Re: [BUGFIX PATCH 2/4] perf probe: Filter out instances except for inlined subroutine and subprogram

From: Arnaldo Carvalho de Melo
Date: Wed Nov 06 2019 - 15:07:10 EST


Em Wed, Oct 30, 2019 at 04:09:30PM +0900, Masami Hiramatsu escreveu:
> Filter out instances except for inlined_subroutine and subprogram
> DIE in die_walk_instances() and die_is_func_instance().
> This fixes an issue that perf probe sets some probes on calling
> address instead of a target function itself.
>
> When perf probe walks on instances of an abstruct origin
> (a kind of function prototype of inlined function),
> die_walk_instances() can also pass a GNU_call_site (a GNU
> extension for call site) to callback. Since it is not
> an inlined instance of target function, we have to filter
> out when searching a probe point.
>
> Without this patch, perf probe sets probes on call site
> address too.This can happen on some function which is marked
> "inlined", but has actual symbol. (I'm not sure why GCC mark
> it "inlined")

Thanks, tested before and after and applied,

- Arnaldo