[PATCHSET 0/6] perf annotate-data: Small updates in the data type profiling (v1)

From: Namhyung Kim
Date: Thu May 02 2024 - 02:00:24 EST


Hello,

This is a mix of bug fixes and optimization in the data type profiling.

Firstly it now caches global variables and looks them up by address later.
This will be good for performance as well as improves the success rates
because some variables are defined in a separate file (compile unit) and
has no info in the call site for some reason.

Also it properly checks instructions that use more than one register for
a memory access like x86 SIB addressing. And check the type of stack
variables correctly and discard constant values (without type info).

Thanks,
Namhyung


Namhyung Kim (6):
perf dwarf-aux: Add die_collect_global_vars()
perf annotate-data: Collect global variables in advance
perf annotate-data: Handle direct global variable access
perf annotate-data: Check memory access with two registers
perf annotate-data: Handle multi regs in find_data_type_block()
perf annotate-data: Check kind of stack variables

tools/perf/util/annotate-data.c | 157 ++++++++++++++++++++++++++------
tools/perf/util/dwarf-aux.c | 62 +++++++++++++
tools/perf/util/dwarf-aux.h | 8 ++
3 files changed, 197 insertions(+), 30 deletions(-)

--
2.45.0.rc1.225.g2a3ae87e7f-goog