summaryrefslogtreecommitdiff
path: root/include/trace/events
diff options
context:
space:
mode:
authorJoonwoo Park <joonwoop@codeaurora.org>2015-08-24 15:40:13 -0700
committerDavid Keitel <dkeitel@codeaurora.org>2016-03-23 20:02:32 -0700
commitcee02f81686a7295bc93252ca572456017bc641a (patch)
tree0c1d1f41aa02dd89b400b2ee2aecd6362adb354c /include/trace/events
parentb2e60dbe086b878dfb9a01ece93c2352e6bf8747 (diff)
sched: update sched_task_load trace event
Add best_cpu and latency field to sched_task_load trace event. The latency field represents combined latency of update_task_ravg(), update_task_ravg() and select_best_cpu() which is useful to analyze latency overhead of HMP scheduler. Change-Id: Ie6d777c918d0414d361d758490e3cd7d509f5837 Signed-off-by: Joonwoo Park <joonwoop@codeaurora.org>
Diffstat (limited to 'include/trace/events')
-rw-r--r--include/trace/events/sched.h14
1 files changed, 10 insertions, 4 deletions
diff --git a/include/trace/events/sched.h b/include/trace/events/sched.h
index ae04e2095389..235b61182e64 100644
--- a/include/trace/events/sched.h
+++ b/include/trace/events/sched.h
@@ -116,9 +116,9 @@ TRACE_EVENT(sched_enq_deq_task,
TRACE_EVENT(sched_task_load,
TP_PROTO(struct task_struct *p, int boost, int reason,
- int sync, int need_idle),
+ int sync, int need_idle, int best_cpu),
- TP_ARGS(p, boost, reason, sync, need_idle),
+ TP_ARGS(p, boost, reason, sync, need_idle, best_cpu),
TP_STRUCT__entry(
__array( char, comm, TASK_COMM_LEN )
@@ -131,6 +131,8 @@ TRACE_EVENT(sched_task_load,
__field( int, reason )
__field( int, sync )
__field( int, need_idle )
+ __field( int, best_cpu )
+ __field( u64, latency )
),
TP_fast_assign(
@@ -144,12 +146,16 @@ TRACE_EVENT(sched_task_load,
__entry->reason = reason;
__entry->sync = sync;
__entry->need_idle = need_idle;
+ __entry->best_cpu = best_cpu;
+ __entry->latency = p->state == TASK_WAKING ?
+ sched_clock() - p->ravg.mark_start : 0;
),
- TP_printk("%d (%s): sum=%u, sum_scaled=%u, period=%u demand=%u boost=%d reason=%d sync=%d, need_idle=%d",
+ TP_printk("%d (%s): sum=%u, sum_scaled=%u, period=%u demand=%u boost=%d reason=%d sync=%d need_idle=%d best_cpu=%d latency=%llu",
__entry->pid, __entry->comm, __entry->sum,
__entry->sum_scaled, __entry->period, __entry->demand,
- __entry->boost, __entry->reason, __entry->sync, __entry->need_idle)
+ __entry->boost, __entry->reason, __entry->sync,
+ __entry->need_idle, __entry->best_cpu, __entry->latency)
);
TRACE_EVENT(sched_cpu_load,