context_tracking.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. #undef TRACE_SYSTEM
  2. #define TRACE_SYSTEM context_tracking
  3. #if !defined(_TRACE_CONTEXT_TRACKING_H) || defined(TRACE_HEADER_MULTI_READ)
  4. #define _TRACE_CONTEXT_TRACKING_H
  5. #include <linux/tracepoint.h>
  6. DECLARE_EVENT_CLASS(context_tracking_user,
  7. TP_PROTO(int dummy),
  8. TP_ARGS(dummy),
  9. TP_STRUCT__entry(
  10. __field( int, dummy )
  11. ),
  12. TP_fast_assign(
  13. __entry->dummy = dummy;
  14. ),
  15. TP_printk("%s", "")
  16. );
  17. /**
  18. * user_enter - called when the kernel resumes to userspace
  19. * @dummy: dummy arg to make trace event macro happy
  20. *
  21. * This event occurs when the kernel resumes to userspace after
  22. * an exception or a syscall.
  23. */
  24. DEFINE_EVENT(context_tracking_user, user_enter,
  25. TP_PROTO(int dummy),
  26. TP_ARGS(dummy)
  27. );
  28. /**
  29. * user_exit - called when userspace enters the kernel
  30. * @dummy: dummy arg to make trace event macro happy
  31. *
  32. * This event occurs when userspace enters the kernel through
  33. * an exception or a syscall.
  34. */
  35. DEFINE_EVENT(context_tracking_user, user_exit,
  36. TP_PROTO(int dummy),
  37. TP_ARGS(dummy)
  38. );
  39. #endif /* _TRACE_CONTEXT_TRACKING_H */
  40. /* This part must be outside protection */
  41. #include <trace/define_trace.h>