perf dwarf/libdw extra support, speed and clean ups
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest23 patches 8 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/23 | perf symbol-elf: Fix leak of ELF files with GNU debugdatatools/ | +1 | 0 replies | |
| 2/23 | perf dso: Extra validity checks that e_machine is validtools/ | +21 | 0 replies | |
| 3/23 | perf record: Disable inline frames when marking build IDstools/ | +2 | 0 replies | |
| 4/23 | perf unwind-libdw: fix a cross-arch unwinding bugtools/ tools/ tools/ +16 more | +104 | 2 replies | |
| 5/23 | perf libdw_addr2line: Fixes to srcline memory allocationtools/ | +11 | 0 replies | |
| 6/23 | perf unwind-libdw: Correct argument to dwfl_attach_statetools/ | +1 | 0 replies | |
| 7/23 | perf powerpc: Unify the skip-callchain-idx libdw with that for addr2linetools/ tools/ tools/ +3 more | +89 | 0 replies | |
| 8/23 | perf perf_regs: Switch from arch string to int e_machinetools/ tools/ tools/ +6 more | +164 | 3 replies | |
| 9/23 | perf dwarf-regs: Add util/dwarf-regs-arch for consistency with perf-regstools/ tools/ tools/ +2 more | +4 | 0 replies | |
| 10/23 | perf dwarf-regs: Remove get_arch_regnumtools/ tools/ | +0 | 0 replies | |
| 11/23 | perf dwarf-regs: Clean up x86 dwarf_regnum codetools/ tools/ tools/ | +129 | 0 replies | |
| 12/23 | perf dwarf-regs: Add get_dwarf_regnum_for_perf_regnum and use for x86 unwindingtools/ tools/ tools/ +4 more | +222 | 1 reply | |
| 13/23 | perf dwarf-regs: Add basic get_dwarf_regnum for most architecturestools/ tools/ tools/ | +78 | 0 replies | |
| 14/23 | perf dwarf-regs: Add ARM perf to dwarf register number mapping functionstools/ tools/ tools/ +7 more | +36 | 0 replies | |
| 15/23 | perf dwarf-regs: Add csky perf to dwarf register number mapping functionstools/ tools/ tools/ +4 more | +64 | 0 replies | |
| 16/23 | perf dwarf-regs: Add loongarch perf to dwarf register number mapping functionstools/ tools/ tools/ +5 more | +18 | 0 replies | |
| 17/23 | perf dwarf-regs: Add powerpc perf to dwarf register number mapping functionstools/ tools/ tools/ +4 more | +82 | 0 replies | |
| 18/23 | perf dwarf-regs: Add RISC-V perf to dwarf register number mapping functionstools/ tools/ tools/ +5 more | +18 | 0 replies | |
| 19/23 | perf dwarf-regs: Add S390 perf to dwarf register number mapping functionstools/ tools/ tools/ +5 more | +62 | 0 replies | |
| 20/23 | perf dwarf-regs: Add MIPS perf to dwarf register number mapping functionstools/ tools/ tools/ +2 more | +21 | 0 replies | |
| 21/23 | perf build: Remove NO_LIBDW_DWARF_UNWIND optiontools/ tools/ tools/ | +3 | 0 replies | |
| 22/23 | perf unwind-libdw: Don't discard loaded ELF/Dwarf after every unwindtools/ tools/ tools/ +1 more | +112 | 2 replies | |
| 23/23 | perf machine: Add inline information to frame pointer and LBR callchainstools/ tools/ | +86 | 0 replies |
Reviews trailers per patch
1 of 23 patches has a Reviewed-by or Acked-by.
| Patch | Ian Rogers | Namhyung Kim |
|---|---|---|
| 1/23 | ||
| 2/23 | ||
| 3/23 | ||
| 4/23 | R-b | A-b |
| 5/23 | ||
| 6/23 | ||
| 7/23 | ||
| 8/23 | ||
| 9/23 | ||
| 10/23 | ||
| 11/23 | ||
| 12/23 | ||
| 13/23 | ||
| 14/23 | ||
| 15/23 | ||
| 16/23 | ||
| 17/23 | ||
| 18/23 | ||
| 19/23 | ||
| 20/23 | ||
| 21/23 | ||
| 22/23 | ||
| 23/23 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v1 00/23] perf dwarf/libdw extra support, speed and clean ups
The first 6 patches are minor tweaks addressing a memory leak, correctness and performance. Patch 5 incorportes the reviewed patch by Shimin Guo [1] that makes the libdw unwinding support cross architecture. The cross architecture files will be refactored in this series.
Patch 7 unifies the dwfl for dsos and addr2line with that for the powerpc skip-callchain-idx. An issue described in:
https://lore.kernel.org/lkml/CAP-5=fX+zw-CUEYEtrPA6vYUKqpp4LZp-p==QsbZaNwLcX0Whw@mail.gmail.com/
Patch 8 migrates the perf regs code away from using an architecture substring to using the ELF machine, which is both more efficient and more accurate.
Patches 9 to 21 clean up the libdw and dwarf register code removing the need for different libdw dwarf register initialization routines by introducing a perf reg to dwarf register mapping function. This function is added for all perf register supporting architectures.
Patch 22 avoids discarding the dwfl for every libdw unwind, it can speed up perf report by amounts like 18x.
Patch 23 adds inline information for frame pointers, an issue described here:
https://lore.kernel.org/lkml/CAP-5=fWh5=AWq_Mav7B9nsuZ0TS2qPMMAwYhQKpt_BYFJRnf2w@mail.gmail.com/
[1] https://lore.kernel.org/lkml/[email protected]/
Ian Rogers (22):
perf symbol-elf: Fix leak of ELF files with GNU debugdata perf dso: Extra validity checks that e_machine is valid perf record: Disable inline frames when marking build IDs perf libdw_addr2line: Fixes to srcline memory allocation perf unwind-libdw: Correct argument to dwfl_attach_state perf powerpc: Unify the skip-callchain-idx libdw with that for
addr2line
perf perf_regs: Switch from arch string to int e_machine perf dwarf-regs: Add util/dwarf-regs-arch for consistency with
perf-regs
perf dwarf-regs: Remove get_arch_regnum
perf dwarf-regs: Clean up x86 dwarf_regnum code
perf dwarf-regs: Add get_dwarf_regnum_for_perf_regnum and use for x86
unwinding
perf dwarf-regs: Add basic get_dwarf_regnum for most architectures perf dwarf-regs: Add ARM perf to dwarf register number mapping
functions
perf dwarf-regs: Add csky perf to dwarf register number mapping
functions
perf dwarf-regs: Add loongarch perf to dwarf register number mapping
functions
perf dwarf-regs: Add powerpc perf to dwarf register number mapping
functions
perf dwarf-regs: Add RISC-V perf to dwarf register number mapping
functions
perf dwarf-regs: Add S390 perf to dwarf register number mapping
functions
perf dwarf-regs: Add MIPS perf to dwarf register number mapping
functions
perf build: Remove NO_LIBDW_DWARF_UNWIND option
perf unwind-libdw: Don't discard loaded ELF/Dwarf after every unwind perf machine: Add inline information to frame pointer and LBR
callchains
Shimin Guo (1):
perf unwind-libdw: fix a cross-arch unwinding bug
tools/perf/Makefile.config | 19 +- tools/perf/arch/arm/util/Build | 1 - tools/perf/arch/arm/util/unwind-libdw.c | 39 --- tools/perf/arch/arm64/util/Build | 1 - tools/perf/arch/arm64/util/unwind-libdw.c | 61 ---- tools/perf/arch/csky/util/Build | 2 - tools/perf/arch/csky/util/unwind-libdw.c | 78 ------ tools/perf/arch/loongarch/util/unwind-libdw.c | 57 ---- tools/perf/arch/powerpc/util/Build | 1 - .../arch/powerpc/util/skip-callchain-idx.c | 52 +--- tools/perf/arch/powerpc/util/unwind-libdw.c | 76 ----- tools/perf/arch/riscv/util/Build | 1 - tools/perf/arch/riscv/util/unwind-libdw.c | 58 ---- tools/perf/arch/s390/util/Build | 2 - tools/perf/arch/s390/util/unwind-libdw.c | 65 ----- tools/perf/arch/x86/util/Build | 1 - tools/perf/arch/x86/util/unwind-libdw.c | 54 ---- tools/perf/builtin-record.c | 3 +- tools/perf/builtin-script.c | 17 +- tools/perf/tests/make | 3 +- tools/perf/tests/shell/addr2line_inlines.sh | 31 ++- tools/perf/util/Build | 6 +- tools/perf/util/dso.c | 33 ++- tools/perf/util/dso.h | 23 +- tools/perf/util/dwarf-regs-arch/Build | 9 + .../util/dwarf-regs-arch/dwarf-regs-arm.c | 12 + .../util/dwarf-regs-arch/dwarf-regs-arm64.c | 12 + .../util/dwarf-regs-arch/dwarf-regs-csky.c | 126 +++++++++ .../dwarf-regs-arch/dwarf-regs-loongarch.c | 12 + .../util/dwarf-regs-arch/dwarf-regs-mips.c | 14 + .../util/dwarf-regs-arch/dwarf-regs-powerpc.c | 136 +++++++++ .../util/dwarf-regs-arch/dwarf-regs-riscv.c | 12 + .../util/dwarf-regs-arch/dwarf-regs-s390.c | 53 ++++ .../util/dwarf-regs-arch/dwarf-regs-x86.c | 260 ++++++++++++++++++ tools/perf/util/dwarf-regs-csky.c | 50 ---- tools/perf/util/dwarf-regs-powerpc.c | 61 ---- tools/perf/util/dwarf-regs-x86.c | 50 ---- tools/perf/util/dwarf-regs.c | 151 +++++++++- tools/perf/util/evsel.c | 14 +- tools/perf/util/include/dwarf-regs.h | 28 +- tools/perf/util/libdw.c | 115 ++++---- tools/perf/util/libdw.h | 12 +- tools/perf/util/machine.c | 104 ++++--- tools/perf/util/maps.c | 36 ++- tools/perf/util/maps.h | 4 + tools/perf/util/perf_regs.c | 105 ++++--- tools/perf/util/perf_regs.h | 10 +- .../scripting-engines/trace-event-python.c | 21 +- tools/perf/util/session.c | 65 +++-- tools/perf/util/session.h | 1 + tools/perf/util/srcline.c | 2 +- tools/perf/util/symbol-elf.c | 2 +- tools/perf/util/unwind-libdw.c | 154 +++++++++-- tools/perf/util/unwind-libdw.h | 10 +- tools/perf/util/unwind-libunwind-local.c | 7 +- 55 files changed, 1347 insertions(+), 985 deletions(-) delete mode 100644 tools/perf/arch/arm/util/unwind-libdw.c delete mode 100644 tools/perf/arch/arm64/util/unwind-libdw.c delete mode 100644 tools/perf/arch/csky/util/unwind-libdw.c delete mode 100644 tools/perf/arch/loongarch/util/unwind-libdw.c delete mode 100644 tools/perf/arch/powerpc/util/unwind-libdw.c delete mode 100644 tools/perf/arch/riscv/util/unwind-libdw.c delete mode 100644 tools/perf/arch/s390/util/unwind-libdw.c delete mode 100644 tools/perf/arch/x86/util/unwind-libdw.c create mode 100644 tools/perf/util/dwarf-regs-arch/Build create mode 100644 tools/perf/util/dwarf-regs-arch/dwarf-regs-arm.c create mode 100644 tools/perf/util/dwarf-regs-arch/dwarf-regs-arm64.c create mode 100644 tools/perf/util/dwarf-regs-arch/dwarf-regs-csky.c create mode 100644 tools/perf/util/dwarf-regs-arch/dwarf-regs-loongarch.c create mode 100644 tools/perf/util/dwarf-regs-arch/dwarf-regs-mips.c create mode 100644 tools/perf/util/dwarf-regs-arch/dwarf-regs-powerpc.c create mode 100644 tools/perf/util/dwarf-regs-arch/dwarf-regs-riscv.c create mode 100644 tools/perf/util/dwarf-regs-arch/dwarf-regs-s390.c create mode 100644 tools/perf/util/dwarf-regs-arch/dwarf-regs-x86.c delete mode 100644 tools/perf/util/dwarf-regs-csky.c delete mode 100644 tools/perf/util/dwarf-regs-powerpc.c delete mode 100644 tools/perf/util/dwarf-regs-x86.c
Signature · 1 line
2.52.0.457.g6b5491de43-goog