Skip to content

perf tools: Random fixes for DWARF unwind

Namhyung Kim linux-perf-users lkml 1 version Applied

Status from this message: Thanks, applied to perf-tools-next.

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 8 repliesApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/3perf genelf: Set ELF program header addresses properlytools/perf/util/genelf.c+3 -31 reply
2/3perf unwind-libdw: Handle JIT-generated DSOs properlytools/perf/util/unwind-libdw.c+17 -42 replies
3/3perf unwind-libunwind: Fix base address for .eh_frametools/perf/util/unwind-libunwind-local.c+1 -11 reply

Reviews trailers per patch

2 of 3 patches have a Reviewed-by or Acked-by.

PatchIan Rogers
1/3R-b
2/3
3/3R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/3] perf tools: Random fixes for DWARF unwind

Hello,

I've found a couple of issues on the unwind code while I'm playing with the JIT-dump code for the CPython. The code assumes normal DSOs mapped from the beginning of the file and aligned to the page size. But it's not true for the JIT-dumped DSOs which are generated for each function.

Depending on the JIT implementation, the code address and accompanied ELF info (like ELF file headers and unwind info) can be overlapped to adjacent (JIT-dumped) DSOs. So it should take more care when it calculates the mapping address for the DSO.

It seems these changes need to go to the stable trees but they are changed a lot since then so I'm not sure.

Thanks,
Namhyung

Namhyung Kim (3):
perf genelf: Set ELF program header addresses properly perf unwind-libdw: Handle JIT-generated DSOs properly perf unwind-libunwind: Fix base address for .eh_frame

 tools/perf/util/genelf.c                 |  6 +++---
 tools/perf/util/unwind-libdw.c           | 21 +++++++++++++++++----
 tools/perf/util/unwind-libunwind-local.c |  2 +-
 3 files changed, 21 insertions(+), 8 deletions(-)
Signature · 1 line
2.43.0.472.g3155946c3a-goog