diff options
author | Arun Bharadwaj <abharadw@codeaurora.org> | 2013-07-03 10:35:02 -0700 |
---|---|---|
committer | John Stultz <john.stultz@linaro.org> | 2016-02-16 13:53:29 -0800 |
commit | a2b15c0b536307192d86d310b78b4542fa4cc3dc (patch) | |
tree | d056217e09562299fed200ba374af7cf9b30fc48 /kernel/cpu.c | |
parent | 99dd30a309b22219bf98146141f27030ab8fff33 (diff) |
tracing/sched: Add trace events to track cpu hotplug.
Add ftrace event trace_sched_cpu_hotplug to track cpu
hot-add and hot-remove events.
This is useful in a variety of power, performance and
debug analysis scenarios.
Change-Id: I5d202c7a229ffacc3aafb7cf9afee0b0ee7b0931
Signed-off-by: Arun Bharadwaj <abharadw@codeaurora.org>
Diffstat (limited to 'kernel/cpu.c')
-rw-r--r-- | kernel/cpu.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/kernel/cpu.c b/kernel/cpu.c index 74e411acb1f2..37731292f8a1 100644 --- a/kernel/cpu.c +++ b/kernel/cpu.c @@ -24,6 +24,8 @@ #include <linux/irq.h> #include <trace/events/power.h> +#include <trace/events/sched.h> + #include "smpboot.h" #ifdef CONFIG_SMP @@ -425,6 +427,7 @@ static int _cpu_down(unsigned int cpu, int tasks_frozen) out_release: cpu_hotplug_done(); + trace_sched_cpu_hotplug(cpu, err, 0); if (!err) cpu_notify_nofail(CPU_POST_DEAD | mod, hcpu); return err; @@ -530,6 +533,7 @@ out_notify: __cpu_notify(CPU_UP_CANCELED | mod, hcpu, nr_calls, NULL); out: cpu_hotplug_done(); + trace_sched_cpu_hotplug(cpu, ret, 1); return ret; } |