Skip to content

Commit

Permalink
ANDROID: arch_topology: Add android_rvh_update_thermal_stats
Browse files Browse the repository at this point in the history
Add trace hook so modules can track thermal changes to process
vendor value adds.

Bug: 203763121
Change-Id: I5c54b313d3c92c0514f18b07797dd20c9c6f5161
Signed-off-by: Shaleen Agrawal <[email protected]>
Signed-off-by: Vamsi Krishna Lanka <[email protected]>
Signed-off-by: Sai Harshini Nimmala <[email protected]>
  • Loading branch information
Vamsi Krishna Lanka authored and Sai Harshini Nimmala committed Oct 19, 2022
1 parent 8460be7 commit 6fb5892
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
5 changes: 4 additions & 1 deletion drivers/base/arch_topology.c
Original file line number Diff line number Diff line change
Expand Up @@ -205,8 +205,11 @@ void topology_update_thermal_pressure(const struct cpumask *cpus,

trace_thermal_pressure_update(cpu, th_pressure);

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_update_thermal_pressure);

Expand Down
4 changes: 4 additions & 0 deletions include/trace/hooks/sched.h
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,10 @@ DECLARE_HOOK(android_vh_update_topology_flags_workfn,
TP_PROTO(void *unused),
TP_ARGS(unused));

DECLARE_RESTRICTED_HOOK(android_rvh_update_thermal_stats,
TP_PROTO(int cpu),
TP_ARGS(cpu), 1);

/* macro versions of hooks are no longer required */

#endif /* _TRACE_HOOK_SCHED_H */
Expand Down
1 change: 1 addition & 0 deletions kernel/sched/vendor_hooks.c
Original file line number Diff line number Diff line change
Expand Up @@ -81,3 +81,4 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_ttwu_cond);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_schedule_bug);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_sched_exec);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_update_topology_flags_workfn);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_update_thermal_stats);

0 comments on commit 6fb5892

Please sign in to comment.