perf_counter: Optimize perf_counter_alloc()'s inherit case
authorPeter Zijlstra <a.p.zijlstra@chello.nl>
Mon, 22 Jun 2009 11:58:35 +0000 (13:58 +0200)
committerIngo Molnar <mingo@elte.hu>
Tue, 23 Jun 2009 09:42:46 +0000 (11:42 +0200)
We don't need to add usage counts for swcounter and attr usage
models for inherited counters since the parent counter will
always have one, which suffices to generate the needed output.

This avoids up to 3 global atomic increments per inherited
counter.

LKML-Reference: <new-submission>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
kernel/perf_counter.c

Simple merge