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

Commit 96032468 authored by Chris Redpath's avatar Chris Redpath Committed by Gerrit - the friendly Code Review server
Browse files

ANDROID: trace/sched: Add tracepoint for sched_overutilized events



Change-Id: Ieb46736cb21fe58024c434cd678af0abb8b0d249
Signed-off-by: default avatarChris Redpath <chris.redpath@arm.com>
Git-commit: 7022c871dfc7215d32df21936876a4d9bafeaf50
Git-repo: https://android.googlesource.com/kernel/common/


[clingutla@codeaurora.org: Resolved trivial merge conflicts]
Signed-off-by: default avatarLingutla Chandrasekhar <clingutla@codeaurora.org>
[satyap@codeaurora.org: port to 5.x and resolve trivial merge conflicts]
Signed-off-by: default avatarSatya Durga Srinivasu Prabhala <satyap@codeaurora.org>
parent de785069
Loading
Loading
Loading
Loading
+28 −0
Original line number Diff line number Diff line
@@ -1105,6 +1105,34 @@ TRACE_EVENT(sched_find_best_target,
		  __entry->target, __entry->backup)
);

/*
 * Tracepoint for system overutilized flag
 */
#ifdef CONFIG_SCHED_WALT
struct sched_domain;
TRACE_EVENT_CONDITION(sched_overutilized,

	TP_PROTO(struct sched_domain *sd, bool was_overutilized, bool overutilized),

	TP_ARGS(sd, was_overutilized, overutilized),

	TP_CONDITION(overutilized != was_overutilized),

	TP_STRUCT__entry(
		__field( bool,	overutilized	  )
		__array( char,  cpulist , 32      )
	),

	TP_fast_assign(
		__entry->overutilized	= overutilized;
		scnprintf(__entry->cpulist, sizeof(__entry->cpulist), "%*pbl", cpumask_pr_args(sched_domain_span(sd)));
	),

	TP_printk("overutilized=%d sd_span=%s",
		__entry->overutilized ? 1 : 0, __entry->cpulist)
);
#endif

TRACE_EVENT(sched_preempt_disable,

	TP_PROTO(u64 delta, bool irqs_disabled,
+2 −0
Original line number Diff line number Diff line
@@ -5305,11 +5305,13 @@ static bool sd_overutilized(struct sched_domain *sd)

static void set_sd_overutilized(struct sched_domain *sd)
{
	trace_sched_overutilized(sd, sd->shared->overutilized, true);
	sd->shared->overutilized = true;
}

static void clear_sd_overutilized(struct sched_domain *sd)
{
	trace_sched_overutilized(sd, sd->shared->overutilized, false);
	sd->shared->overutilized = false;
}
#endif