On Wed, 16 Mar 2016 15:34:31 +0100
Jiri Olsa <[email protected]> wrote:

> Having following commands running concurrently:
> 
>   # perf record -e ftrace:function -a -o krava.data sleep 10
>   # perf record -e ftrace:function --filter 'ip == SyS_read' ls
> 
> will end up in the latter one to fail on the filter rules
> and store all functions (in perf.data) as instructed by the
> first perf record instead of just SyS_read records.
> 
> The reason for this is, that tracepoint code by default
> triggers all events that registered for the tracepoint.
> 
> While ftrace:function is special because ftrace_ops
> itself carries a filter and only the event that owns
> ftrace_ops is eligible to be triggered.
> 
> Fixing this by using ftrace_ops::private value to keep
> the perf_event pointer. This way we don't need to search
> for triggered event (as tracepoint handler does) and
> directly store sample.
> 
> Acked-by: Namhyung Kim <[email protected]>
> Suggested-by: Steven Rostedt <[email protected]>
> Signed-off-by: Jiri Olsa <[email protected]>

Acked-by: Steven Rostedt <[email protected]>

-- Steve

Reply via email to