workqueue.h 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. #undef TRACE_SYSTEM
  2. #define TRACE_SYSTEM workqueue
  3. #if !defined(_TRACE_WORKQUEUE_H) || defined(TRACE_HEADER_MULTI_READ)
  4. #define _TRACE_WORKQUEUE_H
  5. #include <linux/tracepoint.h>
  6. #include <linux/workqueue.h>
  7. /**
  8. * workqueue_execute_start - called immediately before the workqueue callback
  9. * @work: pointer to struct work_struct
  10. *
  11. * Allows to track workqueue execution.
  12. */
  13. TRACE_EVENT(workqueue_execute_start,
  14. TP_PROTO(struct work_struct *work),
  15. TP_ARGS(work),
  16. TP_STRUCT__entry(
  17. __field( void *, work )
  18. __field( void *, function)
  19. ),
  20. TP_fast_assign(
  21. __entry->work = work;
  22. __entry->function = work->func;
  23. ),
  24. TP_printk("work struct %p: function %pf", __entry->work, __entry->function)
  25. );
  26. /**
  27. * workqueue_execute_end - called immediately before the workqueue callback
  28. * @work: pointer to struct work_struct
  29. *
  30. * Allows to track workqueue execution.
  31. */
  32. TRACE_EVENT(workqueue_execute_end,
  33. TP_PROTO(struct work_struct *work),
  34. TP_ARGS(work),
  35. TP_STRUCT__entry(
  36. __field( void *, work )
  37. ),
  38. TP_fast_assign(
  39. __entry->work = work;
  40. ),
  41. TP_printk("work struct %p", __entry->work)
  42. );
  43. #endif /* _TRACE_WORKQUEUE_H */
  44. /* This part must be outside protection */
  45. #include <trace/define_trace.h>