tracing: Add tracepoints for hotplug
Simple trace points for measuring hotplug up/down times.
Bug 960310
Bug 200194487
Change-Id: I1927aae6edb74cba7ca3e9522d138407b48325dc
Signed-off-by: Antti P Miettinen <amiettinen@nvidia.com>
Reviewed-on: http://git-master/r/92920
Rebase-Id: R9a5ff4f33d9d5f06ea7b4660a6567680398eefb1
(cherry picked from commit 6c53f6d35cdf080d8f137a786f994883e53764c5)
Reviewed-on: http://git-master/r/1224311
GVS: Gerrit_Virtual_Submit
Reviewed-by: Timo Alho <talho@nvidia.com>
diff --git a/kernel/cpu.c b/kernel/cpu.c
index 3773129..91776f3 100644
--- a/kernel/cpu.c
+++ b/kernel/cpu.c
@@ -437,6 +437,8 @@
{
int err;
+ trace_cpu_hotplug(cpu, POWER_CPU_DOWN_START);
+
cpu_maps_update_begin();
if (cpu_hotplug_disabled) {
@@ -448,6 +450,7 @@
out:
cpu_maps_update_done();
+ trace_cpu_hotplug(cpu, POWER_CPU_DOWN_DONE);
return err;
}
EXPORT_SYMBOL(cpu_down);
@@ -542,6 +545,8 @@
{
int err = 0;
+ trace_cpu_hotplug(cpu, POWER_CPU_UP_START);
+
if (!cpu_possible(cpu)) {
pr_err("can't online cpu %d because it is not configured as may-hotadd at boot time\n",
cpu);
@@ -566,6 +571,7 @@
out:
cpu_maps_update_done();
+ trace_cpu_hotplug(cpu, POWER_CPU_UP_DONE);
return err;
}
EXPORT_SYMBOL_GPL(cpu_up);