]> git.itanic.dy.fi Git - linux-stable/commit
perf dwarf-aux: Add die_get_scopes() alternative to dwarf_getscopes()
authorNamhyung Kim <namhyung@kernel.org>
Thu, 9 Nov 2023 23:59:25 +0000 (15:59 -0800)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Fri, 10 Nov 2023 12:04:08 +0000 (09:04 -0300)
commit981620fd2776c45a514ed621a718e2a6941ad7c5
tree2bc02ccd0739a5e7f11a07b2ebceccb50a18cc77
parent3796eba7c137e073d1caa95b48d4a320fd2d9600
perf dwarf-aux: Add die_get_scopes() alternative to dwarf_getscopes()

The die_get_scopes() returns the number of enclosing DIEs for the given
address and it fills an array of DIEs like dwarf_getscopes().  But it
doesn't follow the abstract origin of inlined functions as we want
information of the concrete instance.  This is needed to check the
location of parameters and local variables properly.  Users can check
the origin separately if needed.

Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Acked-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Ian Rogers <irogers@google.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Cc: linux-toolchains@vger.kernel.org
Cc: linux-trace-devel@vger.kernel.org
Link: https://lore.kernel.org/r/20231110000012.3538610-7-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/dwarf-aux.c
tools/perf/util/dwarf-aux.h