ANDROID: sched: cpufreq_schedutil: move sugov traces to sched

Since the sugov traces were added in kernel/sched/cpufreq_schedutil.c,
move it from power.h to sched.h.
And move the tracepoint to where the change happens.

Bug: 174488007
Test: build pass and boot to home
Signed-off-by: Jimmy Shiu <jimmyshiu@google.com>
Change-Id: Ibe18f04773c28be84db3619b1a4253bf08f0e289
Signed-off-by: Will McVicker <willmcvicker@google.com>
This commit is contained in:
Jimmy Shiu
2020-12-14 16:34:14 +08:00
committed by Will McVicker
parent bbc2a30bc2
commit a68d66b29e
5 changed files with 12 additions and 13 deletions

View File

@@ -500,15 +500,6 @@ DEFINE_EVENT(dev_pm_qos_request, dev_pm_qos_remove_request,
TP_ARGS(name, type, new_value)
);
DECLARE_TRACE(sugov_util_update_tp,
TP_PROTO(unsigned int cpu, unsigned long util, unsigned long max_cap, unsigned int flags),
TP_ARGS(cpu, util, max_cap, flags));
DECLARE_TRACE(sugov_next_freq_tp,
TP_PROTO(unsigned int cpu, unsigned long util, unsigned long max, unsigned int freq),
TP_ARGS(cpu, util, max, freq));
#endif /* _TRACE_POWER_H */
/* This part must be outside protection */

View File

@@ -677,6 +677,14 @@ DECLARE_TRACE(sched_update_nr_running_tp,
TP_PROTO(struct rq *rq, int change),
TP_ARGS(rq, change));
DECLARE_TRACE(sugov_util_update_tp,
TP_PROTO(unsigned int cpu, unsigned long util, unsigned long max_cap, unsigned int flags),
TP_ARGS(cpu, util, max_cap, flags));
DECLARE_TRACE(sugov_next_freq_tp,
TP_PROTO(unsigned int cpu, unsigned long util, unsigned long max, unsigned int freq),
TP_ARGS(cpu, util, max, freq));
#endif /* _TRACE_SCHED_H */
/* This part must be outside protection */

View File

@@ -45,6 +45,8 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(sched_util_est_cfs_tp);
EXPORT_TRACEPOINT_SYMBOL_GPL(sched_util_est_se_tp);
EXPORT_TRACEPOINT_SYMBOL_GPL(sched_update_nr_running_tp);
EXPORT_TRACEPOINT_SYMBOL_GPL(sched_switch);
EXPORT_TRACEPOINT_SYMBOL_GPL(sugov_next_freq_tp);
EXPORT_TRACEPOINT_SYMBOL_GPL(sugov_util_update_tp);
DEFINE_PER_CPU_SHARED_ALIGNED(struct rq, runqueues);
EXPORT_SYMBOL_GPL(runqueues);

View File

@@ -532,11 +532,11 @@ sugov_update_shared(struct update_util_data *hook, u64 time, unsigned int flags)
ignore_dl_rate_limit(sg_cpu, sg_policy);
trace_sugov_util_update_tp(sg_cpu->cpu, util, sg_cpu->max, flags);
if (sugov_should_update_freq(sg_policy, time)) {
next_f = sugov_next_freq_shared(sg_cpu, time);
trace_sugov_util_update_tp(sg_cpu->cpu, util, sg_cpu->max, flags);
if (sg_policy->policy->fast_switch_enabled)
sugov_fast_switch(sg_policy, time, next_f);
else

View File

@@ -21,5 +21,3 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(powernv_throttle);
EXPORT_TRACEPOINT_SYMBOL_GPL(device_pm_callback_start);
EXPORT_TRACEPOINT_SYMBOL_GPL(device_pm_callback_end);
EXPORT_TRACEPOINT_SYMBOL_GPL(clock_set_rate);
EXPORT_TRACEPOINT_SYMBOL_GPL(sugov_next_freq_tp);
EXPORT_TRACEPOINT_SYMBOL_GPL(sugov_util_update_tp);