All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/8] Add support for remote unwind
@ 2016-05-06  8:59 He Kuang
  2016-05-06  8:59 ` [PATCH 1/8] perf tools: Omit DWARF judgement when recording dwarf callchain He Kuang
                   ` (8 more replies)
  0 siblings, 9 replies; 22+ messages in thread
From: He Kuang @ 2016-05-06  8:59 UTC (permalink / raw)
  To: peterz, mingo, acme, alexander.shishkin, jolsa, wangnan0,
	hekuang, jpoimboe, ak, eranian, namhyung, adrian.hunter, sukadev,
	masami.hiramatsu.pt, tumanova, kan.liang, penberg, dsahern
  Cc: linux-kernel

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.

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

^ permalink raw reply	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2016-05-10 20:31 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-06  8:59 [PATCH 0/8] Add support for remote unwind He Kuang
2016-05-06  8:59 ` [PATCH 1/8] perf tools: Omit DWARF judgement when recording dwarf callchain He Kuang
2016-05-06 11:47   ` Arnaldo Carvalho de Melo
2016-05-07 18:03   ` Jiri Olsa
2016-05-09 16:16     ` Arnaldo Carvalho de Melo
2016-05-10  1:44       ` Hekuang
2016-05-10 20:30   ` [tip:perf/core] perf callchain: Recording 'dwarf' callchains do not need DWARF unwinding support tip-bot for He Kuang
2016-05-06  8:59 ` [PATCH 2/8] perf script: Add options for custom vdso name He Kuang
2016-05-06 11:49   ` Arnaldo Carvalho de Melo
2016-05-07 18:14   ` Jiri Olsa
2016-05-06  8:59 ` [PATCH 3/8] perf build: Add build-test for libunwind cross-platforms support He Kuang
2016-05-07 18:20   ` Jiri Olsa
2016-05-06  8:59 ` [PATCH 4/8] perf build: Add build-test for debug-frame on arm/arm64 He Kuang
2016-05-07 18:24   ` Jiri Olsa
2016-05-06  8:59 ` [PATCH 5/8] perf tools: Promote proper messages for cross-platform unwind He Kuang
2016-05-07 18:41   ` Jiri Olsa
2016-05-07 18:42   ` Jiri Olsa
2016-05-06  8:59 ` [PATCH 6/8] perf callchain: Add support " He Kuang
2016-05-06 11:56   ` Arnaldo Carvalho de Melo
2016-05-06  8:59 ` [PATCH 7/8] perf callchain: Support x86 target platform He Kuang
2016-05-06  8:59 ` [PATCH 8/8] perf callchain: Support aarch64 cross-platform He Kuang
2016-05-06 11:58 ` [PATCH 0/8] Add support for remote unwind Arnaldo Carvalho de Melo

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.