summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorLen Brown <len.brown@intel.com>2011-01-13 00:06:19 +0100
committerLen Brown <len.brown@intel.com>2011-01-13 00:06:19 +0100
commit43952886f0b8b3c344c3392b88de067d5fa5419a (patch)
treec1a738f11a479246c09976902be5b73aaf731722 /drivers
parentMerge branch 'linus' into idle-test (diff)
parentcpuidle/x86/perf: fix power:cpu_idle double end events and throw cpu_idle eve... (diff)
downloadlinux-43952886f0b8b3c344c3392b88de067d5fa5419a.tar.xz
linux-43952886f0b8b3c344c3392b88de067d5fa5419a.zip
Merge branch 'cpuidle-perf-events' into idle-test
Diffstat (limited to 'drivers')
-rw-r--r--drivers/cpuidle/cpuidle.c10
-rw-r--r--drivers/idle/intel_idle.c2
2 files changed, 8 insertions, 4 deletions
diff --git a/drivers/cpuidle/cpuidle.c b/drivers/cpuidle/cpuidle.c
index a2d5b95a6d64..bf5092455a8f 100644
--- a/drivers/cpuidle/cpuidle.c
+++ b/drivers/cpuidle/cpuidle.c
@@ -96,7 +96,15 @@ static void cpuidle_idle_call(void)
/* enter the state and update stats */
dev->last_state = target_state;
+
+ trace_power_start(POWER_CSTATE, next_state, dev->cpu);
+ trace_cpu_idle(next_state, dev->cpu);
+
dev->last_residency = target_state->enter(dev, target_state);
+
+ trace_power_end(dev->cpu);
+ trace_cpu_idle(PWR_EVENT_EXIT, dev->cpu);
+
if (dev->last_state)
target_state = dev->last_state;
@@ -106,8 +114,6 @@ static void cpuidle_idle_call(void)
/* give the governor an opportunity to reflect on the outcome */
if (cpuidle_curr_governor->reflect)
cpuidle_curr_governor->reflect(dev);
- trace_power_end(smp_processor_id());
- trace_cpu_idle(PWR_EVENT_EXIT, smp_processor_id());
}
/**
diff --git a/drivers/idle/intel_idle.c b/drivers/idle/intel_idle.c
index d14585b2e045..7acb32e7f817 100644
--- a/drivers/idle/intel_idle.c
+++ b/drivers/idle/intel_idle.c
@@ -231,8 +231,6 @@ static int intel_idle(struct cpuidle_device *dev, struct cpuidle_state *state)
kt_before = ktime_get_real();
stop_critical_timings();
- trace_power_start(POWER_CSTATE, (eax >> 4) + 1, cpu);
- trace_cpu_idle((eax >> 4) + 1, cpu);
if (!need_resched()) {
__monitor((void *)&current_thread_info()->flags, 0, 0);