From: Patrick Bellasi Date: Mon, 22 Jun 2015 12:51:07 +0000 (+0100) Subject: DEBUG: schedtune: add tracepoint for CPU boost signal X-Git-Tag: firefly_0821_release~176^2~232 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=37437e7367e443498a23f49144471a4f3594121d;p=firefly-linux-kernel-4.4.55.git DEBUG: schedtune: add tracepoint for CPU boost signal Signed-off-by: Patrick Bellasi --- diff --git a/include/trace/events/sched.h b/include/trace/events/sched.h index f4ce46f0a4c4..d5563004033f 100644 --- a/include/trace/events/sched.h +++ b/include/trace/events/sched.h @@ -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 */ diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index 7d1302d85818..4fd9ddad3f69 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -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; }