diff options
author | Patrick Bellasi <patrick.bellasi@arm.com> | 2015-06-24 15:36:08 +0100 |
---|---|---|
committer | Vincent Guittot <vincent.guittot@linaro.org> | 2015-08-10 17:57:11 +0200 |
commit | 4ac692746b83098abe4eab886f1cc8d76cbf8ec7 (patch) | |
tree | 9d7e6895c3e6b588a410ba847dddc8fed854374a | |
parent | 9f67152892a63705d7f5f0283cb076d755bf8a08 (diff) |
DEBUG: schedtune: add tracepoint for schedtune_tasks_update() values
Change-Id: Ieb6e2c7cf0ee09bfda0fae8f1d7ad747a0013540
Signed-off-by: Patrick Bellasi <patrick.bellasi@arm.com>
-rw-r--r-- | include/trace/events/sched.h | 37 | ||||
-rw-r--r-- | kernel/sched/tune.c | 4 |
2 files changed, 41 insertions, 0 deletions
diff --git a/include/trace/events/sched.h b/include/trace/events/sched.h index cad7002b1446..ae6dd1e0c6d2 100644 --- a/include/trace/events/sched.h +++ b/include/trace/events/sched.h @@ -790,6 +790,43 @@ TRACE_EVENT(sched_energy_diff, __entry->nrgn, __entry->nrgp) ); +/* + * Tracepoint for schedtune_tasks_update + */ +TRACE_EVENT(sched_tune_tasks_update, + + TP_PROTO(struct task_struct *tsk, int cpu, int tasks, int idx, + unsigned int boost, unsigned int max_boost), + + TP_ARGS(tsk, cpu, tasks, idx, boost, max_boost), + + TP_STRUCT__entry( + __array( char, comm, TASK_COMM_LEN ) + __field( pid_t, pid ) + __field( int, cpu ) + __field( int, tasks ) + __field( int, idx ) + __field( unsigned int, boost ) + __field( unsigned int, max_boost ) + ), + + TP_fast_assign( + memcpy(__entry->comm, tsk->comm, TASK_COMM_LEN); + __entry->pid = tsk->pid; + __entry->cpu = cpu; + __entry->tasks = tasks; + __entry->idx = idx; + __entry->boost = boost; + __entry->max_boost = max_boost; + ), + + TP_printk("pid=%d comm=%s " + "cpu=%d tasks=%d idx=%d boost=%u max_boost=%u", + __entry->pid, __entry->comm, + __entry->cpu, __entry->tasks, __entry->idx, + __entry->boost, __entry->max_boost) +); + #endif /* _TRACE_SCHED_H */ /* This part must be outside protection */ diff --git a/kernel/sched/tune.c b/kernel/sched/tune.c index fd7278c353ad..4274e711266e 100644 --- a/kernel/sched/tune.c +++ b/kernel/sched/tune.c @@ -362,6 +362,10 @@ schedtune_tasks_update(struct task_struct *p, int cpu, int idx, int task_count) tasks = bg->group[idx].tasks; if (tasks == 1 || tasks == 0) schedtune_cpu_update(cpu); + + trace_sched_tune_tasks_update(p, cpu, tasks, idx, + bg->group[idx].boost, bg->boost_max); + } /* |