From: He Kuang <hekuang@huawei.com>
To: <peterz@infradead.org>, <mingo@redhat.com>, <acme@kernel.org>,
<alexander.shishkin@linux.intel.com>, <jolsa@redhat.com>,
<wangnan0@huawei.com>, <hekuang@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>
Cc: <linux-kernel@vger.kernel.org>
Subject: [PATCH v2 0/9] Add support for remote unwind
Date: Tue, 10 May 2016 07:40:28 +0000 [thread overview]
Message-ID: <1462866037-30382-1-git-send-email-hekuang@huawei.com> (raw)
v1 url:
http://thread.gmane.org/gmane.linux.kernel/2216256
Currently, perf script uses host unwind methods(local unwind) 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.
This patchset adds build tests for the supported platforms for remote
unwinding, and checks whether a dso is 32-bit or 64-bit according to
elf class info for each thread to let perf use the correct remote
unwind methods instead.
Only x86 and aarch64 is added in this patchset to show the work flow,
other platforms can be added easily.
We can see the right result for unwind info on different machines, for
example: perf.data recorded on i686 qemu with '-g' option and parsed
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)
v2:
- Explain the reason why we can omit dwarf judgement when recording
in commit message.
- Elaborate on why we need to add a custom vdso path option, and
change the type name to DSO_BINARY_TYPE__VDSO.
- Hide the build tests status for cross platform unwind.
- Keep generic version of libunwind-debug-frame test.
- Put 32/64-bit test functions into separate patch.
- Extract unwind related functions to unwind-libunwind.c and add new
file for common parts used by both local and remote unwind.
- Eliminate most of the ifdefs in .c file.
Thanks.
He Kuang (9):
perf tools: Omit DWARF judgement when recording dwarf callchain
perf script: Add options for custom vdso path
perf build: Add build-test for libunwind cross-platforms support
perf build: Add build-test for debug-frame on arm/arm64
perf tools: Add methods to test dso is 64-bit or 32-bit
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 | 8 +-
tools/build/feature/Makefile | 23 +++++
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-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 | 7 +-
tools/perf/util/thread.h | 14 ++-
tools/perf/util/unwind-libunwind.c | 49 +++++++--
tools/perf/util/unwind-libunwind_common.c | 113 +++++++++++++++++++++
tools/perf/util/unwind.h | 48 +++++++--
tools/perf/util/util.c | 2 -
26 files changed, 585 insertions(+), 28 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
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
next reply other threads:[~2016-05-10 7:41 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-10 7:40 He Kuang [this message]
2016-05-10 7:40 ` [PATCH v2 1/9] perf tools: Omit DWARF judgement when recording dwarf callchain He Kuang
2016-05-10 13:45 ` Arnaldo Carvalho de Melo
2016-05-10 7:40 ` [PATCH v2 2/9] perf script: Add options for custom vdso path He Kuang
2016-05-10 13:44 ` Arnaldo Carvalho de Melo
2016-05-11 1:33 ` Hekuang
2016-05-10 7:40 ` [PATCH v2 3/9] perf build: Add build-test for libunwind cross-platforms support He Kuang
2016-05-11 11:52 ` Jiri Olsa
2016-05-11 13:24 ` Arnaldo Carvalho de Melo
2016-05-12 10:23 ` [tip:perf/core] " tip-bot for He Kuang
2016-05-10 7:40 ` [PATCH v2 4/9] perf build: Add build-test for debug-frame on arm/arm64 He Kuang
2016-05-11 11:58 ` Jiri Olsa
2016-05-11 13:24 ` Arnaldo Carvalho de Melo
2016-05-12 10:24 ` [tip:perf/core] " tip-bot for He Kuang
2016-05-10 7:40 ` [PATCH v2 5/9] perf tools: Add methods to test dso is 64-bit or 32-bit He Kuang
2016-05-10 8:08 ` Adrian Hunter
2016-05-10 9:49 ` Hekuang
2016-05-10 10:34 ` Adrian Hunter
2016-05-10 11:38 ` Hekuang
2016-05-10 11:59 ` Adrian Hunter
2016-05-10 12:29 ` Hekuang
2016-05-10 7:40 ` [PATCH v2 6/9] perf tools: Promote proper messages for cross-platform unwind He Kuang
2016-05-10 7:40 ` [PATCH v2 7/9] perf callchain: Add support " He Kuang
2016-05-10 7:40 ` [PATCH v2 8/9] perf callchain: Support x86 target platform He Kuang
2016-05-10 7:40 ` [PATCH v2 9/9] perf callchain: Support aarch64 cross-platform He Kuang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1462866037-30382-1-git-send-email-hekuang@huawei.com \
--to=hekuang@huawei.com \
--cc=acme@kernel.org \
--cc=adrian.hunter@intel.com \
--cc=ak@linux.intel.com \
--cc=alexander.shishkin@linux.intel.com \
--cc=dsahern@gmail.com \
--cc=eranian@google.com \
--cc=jolsa@redhat.com \
--cc=jpoimboe@redhat.com \
--cc=kan.liang@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=masami.hiramatsu.pt@hitachi.com \
--cc=mingo@redhat.com \
--cc=namhyung@kernel.org \
--cc=penberg@kernel.org \
--cc=peterz@infradead.org \
--cc=sukadev@linux.vnet.ibm.com \
--cc=tumanova@linux.vnet.ibm.com \
--cc=wangnan0@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®