cpufreq_interactive.h 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. #undef TRACE_SYSTEM
  2. #define TRACE_SYSTEM cpufreq_interactive
  3. #if !defined(_TRACE_CPUFREQ_INTERACTIVE_H) || defined(TRACE_HEADER_MULTI_READ)
  4. #define _TRACE_CPUFREQ_INTERACTIVE_H
  5. #include <linux/tracepoint.h>
  6. DECLARE_EVENT_CLASS(set,
  7. TP_PROTO(u32 cpu_id, unsigned long targfreq,
  8. unsigned long actualfreq),
  9. TP_ARGS(cpu_id, targfreq, actualfreq),
  10. TP_STRUCT__entry(
  11. __field( u32, cpu_id )
  12. __field(unsigned long, targfreq )
  13. __field(unsigned long, actualfreq )
  14. ),
  15. TP_fast_assign(
  16. __entry->cpu_id = (u32) cpu_id;
  17. __entry->targfreq = targfreq;
  18. __entry->actualfreq = actualfreq;
  19. ),
  20. TP_printk("cpu=%u targ=%lu actual=%lu",
  21. __entry->cpu_id, __entry->targfreq,
  22. __entry->actualfreq)
  23. );
  24. DEFINE_EVENT(set, cpufreq_interactive_up,
  25. TP_PROTO(u32 cpu_id, unsigned long targfreq,
  26. unsigned long actualfreq),
  27. TP_ARGS(cpu_id, targfreq, actualfreq)
  28. );
  29. DEFINE_EVENT(set, cpufreq_interactive_down,
  30. TP_PROTO(u32 cpu_id, unsigned long targfreq,
  31. unsigned long actualfreq),
  32. TP_ARGS(cpu_id, targfreq, actualfreq)
  33. );
  34. DECLARE_EVENT_CLASS(loadeval,
  35. TP_PROTO(unsigned long cpu_id, unsigned long load,
  36. unsigned long curfreq, unsigned long targfreq),
  37. TP_ARGS(cpu_id, load, curfreq, targfreq),
  38. TP_STRUCT__entry(
  39. __field(unsigned long, cpu_id )
  40. __field(unsigned long, load )
  41. __field(unsigned long, curfreq )
  42. __field(unsigned long, targfreq )
  43. ),
  44. TP_fast_assign(
  45. __entry->cpu_id = cpu_id;
  46. __entry->load = load;
  47. __entry->curfreq = curfreq;
  48. __entry->targfreq = targfreq;
  49. ),
  50. TP_printk("cpu=%lu load=%lu cur=%lu targ=%lu",
  51. __entry->cpu_id, __entry->load, __entry->curfreq,
  52. __entry->targfreq)
  53. );
  54. DEFINE_EVENT(loadeval, cpufreq_interactive_target,
  55. TP_PROTO(unsigned long cpu_id, unsigned long load,
  56. unsigned long curfreq, unsigned long targfreq),
  57. TP_ARGS(cpu_id, load, curfreq, targfreq)
  58. );
  59. DEFINE_EVENT(loadeval, cpufreq_interactive_already,
  60. TP_PROTO(unsigned long cpu_id, unsigned long load,
  61. unsigned long curfreq, unsigned long targfreq),
  62. TP_ARGS(cpu_id, load, curfreq, targfreq)
  63. );
  64. DEFINE_EVENT(loadeval, cpufreq_interactive_notyet,
  65. TP_PROTO(unsigned long cpu_id, unsigned long load,
  66. unsigned long curfreq, unsigned long targfreq),
  67. TP_ARGS(cpu_id, load, curfreq, targfreq)
  68. );
  69. TRACE_EVENT(cpufreq_interactive_boost,
  70. TP_PROTO(char *s),
  71. TP_ARGS(s),
  72. TP_STRUCT__entry(
  73. __field(char *, s)
  74. ),
  75. TP_fast_assign(
  76. __entry->s = s;
  77. ),
  78. TP_printk("%s", __entry->s)
  79. );
  80. TRACE_EVENT(cpufreq_interactive_unboost,
  81. TP_PROTO(char *s),
  82. TP_ARGS(s),
  83. TP_STRUCT__entry(
  84. __field(char *, s)
  85. ),
  86. TP_fast_assign(
  87. __entry->s = s;
  88. ),
  89. TP_printk("%s", __entry->s)
  90. );
  91. #endif /* _TRACE_CPUFREQ_INTERACTIVE_H */
  92. /* This part must be outside protection */
  93. #include <trace/define_trace.h>