mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-12 07:37:31 -04:00
trace: Add new trace event for DCVSH
Add trace to capture DCVSH updates to sched. Change-Id: I57201ab0e41931cffe121c6ab18c46b1f26f250e Signed-off-by: Taniya Das <tdas@codeaurora.org>
This commit is contained in:
parent
2b4eabbaff
commit
dcedf3c538
2 changed files with 40 additions and 0 deletions
|
|
@ -18,6 +18,9 @@
|
|||
#include <linux/sched.h>
|
||||
#include <linux/slab.h>
|
||||
|
||||
#define CREATE_TRACE_POINTS
|
||||
#include <trace/events/dcvsh.h>
|
||||
|
||||
#define LUT_MAX_ENTRIES 40U
|
||||
#define LUT_SRC GENMASK(31, 30)
|
||||
#define LUT_L_VAL GENMASK(7, 0)
|
||||
|
|
@ -106,6 +109,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
include/trace/events/dcvsh.h
Normal file
35
include/trace/events/dcvsh.h
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
/* 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>
|
||||
Loading…
Reference in a new issue