Re: [PATCH 32/52] perf dwarf-aux: Add die_find_variable_by_addr()
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- Subject: Re: [PATCH 32/52] perf dwarf-aux: Add die_find_variable_by_addr()
- From: Arnaldo Carvalho de Melo <acme@xxxxxxxxxx>
- Date: Mon, 27 Nov 2023 19:07:53 -0300
- Cc: Jiri Olsa <jolsa@xxxxxxxxxx>, Peter Zijlstra <peterz@xxxxxxxxxxxxx>, Ian Rogers <irogers@xxxxxxxxxx>, Adrian Hunter <adrian.hunter@xxxxxxxxx>, Ingo Molnar <mingo@xxxxxxxxxx>, LKML <linux-kernel@xxxxxxxxxxxxxxx>, linux-perf-users@xxxxxxxxxxxxxxx, Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx>, Stephane Eranian <eranian@xxxxxxxxxx>, Masami Hiramatsu <mhiramat@xxxxxxxxxx>, Andi Kleen <ak@xxxxxxxxxxxxxxx>, linux-trace-devel@xxxxxxxxxxxxxxx, linux-toolchains@xxxxxxxxxxxxxxx
- In-reply-to: <20231110000012.3538610-33-namhyung@kernel.org>
- References: <20231110000012.3538610-1-namhyung@kernel.org> <20231110000012.3538610-33-namhyung@kernel.org>
Em Thu, Nov 09, 2023 at 03:59:51PM -0800, Namhyung Kim escreveu:
> 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.
>
> Acked-by: Masami Hiramatsu (Google) <mhiramat@xxxxxxxxxx>
> Signed-off-by: Namhyung Kim <namhyung@xxxxxxxxxx>
Thanks, applied to perf-tools-next.
- Arnaldo
[Index of Archives]
[Linux USB Development]
[Linux USB Development]
[Linux Audio Users]
[Yosemite Hiking]
[Linux Kernel]
[Linux SCSI]