linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/4] perf: parse the dwarf backtrace info from .debug_frame section
@ 2013-09-16  9:17 Jean Pihet
  2013-09-16  9:17 ` [PATCH 1/4] ARM: perf: add support for perf registers API Jean Pihet
                   ` (3 more replies)
  0 siblings, 4 replies; 17+ messages in thread
From: Jean Pihet @ 2013-09-16  9:17 UTC (permalink / raw)
  To: linux-arm-kernel

On ARM the debug info is not present in the .eh_frame sections but
in .debug_frame instead, in dwarf format.

This patch set uses libunwind to load and parse the dwarf debug info from
the .debug_frame section if no .eh_frame_hdr section is found; also it
sets the hooks in the perf_regs and libunwind code for ARMv7.

Dependencies:
 . if present, libunwind >= 1.1 is needed to prevent a segfault when
   parsing the dwarf info,
 . libunwind needs to be configured with --enable-debug-frame
   to prevent a linkage error. Note: --enable-debug-frame is automatically
   selected on ARM).

The generated perf has been tested on ARMv7 (OMAP4, Marvell Armada XP) and
x86_64, using the following commands:
 perf record -g [dwarf] -- <binary>
 perf report --sort symbol --call-graph --stdio


Jean Pihet (2):
  perf tools: Check libunwind for availability of dwarf parsing feature
  perf: parse the .debug_frame section in case .eh_frame is not present

Will Deacon (2):
  ARM: perf: add support for perf registers API
  ARM: perf: wire up perf_regs and unwind support for ARM

 arch/arm/Kconfig                        |  2 +
 arch/arm/include/uapi/asm/Kbuild        |  1 +
 arch/arm/include/uapi/asm/perf_regs.h   | 23 +++++++++++
 arch/arm/kernel/Makefile                |  1 +
 arch/arm/kernel/perf_regs.c             | 30 ++++++++++++++
 tools/perf/arch/arm/Makefile            |  3 ++
 tools/perf/arch/arm/include/perf_regs.h | 54 +++++++++++++++++++++++++
 tools/perf/arch/arm/util/unwind.c       | 48 ++++++++++++++++++++++
 tools/perf/config/Makefile              |  7 +++-
 tools/perf/config/feature-tests.mak     | 11 ++++-
 tools/perf/util/unwind.c                | 71 +++++++++++++++++++++++++--------
 11 files changed, 232 insertions(+), 19 deletions(-)
 create mode 100644 arch/arm/include/uapi/asm/perf_regs.h
 create mode 100644 arch/arm/kernel/perf_regs.c
 create mode 100644 tools/perf/arch/arm/include/perf_regs.h
 create mode 100644 tools/perf/arch/arm/util/unwind.c

-- 
1.7.11.7

^ permalink raw reply	[flat|nested] 17+ messages in thread
* [PATCH v3 0/4] perf: parse the dwarf backtrace info from .debug_frame section
@ 2013-09-26 11:36 Jean Pihet
  2013-09-26 11:36 ` [PATCH 2/4] ARM: perf: wire up perf_regs and unwind support for ARM Jean Pihet
  0 siblings, 1 reply; 17+ messages in thread
From: Jean Pihet @ 2013-09-26 11:36 UTC (permalink / raw)
  To: linux-arm-kernel

On ARM the debug info is not present in the .eh_frame sections but
in .debug_frame instead, in dwarf format.

This patch set uses libunwind to load and parse the dwarf debug info from
the .debug_frame section if no .eh_frame_hdr section is found; also it
sets the hooks in the perf_regs and libunwind code for ARMv7.

Dependencies:
 . if present, libunwind >= 1.1 is needed to prevent a segfault when
   parsing the dwarf info,
 . libunwind needs to be configured with --enable-debug-frame. Note:
   --enable-debug-frame is automatically selected on ARM.

The generated perf binary has been tested on ARMv7 (OMAP4, Marvell
Armada XP) and x86_64, using the following commands:
 perf record -g [dwarf] -- <binary>
 perf report --sort symbol --call-graph --stdio


Jean Pihet (2):
  perf tools: Check libunwind for availability of dwarf parsing feature
  perf: parse the .debug_frame section in case .eh_frame is not present

Will Deacon (2):
  ARM: perf: add support for perf registers API
  ARM: perf: wire up perf_regs and unwind support for ARM

 arch/arm/Kconfig                        |  2 +
 arch/arm/include/uapi/asm/Kbuild        |  1 +
 arch/arm/include/uapi/asm/perf_regs.h   | 23 ++++++++++
 arch/arm/kernel/Makefile                |  1 +
 arch/arm/kernel/perf_regs.c             | 30 +++++++++++++
 tools/perf/arch/arm/Makefile            |  3 ++
 tools/perf/arch/arm/include/perf_regs.h | 54 ++++++++++++++++++++++++
 tools/perf/arch/arm/util/unwind.c       | 48 +++++++++++++++++++++
 tools/perf/config/Makefile              | 13 ++++--
 tools/perf/config/feature-tests.mak     | 21 ++++++++-
 tools/perf/util/unwind.c                | 75 ++++++++++++++++++++++++++-------
 11 files changed, 251 insertions(+), 20 deletions(-)
 create mode 100644 arch/arm/include/uapi/asm/perf_regs.h
 create mode 100644 arch/arm/kernel/perf_regs.c
 create mode 100644 tools/perf/arch/arm/include/perf_regs.h
 create mode 100644 tools/perf/arch/arm/util/unwind.c

-- 
1.7.11.7

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

end of thread, other threads:[~2013-09-30 16:01 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-16  9:17 [PATCH v2 0/4] perf: parse the dwarf backtrace info from .debug_frame section Jean Pihet
2013-09-16  9:17 ` [PATCH 1/4] ARM: perf: add support for perf registers API Jean Pihet
2013-09-16  9:17 ` [PATCH 2/4] ARM: perf: wire up perf_regs and unwind support for ARM Jean Pihet
2013-09-16  9:17 ` [PATCH 3/4] perf tools: Check libunwind for availability of dwarf parsing feature Jean Pihet
2013-09-17 10:29   ` Will Deacon
2013-09-24  8:55     ` Jean Pihet
2013-09-24  9:34       ` Jiri Olsa
2013-09-24 10:06         ` Will Deacon
2013-09-24 12:03           ` Jean Pihet
2013-09-24 17:43             ` Jiri Olsa
2013-09-25  6:53               ` Jean Pihet
2013-09-25  7:31                 ` Jiri Olsa
2013-09-26 11:39                   ` Jean Pihet
2013-09-24 17:12     ` Arnaldo Carvalho de Melo
2013-09-30 16:01       ` Will Deacon
2013-09-16  9:17 ` [PATCH 4/4] perf: parse the .debug_frame section in case .eh_frame is not present Jean Pihet
  -- strict thread matches above, loose matches on Subject: below --
2013-09-26 11:36 [PATCH v3 0/4] perf: parse the dwarf backtrace info from .debug_frame section Jean Pihet
2013-09-26 11:36 ` [PATCH 2/4] ARM: perf: wire up perf_regs and unwind support for ARM Jean Pihet

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).