TP_printk("pre_cpu_mask=%x, cpu=%u, on=%s", __entry->pre_cpu_mask,
__entry->cpu, __entry->on? "ON" : "OFF")
);
+
+TRACE_EVENT(cpus_up_enter,
+
+ TP_PROTO(int cpu),
+
+ TP_ARGS(cpu),
+
+ TP_STRUCT__entry(
+ __field(int, cpu)
+ ),
+
+ TP_fast_assign(
+ __entry->cpu = cpu;
+ ),
+
+ TP_printk("enter cpus_up cpu%d", __entry->cpu)
+);
+
+TRACE_EVENT(cpus_up_exit,
+
+ TP_PROTO(int cpu),
+
+ TP_ARGS(cpu),
+
+ TP_STRUCT__entry(
+ __field(int, cpu)
+ ),
+
+ TP_fast_assign(
+ __entry->cpu = cpu;
+ ),
+
+ TP_printk("exit cpus_up cpu%d", __entry->cpu)
+);
+
+TRACE_EVENT(cpus_down_enter,
+
+ TP_PROTO(int cpu),
+
+ TP_ARGS(cpu),
+
+ TP_STRUCT__entry(
+ __field(int, cpu)
+ ),
+
+ TP_fast_assign(
+ __entry->cpu = cpu;
+ ),
+
+ TP_printk("enter cpus_down cpu%d", __entry->cpu)
+);
+
+TRACE_EVENT(cpus_down_exit,
+
+ TP_PROTO(int cpu),
+
+ TP_ARGS(cpu),
+
+ TP_STRUCT__entry(
+ __field(int, cpu)
+ ),
+
+ TP_fast_assign(
+ __entry->cpu = cpu;
+ ),
+
+ TP_printk("exit cpus_down cpu%d", __entry->cpu)
+);
+
#endif /* _TRACE_POWER_H */
/* This part must be outside protection */
{
int err, cpu;
+ trace_cpus_down_enter(cpumask_first(&cpus));
cpu_maps_update_begin();
if (cpu_hotplug_disabled) {
out:
cpu_maps_update_done();
+ trace_cpus_down_exit(cpumask_first(&cpus));
return err;
}
EXPORT_SYMBOL_GPL(cpus_down);
{
int cpu, err = 0;
+ trace_cpus_up_enter(cpumask_first(&cpus));
for_each_cpu(cpu, &cpus)
if (cpu_online(cpu)) {
cpumask_clear_cpu(cpu, &cpus);
err = _cpus_up(cpus, 0, CPUHP_ONLINE);
out:
cpu_maps_update_done();
+ trace_cpus_up_exit(cpumask_first(&cpus));
return err;
}