From b5e5c73d6d5889d245c17910020f77af5da04a16 Mon Sep 17 00:00:00 2001 From: Andy Park Date: Tue, 1 May 2012 08:53:26 -0700 Subject: tracing: Add tracepoints for hotplug Simple trace points for measuring hotplug up/down times. Bug 960310 Change-Id: I74dd3c5cddcc1ded02ad08a7ce38bacf3147ee3e Reviewed-on: http://git-master/r/99806 Reviewed-by: Andy Park Tested-by: Andy Park Reviewed-by: Prajakta Gudadhe --- kernel/cpu.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'kernel') 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 #include #include +#include #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; } -- cgit v1.2.3