diff options
Diffstat (limited to 'tools/perf')
-rw-r--r-- | tools/perf/util/probe-finder.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/tools/perf/util/probe-finder.c b/tools/perf/util/probe-finder.c index 5473f11a9bc8..689ab462a188 100644 --- a/tools/perf/util/probe-finder.c +++ b/tools/perf/util/probe-finder.c | |||
@@ -497,7 +497,20 @@ static int __die_find_inline_cb(Dwarf_Die *die_mem, void *data) | |||
497 | static Dwarf_Die *die_find_inlinefunc(Dwarf_Die *sp_die, Dwarf_Addr addr, | 497 | static Dwarf_Die *die_find_inlinefunc(Dwarf_Die *sp_die, Dwarf_Addr addr, |
498 | Dwarf_Die *die_mem) | 498 | Dwarf_Die *die_mem) |
499 | { | 499 | { |
500 | return die_find_child(sp_die, __die_find_inline_cb, &addr, die_mem); | 500 | Dwarf_Die tmp_die; |
501 | |||
502 | sp_die = die_find_child(sp_die, __die_find_inline_cb, &addr, &tmp_die); | ||
503 | if (!sp_die) | ||
504 | return NULL; | ||
505 | |||
506 | /* Inlined function could be recursive. Trace it until fail */ | ||
507 | while (sp_die) { | ||
508 | memcpy(die_mem, sp_die, sizeof(Dwarf_Die)); | ||
509 | sp_die = die_find_child(sp_die, __die_find_inline_cb, &addr, | ||
510 | &tmp_die); | ||
511 | } | ||
512 | |||
513 | return die_mem; | ||
501 | } | 514 | } |
502 | 515 | ||
503 | /* Walker on lines (Note: line number will not be sorted) */ | 516 | /* Walker on lines (Note: line number will not be sorted) */ |