diff options
author | Colin Cross <ccross@android.com> | 2012-05-09 16:09:50 -0700 |
---|---|---|
committer | Arve Hjønnevåg <arve@android.com> | 2013-04-29 14:42:49 -0700 |
commit | 79063ae515cb3ad2635dad9d14dd33ebe9487a3f (patch) | |
tree | c0c21c03e388ee8e4cfceb867dd3a41c8d483156 /include | |
parent | ff5844390684298ec3b0fccbfbf8a73163d3076a (diff) |
trace: power: add trace_clock_set_parent
Adds a new trace event to be called from clk_set_parent. Some
cpufreq drivers, including Tegra, reparent the cpu clock to a
slower clock while the main pll is relocking, tracing
clk_set_parent allows traces to show how for long the cpu is
running slower.
Uses a separate TRACE_EVENT instead of the clock event class to
allow the event to contain string names for the child and the
parent.
Signed-off-by: Colin Cross <ccross@android.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/trace/events/power.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/include/trace/events/power.h b/include/trace/events/power.h index 427acab5d69..503fc2b870b 100644 --- a/include/trace/events/power.h +++ b/include/trace/events/power.h @@ -146,6 +146,25 @@ DEFINE_EVENT(clock, clock_set_rate, TP_ARGS(name, state, cpu_id) ); +TRACE_EVENT(clock_set_parent, + + TP_PROTO(const char *name, const char *parent_name), + + TP_ARGS(name, parent_name), + + TP_STRUCT__entry( + __string( name, name ) + __string( parent_name, parent_name ) + ), + + TP_fast_assign( + __assign_str(name, name); + __assign_str(parent_name, parent_name); + ), + + TP_printk("%s parent=%s", __get_str(name), __get_str(parent_name)) +); + /* * The power domain events are used for power domains transitions */ |