From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932957AbcE3IxM (ORCPT ); Mon, 30 May 2016 04:53:12 -0400 Received: from mx1.redhat.com ([209.132.183.28]:59932 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754247AbcE3IxI (ORCPT ); Mon, 30 May 2016 04:53:08 -0400 Date: Mon, 30 May 2016 10:53:02 +0200 From: Jiri Olsa To: He Kuang Cc: peterz@infradead.org, mingo@redhat.com, acme@kernel.org, alexander.shishkin@linux.intel.com, wangnan0@huawei.com, jpoimboe@redhat.com, ak@linux.intel.com, eranian@google.com, namhyung@kernel.org, adrian.hunter@intel.com, sukadev@linux.vnet.ibm.com, masami.hiramatsu.pt@hitachi.com, tumanova@linux.vnet.ibm.com, kan.liang@intel.com, penberg@kernel.org, dsahern@gmail.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH v6 08/11] perf tools: Show warnings for unsupported cross-platform unwind Message-ID: <20160530085302.GD25607@krava> References: <1464436800-39860-1-git-send-email-hekuang@huawei.com> <1464436800-39860-9-git-send-email-hekuang@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1464436800-39860-9-git-send-email-hekuang@huawei.com> User-Agent: Mutt/1.6.1 (2016-04-27) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Mon, 30 May 2016 08:53:07 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > --- > 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