diff options
author | Arjan van de Ven <arjan@infradead.org> | 2009-09-19 07:35:33 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-09-19 12:57:52 -0400 |
commit | 288f023e708efd89d77ce9acf977a33a623ae83d (patch) | |
tree | c3fe7d1bcab32f9dcfd16d92b76098ef4c125178 /drivers/cpuidle | |
parent | 964a0b3d2b1b1cac1d01e29b635831b3d92a3fdd (diff) |
tracing, x86, cpuidle: Move the end point of a C state in the power tracer
The "end of a C state" trace point currently happens before
the code runs that corrects the TSC for having stopped during idle.
The result of this is that the timestamp of the end-of-C-state event
is garbage on cpus where the TSC stops during idle.
This patch moves the end point of the C state to after the timekeeping
engine of the kernel has been corrected.
Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Cc: Len Brown <len.brown@intel.com>
Cc: fweisbec@gmail.com
Cc: peterz@infradead.org
Cc: Paul Mackerras <paulus@samba.org>
LKML-Reference: <20090919133533.139c2a46@infradead.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'drivers/cpuidle')
-rw-r--r-- | drivers/cpuidle/cpuidle.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/cpuidle/cpuidle.c b/drivers/cpuidle/cpuidle.c index 8504a2108557..ad41f19b8e3f 100644 --- a/drivers/cpuidle/cpuidle.c +++ b/drivers/cpuidle/cpuidle.c | |||
@@ -17,6 +17,7 @@ | |||
17 | #include <linux/cpuidle.h> | 17 | #include <linux/cpuidle.h> |
18 | #include <linux/ktime.h> | 18 | #include <linux/ktime.h> |
19 | #include <linux/hrtimer.h> | 19 | #include <linux/hrtimer.h> |
20 | #include <trace/events/power.h> | ||
20 | 21 | ||
21 | #include "cpuidle.h" | 22 | #include "cpuidle.h" |
22 | 23 | ||
@@ -91,6 +92,7 @@ static void cpuidle_idle_call(void) | |||
91 | /* give the governor an opportunity to reflect on the outcome */ | 92 | /* give the governor an opportunity to reflect on the outcome */ |
92 | if (cpuidle_curr_governor->reflect) | 93 | if (cpuidle_curr_governor->reflect) |
93 | cpuidle_curr_governor->reflect(dev); | 94 | cpuidle_curr_governor->reflect(dev); |
95 | trace_power_end(0); | ||
94 | } | 96 | } |
95 | 97 | ||
96 | /** | 98 | /** |