Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3124a5b9 authored by Chris Redpath's avatar Chris Redpath Committed by Quentin Perret
Browse files

ANDROID: sched/events: Introduce rt_rq load tracking trace event



We want to be able to track rt_rq signals same as we do for other RQs.

Signed-off-by: default avatarChris Redpath <chris.redpath@arm.com>
(cherry-picked from commit 574a2d189695c334ae290f522b098f05398a3765)
[ - Fixed conflicts with the refactored RT util_avg tracking
  - Changed commit title for consistency with other tracepoint patches ]
Signed-off-by: default avatarQuentin Perret <quentin.perret@arm.com>
Change-Id: I38b64baa50e1ff86019ca4b8b0a04af994880b35
parent 8c850534
Loading
Loading
Loading
Loading
+24 −0
Original line number Diff line number Diff line
@@ -647,6 +647,30 @@ TRACE_EVENT(sched_load_cfs_rq,
		  __entry->rbl_load,__entry->util)
);

/*
 * Tracepoint for rt_rq load tracking:
 */
struct rq;
TRACE_EVENT(sched_load_rt_rq,

	TP_PROTO(struct rq *rq),

	TP_ARGS(rq),

	TP_STRUCT__entry(
		__field(	int,		cpu			)
		__field(	unsigned long,	util			)
	),

	TP_fast_assign(
		__entry->cpu	= rq->cpu;
		__entry->util	= rq->avg_rt.util_avg;
	),

	TP_printk("cpu=%d util=%lu", __entry->cpu,
		  __entry->util)
);

/*
 * Tracepoint for sched_entity load tracking:
 */
+3 −0
Original line number Diff line number Diff line
@@ -340,6 +340,9 @@ int update_rt_rq_load_avg(u64 now, struct rq *rq, int running)
				running)) {

		___update_load_avg(&rq->avg_rt, 1, 1);

		trace_sched_load_rt_rq(rq);

		return 1;
	}