aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Bellasi <patrick.bellasi@arm.com>2015-06-22 14:11:22 +0100
committerJuri Lelli <juri.lelli@arm.com>2015-10-05 12:21:26 +0100
commit9271a3aa035412333aa9ea55e3de114b8ae12981 (patch)
tree144ceed65012f95d449b55f3682b4fa7ecd9e9e2
parent5151c37242b8489d7ba23f235537de4b8dd67c4c (diff)
downloadlinux-linaro-stable-9271a3aa035412333aa9ea55e3de114b8ae12981.tar.gz
DEBUG: schedtune: add tracepoint on boostgroup updates
Change-Id: I993971dde9af5e8914fc9dbc7c675a9f7bae0bba Signed-off-by: Patrick Bellasi <patrick.bellasi@arm.com>
-rw-r--r--include/trace/events/sched.h25
-rw-r--r--kernel/sched/tune.c5
2 files changed, 30 insertions, 0 deletions
diff --git a/include/trace/events/sched.h b/include/trace/events/sched.h
index 32ce2e7f864e..7308931f88d7 100644
--- a/include/trace/events/sched.h
+++ b/include/trace/events/sched.h
@@ -851,6 +851,31 @@ TRACE_EVENT(sched_tune_filter,
__entry->nrg_payoff, __entry->region)
);
+/*
+ * 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 9760a3f0b5cd..2ec7e63524a5 100644
--- a/kernel/sched/tune.c
+++ b/kernel/sched/tune.c
@@ -348,13 +348,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) {
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;