cpuhp.h 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. #undef TRACE_SYSTEM
  3. #define TRACE_SYSTEM cpuhp
  4. #if !defined(_TRACE_CPUHP_H) || defined(TRACE_HEADER_MULTI_READ)
  5. #define _TRACE_CPUHP_H
  6. #include <linux/tracepoint.h>
  7. TRACE_EVENT(cpuhp_enter,
  8. TP_PROTO(unsigned int cpu,
  9. int target,
  10. int idx,
  11. int (*fun)(unsigned int)),
  12. TP_ARGS(cpu, target, idx, fun),
  13. TP_STRUCT__entry(
  14. __field( unsigned int, cpu )
  15. __field( int, target )
  16. __field( int, idx )
  17. __field( void *, fun )
  18. ),
  19. TP_fast_assign(
  20. __entry->cpu = cpu;
  21. __entry->target = target;
  22. __entry->idx = idx;
  23. __entry->fun = fun;
  24. ),
  25. TP_printk("cpu: %04u target: %3d step: %3d (%pf)",
  26. __entry->cpu, __entry->target, __entry->idx, __entry->fun)
  27. );
  28. TRACE_EVENT(cpuhp_multi_enter,
  29. TP_PROTO(unsigned int cpu,
  30. int target,
  31. int idx,
  32. int (*fun)(unsigned int, struct hlist_node *),
  33. struct hlist_node *node),
  34. TP_ARGS(cpu, target, idx, fun, node),
  35. TP_STRUCT__entry(
  36. __field( unsigned int, cpu )
  37. __field( int, target )
  38. __field( int, idx )
  39. __field( void *, fun )
  40. ),
  41. TP_fast_assign(
  42. __entry->cpu = cpu;
  43. __entry->target = target;
  44. __entry->idx = idx;
  45. __entry->fun = fun;
  46. ),
  47. TP_printk("cpu: %04u target: %3d step: %3d (%pf)",
  48. __entry->cpu, __entry->target, __entry->idx, __entry->fun)
  49. );
  50. TRACE_EVENT(cpuhp_exit,
  51. TP_PROTO(unsigned int cpu,
  52. int state,
  53. int idx,
  54. int ret),
  55. TP_ARGS(cpu, state, idx, ret),
  56. TP_STRUCT__entry(
  57. __field( unsigned int, cpu )
  58. __field( int, state )
  59. __field( int, idx )
  60. __field( int, ret )
  61. ),
  62. TP_fast_assign(
  63. __entry->cpu = cpu;
  64. __entry->state = state;
  65. __entry->idx = idx;
  66. __entry->ret = ret;
  67. ),
  68. TP_printk(" cpu: %04u state: %3d step: %3d ret: %d",
  69. __entry->cpu, __entry->state, __entry->idx, __entry->ret)
  70. );
  71. #endif
  72. /* This part must be outside protection */
  73. #include <trace/define_trace.h>