From 02ec547ceb849e603c602973a6af0baa96568032 Mon Sep 17 00:00:00 2001 From: Antti P Miettinen Date: Thu, 29 Mar 2012 07:14:40 +0300 Subject: tracing: Add tracepoints for CPU scaling Simple tracepoints for measuring CPU scaling latencies. Bug 960307 Change-Id: I6fd4e67e352a2ff134da58866d943457506d080b Signed-off-by: Antti P Miettinen Reviewed-on: http://git-master/r/93080 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Juha Tukkinen --- include/trace/events/power.h | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) (limited to 'include/trace') diff --git a/include/trace/events/power.h b/include/trace/events/power.h index be2325339768..63031aa5b6dd 100644 --- a/include/trace/events/power.h +++ b/include/trace/events/power.h @@ -47,6 +47,11 @@ enum { POWER_CPU_DOWN_DONE, }; +enum { + POWER_CPU_SCALE_START, + POWER_CPU_SCALE_DONE, +}; + #endif TRACE_EVENT(cpu_hotplug, @@ -70,6 +75,30 @@ TRACE_EVENT(cpu_hotplug, (unsigned long)__entry->state) ); +TRACE_EVENT(cpu_scale, + + TP_PROTO(unsigned int cpu_id, unsigned int freq, int state), + + TP_ARGS(cpu_id, freq, state), + + TP_STRUCT__entry( + __field(u64, cpu_id) + __field(u32, freq) + __field(u32, state) + ), + + TP_fast_assign( + __entry->cpu_id = cpu_id; + __entry->freq = freq; + __entry->state = state; + ), + + TP_printk("cpu_id=%lu, freq=%lu, state=%lu", + (unsigned long)__entry->cpu_id, + (unsigned long)__entry->freq, + (unsigned long)__entry->state) +); + DEFINE_EVENT(cpu, cpu_frequency, TP_PROTO(unsigned int frequency, unsigned int cpu_id), -- cgit v1.2.3