ANDROID: arch_topology: Add android_rvh_update_thermal_stats

Add trace hook so modules can track thermal changes to process
vendor value adds.

Bug: 203763121
Change-Id: I5c54b313d3c92c0514f18b07797dd20c9c6f5161
Signed-off-by: Shaleen Agrawal <shalagra@codeaurora.org>
This commit is contained in:
Shaleen Agrawal
2021-10-21 14:30:17 -07:00
committed by Treehugger Robot
parent 6ac8b4fbb4
commit 8ab43e8a3e
3 changed files with 9 additions and 1 deletions

View File

@@ -372,3 +372,4 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_free_oem_binder_struct);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_binder_special_task);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_binder_free_buf);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_isolate_freepages);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_update_thermal_stats);

View File

@@ -173,8 +173,11 @@ void topology_set_thermal_pressure(const struct cpumask *cpus,
{
int cpu;
for_each_cpu(cpu, cpus)
for_each_cpu(cpu, cpus) {
WRITE_ONCE(per_cpu(thermal_pressure, cpu), th_pressure);
trace_android_rvh_update_thermal_stats(cpu);
}
}
EXPORT_SYMBOL_GPL(topology_set_thermal_pressure);

View File

@@ -24,6 +24,10 @@ DECLARE_HOOK(android_vh_use_amu_fie,
TP_PROTO(bool *use_amu_fie),
TP_ARGS(use_amu_fie));
DECLARE_RESTRICTED_HOOK(android_rvh_update_thermal_stats,
TP_PROTO(int cpu),
TP_ARGS(cpu), 1);
#endif /* _TRACE_HOOK_TOPOLOGY_H */
/* This part must be outside protection */
#include <trace/define_trace.h>