diff options
| author | Arun Bharadwaj <abharadw@codeaurora.org> | 2013-07-03 10:35:02 -0700 |
|---|---|---|
| committer | John Stultz <john.stultz@linaro.org> | 2016-02-16 13:53:29 -0800 |
| commit | a2b15c0b536307192d86d310b78b4542fa4cc3dc (patch) | |
| tree | d056217e09562299fed200ba374af7cf9b30fc48 /include/trace | |
| parent | 99dd30a309b22219bf98146141f27030ab8fff33 (diff) | |
tracing/sched: Add trace events to track cpu hotplug.
Add ftrace event trace_sched_cpu_hotplug to track cpu
hot-add and hot-remove events.
This is useful in a variety of power, performance and
debug analysis scenarios.
Change-Id: I5d202c7a229ffacc3aafb7cf9afee0b0ee7b0931
Signed-off-by: Arun Bharadwaj <abharadw@codeaurora.org>
Diffstat (limited to 'include/trace')
| -rw-r--r-- | include/trace/events/sched.h | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/include/trace/events/sched.h b/include/trace/events/sched.h index 3211890ee7d5..d34eba74af27 100644 --- a/include/trace/events/sched.h +++ b/include/trace/events/sched.h @@ -191,6 +191,31 @@ TRACE_EVENT(sched_migrate_task, __entry->orig_cpu, __entry->dest_cpu) ); +/* + * Tracepoint for a CPU going offline/online: + */ +TRACE_EVENT(sched_cpu_hotplug, + + TP_PROTO(int affected_cpu, int error, int status), + + TP_ARGS(affected_cpu, error, status), + + TP_STRUCT__entry( + __field( int, affected_cpu ) + __field( int, error ) + __field( int, status ) + ), + + TP_fast_assign( + __entry->affected_cpu = affected_cpu; + __entry->error = error; + __entry->status = status; + ), + + TP_printk("cpu %d %s error=%d", __entry->affected_cpu, + __entry->status ? "online" : "offline", __entry->error) +); + DECLARE_EVENT_CLASS(sched_process_template, TP_PROTO(struct task_struct *p), |
