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

Commit 4dca8707 authored by Juri Lelli's avatar Juri Lelli Committed by Todd Kjos
Browse files

DEBUG: sched: add tracepoint for cpu/freq scale invariance



Change-Id: Ia3138469039c74bbb34486135da9f1ec033842c2
Signed-off-by: default avatarJuri Lelli <juri.lelli@arm.com>
parent 94b81d03
Loading
Loading
Loading
Loading
+24 −0
Original line number Diff line number Diff line
@@ -599,6 +599,30 @@ TRACE_EVENT(sched_wake_idle_without_ipi,

	TP_printk("cpu=%d", __entry->cpu)
);

TRACE_EVENT(sched_contrib_scale_f,

	TP_PROTO(int cpu, unsigned long freq_scale_factor,
		 unsigned long cpu_scale_factor),

	TP_ARGS(cpu, freq_scale_factor, cpu_scale_factor),

	TP_STRUCT__entry(
		__field(int, cpu)
		__field(unsigned long, freq_scale_factor)
		__field(unsigned long, cpu_scale_factor)
	),

	TP_fast_assign(
		__entry->cpu = cpu;
		__entry->freq_scale_factor = freq_scale_factor;
		__entry->cpu_scale_factor = cpu_scale_factor;
	),

	TP_printk("cpu=%d freq_scale_factor=%lu cpu_scale_factor=%lu",
		  __entry->cpu, __entry->freq_scale_factor,
		  __entry->cpu_scale_factor)
);
#endif /* _TRACE_SCHED_H */

/* This part must be outside protection */
+1 −0
Original line number Diff line number Diff line
@@ -2349,6 +2349,7 @@ __update_load_avg(u64 now, int cpu, struct sched_avg *sa,

	scale_freq = arch_scale_freq_capacity(NULL, cpu);
	scale_cpu = arch_scale_cpu_capacity(NULL, cpu);
	trace_sched_contrib_scale_f(cpu, scale_freq, scale_cpu);

	/* delta_w is the amount already accumulated against our next period */
	delta_w = sa->period_contrib;