diff options
author | Daniel Lezcano <daniel.lezcano@linaro.org> | 2018-12-27 14:01:19 +0100 |
---|---|---|
committer | Daniel Lezcano <daniel.lezcano@linaro.org> | 2018-12-27 15:51:38 +0100 |
commit | e09061a571c328334af7975d856a00e95cbb9c39 (patch) | |
tree | 7b5ff198359c0968c04963f3708561cc9ee6c3d4 | |
parent | f225f5170898f202c6d538431417d835d00c2a60 (diff) |
trace: Add the next wakeup trace
In order to measure the gap between the prediction for the next event
on the real event, let's add a trace giving the prediction.
The prediction must be correlated with the cpuidle exit trace timestamp
but removing the exit latency value of the state which can be very large
on some platforms.
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
-rw-r--r-- | include/trace/events/power.h | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/include/trace/events/power.h b/include/trace/events/power.h index f7aece721aed..df3bc2a9c661 100644 --- a/include/trace/events/power.h +++ b/include/trace/events/power.h @@ -40,6 +40,33 @@ DEFINE_EVENT(cpu, cpu_idle, TP_ARGS(state, cpu_id) ); +TRACE_EVENT(next_wakeup, + + TP_PROTO(u64 now, u64 wakeup, unsigned int residency, + unsigned int cpu_id), + + TP_ARGS(now, wakeup, residency, cpu_id), + + TP_STRUCT__entry( + __field(u64, now) + __field(u64, wakeup) + __field(u32, residency) + __field(u32, cpu_id) + ), + + TP_fast_assign( + __entry->now = now; + __entry->wakeup = wakeup; + __entry->residency = residency; + __entry->cpu_id = cpu_id; + ), + + TP_printk("now=%llu wakeup=%llu residency=%lu cpu_id=%lu", + __entry->now, __entry->wakeup, + (unsigned long)__entry->residency, + (unsigned long)__entry->cpu_id) +); + TRACE_EVENT(powernv_throttle, TP_PROTO(int chip_id, const char *reason, int pmax), |