ANDROID: cpufreq: Add a restricted vendor hook for freq transition
A restricted vendor hook for cpufreq transition. The hook is invoked per policy after changing the policy->cur and passes policy as an argument. Bug: 181889516 Change-Id: I6f89850779fdd63e178e227c293f42b7f66fd78d Signed-off-by: Pavankumar Kondeti <quic_pkondeti@quicinc.com>
This commit is contained in:
committed by
Shaleen Agrawal
parent
771633a2e9
commit
d723168991
@@ -162,3 +162,4 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_update_topology_flags_workfn);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_sched_balance_rt);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_pick_next_entity);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_check_preempt_wakeup);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_cpufreq_transition);
|
||||
|
||||
@@ -390,6 +390,7 @@ static void cpufreq_notify_transition(struct cpufreq_policy *policy,
|
||||
cpufreq_stats_record_transition(policy, freqs->new);
|
||||
cpufreq_times_record_transition(policy, freqs->new);
|
||||
policy->cur = freqs->new;
|
||||
trace_android_rvh_cpufreq_transition(policy);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2111,6 +2112,7 @@ unsigned int cpufreq_driver_fast_switch(struct cpufreq_policy *policy,
|
||||
arch_set_freq_scale(policy->related_cpus, freq,
|
||||
policy->cpuinfo.max_freq);
|
||||
cpufreq_stats_record_transition(policy, freq);
|
||||
trace_android_rvh_cpufreq_transition(policy);
|
||||
|
||||
if (trace_cpu_frequency_enabled()) {
|
||||
for_each_cpu(cpu, policy->cpus)
|
||||
|
||||
@@ -20,6 +20,10 @@ DECLARE_HOOK(android_vh_freq_table_limits,
|
||||
unsigned int max_freq),
|
||||
TP_ARGS(policy, min_freq, max_freq));
|
||||
|
||||
DECLARE_RESTRICTED_HOOK(android_rvh_cpufreq_transition,
|
||||
TP_PROTO(struct cpufreq_policy *policy),
|
||||
TP_ARGS(policy), 1);
|
||||
|
||||
#endif /* _TRACE_HOOK_CPUFREQ_H */
|
||||
/* This part must be outside protection */
|
||||
#include <trace/define_trace.h>
|
||||
|
||||
Reference in New Issue
Block a user