diff options
author | Peter Zijlstra <a.p.zijlstra@chello.nl> | 2009-06-26 07:10:23 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-06-26 11:48:54 -0400 |
commit | 19d2e755436054dfc2be640bffc32e427c37ac3d (patch) | |
tree | f53c2e93820d1ca6d04e8b42c7bca08af01c9b44 /kernel | |
parent | f55c555226b1010b249730ec6b232e5470286950 (diff) |
perf_counter: Complete counter swap
Complete the counter swap by indeed switching the times too and
updating the userpage after modifying the counter values.
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Paul Mackerras <paulus@samba.org>
LKML-Reference: <1246014623.31755.195.camel@twins>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/perf_counter.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/kernel/perf_counter.c b/kernel/perf_counter.c index f2f232696587..66ab1e9d1294 100644 --- a/kernel/perf_counter.c +++ b/kernel/perf_counter.c | |||
@@ -1048,9 +1048,14 @@ static void __perf_counter_sync_stat(struct perf_counter *counter, | |||
1048 | value = atomic64_xchg(&counter->count, value); | 1048 | value = atomic64_xchg(&counter->count, value); |
1049 | atomic64_set(&next_counter->count, value); | 1049 | atomic64_set(&next_counter->count, value); |
1050 | 1050 | ||
1051 | swap(counter->total_time_enabled, next_counter->total_time_enabled); | ||
1052 | swap(counter->total_time_running, next_counter->total_time_running); | ||
1053 | |||
1051 | /* | 1054 | /* |
1052 | * XXX also sync time_enabled and time_running ? | 1055 | * Since we swizzled the values, update the user visible data too. |
1053 | */ | 1056 | */ |
1057 | perf_counter_update_userpage(counter); | ||
1058 | perf_counter_update_userpage(next_counter); | ||
1054 | } | 1059 | } |
1055 | 1060 | ||
1056 | #define list_next_entry(pos, member) \ | 1061 | #define list_next_entry(pos, member) \ |