summaryrefslogtreecommitdiff
path: root/kernel
diff options
context:
space:
mode:
authorAntti P Miettinen <amiettinen@nvidia.com>2012-03-28 20:42:55 +0300
committerDan Willemsen <dwillemsen@nvidia.com>2013-09-14 01:32:38 -0700
commit90c5c20f058c62e593641d042b98c57d80e1f963 (patch)
tree4d448bc62190bb554839067c7b8fbec719370442 /kernel
parentd9799e098c1c711e9108457fab304882446b7361 (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> Rebase-Id: R9a5ff4f33d9d5f06ea7b4660a6567680398eefb1
Diffstat (limited to 'kernel')
-rw-r--r--kernel/cpu.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/kernel/cpu.c b/kernel/cpu.c
index 198a38883e64..d0a9b076a6fb 100644
--- a/kernel/cpu.c
+++ b/kernel/cpu.c
@@ -19,6 +19,7 @@
#include <linux/mutex.h>
#include <linux/gfp.h>
#include <linux/suspend.h>
+#include <trace/events/power.h>
#include "smpboot.h"
@@ -349,6 +350,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) {
@@ -360,6 +363,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);
@@ -428,6 +432,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);
@@ -471,6 +477,7 @@ int __cpuinit cpu_up(unsigned int cpu)
out:
cpu_maps_update_done();
+ trace_cpu_hotplug(cpu, POWER_CPU_UP_DONE);
return err;
}
EXPORT_SYMBOL_GPL(cpu_up);