From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Peter Zijlstra <peterz@infradead.org>
Cc: "Frédéric Weisbecker" <fweisbec@gmail.com>,
"Jiri Olsa" <jolsa@kernel.org>, "David Ahern" <dsahern@gmail.com>,
"Adrian Hunter" <adrian.hunter@intel.com>,
"Wang Nan" <wangnan0@huawei.com>,
"Steven Rostedt" <rostedt@goodmis.org>,
"Linux Kernel Mailing List" <linux-kernel@vger.kernel.org>
Subject: Re: tracepoint filter problems
Date: Mon, 2 Nov 2015 22:13:24 -0300 [thread overview]
Message-ID: <20151103011324.GG21609@kernel.org> (raw)
In-Reply-To: <20151102095051.GN17308@twins.programming.kicks-ass.net>
Em Mon, Nov 02, 2015 at 10:50:51AM +0100, Peter Zijlstra escreveu:
> On Thu, Oct 29, 2015 at 12:27:42PM -0300, Arnaldo Carvalho de Melo wrote:
> > In the example below 'perf trace' will ask to see just the 'open' syscall, and
> > it works for the started workload, namely 'perf record', but then it'll call
> > 'sleep 100000000000' and there the filter doesn't apply, bummer :-\
> > The inherit bit is set, sure, as we can see when adding -vv to the 'perf trace'
> > call, ideas?
> --- a/kernel/events/core.c
> +++ b/kernel/events/core.c
> @@ -6939,6 +6939,10 @@ static int perf_tp_filter_match(struct p
> {
> void *record = data->raw->data;
>
> + /* only top level events have filters set */
> + if (event->parent)
> + event = event->parent;
> +
> if (likely(!event->filter) || filter_match_preds(event->filter, record))
> return 1;
> return 0;
Thank you!
Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
[root@felicio ~]# trace -e bpf,nanosleep perf record -e /tmp/foo.o sleep 1
385.246 ( 0.062 ms): perf/13761 bpf(cmd: PROG_LOAD, uattr: 0x7ffd9900ac90, size: 48) = 3
1424.278 (999.497 ms): sleep/13762 nanosleep(rqtp: 0x7ffd4583a6e0 ) = 0
[ perf record: Woken up 1 times to write data ]
[ perf record: Captured and wrote 0.012 MB perf.data ]
[root@felicio ~]#
- Arnaldo
next prev parent reply other threads:[~2015-11-03 1:13 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-29 15:27 tracepoint filter problems Arnaldo Carvalho de Melo
2015-11-02 9:50 ` Peter Zijlstra
2015-11-03 1:13 ` Arnaldo Carvalho de Melo [this message]
2015-11-10 6:40 ` [tip:perf/urgent] perf: Fix inherited events vs. tracepoint filters tip-bot for Peter Zijlstra
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=20151103011324.GG21609@kernel.org \
--to=acme@kernel.org \
--cc=adrian.hunter@intel.com \
--cc=dsahern@gmail.com \
--cc=fweisbec@gmail.com \
--cc=jolsa@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
--cc=wangnan0@huawei.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.