diff options
author | Antti P Miettinen <amiettinen@nvidia.com> | 2012-03-28 20:42:55 +0300 |
---|---|---|
committer | Rohan Somvanshi <rsomvanshi@nvidia.com> | 2012-04-12 22:56:36 -0700 |
commit | 83e03321026504ee3ec69bf0a4790b82206f7a07 (patch) | |
tree | 17f1dbf7153a03ca46de5f1f972b1d0a5e793ccd /kernel | |
parent | d340e5c6525b1332dd5cd880137b5c930d01fe68 (diff) |
tracing: Add tracepoints for hotplug
Simple trace points for measuring hotplug up/down times.
Bug 960310
Change-Id: I1927aae6edb74cba7ca3e9522d138407b48325dc
Signed-off-by: Antti P Miettinen <amiettinen@nvidia.com>
Reviewed-on: http://git-master/r/92920
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Satya Popuri <spopuri@nvidia.com>
Reviewed-by: Diwakar Tundlam <dtundlam@nvidia.com>
Reviewed-by: Juha Tukkinen <jtukkinen@nvidia.com>
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/cpu.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/kernel/cpu.c b/kernel/cpu.c index eae3d9b39574..f9bb3d498fb4 100644 --- a/kernel/cpu.c +++ b/kernel/cpu.c @@ -16,6 +16,7 @@ #include <linux/mutex.h> #include <linux/gfp.h> #include <linux/suspend.h> +#include <trace/events/power.h> #ifdef CONFIG_SMP /* Serializes the updates to cpu_online_mask, cpu_present_mask */ @@ -274,6 +275,8 @@ int __ref cpu_down(unsigned int cpu) { int err; + trace_cpu_hotplug(cpu, POWER_CPU_DOWN_START); + cpu_maps_update_begin(); if (cpu_hotplug_disabled) { @@ -285,6 +288,7 @@ int __ref cpu_down(unsigned int cpu) out: cpu_maps_update_done(); + trace_cpu_hotplug(cpu, POWER_CPU_DOWN_DONE); return err; } EXPORT_SYMBOL(cpu_down); @@ -335,6 +339,8 @@ int __cpuinit cpu_up(unsigned int cpu) pg_data_t *pgdat; #endif + trace_cpu_hotplug(cpu, POWER_CPU_UP_START); + if (!cpu_possible(cpu)) { printk(KERN_ERR "can't online cpu %d because it is not " "configured as may-hotadd at boot time\n", cpu); @@ -378,6 +384,7 @@ int __cpuinit cpu_up(unsigned int cpu) out: cpu_maps_update_done(); + trace_cpu_hotplug(cpu, POWER_CPU_UP_DONE); return err; } |