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

Commit 2620eb5a authored by Chris Redpath's avatar Chris Redpath Committed by Lingutla Chandrasekhar
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>
parent f6ee05f9
Loading
Loading
Loading
Loading
+13 −8
Original line number Diff line number Diff line
@@ -1511,22 +1511,28 @@ TRACE_EVENT(sched_boost_task,
/*
 * Tracepoint for system overutilized flag
*/
TRACE_EVENT(sched_overutilized,

	TP_PROTO(int overutilized),
struct sched_domain;
TRACE_EVENT_CONDITION(sched_overutilized,

	TP_ARGS(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( int,  overutilized    )
		__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",
		__entry->overutilized)
	TP_printk("overutilized=%d sd_span=%s",
		__entry->overutilized ? 1 : 0, __entry->cpulist)
);

/*
@@ -1628,7 +1634,6 @@ TRACE_EVENT(sched_preempt_disable,
);

#include "walt.h"

#endif /* CONFIG_SMP */
#endif /* _TRACE_SCHED_H */

+2 −0
Original line number Diff line number Diff line
@@ -5285,11 +5285,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;
}