irq_matrix.h 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202
  1. #undef TRACE_SYSTEM
  2. #define TRACE_SYSTEM irq_matrix
  3. #if !defined(_TRACE_IRQ_MATRIX_H) || defined(TRACE_HEADER_MULTI_READ)
  4. #define _TRACE_IRQ_MATRIX_H
  5. #include <linux/tracepoint.h>
  6. struct irq_matrix;
  7. struct cpumap;
  8. DECLARE_EVENT_CLASS(irq_matrix_global,
  9. TP_PROTO(struct irq_matrix *matrix),
  10. TP_ARGS(matrix),
  11. TP_STRUCT__entry(
  12. __field( unsigned int, online_maps )
  13. __field( unsigned int, global_available )
  14. __field( unsigned int, global_reserved )
  15. __field( unsigned int, total_allocated )
  16. ),
  17. TP_fast_assign(
  18. __entry->online_maps = matrix->online_maps;
  19. __entry->global_available = matrix->global_available;
  20. __entry->global_reserved = matrix->global_reserved;
  21. __entry->total_allocated = matrix->total_allocated;
  22. ),
  23. TP_printk("online_maps=%d global_avl=%u, global_rsvd=%u, total_alloc=%u",
  24. __entry->online_maps, __entry->global_available,
  25. __entry->global_reserved, __entry->total_allocated)
  26. );
  27. DECLARE_EVENT_CLASS(irq_matrix_global_update,
  28. TP_PROTO(int bit, struct irq_matrix *matrix),
  29. TP_ARGS(bit, matrix),
  30. TP_STRUCT__entry(
  31. __field( int, bit )
  32. __field( unsigned int, online_maps )
  33. __field( unsigned int, global_available )
  34. __field( unsigned int, global_reserved )
  35. __field( unsigned int, total_allocated )
  36. ),
  37. TP_fast_assign(
  38. __entry->bit = bit;
  39. __entry->online_maps = matrix->online_maps;
  40. __entry->global_available = matrix->global_available;
  41. __entry->global_reserved = matrix->global_reserved;
  42. __entry->total_allocated = matrix->total_allocated;
  43. ),
  44. TP_printk("bit=%d online_maps=%d global_avl=%u, global_rsvd=%u, total_alloc=%u",
  45. __entry->bit, __entry->online_maps,
  46. __entry->global_available, __entry->global_reserved,
  47. __entry->total_allocated)
  48. );
  49. DECLARE_EVENT_CLASS(irq_matrix_cpu,
  50. TP_PROTO(int bit, unsigned int cpu, struct irq_matrix *matrix,
  51. struct cpumap *cmap),
  52. TP_ARGS(bit, cpu, matrix, cmap),
  53. TP_STRUCT__entry(
  54. __field( int, bit )
  55. __field( unsigned int, cpu )
  56. __field( bool, online )
  57. __field( unsigned int, available )
  58. __field( unsigned int, allocated )
  59. __field( unsigned int, managed )
  60. __field( unsigned int, online_maps )
  61. __field( unsigned int, global_available )
  62. __field( unsigned int, global_reserved )
  63. __field( unsigned int, total_allocated )
  64. ),
  65. TP_fast_assign(
  66. __entry->bit = bit;
  67. __entry->cpu = cpu;
  68. __entry->online = cmap->online;
  69. __entry->available = cmap->available;
  70. __entry->allocated = cmap->allocated;
  71. __entry->managed = cmap->managed;
  72. __entry->online_maps = matrix->online_maps;
  73. __entry->global_available = matrix->global_available;
  74. __entry->global_reserved = matrix->global_reserved;
  75. __entry->total_allocated = matrix->total_allocated;
  76. ),
  77. TP_printk("bit=%d cpu=%u online=%d avl=%u alloc=%u managed=%u online_maps=%u global_avl=%u, global_rsvd=%u, total_alloc=%u",
  78. __entry->bit, __entry->cpu, __entry->online,
  79. __entry->available, __entry->allocated,
  80. __entry->managed, __entry->online_maps,
  81. __entry->global_available, __entry->global_reserved,
  82. __entry->total_allocated)
  83. );
  84. DEFINE_EVENT(irq_matrix_global, irq_matrix_online,
  85. TP_PROTO(struct irq_matrix *matrix),
  86. TP_ARGS(matrix)
  87. );
  88. DEFINE_EVENT(irq_matrix_global, irq_matrix_offline,
  89. TP_PROTO(struct irq_matrix *matrix),
  90. TP_ARGS(matrix)
  91. );
  92. DEFINE_EVENT(irq_matrix_global, irq_matrix_reserve,
  93. TP_PROTO(struct irq_matrix *matrix),
  94. TP_ARGS(matrix)
  95. );
  96. DEFINE_EVENT(irq_matrix_global, irq_matrix_remove_reserved,
  97. TP_PROTO(struct irq_matrix *matrix),
  98. TP_ARGS(matrix)
  99. );
  100. DEFINE_EVENT(irq_matrix_global_update, irq_matrix_assign_system,
  101. TP_PROTO(int bit, struct irq_matrix *matrix),
  102. TP_ARGS(bit, matrix)
  103. );
  104. DEFINE_EVENT(irq_matrix_cpu, irq_matrix_alloc_reserved,
  105. TP_PROTO(int bit, unsigned int cpu,
  106. struct irq_matrix *matrix, struct cpumap *cmap),
  107. TP_ARGS(bit, cpu, matrix, cmap)
  108. );
  109. DEFINE_EVENT(irq_matrix_cpu, irq_matrix_reserve_managed,
  110. TP_PROTO(int bit, unsigned int cpu,
  111. struct irq_matrix *matrix, struct cpumap *cmap),
  112. TP_ARGS(bit, cpu, matrix, cmap)
  113. );
  114. DEFINE_EVENT(irq_matrix_cpu, irq_matrix_remove_managed,
  115. TP_PROTO(int bit, unsigned int cpu,
  116. struct irq_matrix *matrix, struct cpumap *cmap),
  117. TP_ARGS(bit, cpu, matrix, cmap)
  118. );
  119. DEFINE_EVENT(irq_matrix_cpu, irq_matrix_alloc_managed,
  120. TP_PROTO(int bit, unsigned int cpu,
  121. struct irq_matrix *matrix, struct cpumap *cmap),
  122. TP_ARGS(bit, cpu, matrix, cmap)
  123. );
  124. DEFINE_EVENT(irq_matrix_cpu, irq_matrix_assign,
  125. TP_PROTO(int bit, unsigned int cpu,
  126. struct irq_matrix *matrix, struct cpumap *cmap),
  127. TP_ARGS(bit, cpu, matrix, cmap)
  128. );
  129. DEFINE_EVENT(irq_matrix_cpu, irq_matrix_alloc,
  130. TP_PROTO(int bit, unsigned int cpu,
  131. struct irq_matrix *matrix, struct cpumap *cmap),
  132. TP_ARGS(bit, cpu, matrix, cmap)
  133. );
  134. DEFINE_EVENT(irq_matrix_cpu, irq_matrix_free,
  135. TP_PROTO(int bit, unsigned int cpu,
  136. struct irq_matrix *matrix, struct cpumap *cmap),
  137. TP_ARGS(bit, cpu, matrix, cmap)
  138. );
  139. #endif /* _TRACE_IRQ_H */
  140. /* This part must be outside protection */
  141. #include <trace/define_trace.h>