DEBUG: sched: add tracepoint for CPU load/util signals
Signed-off-by: Juri Lelli <juri.lelli@arm.com>
This commit is contained in:
parent
c604a5fa23
commit
69852bd9a3
2 changed files with 26 additions and 0 deletions
|
@ -678,6 +678,31 @@ TRACE_EVENT(sched_load_avg_task,
|
|||
(u32)__entry->util_sum,
|
||||
(u32)__entry->period_contrib)
|
||||
);
|
||||
|
||||
/*
|
||||
* Tracepoint for accounting sched averages for cpus.
|
||||
*/
|
||||
TRACE_EVENT(sched_load_avg_cpu,
|
||||
|
||||
TP_PROTO(int cpu, struct cfs_rq *cfs_rq),
|
||||
|
||||
TP_ARGS(cpu, cfs_rq),
|
||||
|
||||
TP_STRUCT__entry(
|
||||
__field( int, cpu )
|
||||
__field( unsigned long, load_avg )
|
||||
__field( unsigned long, util_avg )
|
||||
),
|
||||
|
||||
TP_fast_assign(
|
||||
__entry->cpu = cpu;
|
||||
__entry->load_avg = cfs_rq->avg.load_avg;
|
||||
__entry->util_avg = cfs_rq->avg.util_avg;
|
||||
),
|
||||
|
||||
TP_printk("cpu=%d load_avg=%lu util_avg=%lu",
|
||||
__entry->cpu, __entry->load_avg, __entry->util_avg)
|
||||
);
|
||||
#endif /* _TRACE_SCHED_H */
|
||||
|
||||
/* This part must be outside protection */
|
||||
|
|
|
@ -2749,6 +2749,7 @@ static inline void update_load_avg(struct sched_entity *se, int update_tg)
|
|||
|
||||
if (entity_is_task(se))
|
||||
trace_sched_load_avg_task(task_of(se), &se->avg);
|
||||
trace_sched_load_avg_cpu(cpu, cfs_rq);
|
||||
}
|
||||
|
||||
static void attach_entity_load_avg(struct cfs_rq *cfs_rq, struct sched_entity *se)
|
||||
|
|
Loading…
Add table
Reference in a new issue