lkml.org 
[lkml]   [2016]   [Mar]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 3/5] ftrace perf: Use ftrace_ops::private to store event pointer
On Wed, 16 Mar 2016 15:34:31 +0100
Jiri Olsa <jolsa@kernel.org> 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 <namhyung@kernel.org>
> Suggested-by: Steven Rostedt <rostedt@goodmis.org>
> Signed-off-by: Jiri Olsa <jolsa@kernel.org>

Acked-by: Steven Rostedt <rostedt@goodmis.org>

-- Steve

\
 
 \ /
  Last update: 2016-03-18 16:01    [W:0.100 / U:0.072 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site