aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/perf_counter.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2009-05-26 02:10:00 -0400
committerIngo Molnar <mingo@elte.hu>2009-05-26 03:54:13 -0400
commit329d876d6fd326109f191ae0fb2798b8834fb70b (patch)
tree9e8a071a9c89be06a3b6dd526ec42f08eca16ae3 /kernel/perf_counter.c
parentaaba98018b8295dfa2119345d17f833d74448cd0 (diff)
perf_counter: Initialize ->oncpu properly
This shouldnt matter normally (and i have not seen any misbehavior), because active counters always have a proper ->oncpu value - but nevertheless initialize the field properly to -1. [ Impact: cleanup ] Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Mike Galbraith <efault@gmx.de> Cc: Paul Mackerras <paulus@samba.org> Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com> Cc: Marcelo Tosatti <mtosatti@redhat.com> Cc: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: John Kacur <jkacur@redhat.com> LKML-Reference: <new-submission> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/perf_counter.c')
-rw-r--r--kernel/perf_counter.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/kernel/perf_counter.c b/kernel/perf_counter.c
index 070f92d3232a..367299f91aaf 100644
--- a/kernel/perf_counter.c
+++ b/kernel/perf_counter.c
@@ -3122,6 +3122,8 @@ perf_counter_alloc(struct perf_counter_hw_event *hw_event,
3122 counter->group_leader = group_leader; 3122 counter->group_leader = group_leader;
3123 counter->pmu = NULL; 3123 counter->pmu = NULL;
3124 counter->ctx = ctx; 3124 counter->ctx = ctx;
3125 counter->oncpu = -1;
3126
3125 get_ctx(ctx); 3127 get_ctx(ctx);
3126 3128
3127 counter->state = PERF_COUNTER_STATE_INACTIVE; 3129 counter->state = PERF_COUNTER_STATE_INACTIVE;