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]
Message-ID: <20160601083936.GC13738@krava>
Date:	Wed, 1 Jun 2016 10:39:36 +0200
From:	Jiri Olsa <jolsa@...hat.com>
To:	He Kuang <hekuang@...wei.com>
Cc:	peterz@...radead.org, mingo@...hat.com, acme@...nel.org,
	alexander.shishkin@...ux.intel.com, wangnan0@...wei.com,
	jpoimboe@...hat.com, ak@...ux.intel.com, eranian@...gle.com,
	namhyung@...nel.org, adrian.hunter@...el.com,
	sukadev@...ux.vnet.ibm.com, masami.hiramatsu.pt@...achi.com,
	tumanova@...ux.vnet.ibm.com, kan.liang@...el.com,
	penberg@...nel.org, dsahern@...il.com, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v7 03/14] perf tools: Introducing struct
 unwind_libunwind_ops for local unwind

On Tue, May 31, 2016 at 11:19:01AM +0000, He Kuang wrote:
> Currently, libunwind operations are fixed, and they are chosen
> according to the host architecture. This will lead a problem that if a
> thread is run as x86_32 on x86_64 machine, perf will use libunwind
> methods for x86_64 to parse the callchain and get wrong result.
> 
> This patch changes the fixed methods of libunwind operations to
> thread/map related, and each thread can have indivadual libunwind
> operations. Local libunwind methods are registered as default value.
> 
> Signed-off-by: He Kuang <hekuang@...wei.com>
> ---
>  tools/perf/util/thread.c           |  6 ++++
>  tools/perf/util/thread.h           |  4 ++-
>  tools/perf/util/unwind-libunwind.c | 58 +++++++++++++++++++++++++++++++++++---
>  tools/perf/util/unwind.h           | 19 +++++++++++++
>  4 files changed, 82 insertions(+), 5 deletions(-)
> 
> diff --git a/tools/perf/util/thread.c b/tools/perf/util/thread.c
> index 45fcb71..95ff1b8 100644
> --- a/tools/perf/util/thread.c
> +++ b/tools/perf/util/thread.c
> @@ -43,6 +43,12 @@ struct thread *thread__new(pid_t pid, pid_t tid)
>  		thread->cpu = -1;
>  		INIT_LIST_HEAD(&thread->comm_list);
>  
> +#ifdef HAVE_LIBUNWIND_SUPPORT
> +		unwind__register_ops(thread, local_unwind_libunwind_ops);
> +#else
> +		unwind__register_ops(thread, NULL);
> +#endif

is it needed to register NULL? it's there by init right?

jirka

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ