Skip to content

Commit d8bbbf2

Browse files
mhiramatgregkh
authored andcommitted
perf probe: Use dwarf_attr_integrate as generic DWARF attr accessor
[ Upstream commit f828929 ] 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> Stable-dep-of: a9dfc46 ("perf probe: Fix to get the DW_AT_decl_file and DW_AT_call_file as unsinged data") Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent b131b5f commit d8bbbf2

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

tools/perf/util/dwarf-aux.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ static int die_get_attr_udata(Dwarf_Die *tp_die, unsigned int attr_name,
308308
{
309309
Dwarf_Attribute attr;
310310

311-
if (dwarf_attr(tp_die, attr_name, &attr) == NULL ||
311+
if (dwarf_attr_integrate(tp_die, attr_name, &attr) == NULL ||
312312
dwarf_formudata(&attr, result) != 0)
313313
return -ENOENT;
314314

@@ -321,7 +321,7 @@ static int die_get_attr_sdata(Dwarf_Die *tp_die, unsigned int attr_name,
321321
{
322322
Dwarf_Attribute attr;
323323

324-
if (dwarf_attr(tp_die, attr_name, &attr) == NULL ||
324+
if (dwarf_attr_integrate(tp_die, attr_name, &attr) == NULL ||
325325
dwarf_formsdata(&attr, result) != 0)
326326
return -ENOENT;
327327

0 commit comments

Comments
 (0)