summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2008-12-11 15:17:03 +0100
committerIngo Molnar <mingo@elte.hu>2008-12-11 15:45:56 +0100
commit6a930700c8b655a9e25e42fc4adc0b225ebbcefc (patch)
tree5b6aa07d2734f43d0c5bc7d97aebe256e6d86fa8 /arch
parent1d1c7ddbfab358445a542715551301b7fc363e28 (diff)
perf counters: clean up state transitions
Impact: cleanup Introduce a proper enum for the 3 states of a counter: PERF_COUNTER_STATE_OFF = -1 PERF_COUNTER_STATE_INACTIVE = 0 PERF_COUNTER_STATE_ACTIVE = 1 and rename counter->active to counter->state and propagate the changes everywhere. Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch')
-rw-r--r--arch/x86/kernel/cpu/perf_counter.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/kernel/cpu/perf_counter.c b/arch/x86/kernel/cpu/perf_counter.c
index 3e1dbebe22b9..4854cca7fffd 100644
--- a/arch/x86/kernel/cpu/perf_counter.c
+++ b/arch/x86/kernel/cpu/perf_counter.c
@@ -332,7 +332,7 @@ perf_handle_group(struct perf_counter *sibling, u64 *status, u64 *overflown)
* Then store sibling timestamps (if any):
*/
list_for_each_entry(counter, &group_leader->sibling_list, list_entry) {
- if (!counter->active) {
+ if (counter->state != PERF_COUNTER_STATE_ACTIVE) {
/*
* When counter was not in the overflow mask, we have to
* read it from hardware. We read it as well, when it