From: Jiri Olsa <jolsa@redhat.com>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: Jiri Olsa <jolsa@kernel.org>, lkml <linux-kernel@vger.kernel.org>,
David Ahern <dsahern@gmail.com>, Ingo Molnar <mingo@kernel.org>,
Namhyung Kim <namhyung@kernel.org>,
Peter Zijlstra <a.p.zijlstra@chello.nl>,
Arnaldo Carvalho de Melo <acme@kernel.org>
Subject: Re: [PATCH 1/2] ftrace: Add separate handler for ftrace:function event
Date: Wed, 25 Nov 2015 17:50:57 +0100 [thread overview]
Message-ID: <20151125165057.GA30914@krava.brq.redhat.com> (raw)
In-Reply-To: <20151125111956.7d53da99@gandalf.local.home>
On Wed, Nov 25, 2015 at 11:19:56AM -0500, Steven Rostedt wrote:
> On Wed, 25 Nov 2015 16:45:32 +0100
> Jiri Olsa <jolsa@kernel.org> wrote:
>
> > Having following commands running concurently:
> >
> > # perf record -e ftrace:function -a -o krava.data sleep 10
> > # perf record -e ftrace:function --filter 'ip == SyS_read' ls
> >
> > will endup in the latter one failing on the filter
> > rules and store all functions (in perf.data) as
> > instructed by the first record instead of just
> > SyS_read records.
> >
> > The reason is that we don't check the ftrace_ops that
> > triggered the event with event's ftrace_ops. Hence
> > once running together the event from latter perf will
> > get all the data of the event from the first one.
> >
> > Fixing this by having separate handler for ftrace:function
> > event that actualy checks ftrace_ops against event.
>
> This seems redundant. I never understood the control_ops that perf uses
> in the function tracing infrastructure. Why can't you just register the
> event->ops and have that ops set the filtering? Then the ftrace
> infrastructure will only call that event handler for the functions its
> filtered on. Then you don't need to do it again. Right now ftrace
> already does that with the generic "control_ops" that perf uses, but
> now you are doing it again. Seems rather pointless.
well thats exactly what we are doing.. but as all ops
share single callback we need to find the proper event
this callback was triggered for
currently we use tracepoint callback (perf_tp_event)
where the proper event is found based on the event->filter
however this is not the case for ftrace:function because
filter will not change the event->filter, but the ops filter
> I may need to spend some time looking at how perf uses the function
> tracing, and perhaps we can remove a lot of this redundancy.
that'd be cool
thanks,
jirka
next prev parent reply other threads:[~2015-11-25 16:51 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-25 15:45 Jiri Olsa
2015-11-25 15:45 ` [PATCH 2/2] ftrace: Check sample types only for sampling events Jiri Olsa
2015-11-25 16:19 ` [PATCH 1/2] ftrace: Add separate handler for ftrace:function event Steven Rostedt
2015-11-25 16:50 ` Jiri Olsa [this message]
2015-11-25 17:02 ` Steven Rostedt
2015-11-25 17:12 ` Jiri Olsa
2015-11-25 17:42 ` Steven Rostedt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20151125165057.GA30914@krava.brq.redhat.com \
--to=jolsa@redhat.com \
--cc=a.p.zijlstra@chello.nl \
--cc=acme@kernel.org \
--cc=dsahern@gmail.com \
--cc=jolsa@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=namhyung@kernel.org \
--cc=rostedt@goodmis.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®