summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMatt Wagantall <mattw@codeaurora.org>2012-07-30 19:47:52 -0700
committerDavid Keitel <dkeitel@codeaurora.org>2016-03-23 20:02:51 -0700
commitc7984141ec47a2b5d2dcae276d4264f523b231d1 (patch)
tree629952fafe0cff4374f482a2b44eb1b2cf156547 /include
parent7252c408d4af4a05e6de059db3fb26da9852f735 (diff)
trace: power: add cpu_frequency_switch_{start, end}
It is sometimes useful to profile how long CPU frequency switches take, since they often involve variable overhead (PLL lock times, voltage increase time, etc.). Add additional traces to to make this possible. Since the overhead involved may differ based on the frequencies being switched between, record both the start and the end frequencies as part of the trace. Change-Id: I2de743fc357dad3590fd4980f65f38f6073d426e Signed-off-by: Matt Wagantall <mattw@codeaurora.org> Signed-off-by: Stephen Boyd <sboyd@codeaurora.org> [abhimany: resolve trivial merge conflicts] Signed-off-by: Abhimanyu Kapur <abhimany@codeaurora.org>
Diffstat (limited to 'include')
-rw-r--r--include/trace/events/power.h42
1 files changed, 42 insertions, 0 deletions
diff --git a/include/trace/events/power.h b/include/trace/events/power.h
index 9c75816079f6..5c618e97ad18 100644
--- a/include/trace/events/power.h
+++ b/include/trace/events/power.h
@@ -145,6 +145,48 @@ TRACE_EVENT(cpu_frequency_limits,
(unsigned long)__entry->cpu_id)
);
+TRACE_EVENT(cpu_frequency_switch_start,
+
+ TP_PROTO(unsigned int start_freq, unsigned int end_freq,
+ unsigned int cpu_id),
+
+ TP_ARGS(start_freq, end_freq, cpu_id),
+
+ TP_STRUCT__entry(
+ __field( u32, start_freq )
+ __field( u32, end_freq )
+ __field( u32, cpu_id )
+ ),
+
+ TP_fast_assign(
+ __entry->start_freq = start_freq;
+ __entry->end_freq = end_freq;
+ __entry->cpu_id = cpu_id;
+ ),
+
+ TP_printk("start=%lu end=%lu cpu_id=%lu",
+ (unsigned long)__entry->start_freq,
+ (unsigned long)__entry->end_freq,
+ (unsigned long)__entry->cpu_id)
+);
+
+TRACE_EVENT(cpu_frequency_switch_end,
+
+ TP_PROTO(unsigned int cpu_id),
+
+ TP_ARGS(cpu_id),
+
+ TP_STRUCT__entry(
+ __field( u32, cpu_id )
+ ),
+
+ TP_fast_assign(
+ __entry->cpu_id = cpu_id;
+ ),
+
+ TP_printk("cpu_id=%lu", (unsigned long)__entry->cpu_id)
+);
+
TRACE_EVENT(device_pm_callback_start,
TP_PROTO(struct device *dev, const char *pm_ops, int event),