~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/include/trace/events/devfreq.h

Version: ~ [ linux-6.11.5 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.58 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.114 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.169 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.228 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.284 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.322 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /* SPDX-License-Identifier: GPL-2.0 */
  2 #undef TRACE_SYSTEM
  3 #define TRACE_SYSTEM devfreq
  4 
  5 #if !defined(_TRACE_DEVFREQ_H) || defined(TRACE_HEADER_MULTI_READ)
  6 #define _TRACE_DEVFREQ_H
  7 
  8 #include <linux/devfreq.h>
  9 #include <linux/tracepoint.h>
 10 
 11 TRACE_EVENT(devfreq_frequency,
 12         TP_PROTO(struct devfreq *devfreq, unsigned long freq,
 13                  unsigned long prev_freq),
 14 
 15         TP_ARGS(devfreq, freq, prev_freq),
 16 
 17         TP_STRUCT__entry(
 18                 __string(dev_name, dev_name(&devfreq->dev))
 19                 __field(unsigned long, freq)
 20                 __field(unsigned long, prev_freq)
 21                 __field(unsigned long, busy_time)
 22                 __field(unsigned long, total_time)
 23         ),
 24 
 25         TP_fast_assign(
 26                 __assign_str(dev_name);
 27                 __entry->freq = freq;
 28                 __entry->prev_freq = prev_freq;
 29                 __entry->busy_time = devfreq->last_status.busy_time;
 30                 __entry->total_time = devfreq->last_status.total_time;
 31         ),
 32 
 33         TP_printk("dev_name=%-30s freq=%-12lu prev_freq=%-12lu load=%-2lu",
 34                 __get_str(dev_name), __entry->freq, __entry->prev_freq,
 35                 __entry->total_time == 0 ? 0 :
 36                         (100 * __entry->busy_time) / __entry->total_time)
 37 );
 38 
 39 TRACE_EVENT(devfreq_monitor,
 40         TP_PROTO(struct devfreq *devfreq),
 41 
 42         TP_ARGS(devfreq),
 43 
 44         TP_STRUCT__entry(
 45                 __field(unsigned long, freq)
 46                 __field(unsigned long, busy_time)
 47                 __field(unsigned long, total_time)
 48                 __field(unsigned int, polling_ms)
 49                 __string(dev_name, dev_name(&devfreq->dev))
 50         ),
 51 
 52         TP_fast_assign(
 53                 __entry->freq = devfreq->previous_freq;
 54                 __entry->busy_time = devfreq->last_status.busy_time;
 55                 __entry->total_time = devfreq->last_status.total_time;
 56                 __entry->polling_ms = devfreq->profile->polling_ms;
 57                 __assign_str(dev_name);
 58         ),
 59 
 60         TP_printk("dev_name=%-30s freq=%-12lu polling_ms=%-3u load=%-2lu",
 61                 __get_str(dev_name), __entry->freq, __entry->polling_ms,
 62                 __entry->total_time == 0 ? 0 :
 63                         (100 * __entry->busy_time) / __entry->total_time)
 64 );
 65 #endif /* _TRACE_DEVFREQ_H */
 66 
 67 /* This part must be outside protection */
 68 #include <trace/define_trace.h>
 69 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php