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

Commit f2fc47c3 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "cpufreq: schedutil: Add trace point for get_next_freq"

parents 184d6620 2cf86dc5
Loading
Loading
Loading
Loading
+23 −0
Original line number Diff line number Diff line
@@ -801,6 +801,29 @@ TRACE_EVENT(sugov_util_update,
		      __entry->pl, __entry->flags)
);

TRACE_EVENT(sugov_next_freq,
	    TP_PROTO(unsigned int cpu, unsigned long util, unsigned long max,
		     unsigned int freq),
	    TP_ARGS(cpu, util, max, freq),
	    TP_STRUCT__entry(
		    __field(	unsigned int,	cpu)
		    __field(	unsigned long,	util)
		    __field(	unsigned long,	max)
		    __field(	unsigned int,	freq)
	    ),
	    TP_fast_assign(
		    __entry->cpu = cpu;
		    __entry->util = util;
		    __entry->max = max;
		    __entry->freq = freq;
	    ),
	    TP_printk("cpu=%u util=%lu max=%lu freq=%u",
		      __entry->cpu,
		      __entry->util,
		      __entry->max,
		      __entry->freq)
);

DECLARE_EVENT_CLASS(kpm_module,

	TP_PROTO(unsigned int managed_cpus, unsigned int max_cpus),
+1 −0
Original line number Diff line number Diff line
@@ -163,6 +163,7 @@ static unsigned int get_next_freq(struct sugov_policy *sg_policy,
				policy->cpuinfo.max_freq : policy->cur;

	freq = (freq + (freq >> 2)) * util / max;
	trace_sugov_next_freq(policy->cpu, util, max, freq);

	if (freq == sg_policy->cached_raw_freq && sg_policy->next_freq != UINT_MAX)
		return sg_policy->next_freq;