From aab1e601dee194e8be2dc07883f5a58694c2f8d2 Mon Sep 17 00:00:00 2001 From: Junjie Wu Date: Tue, 14 Jul 2015 16:35:45 -0700 Subject: PM / devfreq: governor_cache_hwmon: Add mrps and freq vote traces Replace measured mrps and frequency vote debug prints with trace events. Change-Id: I78370b068e3819a57635cbabaf5cdd053ebabce4 Signed-off-by: Junjie Wu --- include/trace/events/power.h | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) (limited to 'include') diff --git a/include/trace/events/power.h b/include/trace/events/power.h index d6d8f5390647..5610ba0c892c 100644 --- a/include/trace/events/power.h +++ b/include/trace/events/power.h @@ -654,6 +654,49 @@ TRACE_EVENT(bw_hwmon_update, __entry->down_thres) ); +TRACE_EVENT(cache_hwmon_meas, + TP_PROTO(const char *name, unsigned long high_mrps, + unsigned long med_mrps, unsigned long low_mrps, + unsigned int busy_percent, unsigned int us), + TP_ARGS(name, high_mrps, med_mrps, low_mrps, busy_percent, us), + TP_STRUCT__entry( + __string(name, name) + __field(unsigned long, high_mrps) + __field(unsigned long, med_mrps) + __field(unsigned long, low_mrps) + __field(unsigned long, total_mrps) + __field(unsigned int, busy_percent) + __field(unsigned int, us) + ), + TP_fast_assign( + __assign_str(name, name); + __entry->high_mrps = high_mrps; + __entry->med_mrps = med_mrps; + __entry->low_mrps = low_mrps; + __entry->total_mrps = high_mrps + med_mrps + low_mrps; + __entry->busy_percent = busy_percent; + __entry->us = us; + ), + TP_printk("dev=%s H=%lu M=%lu L=%lu T=%lu busy_pct=%u period=%u", + __get_str(name), __entry->high_mrps, __entry->med_mrps, + __entry->low_mrps, __entry->total_mrps, + __entry->busy_percent, __entry->us) +); + +TRACE_EVENT(cache_hwmon_update, + TP_PROTO(const char *name, unsigned long freq_mhz), + TP_ARGS(name, freq_mhz), + TP_STRUCT__entry( + __string(name, name) + __field(unsigned long, freq) + ), + TP_fast_assign( + __assign_str(name, name); + __entry->freq = freq_mhz; + ), + TP_printk("dev=%s freq=%lu", __get_str(name), __entry->freq) +); + #endif /* _TRACE_POWER_H */ /* This part must be outside protection */ -- cgit v1.2.3