diff options
author | Alex Van Brunt <avanbrunt@nvidia.com> | 2014-05-07 09:43:46 -0700 |
---|---|---|
committer | Riham Haidar <rhaidar@nvidia.com> | 2014-05-14 15:28:34 -0700 |
commit | 805cd22eb9583894d9241a69779996210c127b7c (patch) | |
tree | bf6b76988572db269ec9f7158e1cdce9ef8da39b | |
parent | 9e016f02bc067441963da6d0cc48e92fdb874072 (diff) |
sched: add event for context switch end
Add a trace envent for the end of a context switch. The makes it
possible to account for the time spent context switching using the
event log.
Change-Id: Idc7bcc47cf51d5e2200e2f9380ba0100e1e56884
Signed-off-by: Alex Van Brunt <avanbrunt@nvidia.com>
Reviewed-on: http://git-master/r/407689
GVS: Gerrit_Virtual_Submit
-rw-r--r-- | include/trace/events/sched.h | 16 | ||||
-rw-r--r-- | kernel/sched/core.c | 1 |
2 files changed, 17 insertions, 0 deletions
diff --git a/include/trace/events/sched.h b/include/trace/events/sched.h index e5586caff67a..725c0cbb6caf 100644 --- a/include/trace/events/sched.h +++ b/include/trace/events/sched.h @@ -152,6 +152,22 @@ TRACE_EVENT(sched_switch, __entry->next_comm, __entry->next_pid, __entry->next_prio) ); +TRACE_EVENT(sched_switch_end, + + TP_PROTO(u32 a), + + TP_ARGS(a), + + TP_STRUCT__entry( + ), + + TP_fast_assign( + ), + + TP_printk("none %d", 0) +); + + /* * Tracepoint for a task being migrated: */ diff --git a/kernel/sched/core.c b/kernel/sched/core.c index d10482a0c683..3bfa39888f70 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c @@ -2047,6 +2047,7 @@ context_switch(struct rq *rq, struct task_struct *prev, * frame will be invalid. */ finish_task_switch(this_rq(), prev); + trace_sched_switch_end(0); } /* |