aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/perf_event.c
diff options
context:
space:
mode:
authorPeter Zijlstra <a.p.zijlstra@chello.nl>2009-11-20 16:19:52 -0500
committerIngo Molnar <mingo@elte.hu>2009-11-21 08:11:39 -0500
commit3dbebf15c5d3e265f751eec72c1538a00da4be27 (patch)
tree66aa74aee095f2031b7c79a3762e22ca2a765174 /kernel/perf_event.c
parentf6f83785222b0ee037f7be90731f62a649292b5e (diff)
perf: Simplify __perf_event_sync_stat
Removes constraints from __perf_event_read() by leaving it with a single callsite; this callsite had ctx->lock held, the other one does not. Removes some superfluous code from __perf_event_sync_stat(). Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Paul Mackerras <paulus@samba.org> LKML-Reference: <20091120212508.918544317@chello.nl> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/perf_event.c')
-rw-r--r--kernel/perf_event.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/kernel/perf_event.c b/kernel/perf_event.c
index e66f6c400d13..af150bbcfc5b 100644
--- a/kernel/perf_event.c
+++ b/kernel/perf_event.c
@@ -1061,8 +1061,6 @@ static int context_equiv(struct perf_event_context *ctx1,
1061 && !ctx1->pin_count && !ctx2->pin_count; 1061 && !ctx1->pin_count && !ctx2->pin_count;
1062} 1062}
1063 1063
1064static void __perf_event_read(void *event);
1065
1066static void __perf_event_sync_stat(struct perf_event *event, 1064static void __perf_event_sync_stat(struct perf_event *event,
1067 struct perf_event *next_event) 1065 struct perf_event *next_event)
1068{ 1066{
@@ -1080,8 +1078,8 @@ static void __perf_event_sync_stat(struct perf_event *event,
1080 */ 1078 */
1081 switch (event->state) { 1079 switch (event->state) {
1082 case PERF_EVENT_STATE_ACTIVE: 1080 case PERF_EVENT_STATE_ACTIVE:
1083 __perf_event_read(event); 1081 event->pmu->read(event);
1084 break; 1082 /* fall-through */
1085 1083
1086 case PERF_EVENT_STATE_INACTIVE: 1084 case PERF_EVENT_STATE_INACTIVE:
1087 update_event_times(event); 1085 update_event_times(event);