diff options
| author | Namhyung Kim <[email protected]> | 2023-11-09 15:59:51 -0800 |
|---|---|---|
| committer | Arnaldo Carvalho de Melo <[email protected]> | 2023-11-28 14:14:53 -0300 |
| commit | d60469d7c0e5c4e8de10699377d2ba79004236a4 (patch) | |
| tree | a78a183918a9f94a9707e535ab10c1522030ea9d /tools/perf/scripts/python | |
| parent | 72108c0b9c0e004d7dfc2fc88b02c30b12711325 (diff) | |
perf dwarf-aux: Add die_find_variable_by_addr()
The die_find_variable_by_addr() is to find a variables in the given DIE
using given (PC-relative) address. Global variables will have a
location expression with DW_OP_addr which has an address so can simply
compare it with the address.
<1><143a7>: Abbrev Number: 2 (DW_TAG_variable)
<143a8> DW_AT_name : loops_per_jiffy
<143ac> DW_AT_type : <0x1cca>
<143b0> DW_AT_external : 1
<143b0> DW_AT_decl_file : 193
<143b1> DW_AT_decl_line : 213
<143b2> DW_AT_location : 9 byte block: 3 b0 46 41 82 ff ff ff ff
(DW_OP_addr: ffffffff824146b0)
Note that the type-offset should be calculated from the base address of
the global variable.
Signed-off-by: Namhyung Kim <[email protected]>
Acked-by: Masami Hiramatsu (Google) <[email protected]>
Cc: Adrian Hunter <[email protected]>
Cc: Andi Kleen <[email protected]>
Cc: Ian Rogers <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: Jiri Olsa <[email protected]>
Cc: Linus Torvalds <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Stephane Eranian <[email protected]>
Cc: [email protected]
Cc: [email protected]
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions