mirror of
https://github.com/torvalds/linux.git
synced 2026-06-08 22:52:35 +02:00
ANDROID: sched/events: Introduce find_best_target trace event
Adapated from the existing trace event from android-4.14. Change-Id: I9785e692fb0af087c236906d7f47fed1b20690f5 Signed-off-by: Quentin Perret <quentin.perret@arm.com>
This commit is contained in:
parent
8eb64d5f73
commit
171db7dcae
|
|
@ -779,6 +779,47 @@ TRACE_EVENT(sched_util_est_cpu,
|
|||
__entry->util_avg,
|
||||
__entry->util_est_enqueued)
|
||||
);
|
||||
|
||||
/*
|
||||
* Tracepoint for find_best_target
|
||||
*/
|
||||
TRACE_EVENT(sched_find_best_target,
|
||||
|
||||
TP_PROTO(struct task_struct *tsk, bool prefer_idle,
|
||||
unsigned long min_util, int best_idle, int best_active,
|
||||
int target, int backup),
|
||||
|
||||
TP_ARGS(tsk, prefer_idle, min_util, best_idle,
|
||||
best_active, target, backup),
|
||||
|
||||
TP_STRUCT__entry(
|
||||
__array( char, comm, TASK_COMM_LEN )
|
||||
__field( pid_t, pid )
|
||||
__field( unsigned long, min_util )
|
||||
__field( bool, prefer_idle )
|
||||
__field( int, best_idle )
|
||||
__field( int, best_active )
|
||||
__field( int, target )
|
||||
__field( int, backup )
|
||||
),
|
||||
|
||||
TP_fast_assign(
|
||||
memcpy(__entry->comm, tsk->comm, TASK_COMM_LEN);
|
||||
__entry->pid = tsk->pid;
|
||||
__entry->min_util = min_util;
|
||||
__entry->prefer_idle = prefer_idle;
|
||||
__entry->best_idle = best_idle;
|
||||
__entry->best_active = best_active;
|
||||
__entry->target = target;
|
||||
__entry->backup = backup;
|
||||
),
|
||||
|
||||
TP_printk("pid=%d comm=%s prefer_idle=%d "
|
||||
"best_idle=%d best_active=%d target=%d backup=%d",
|
||||
__entry->pid, __entry->comm, __entry->prefer_idle,
|
||||
__entry->best_idle, __entry->best_active,
|
||||
__entry->target, __entry->backup)
|
||||
);
|
||||
#endif /* CONFIG_SMP */
|
||||
#endif /* _TRACE_SCHED_H */
|
||||
|
||||
|
|
|
|||
|
|
@ -6789,6 +6789,9 @@ static void find_best_target(struct sched_domain *sd, cpumask_t *cpus,
|
|||
target:
|
||||
cpumask_set_cpu(target_cpu, cpus);
|
||||
}
|
||||
|
||||
trace_sched_find_best_target(p, prefer_idle, min_util, best_idle_cpu,
|
||||
best_active_cpu, target_cpu, backup_cpu);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user