rcu.h 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. #undef TRACE_SYSTEM
  2. #define TRACE_SYSTEM rcu
  3. #if !defined(_TRACE_RCU_H) || defined(TRACE_HEADER_MULTI_READ)
  4. #define _TRACE_RCU_H
  5. #include <linux/tracepoint.h>
  6. /*
  7. * Tracepoint for calling rcu_do_batch, performed to start callback invocation:
  8. */
  9. TRACE_EVENT(rcu_batch_start,
  10. TP_PROTO(long callbacks_ready, int blimit),
  11. TP_ARGS(callbacks_ready, blimit),
  12. TP_STRUCT__entry(
  13. __field( long, callbacks_ready )
  14. __field( int, blimit )
  15. ),
  16. TP_fast_assign(
  17. __entry->callbacks_ready = callbacks_ready;
  18. __entry->blimit = blimit;
  19. ),
  20. TP_printk("CBs=%ld bl=%d", __entry->callbacks_ready, __entry->blimit)
  21. );
  22. /*
  23. * Tracepoint for the invocation of a single RCU callback
  24. */
  25. TRACE_EVENT(rcu_invoke_callback,
  26. TP_PROTO(struct rcu_head *rhp),
  27. TP_ARGS(rhp),
  28. TP_STRUCT__entry(
  29. __field( void *, rhp )
  30. __field( void *, func )
  31. ),
  32. TP_fast_assign(
  33. __entry->rhp = rhp;
  34. __entry->func = rhp->func;
  35. ),
  36. TP_printk("rhp=%p func=%pf", __entry->rhp, __entry->func)
  37. );
  38. /*
  39. * Tracepoint for the invocation of a single RCU kfree callback
  40. */
  41. TRACE_EVENT(rcu_invoke_kfree_callback,
  42. TP_PROTO(struct rcu_head *rhp, unsigned long offset),
  43. TP_ARGS(rhp, offset),
  44. TP_STRUCT__entry(
  45. __field(void *, rhp )
  46. __field(unsigned long, offset )
  47. ),
  48. TP_fast_assign(
  49. __entry->rhp = rhp;
  50. __entry->offset = offset;
  51. ),
  52. TP_printk("rhp=%p func=%ld", __entry->rhp, __entry->offset)
  53. );
  54. /*
  55. * Tracepoint for leaving rcu_do_batch, performed after callback invocation:
  56. */
  57. TRACE_EVENT(rcu_batch_end,
  58. TP_PROTO(int callbacks_invoked),
  59. TP_ARGS(callbacks_invoked),
  60. TP_STRUCT__entry(
  61. __field( int, callbacks_invoked )
  62. ),
  63. TP_fast_assign(
  64. __entry->callbacks_invoked = callbacks_invoked;
  65. ),
  66. TP_printk("CBs-invoked=%d", __entry->callbacks_invoked)
  67. );
  68. #endif /* _TRACE_RCU_H */
  69. /* This part must be outside protection */
  70. #include <trace/define_trace.h>