lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 12 Oct 2015 15:35:20 +0200
From:	Jiri Olsa <jolsa@...hat.com>
To:	Namhyung Kim <namhyung@...nel.org>
Cc:	Arnaldo Carvalho de Melo <acme@...nel.org>,
	Ingo Molnar <mingo@...nel.org>,
	Peter Zijlstra <a.p.zijlstra@...llo.nl>,
	LKML <linux-kernel@...r.kernel.org>,
	Frederic Weisbecker <fweisbec@...il.com>,
	Stephane Eranian <eranian@...gle.com>,
	David Ahern <dsahern@...il.com>,
	Andi Kleen <andi@...stfloor.org>
Subject: Re: [RFC/PATCH 18/38] perf tools: Introduce
 thread__find_addr_location_by_time() and friends

On Fri, Oct 02, 2015 at 02:18:59PM +0900, Namhyung Kim wrote:

SNIP

> +void thread__find_addr_map(struct thread *thread, u8 cpumode,
> +			   enum map_type type, u64 addr,
> +			   struct addr_location *al)
> +{
> +	al->thread = thread;
> +	map_groups__find_addr_map(thread->mg, cpumode, type, addr, al);
> +}
> +
> +void thread__find_addr_map_by_time(struct thread *thread, u8 cpumode,
> +				   enum map_type type, u64 addr,
> +				   struct addr_location *al, u64 timestamp)
> +{
> +	struct map_groups *mg;
> +
> +	if (perf_has_index)
> +		mg = thread__get_map_groups(thread, timestamp);
> +	else
> +		mg = thread->mg;
> +
> +	al->thread = thread;
> +	map_groups__find_addr_map(mg, cpumode, type, addr, al);
> +}
> +
>  void thread__find_addr_location(struct thread *thread,
>  				u8 cpumode, enum map_type type, u64 addr,
>  				struct addr_location *al)
> @@ -985,6 +1006,23 @@ void thread__find_addr_location(struct thread *thread,
>  		al->sym = NULL;
>  }
>  
> +void thread__find_addr_location_by_time(struct thread *thread, u8 cpumode,
> +					enum map_type type, u64 addr,
> +					struct addr_location *al, u64 timestamp)
> +{
> +	if (perf_has_index)
> +		thread__find_addr_map_by_time(thread, cpumode, type, addr, al,
> +					      timestamp);
> +	else
> +		thread__find_addr_map(thread, cpumode, type, addr, al);

hum, we make the 'perf_has_index' decision here and also in
thread__find_addr_map_by_time which seems to have the same code
as thread__find_addr_map for !perf_has_index case

it seems redundant to have both original and _by_time versions
why not just thread__find_cpumode_addr_location with time arg?

also how about other callers of original versions like
thread__find_addr_location call in util/unwind-libunwind.c ?

jirka
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ