mirror of
https://github.com/adulau/aha.git
synced 2024-12-28 03:36:19 +00:00
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>
This commit is contained in:
parent
aaba98018b
commit
329d876d6f
1 changed files with 2 additions and 0 deletions
|
@ -3122,6 +3122,8 @@ perf_counter_alloc(struct perf_counter_hw_event *hw_event,
|
||||||
counter->group_leader = group_leader;
|
counter->group_leader = group_leader;
|
||||||
counter->pmu = NULL;
|
counter->pmu = NULL;
|
||||||
counter->ctx = ctx;
|
counter->ctx = ctx;
|
||||||
|
counter->oncpu = -1;
|
||||||
|
|
||||||
get_ctx(ctx);
|
get_ctx(ctx);
|
||||||
|
|
||||||
counter->state = PERF_COUNTER_STATE_INACTIVE;
|
counter->state = PERF_COUNTER_STATE_INACTIVE;
|
||||||
|
|
Loading…
Reference in a new issue