notifier.h 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. #undef TRACE_SYSTEM
  3. #define TRACE_SYSTEM notifier
  4. #if !defined(_TRACE_NOTIFIERS_H) || defined(TRACE_HEADER_MULTI_READ)
  5. #define _TRACE_NOTIFIERS_H
  6. #include <linux/tracepoint.h>
  7. DECLARE_EVENT_CLASS(notifier_info,
  8. TP_PROTO(void *cb),
  9. TP_ARGS(cb),
  10. TP_STRUCT__entry(
  11. __field(void *, cb)
  12. ),
  13. TP_fast_assign(
  14. __entry->cb = cb;
  15. ),
  16. TP_printk("%ps", __entry->cb)
  17. );
  18. /*
  19. * notifier_register - called upon notifier callback registration
  20. *
  21. * @cb: callback pointer
  22. *
  23. */
  24. DEFINE_EVENT(notifier_info, notifier_register,
  25. TP_PROTO(void *cb),
  26. TP_ARGS(cb)
  27. );
  28. /*
  29. * notifier_unregister - called upon notifier callback unregistration
  30. *
  31. * @cb: callback pointer
  32. *
  33. */
  34. DEFINE_EVENT(notifier_info, notifier_unregister,
  35. TP_PROTO(void *cb),
  36. TP_ARGS(cb)
  37. );
  38. /*
  39. * notifier_run - called upon notifier callback execution
  40. *
  41. * @cb: callback pointer
  42. *
  43. */
  44. DEFINE_EVENT(notifier_info, notifier_run,
  45. TP_PROTO(void *cb),
  46. TP_ARGS(cb)
  47. );
  48. #endif /* _TRACE_NOTIFIERS_H */
  49. /* This part must be outside protection */
  50. #include <trace/define_trace.h>