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

Namhyung Kim posted 6 patches 1 year, 7 months ago
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(-)
[PATCHSET 0/6] perf annotate-data: Small updates in the data type profiling (v1)
Posted by Namhyung Kim 1 year, 7 months ago
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
Re: [PATCHSET 0/6] perf annotate-data: Small updates in the data type profiling (v1)
Posted by Arnaldo Carvalho de Melo 1 year, 7 months ago
On Wed, May 01, 2024 at 11:00:05PM -0700, Namhyung Kim wrote:
> 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).

Applied locally, doing build tests.

- Arnaldo