lkml.org 
[lkml]   [2016]   [May]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [PATCH v6 10/11] perf callchain: Support x86 target platform
On Sat, May 28, 2016 at 11:59:59AM +0000, He Kuang wrote:

SNIP

> diff --git a/tools/perf/util/unwind-libunwind-local.c b/tools/perf/util/unwind-libunwind-local.c
> index b391e3e..849fec1 100644
> --- a/tools/perf/util/unwind-libunwind-local.c
> +++ b/tools/perf/util/unwind-libunwind-local.c
> @@ -5,7 +5,9 @@
> #include <unistd.h>
> #include <sys/mman.h>
> #include <linux/list.h>
> +#ifndef REMOTE_UNWIND_LIBUNWIND
> #include <libunwind.h>
> +#endif
> #include "callchain.h"
> #include "thread.h"
> #include "session.h"
> @@ -671,7 +673,9 @@ _unwind_libunwind_ops = {
> .get_entries = _unwind__get_entries,
> };
>
> +#ifndef REMOTE_UNWIND_LIBUNWIND
> void register_local_unwind_libunwind_ops(struct thread *thread)
> {
> thread->unwind_libunwind_ops = &_unwind_libunwind_ops;
> }
> +#endif

above hunks should go to separate patch

however I still think it'd be more clear if we separate the code like:

code template - util/unwind-libunwind.c
arch template - arch/x86/util/unwind-libunwind.c

wrapper for local - util/unwind-libunwind-local.c
wrapper for x86_32 - arch/x86/util/unwind-libunwind-x86_32.c
wrapper for arm64 - arch/x86/util/unwind-libunwind-arm64.c

jirka

\
 
 \ /
  Last update: 2016-05-30 11:21    [W:0.103 / U:0.140 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site