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

Commit c705e73f authored by Taniya Das's avatar Taniya Das
Browse files

trace: Add new trace event for DCVSH



Add trace to capture DCVSH updates to sched.

Change-Id: I57201ab0e41931cffe121c6ab18c46b1f26f250e
Signed-off-by: default avatarTaniya Das <tdas@codeaurora.org>
parent 1756090f
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -16,6 +16,9 @@
#include <linux/sched.h>
#include <linux/cpu_cooling.h>

#define CREATE_TRACE_POINTS
#include <trace/events/dcvsh.h>

#define LUT_MAX_ENTRIES			40U
#define CORE_COUNT_VAL(val)		(((val) & (GENMASK(18, 16))) >> 16)
#define LUT_ROW_SIZE			32
@@ -102,6 +105,8 @@ static unsigned long limits_mitigation_notify(struct cpufreq_qcom *c)
		else {
			sched_update_cpu_freq_min_max(&c->related_cpus, 0,
					c->table[i].frequency);
			trace_dcvsh_freq(cpumask_first(&c->related_cpus),
						c->table[i].frequency);
			return c->table[i].frequency;
		}
	}
+35 −0
Original line number Diff line number Diff line
/* SPDX-License-Identifier: GPL-2.0-only */
/*
 * Copyright (c) 2019, The Linux Foundation. All rights reserved.
 */

#undef TRACE_SYSTEM
#define TRACE_SYSTEM dcvsh

#if !defined(_TRACE_DCVSH_H) || defined(TRACE_HEADER_MULTI_READ)
#define _TRACE_DCVSH_H

#include <linux/tracepoint.h>

TRACE_EVENT(dcvsh_freq,
	TP_PROTO(unsigned long cpu, unsigned long freq),

	TP_ARGS(cpu, freq),

	TP_STRUCT__entry(
		__field(unsigned long, cpu)
		__field(unsigned long, freq)
	),

	TP_fast_assign(
		__entry->cpu = cpu;
		__entry->freq = freq;
	),

	TP_printk("cpu:%lu max frequency:%lu", __entry->cpu, __entry->freq)
);

#endif /* _TRACE_DCVSH_H */

/* This part must be outside protection */
#include <trace/define_trace.h>