diff options
Diffstat (limited to 'include/trace/events/devfreq.h')
-rw-r--r-- | include/trace/events/devfreq.h | 30 |
1 files changed, 29 insertions, 1 deletions
diff --git a/include/trace/events/devfreq.h b/include/trace/events/devfreq.h index cf5b8772175d..7627c620bbda 100644 --- a/include/trace/events/devfreq.h +++ b/include/trace/events/devfreq.h @@ -8,6 +8,34 @@ #include <linux/devfreq.h> #include <linux/tracepoint.h> +TRACE_EVENT(devfreq_frequency, + TP_PROTO(struct devfreq *devfreq, unsigned long freq, + unsigned long prev_freq), + + TP_ARGS(devfreq, freq, prev_freq), + + TP_STRUCT__entry( + __string(dev_name, dev_name(&devfreq->dev)) + __field(unsigned long, freq) + __field(unsigned long, prev_freq) + __field(unsigned long, busy_time) + __field(unsigned long, total_time) + ), + + TP_fast_assign( + __assign_str(dev_name, dev_name(&devfreq->dev)); + __entry->freq = freq; + __entry->prev_freq = prev_freq; + __entry->busy_time = devfreq->last_status.busy_time; + __entry->total_time = devfreq->last_status.total_time; + ), + + TP_printk("dev_name=%-30s freq=%-12lu prev_freq=%-12lu load=%-2lu", + __get_str(dev_name), __entry->freq, __entry->prev_freq, + __entry->total_time == 0 ? 0 : + (100 * __entry->busy_time) / __entry->total_time) +); + TRACE_EVENT(devfreq_monitor, TP_PROTO(struct devfreq *devfreq), @@ -29,7 +57,7 @@ TRACE_EVENT(devfreq_monitor, __assign_str(dev_name, dev_name(&devfreq->dev)); ), - TP_printk("dev_name=%s freq=%lu polling_ms=%u load=%lu", + TP_printk("dev_name=%-30s freq=%-12lu polling_ms=%-3u load=%-2lu", __get_str(dev_name), __entry->freq, __entry->polling_ms, __entry->total_time == 0 ? 0 : (100 * __entry->busy_time) / __entry->total_time) |