summaryrefslogtreecommitdiff
path: root/tools/perf/util/annotate.c
diff options
context:
space:
mode:
authorNamhyung Kim <namhyung@kernel.org>2024-01-16 22:26:53 -0800
committerNamhyung Kim <namhyung@kernel.org>2024-01-22 12:08:20 -0800
commit83bfa06d08050d03d35004e8579df9718a614100 (patch)
treee3de2dd23ca479481dad56f139b954e4fb9bff8b /tools/perf/util/annotate.c
parent7a54f1d83defa6dd6c25c0851191f6d3a0a42362 (diff)
perf annotate-data: Handle PC-relative addressing
Extend find_data_type_die() to find data type from PC-relative address using die_find_variable_by_addr(). Users need to pass the address for the (global) variable. The offset for the variable should be updated after finding the type because the offset in the instruction is just to calcuate the address for the variable. So it changed to pass a pointer to offset and renamed it to 'poffset'. First it searches variables in the CU DIE as it's likely that the global variables are defined in the file level. And then it iterates the scope DIEs to find a local (static) variable. Reviewed-by: Ian Rogers <irogers@google.com> Cc: Stephane Eranian <eranian@google.com> Cc: Masami Hiramatsu <mhiramat@kernel.org> Link: https://lore.kernel.org/r/20240117062657.985479-6-namhyung@kernel.org Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Diffstat (limited to 'tools/perf/util/annotate.c')
0 files changed, 0 insertions, 0 deletions