Commit 19d2e755 authored by Peter Zijlstra's avatar Peter Zijlstra Committed by Ingo Molnar

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: default avatarPeter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Paul Mackerras <paulus@samba.org>
LKML-Reference: <1246014623.31755.195.camel@twins>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent f55c5552
...@@ -1048,9 +1048,14 @@ static void __perf_counter_sync_stat(struct perf_counter *counter, ...@@ -1048,9 +1048,14 @@ static void __perf_counter_sync_stat(struct perf_counter *counter,
value = atomic64_xchg(&counter->count, value); value = atomic64_xchg(&counter->count, value);
atomic64_set(&next_counter->count, value); atomic64_set(&next_counter->count, value);
swap(counter->total_time_enabled, next_counter->total_time_enabled);
swap(counter->total_time_running, next_counter->total_time_running);
/* /*
* XXX also sync time_enabled and time_running ? * Since we swizzled the values, update the user visible data too.
*/ */
perf_counter_update_userpage(counter);
perf_counter_update_userpage(next_counter);
} }
#define list_next_entry(pos, member) \ #define list_next_entry(pos, member) \
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment