From: Colin Cross Date: Wed, 9 May 2012 23:09:50 +0000 (-0700) Subject: trace: power: add trace_clock_set_parent X-Git-Tag: firefly_0821_release~2958^2~191 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=7fcd7eef75430ea36a1bebea2be66a539bebe86f;p=firefly-linux-kernel-4.4.55.git 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 --- diff --git a/include/trace/events/power.h b/include/trace/events/power.h index a4878c1b35d2..de77035567c4 100644 --- a/include/trace/events/power.h +++ b/include/trace/events/power.h @@ -298,6 +298,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 */