diff options
author | Patrick Bellasi <patrick.bellasi@arm.com> | 2016-01-14 11:38:30 +0000 |
---|---|---|
committer | Jon Medhurst <tixy@linaro.org> | 2016-04-13 11:45:45 +0100 |
commit | d6a8abaf39c4460991de898296ca2021c4a8586f (patch) | |
tree | ae580967483f8c963c822ff514996ef6f84b5b89 | |
parent | de154091fc82475f186625a2e8e65df20098bfe0 (diff) |
DEBUG: schedtune: add tracepoint on boostgroup updates
Change-Id: I7a1bb15bd17111885e2db3bdfced8a3d4a9410e5
Signed-off-by: Patrick Bellasi <patrick.bellasi@arm.com>
-rw-r--r-- | include/trace/events/sched.h | 25 | ||||
-rw-r--r-- | kernel/sched/tune.c | 8 |
2 files changed, 32 insertions, 1 deletions
diff --git a/include/trace/events/sched.h b/include/trace/events/sched.h index 00ec8ef3f24c..114364c88497 100644 --- a/include/trace/events/sched.h +++ b/include/trace/events/sched.h @@ -740,6 +740,31 @@ TRACE_EVENT(sched_tune_tasks_update, __entry->boost, __entry->max_boost) ); +/* + * Tracepoint for schedtune_boostgroup_update + */ +TRACE_EVENT(sched_tune_boostgroup_update, + + TP_PROTO(int cpu, int variation, int max_boost), + + TP_ARGS(cpu, variation, max_boost), + + TP_STRUCT__entry( + __field( int, cpu ) + __field( int, variation ) + __field( int, max_boost ) + ), + + TP_fast_assign( + __entry->cpu = cpu; + __entry->variation = variation; + __entry->max_boost = max_boost; + ), + + TP_printk("cpu=%d variation=%d max_boost=%d", + __entry->cpu, __entry->variation, __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 48938553c306..7d00f6f31de2 100644 --- a/kernel/sched/tune.c +++ b/kernel/sched/tune.c @@ -264,12 +264,18 @@ schedtune_boostgroup_update(int idx, int boost) /* Check if this update increase current max */ if (boost > cur_boost_max && bg->group[idx].tasks) { bg->boost_max = boost; + trace_sched_tune_boostgroup_update(cpu, 1, bg->boost_max); continue; } /* Check if this update has decreased current max */ - if (cur_boost_max == old_boost && old_boost > boost) + if (cur_boost_max == old_boost && old_boost > boost) { schedtune_cpu_update(cpu); + trace_sched_tune_boostgroup_update(cpu, -1, bg->boost_max); + continue; + } + + trace_sched_tune_boostgroup_update(cpu, 0, bg->boost_max); } return 0; |