Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

perf probe: Use dwarf_attr_integrate as generic DWARF attr accessor

Use dwarf_attr_integrate() instead of dwarf_attr() for generic attribute
acccessor functions, so that it can find the specified attribute from
abstact origin DIE etc.

Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org>
Acked-by: Namhyung Kim <namhyung@kernel.org>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Steven Rostedt (VMware) <rostedt@goodmis.org>
Link: https://lore.kernel.org/r/166731051988.2100653.13595339994343449770.stgit@devnote3
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>

authored by

Masami Hiramatsu (Google) and committed by
Arnaldo Carvalho de Melo
f828929a 98e4c68d

+2 -2
+2 -2
tools/perf/util/dwarf-aux.c
··· 308 308 { 309 309 Dwarf_Attribute attr; 310 310 311 - if (dwarf_attr(tp_die, attr_name, &attr) == NULL || 311 + if (dwarf_attr_integrate(tp_die, attr_name, &attr) == NULL || 312 312 dwarf_formudata(&attr, result) != 0) 313 313 return -ENOENT; 314 314 ··· 321 321 { 322 322 Dwarf_Attribute attr; 323 323 324 - if (dwarf_attr(tp_die, attr_name, &attr) == NULL || 324 + if (dwarf_attr_integrate(tp_die, attr_name, &attr) == NULL || 325 325 dwarf_formsdata(&attr, result) != 0) 326 326 return -ENOENT; 327 327