[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <tip-b71b437eedaed985062492565d9d421d975ae845@git.kernel.org>
Date: Mon, 9 Nov 2015 22:40:07 -0800
From: tip-bot for Peter Zijlstra <tipbot@...or.com>
To: linux-tip-commits@...r.kernel.org
Cc: jolsa@...hat.com, rostedt@...dmis.org, fweisbec@...il.com,
hpa@...or.com, torvalds@...ux-foundation.org,
linux-kernel@...r.kernel.org, tglx@...utronix.de,
wangnan0@...wei.com, peterz@...radead.org, dsahern@...il.com,
acme@...hat.com, adrian.hunter@...el.com, jolsa@...nel.org,
mingo@...nel.org, acme@...nel.org
Subject: [tip:perf/urgent] perf:
Fix inherited events vs. tracepoint filters
Commit-ID: b71b437eedaed985062492565d9d421d975ae845
Gitweb: http://git.kernel.org/tip/b71b437eedaed985062492565d9d421d975ae845
Author: Peter Zijlstra <peterz@...radead.org>
AuthorDate: Mon, 2 Nov 2015 10:50:51 +0100
Committer: Ingo Molnar <mingo@...nel.org>
CommitDate: Mon, 9 Nov 2015 16:13:11 +0100
perf: Fix inherited events vs. tracepoint filters
Arnaldo reported that tracepoint filters seem to misbehave (ie. not
apply) on inherited events.
The fix is obvious; filters are only set on the actual (parent)
event, use the normal pattern of using this parent event for filters.
This is safe because each child event has a reference to it.
Reported-by: Arnaldo Carvalho de Melo <acme@...nel.org>
Tested-by: Arnaldo Carvalho de Melo <acme@...nel.org>
Signed-off-by: Peter Zijlstra (Intel) <peterz@...radead.org>
Cc: Adrian Hunter <adrian.hunter@...el.com>
Cc: Arnaldo Carvalho de Melo <acme@...hat.com>
Cc: David Ahern <dsahern@...il.com>
Cc: Frédéric Weisbecker <fweisbec@...il.com>
Cc: Jiri Olsa <jolsa@...nel.org>
Cc: Jiri Olsa <jolsa@...hat.com>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Peter Zijlstra <peterz@...radead.org>
Cc: Steven Rostedt <rostedt@...dmis.org>
Cc: Thomas Gleixner <tglx@...utronix.de>
Cc: Wang Nan <wangnan0@...wei.com>
Cc: stable@...r.kernel.org
Link: http://lkml.kernel.org/r/20151102095051.GN17308@twins.programming.kicks-ass.net
Signed-off-by: Ingo Molnar <mingo@...nel.org>
---
kernel/events/core.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/kernel/events/core.c b/kernel/events/core.c
index f8e5c44..98a4b9d 100644
--- a/kernel/events/core.c
+++ b/kernel/events/core.c
@@ -6909,6 +6909,10 @@ static int perf_tp_filter_match(struct perf_event *event,
{
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;
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists