From: Andi Kleen <ak@linux.intel.com>
To: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: Andi Kleen <andi@firstfloor.org>,
jolsa@redhat.com, linux-kernel@vger.kernel.org,
namhyung@kernel.org, Brendan Gregg <brendan.d.gregg@gmail.com>,
Steven Rostedt <rostedt@goodmis.org>
Subject: Re: Adding a filter to events (instead of replacing one) was Re: [PATCH 1/2] perf, tools: Add PERF_PID
Date: Wed, 1 Oct 2014 15:02:18 -0700 [thread overview]
Message-ID: <20141001220218.GC3264@tassilo.jf.intel.com> (raw)
In-Reply-To: <20141001180316.GI2799@kernel.org>
On Wed, Oct 01, 2014 at 03:03:16PM -0300, Arnaldo Carvalho de Melo wrote:
> Em Wed, Sep 24, 2014 at 01:51:08PM -0700, Andi Kleen escreveu:
>
> > It's currently difficult to filter out perf itself using a filter.
> > This can give cascading effects during IO tracing when the IO perf
> > does itself causes more trace output.
>
> > The best way to filter is to use the pid. But it's difficult to get the pid
> > of perf without using hacks.
>
> > Add a PERF_PID meta variable to the perf filter that contains the current pid.
>
> > With this patch the following works
>
> > % perf record -e syscalls:sys_enter_write -a --filter 'common_pid != PERF_PID' ...
>
> So I tried this one now and saw the other patch, that applies the
> --filter to all events, while trying I got:
Patch seems reasonable to me.
However adding PERF_PID and sanitizing --filter are really two
different things and should probably not be mixed in a patch.
-Andi
next prev parent reply other threads:[~2014-10-01 22:02 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-24 20:51 [PATCH 1/2] perf, tools: Add PERF_PID Andi Kleen
2014-09-24 20:51 ` [PATCH 2/2] perf tools: apply -F filter to all previous events Andi Kleen
2014-10-01 18:03 ` Adding a filter to events (instead of replacing one) was Re: [PATCH 1/2] perf, tools: Add PERF_PID Arnaldo Carvalho de Melo
2014-10-01 22:02 ` Andi Kleen [this message]
2014-10-01 22:13 ` Arnaldo Carvalho de Melo
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=20141001220218.GC3264@tassilo.jf.intel.com \
--to=ak@linux.intel.com \
--cc=acme@kernel.org \
--cc=andi@firstfloor.org \
--cc=brendan.d.gregg@gmail.com \
--cc=jolsa@redhat.com \
--cc=linux-kernel@vger.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