From: Brendan Gregg <brendan.d.gregg@gmail.com>
To: linux-perf-users@vger.kernel.org
Subject: Fwd: filtering perf itself
Date: Mon, 7 Jul 2014 11:38:43 -0700 [thread overview]
Message-ID: <CAE40pdePzcfHfZzuOC6DyFc2H7DQMZ_JzADvx_guDS+Eg4SJtw@mail.gmail.com> (raw)
In-Reply-To: <CAE40pdeACbvYJN0BMh9edGGLvdpV_H1Kn5ccgBh7GFuDHiuWGQ@mail.gmail.com>
G'Day perf users,
Is there a way to filter perf from tracing itself?
Here's an idle system:
# ./perf record -e syscalls:sys_enter_read -a sleep 5
[ perf record: Woken up 2 times to write data ]
[ perf record: Captured and wrote 0.569 MB perf.data (~24864 samples) ]
# ./perf record -e syscalls:sys_enter_write -a sleep 5
[ perf record: Woken up 0 times to write data ]
[ perf record: Captured and wrote 150.381 MB perf.data (~6570251 samples) ]
Note the disparity. perf is capturing its own writes, creating a feedback loop.
I haven't seen a way to filter this. Eg:
# ./perf record -q -e syscalls:sys_enter_write --filter 'comm != perf'
-a sleep 5
Error: failed to set filter with 22 (Invalid argument)
# ./perf record -q -e syscalls:sys_enter_write --filter 'ppid != '$$ -a sleep 5
Error: failed to set filter with 22 (Invalid argument)
# ./perf record -q -e raw_syscalls:sys_enter --filter 'comm != perf' -a sleep 5
Error: failed to set filter with 22 (Invalid argument)
# ./perf record -q -e raw_syscalls:sys_enter --filter 'common_ppid !=
'$$ -a sleep 5
Error: failed to set filter with 22 (Invalid argument)
This is because comm, ppid, common_ppid, etc, aren't available for
those tracepoints.
I thought there might be a simple way I'm missing. I'm on
linux-3.16-rc2. Thanks,
Brendan
--
http://www.brendangregg.com
next parent reply other threads:[~2014-07-07 18:38 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CAE40pdeACbvYJN0BMh9edGGLvdpV_H1Kn5ccgBh7GFuDHiuWGQ@mail.gmail.com>
2014-07-07 18:38 ` Brendan Gregg [this message]
2014-07-07 18:44 ` Fwd: filtering perf itself David Ahern
2014-07-07 19:00 ` Brendan Gregg
2014-07-07 19:16 ` Brendan Gregg
2014-07-07 19:31 ` Brendan Gregg
2014-07-08 19:10 ` William Cohen
2014-07-09 19:27 ` Brendan Gregg
2014-07-08 20:45 ` Andi Kleen
2014-07-09 19:47 ` Brendan Gregg
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=CAE40pdePzcfHfZzuOC6DyFc2H7DQMZ_JzADvx_guDS+Eg4SJtw@mail.gmail.com \
--to=brendan.d.gregg@gmail.com \
--cc=linux-perf-users@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).