tlb.h 916 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. #undef TRACE_SYSTEM
  2. #define TRACE_SYSTEM tlb
  3. #if !defined(_TRACE_TLB_H) || defined(TRACE_HEADER_MULTI_READ)
  4. #define _TRACE_TLB_H
  5. #include <linux/mm_types.h>
  6. #include <linux/tracepoint.h>
  7. #define TLB_FLUSH_REASON \
  8. { TLB_FLUSH_ON_TASK_SWITCH, "flush on task switch" }, \
  9. { TLB_REMOTE_SHOOTDOWN, "remote shootdown" }, \
  10. { TLB_LOCAL_SHOOTDOWN, "local shootdown" }, \
  11. { TLB_LOCAL_MM_SHOOTDOWN, "local mm shootdown" }
  12. TRACE_EVENT(tlb_flush,
  13. TP_PROTO(int reason, unsigned long pages),
  14. TP_ARGS(reason, pages),
  15. TP_STRUCT__entry(
  16. __field( int, reason)
  17. __field(unsigned long, pages)
  18. ),
  19. TP_fast_assign(
  20. __entry->reason = reason;
  21. __entry->pages = pages;
  22. ),
  23. TP_printk("pages:%ld reason:%s (%d)",
  24. __entry->pages,
  25. __print_symbolic(__entry->reason, TLB_FLUSH_REASON),
  26. __entry->reason)
  27. );
  28. #endif /* _TRACE_TLB_H */
  29. /* This part must be outside protection */
  30. #include <trace/define_trace.h>