perf_counter: theres more to overflow than writing events
Prepare for more generic overflow handling. The new perf_counter_overflow() method will handle the generic bits of the counter overflow, and can return a !0 return value, in which case the counter should be (soft) disabled, so that it won't count until it's properly disabled. XXX: do powerpc and swcounter Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Paul Mackerras <paulus@samba.org> Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com> LKML-Reference: <20090406094517.812109629@chello.nl> Signed-off-by: Ingo Molnar <mingo@elte.hu>
This commit is contained in:

committed by
Ingo Molnar

parent
b6276f353b
commit
f6c7d5fe58
@@ -800,7 +800,8 @@ again:
|
||||
continue;
|
||||
|
||||
perf_save_and_restart(counter);
|
||||
perf_counter_output(counter, nmi, regs);
|
||||
if (perf_counter_overflow(counter, nmi, regs))
|
||||
__pmc_generic_disable(counter, &counter->hw, bit);
|
||||
}
|
||||
|
||||
hw_perf_ack_status(ack);
|
||||
|
Reference in New Issue
Block a user