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

Commit 35b180dd authored by Pavankumar Kondeti's avatar Pavankumar Kondeti
Browse files

sched: Print max frequency in sched_get_task_cpu_cycles trace point



Scheduler knows max frequency allowed by both thermal driver and
cpufreq. cpu_max_freq() returns the minimum of these two. Printing it
in sched_get_task_cpu_cycles() is useful in understanding the actual
frequency and limits vs cpufreq view of the frequency and limits.

Change-Id: I7354d34505d6ea771a42f4eaa4412afd96077fa2
Signed-off-by: default avatarPavankumar Kondeti <pkondeti@codeaurora.org>
parent 5a580c0a
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -273,6 +273,7 @@ TRACE_EVENT(sched_get_task_cpu_cycles,
		__field(u64,		exec_time	)
		__field(u32,		freq		)
		__field(u32,		legacy_freq	)
		__field(u32,		max_freq	)
		__field(pid_t,		pid		)
		__array(char,	comm,   TASK_COMM_LEN	)
	),
@@ -284,13 +285,15 @@ TRACE_EVENT(sched_get_task_cpu_cycles,
		__entry->exec_time	= exec_time;
		__entry->freq		= cpu_cycles_to_freq(cycles, exec_time);
		__entry->legacy_freq	= cpu_cur_freq(cpu);
		__entry->max_freq	= cpu_max_freq(cpu);
		__entry->pid            = p->pid;
		memcpy(__entry->comm, p->comm, TASK_COMM_LEN);
	),

	TP_printk("cpu=%d event=%d cycles=%llu exec_time=%llu freq=%u legacy_freq=%u task=%d (%s)",
	TP_printk("cpu=%d event=%d cycles=%llu exec_time=%llu freq=%u legacy_freq=%u max_freq=%u task=%d (%s)",
		  __entry->cpu, __entry->event, __entry->cycles,
		  __entry->exec_time, __entry->freq, __entry->legacy_freq, __entry->pid, __entry->comm)
		  __entry->exec_time, __entry->freq, __entry->legacy_freq,
		  __entry->max_freq, __entry->pid, __entry->comm)
);

TRACE_EVENT(sched_update_task_ravg,