ANDROID: sched/events: Introduce cfs_rq load tracking trace event
The trace event keys load and util (utilization) are mapped to:
(1) load : cfs_rq->runnable_load_avg
(2) util : cfs_rq->avg.util_avg
To let this trace event work for configurations w/ and w/o group
scheduling support for cfs (CONFIG_FAIR_GROUP_SCHED) the following
special handling is necessary for non-existent key=value pairs:
path = "(null)" : In case of !CONFIG_FAIR_GROUP_SCHED.
The following list shows examples of the key=value pairs in different
configurations for:
(1) a root task_group:
cpu=4 path=/ load=6 util=331
(2) a task_group:
cpu=1 path=/tg1/tg11/tg111 load=538 util=522
(3) an autogroup:
cpu=3 path=/autogroup-18 load=997 util=517
(4) w/o CONFIG_FAIR_GROUP_SCHED:
cpu=0 path=(null) load=314 util=289
The trace event is only defined for CONFIG_SMP.
The helper function __trace_sched_path() can be used to get the length
parameter of the dynamic array (path == NULL) and to copy the path into
it (path != NULL).
Signed-off-by:
Dietmar Eggemann <dietmar.eggemann@arm.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by:
Dietmar Eggemann <dietmar.eggemann@arm.com>
Change-Id: Iae08075d889dd772c8d2e1a15dc2ca6589e5640e
Signed-off-by:
Chris Redpath <chris.redpath@arm.com>
Loading
Please register or sign in to comment