From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932176AbcEFL6W (ORCPT ); Fri, 6 May 2016 07:58:22 -0400 Received: from mail.kernel.org ([198.145.29.136]:41232 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751306AbcEFL6U (ORCPT ); Fri, 6 May 2016 07:58:20 -0400 Date: Fri, 6 May 2016 08:58:15 -0300 From: Arnaldo Carvalho de Melo To: He Kuang , Jiri Olsa Cc: peterz@infradead.org, Ingo Molnar , alexander.shishkin@linux.intel.com, jolsa@redhat.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 0/8] Add support for remote unwind Message-ID: <20160506115815.GW11069@kernel.org> References: <1462525154-125656-1-git-send-email-hekuang@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1462525154-125656-1-git-send-email-hekuang@huawei.com> X-Url: http://acmel.wordpress.com User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Em Fri, May 06, 2016 at 08:59:06AM +0000, He Kuang escreveu: > Currently, perf script uses host unwind methods to parse perf.data > callchain info regardless of the target architecture. So we get wrong > result and no promotion when do remote unwind on other > platforms/machines. Thanks for working on this, being able to record on one machine and do analysis in another, of a different hw architectures is indeed a goal for the perf tools! Jiri, if you could please take a look, that would be really great! - Arnaldo > This patch set adds build tests for the supported platforms for remote > unwinding, and checks the map elf info for each thread, use remote > unwind methods instead. > > Only x86 and aarch64 is added in this patch set to show the work flow, > other platforms can be added easily. > > We can see the right result for unwind infos on different machines, > for example: we record perf.data on i686 qemu with '-g' option and > parse it on x86_64 machine. > > before this patchset: > > hello 1071 [000] 417.567832: probe:sys_close: (c1169d60) > c1169d61 sys_close ([kernel.kallsyms]) > c189c0d7 sysenter_past_esp ([kernel.kallsyms]) > b77c8ba9 [unknown] ([vdso32]) > > after: > > hello 1071 [000] 417.567832: probe:sys_close: (c1169d60) > c1169d61 sys_close ([kernel.kallsyms]) > c189c0d7 sysenter_past_esp ([kernel.kallsyms]) > b77c8ba9 [unknown] ([vdso32]) > b76e51cc close (/lib/libc-2.22.so) > 804842e fib (/tmp/hello) > 804849d main (/tmp/hello) > b762546e __libc_start_main (/lib/libc-2.22.so) > 8048341 _start (/tmp/hello) > > Thanks, discussion welcomed. > > He Kuang (8): > perf tools: Omit DWARF judgement when recording dwarf callchain > perf script: Add options for custom vdso name > perf build: Add build-test for libunwind cross-platforms support > perf build: Add build-test for debug-frame on arm/arm64 > perf tools: Promote proper messages for cross-platform unwind > perf callchain: Add support for cross-platform unwind > perf callchain: Support x86 target platform > perf callchain: Support aarch64 cross-platform > > tools/build/Makefile.feature | 11 +++- > tools/build/feature/Makefile | 26 +++++++- > tools/build/feature/test-libunwind-aarch64.c | 26 ++++++++ > tools/build/feature/test-libunwind-arm.c | 27 +++++++++ > .../feature/test-libunwind-debug-frame-aarch64.c | 16 +++++ > .../build/feature/test-libunwind-debug-frame-arm.c | 16 +++++ > tools/build/feature/test-libunwind-debug-frame.c | 16 ----- > tools/build/feature/test-libunwind-x86.c | 27 +++++++++ > tools/build/feature/test-libunwind-x86_64.c | 27 +++++++++ > .../arch/arm64/include/libunwind/libunwind-arch.h | 18 ++++++ > tools/perf/arch/arm64/util/unwind-libunwind.c | 5 +- > .../arch/x86/include/libunwind/libunwind-arch.h | 18 ++++++ > tools/perf/arch/x86/util/unwind-libunwind.c | 42 +++++++++++++ > tools/perf/builtin-script.c | 2 + > tools/perf/config/Makefile | 35 ++++++++++- > tools/perf/util/Build | 13 +++- > tools/perf/util/dso.c | 7 +++ > tools/perf/util/dso.h | 1 + > tools/perf/util/symbol-elf.c | 16 +++++ > tools/perf/util/symbol.c | 50 ++++++++++++++++ > tools/perf/util/symbol.h | 3 + > tools/perf/util/thread.c | 70 ++++++++++++++++++++-- > tools/perf/util/thread.h | 14 ++++- > tools/perf/util/unwind-libunwind.c | 50 +++++++++++++--- > tools/perf/util/unwind-libunwind_common.c | 60 +++++++++++++++++++ > tools/perf/util/unwind.h | 30 ++++++++++ > tools/perf/util/util.c | 2 - > 27 files changed, 589 insertions(+), 39 deletions(-) > create mode 100644 tools/build/feature/test-libunwind-aarch64.c > create mode 100644 tools/build/feature/test-libunwind-arm.c > create mode 100644 tools/build/feature/test-libunwind-debug-frame-aarch64.c > create mode 100644 tools/build/feature/test-libunwind-debug-frame-arm.c > delete mode 100644 tools/build/feature/test-libunwind-debug-frame.c > create mode 100644 tools/build/feature/test-libunwind-x86.c > create mode 100644 tools/build/feature/test-libunwind-x86_64.c > create mode 100644 tools/perf/arch/arm64/include/libunwind/libunwind-arch.h > create mode 100644 tools/perf/arch/x86/include/libunwind/libunwind-arch.h > create mode 100644 tools/perf/util/unwind-libunwind_common.c > > -- > 1.8.5.2