DEBUG: schedtune: add tracepoint for SchedTune configuration update
authorPatrick Bellasi <patrick.bellasi@arm.com>
Mon, 22 Jun 2015 12:49:07 +0000 (13:49 +0100)
committerLeo Yan <leo.yan@linaro.org>
Tue, 10 May 2016 08:54:42 +0000 (16:54 +0800)
Signed-off-by: Patrick Bellasi <patrick.bellasi@arm.com>
include/trace/events/sched.h
kernel/sched/tune.c

index f58760c2f7128612ae42ecd554d91a35aa98071c..8ae43a2ebfda3ceaacbc6eb6784e6f9ddd3ab94e 100644 (file)
@@ -654,6 +654,27 @@ TRACE_EVENT(sched_load_avg_cpu,
        TP_printk("cpu=%d load_avg=%lu util_avg=%lu",
                  __entry->cpu, __entry->load_avg, __entry->util_avg)
 );
+
+/*
+ * Tracepoint for sched_tune_config settings
+ */
+TRACE_EVENT(sched_tune_config,
+
+       TP_PROTO(int boost),
+
+       TP_ARGS(boost),
+
+       TP_STRUCT__entry(
+               __field( int,   boost           )
+       ),
+
+       TP_fast_assign(
+               __entry->boost  = boost;
+       ),
+
+       TP_printk("boost=%d ", __entry->boost)
+);
+
 #endif /* _TRACE_SCHED_H */
 
 /* This part must be outside protection */
index 1a8ba5a6d99b1b1649f0898c09d7e48f2693a645..f5f4c57efb9eb2f0704c7b8c9f16c224767b5e09 100644 (file)
@@ -7,6 +7,8 @@
 #include <linux/rcupdate.h>
 #include <linux/slab.h>
 
+#include <trace/events/sched.h>
+
 #include "sched.h"
 
 unsigned int sysctl_sched_cfs_boost __read_mostly;
@@ -392,6 +394,8 @@ boost_write(struct cgroup_subsys_state *css, struct cftype *cft,
        /* Update CPU boost */
        schedtune_boostgroup_update(st->idx, st->boost);
 
+       trace_sched_tune_config(st->boost);
+
        return 0;
 }