[3.13.y-ckt stable] Patch "perf: Fix inherited events vs. tracepoint filters" has been added to staging queue
Kamal Mostafa
kamal at canonical.com
Wed Dec 2 22:53:46 UTC 2015
This is a note to let you know that I have just added a patch titled
perf: Fix inherited events vs. tracepoint filters
to the linux-3.13.y-queue branch of the 3.13.y-ckt extended stable tree
which can be found at:
http://kernel.ubuntu.com/git/ubuntu/linux.git/log/?h=linux-3.13.y-queue
This patch is scheduled to be released in version 3.13.11-ckt31.
If you, or anyone else, feels it should not be added to this tree, please
reply to this email.
For more information about the 3.13.y-ckt tree, see
https://wiki.ubuntu.com/Kernel/Dev/ExtendedStable
Thanks.
-Kamal
------
>From a506b23e42fcf237cb368e5581c576dd2ca2c35c Mon Sep 17 00:00:00 2001
From: Peter Zijlstra <peterz at infradead.org>
Date: Mon, 2 Nov 2015 10:50:51 +0100
Subject: perf: Fix inherited events vs. tracepoint filters
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
commit b71b437eedaed985062492565d9d421d975ae845 upstream.
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 at kernel.org>
Tested-by: Arnaldo Carvalho de Melo <acme at kernel.org>
Signed-off-by: Peter Zijlstra (Intel) <peterz at infradead.org>
Cc: Adrian Hunter <adrian.hunter at intel.com>
Cc: Arnaldo Carvalho de Melo <acme at redhat.com>
Cc: David Ahern <dsahern at gmail.com>
Cc: Frédéric Weisbecker <fweisbec at gmail.com>
Cc: Jiri Olsa <jolsa at kernel.org>
Cc: Jiri Olsa <jolsa at redhat.com>
Cc: Linus Torvalds <torvalds at linux-foundation.org>
Cc: Peter Zijlstra <peterz at infradead.org>
Cc: Steven Rostedt <rostedt at goodmis.org>
Cc: Thomas Gleixner <tglx at linutronix.de>
Cc: Wang Nan <wangnan0 at huawei.com>
Link: http://lkml.kernel.org/r/20151102095051.GN17308@twins.programming.kicks-ass.net
Signed-off-by: Ingo Molnar <mingo at kernel.org>
Signed-off-by: Kamal Mostafa <kamal at canonical.com>
---
kernel/events/core.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/kernel/events/core.c b/kernel/events/core.c
index f1aec1c..5a90a64 100644
--- a/kernel/events/core.c
+++ b/kernel/events/core.c
@@ -5863,6 +5863,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;
--
1.9.1
More information about the kernel-team
mailing list