Messages in this thread Patch in this message | | | Date | Mon, 30 May 2016 10:53:02 +0200 | From | Jiri Olsa <> | Subject | Re: [PATCH v6 08/11] perf tools: Show warnings for unsupported cross-platform unwind |
| |
On Sat, May 28, 2016 at 11:59:57AM +0000, He Kuang wrote: > Currently, perf script uses host unwind methods to parse perf.data > callchain info regardless of the target architecture. So we get wrong > result without any warnings when unwinding callchains of x86(32-bit) > on x86(64-bit) machine. > > This patch shows warning messages when we do remote unwind x86(32-bit) > on other machines. Same thing for other platforms will be added in > next patches. > > Signed-off-by: He Kuang <hekuang@huawei.com> > --- > tools/perf/config/Makefile | 8 ++++++++ > tools/perf/util/thread.c | 2 +- > tools/perf/util/unwind-libunwind.c | 30 +++++++++++++++++++++++++++++- > tools/perf/util/unwind.h | 5 +++-- > 4 files changed, 41 insertions(+), 4 deletions(-) > > diff --git a/tools/perf/config/Makefile b/tools/perf/config/Makefile > index 3a304a3..e156f76 100644 > --- a/tools/perf/config/Makefile > +++ b/tools/perf/config/Makefile > @@ -355,6 +355,14 @@ endif > > ifndef NO_LIBUNWIND > have_libunwind := > + > + ifeq ($(feature-libunwind-x86), 1) > + $(call detected,CONFIG_LIBUNWIND_X86) > + CFLAGS += -DHAVE_LIBUNWIND_X86_SUPPORT > + LDFLAGS += -lunwind-x86 > + have_libunwind = 1 > + endif
this hunk together with the ifdef in unwind__prepare_access should go to patch:
perf callchain: Support x86 target platform
thanks jirka
SNIP
> + arch = normalize_arch(thread->mg->machine->env->arch); > + > + if (!strcmp(arch, "x86")) { > + if (dso_type != DSO__TYPE_64BIT) > +#ifdef HAVE_LIBUNWIND_X86_SUPPORT > + pr_err("unwind: target platform=%s is not implemented\n", arch); > +#else > + pr_err("unwind: target platform=%s is not supported\n", arch); > +#endif SNIP
| |