DEBUG: schedtune: add tracepoint for CPU boost signal
authorPatrick Bellasi <patrick.bellasi@arm.com>
Mon, 22 Jun 2015 12:51:07 +0000 (13:51 +0100)
committerAmit Pundir <amit.pundir@linaro.org>
Wed, 14 Sep 2016 09:29:32 +0000 (14:59 +0530)
Signed-off-by: Patrick Bellasi <patrick.bellasi@arm.com>
include/trace/events/sched.h
kernel/sched/fair.c

index f4ce46f0a4c40d79a306cf4ee474a7eef1a3041d..d5563004033f07c0017d7c481764a444e0ce26a8 100644 (file)
@@ -724,6 +724,33 @@ TRACE_EVENT(sched_tune_config,
        TP_printk("boost=%d ", __entry->boost)
 );
 
+/*
+ * Tracepoint for accounting CPU  boosted utilization
+ */
+TRACE_EVENT(sched_boost_cpu,
+
+       TP_PROTO(int cpu, unsigned long util, unsigned long margin),
+
+       TP_ARGS(cpu, util, margin),
+
+       TP_STRUCT__entry(
+               __field( int,           cpu                     )
+               __field( unsigned long, util                    )
+               __field( unsigned long, margin                  )
+       ),
+
+       TP_fast_assign(
+               __entry->cpu    = cpu;
+               __entry->util   = util;
+               __entry->margin = margin;
+       ),
+
+       TP_printk("cpu=%d util=%lu margin=%lu",
+                 __entry->cpu,
+                 __entry->util,
+                 __entry->margin)
+);
+
 #endif /* _TRACE_SCHED_H */
 
 /* This part must be outside protection */
index 7d1302d85818cbc878f6bd601b26b4ada9161b88..4fd9ddad3f691e49b20337ac5b9007a409733a51 100644 (file)
@@ -5293,6 +5293,8 @@ boosted_cpu_util(int cpu)
        unsigned long util = cpu_util(cpu);
        unsigned long margin = schedtune_cpu_margin(util, cpu);
 
+       trace_sched_boost_cpu(cpu, util, margin);
+
        return util + margin;
 }