cpufreq: interactive: trace actual speed in target speed decisions
Tracing adds actual speed since this is expected to be key to the choice of target speed. Change-Id: Iec936102d0010c4e9dfa143c38a9fd0d551189c3 Signed-off-by: Todd Poynor <toddpoynor@google.com>
This commit is contained in:
parent
2aadfa7584
commit
dc202c38d3
2 changed files with 31 additions and 23 deletions
|
@ -186,9 +186,9 @@ static void cpufreq_interactive_timer(unsigned long data)
|
||||||
new_freq > hispeed_freq &&
|
new_freq > hispeed_freq &&
|
||||||
now - pcpu->hispeed_validate_time
|
now - pcpu->hispeed_validate_time
|
||||||
< above_hispeed_delay_val) {
|
< above_hispeed_delay_val) {
|
||||||
trace_cpufreq_interactive_notyet(data, cpu_load,
|
trace_cpufreq_interactive_notyet(
|
||||||
pcpu->target_freq,
|
data, cpu_load, pcpu->target_freq,
|
||||||
new_freq);
|
pcpu->policy->cur, new_freq);
|
||||||
goto rearm;
|
goto rearm;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -215,8 +215,9 @@ static void cpufreq_interactive_timer(unsigned long data)
|
||||||
*/
|
*/
|
||||||
if (new_freq < pcpu->floor_freq) {
|
if (new_freq < pcpu->floor_freq) {
|
||||||
if (now - pcpu->floor_validate_time < min_sample_time) {
|
if (now - pcpu->floor_validate_time < min_sample_time) {
|
||||||
trace_cpufreq_interactive_notyet(data, cpu_load,
|
trace_cpufreq_interactive_notyet(
|
||||||
pcpu->target_freq, new_freq);
|
data, cpu_load, pcpu->target_freq,
|
||||||
|
pcpu->policy->cur, new_freq);
|
||||||
goto rearm;
|
goto rearm;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -225,13 +226,14 @@ static void cpufreq_interactive_timer(unsigned long data)
|
||||||
pcpu->floor_validate_time = now;
|
pcpu->floor_validate_time = now;
|
||||||
|
|
||||||
if (pcpu->target_freq == new_freq) {
|
if (pcpu->target_freq == new_freq) {
|
||||||
trace_cpufreq_interactive_already(data, cpu_load,
|
trace_cpufreq_interactive_already(
|
||||||
pcpu->target_freq, new_freq);
|
data, cpu_load, pcpu->target_freq,
|
||||||
|
pcpu->policy->cur, new_freq);
|
||||||
goto rearm_if_notmax;
|
goto rearm_if_notmax;
|
||||||
}
|
}
|
||||||
|
|
||||||
trace_cpufreq_interactive_target(data, cpu_load, pcpu->target_freq,
|
trace_cpufreq_interactive_target(data, cpu_load, pcpu->target_freq,
|
||||||
new_freq);
|
pcpu->policy->cur, new_freq);
|
||||||
pcpu->target_set_time_in_idle = now_idle;
|
pcpu->target_set_time_in_idle = now_idle;
|
||||||
pcpu->target_set_time = now;
|
pcpu->target_set_time = now;
|
||||||
|
|
||||||
|
|
|
@ -36,44 +36,50 @@ DEFINE_EVENT(set, cpufreq_interactive_setspeed,
|
||||||
|
|
||||||
DECLARE_EVENT_CLASS(loadeval,
|
DECLARE_EVENT_CLASS(loadeval,
|
||||||
TP_PROTO(unsigned long cpu_id, unsigned long load,
|
TP_PROTO(unsigned long cpu_id, unsigned long load,
|
||||||
unsigned long curfreq, unsigned long targfreq),
|
unsigned long curtarg, unsigned long curactual,
|
||||||
TP_ARGS(cpu_id, load, curfreq, targfreq),
|
unsigned long newtarg),
|
||||||
|
TP_ARGS(cpu_id, load, curtarg, curactual, newtarg),
|
||||||
|
|
||||||
TP_STRUCT__entry(
|
TP_STRUCT__entry(
|
||||||
__field(unsigned long, cpu_id )
|
__field(unsigned long, cpu_id )
|
||||||
__field(unsigned long, load )
|
__field(unsigned long, load )
|
||||||
__field(unsigned long, curfreq )
|
__field(unsigned long, curtarg )
|
||||||
__field(unsigned long, targfreq )
|
__field(unsigned long, curactual )
|
||||||
|
__field(unsigned long, newtarg )
|
||||||
),
|
),
|
||||||
|
|
||||||
TP_fast_assign(
|
TP_fast_assign(
|
||||||
__entry->cpu_id = cpu_id;
|
__entry->cpu_id = cpu_id;
|
||||||
__entry->load = load;
|
__entry->load = load;
|
||||||
__entry->curfreq = curfreq;
|
__entry->curtarg = curtarg;
|
||||||
__entry->targfreq = targfreq;
|
__entry->curactual = curactual;
|
||||||
|
__entry->newtarg = newtarg;
|
||||||
),
|
),
|
||||||
|
|
||||||
TP_printk("cpu=%lu load=%lu cur=%lu targ=%lu",
|
TP_printk("cpu=%lu load=%lu cur=%lu actual=%lu targ=%lu",
|
||||||
__entry->cpu_id, __entry->load, __entry->curfreq,
|
__entry->cpu_id, __entry->load, __entry->curtarg,
|
||||||
__entry->targfreq)
|
__entry->curactual, __entry->newtarg)
|
||||||
);
|
);
|
||||||
|
|
||||||
DEFINE_EVENT(loadeval, cpufreq_interactive_target,
|
DEFINE_EVENT(loadeval, cpufreq_interactive_target,
|
||||||
TP_PROTO(unsigned long cpu_id, unsigned long load,
|
TP_PROTO(unsigned long cpu_id, unsigned long load,
|
||||||
unsigned long curfreq, unsigned long targfreq),
|
unsigned long curtarg, unsigned long curactual,
|
||||||
TP_ARGS(cpu_id, load, curfreq, targfreq)
|
unsigned long newtarg),
|
||||||
|
TP_ARGS(cpu_id, load, curtarg, curactual, newtarg)
|
||||||
);
|
);
|
||||||
|
|
||||||
DEFINE_EVENT(loadeval, cpufreq_interactive_already,
|
DEFINE_EVENT(loadeval, cpufreq_interactive_already,
|
||||||
TP_PROTO(unsigned long cpu_id, unsigned long load,
|
TP_PROTO(unsigned long cpu_id, unsigned long load,
|
||||||
unsigned long curfreq, unsigned long targfreq),
|
unsigned long curtarg, unsigned long curactual,
|
||||||
TP_ARGS(cpu_id, load, curfreq, targfreq)
|
unsigned long newtarg),
|
||||||
|
TP_ARGS(cpu_id, load, curtarg, curactual, newtarg)
|
||||||
);
|
);
|
||||||
|
|
||||||
DEFINE_EVENT(loadeval, cpufreq_interactive_notyet,
|
DEFINE_EVENT(loadeval, cpufreq_interactive_notyet,
|
||||||
TP_PROTO(unsigned long cpu_id, unsigned long load,
|
TP_PROTO(unsigned long cpu_id, unsigned long load,
|
||||||
unsigned long curfreq, unsigned long targfreq),
|
unsigned long curtarg, unsigned long curactual,
|
||||||
TP_ARGS(cpu_id, load, curfreq, targfreq)
|
unsigned long newtarg),
|
||||||
|
TP_ARGS(cpu_id, load, curtarg, curactual, newtarg)
|
||||||
);
|
);
|
||||||
|
|
||||||
TRACE_EVENT(cpufreq_interactive_boost,
|
TRACE_EVENT(cpufreq_interactive_boost,
|
||||||
|
|
Loading…
Add table
Reference in a new issue