aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/cpuidle
diff options
context:
space:
mode:
authorSandeep Tripathy <sandeep.tripathy@linaro.org>2014-07-02 15:00:58 +0530
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2014-07-09 15:45:23 +0200
commit30fe6884021b9fa0124609e898a6341be188eb44 (patch)
treef8c7edee62a0c1b01622ccbcf1e166b368822c3d /drivers/cpuidle
parentLinux 3.16-rc4 (diff)
downloadlinux-dev-30fe6884021b9fa0124609e898a6341be188eb44.tar.xz
linux-dev-30fe6884021b9fa0124609e898a6341be188eb44.zip
cpuidle: move idle traces to cpuidle_enter_state()
idle_exit event is the first event after a core exits idle state. So this should be traced before local irq is ebabled. Likewise idle_entry is the last event before a core enters idle state. This will ease visualising the cpu idle state from kernel traces. Signed-off-by: Sandeep Tripathy <sandeep.tripathy@linaro.org> Acked-by: Daniel Lezcano <daniel.lezcano@linaro.org> [rjw: Subject, rebase] Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/cpuidle')
-rw-r--r--drivers/cpuidle/cpuidle.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/cpuidle/cpuidle.c b/drivers/cpuidle/cpuidle.c
index cb7019977c50..ee9df5e3f5eb 100644
--- a/drivers/cpuidle/cpuidle.c
+++ b/drivers/cpuidle/cpuidle.c
@@ -119,11 +119,13 @@ int cpuidle_enter_state(struct cpuidle_device *dev, struct cpuidle_driver *drv,
ktime_t time_start, time_end;
s64 diff;
+ trace_cpu_idle_rcuidle(index, dev->cpu);
time_start = ktime_get();
entered_state = target_state->enter(dev, drv, index);
time_end = ktime_get();
+ trace_cpu_idle_rcuidle(PWR_EVENT_EXIT, dev->cpu);
if (!cpuidle_state_is_coupled(dev, drv, entered_state))
local_irq_enable();