trace: power: add trace_clock_set_parent
PATCH 1/1 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.
--- include/trace/events/power.h | 19 +++++++++++++++++++ 1 files changed, 19 insertions(+), 0 deletions(-)
include/trace/events/power.h +19 -0
@@ -204,6 +204,25 @@ enum {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(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 */
Signature · 1 line
1.7.7.3
Steven Rostedt
maintainerQuoted 27 lines · Colin Cross
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, tracingclk_set_parentallows traces to show how for long the cpu is running slower.Uses a separate
TRACE_EVENTinstead of the clock event class to allow the event to contain string names for the child and the parent.Signed-off-by Colin Cross <[email protected]>--- include/trace/events/power.h | 19 +++++++++++++++++++ 1 files changed, 19 insertions(+), 0 deletions(-)include/trace/events/power.h +4
-0@@ -204,6 +204,25 @@ enum {TP_ARGS (name, state, cpu_id) ); +TRACE_EVENT(clock_set_parent, + + TP_PROTO(const char *name, const char *parent_name), +
include/trace/events/power.h enum { · line 220
Quoted 10 lines
include/trace/events/power.h +10
-0+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 (name, parent_name);
Don't you mean: __assign_str(parent_name, parent_name); ?
-- Steve
Quoted 8 lines
include/trace/events/power.h +5
-0+ ), + +TP_printk ("%s parent=%s" ,__get_str (name),__get_str (parent_name)) +); +/* * The power domain events are used for power domains transitions */
Quoted 24 lines · Steven Rostedt
Quoted 23 lines · Colin Cross
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, tracingclk_set_parentallows traces to show how for long the cpu is running slower.Uses a separate
TRACE_EVENTinstead of the clock event class to allow the event to contain string names for the child and the parent.Signed-off-by Colin Cross <[email protected]>---
include/trace/events/power.h | 19 +++++++++++++++++++1 files changed, 19 insertions(+), 0 deletions(-)include/trace/events/power.h +0
-0@@ -204,6 +204,25 @@ enum { TP_ARGS(name, state, cpu_id) );
Quoted 16 lines
Quoted 4 lines
include/trace/events/power.h +4
-0+TRACE_EVENT(clock_set_parent, + + TP_PROTO(const char *name, const char *parent_name), +include/trace/events/power.h enum { · line 220
Quoted 10 lines
include/trace/events/power.h +10
-0+ 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(name, parent_name);Don't you mean:
__assign_str(parent_name, parent_name); ?
Yep, just noticed that in my traces, I'll send an updated patch.