[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1290525705-6265-2-git-send-email-fbuihuu@gmail.com>
Date: Tue, 23 Nov 2010 16:21:44 +0100
From: Franck Bui-Huu <vagabon.xyz@...il.com>
To: a.p.zijlstra@...llo.nl
Cc: linux-kernel@...r.kernel.org
Subject: [PATCH 2/3] perf: Limit event refresh to sampling event
From: Franck Bui-Huu <fbuihuu@...il.com>
Signed-off-by: Franck Bui-Huu <fbuihuu@...il.com>
---
kernel/perf_event.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/kernel/perf_event.c b/kernel/perf_event.c
index df7869f..813b09e 100644
--- a/kernel/perf_event.c
+++ b/kernel/perf_event.c
@@ -1072,7 +1072,7 @@ static int perf_event_refresh(struct perf_event *event, int refresh)
/*
* not supported on inherited events
*/
- if (event->attr.inherit)
+ if (event->attr.inherit || !is_sampling_event(event))
return -EINVAL;
atomic_add(refresh, &event->event_limit);
--
1.7.3.2
--
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