tlb.h 974 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  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_CONDITION(tlb_flush,
  13. TP_PROTO(int reason, unsigned long pages),
  14. TP_ARGS(reason, pages),
  15. TP_CONDITION(cpu_online(smp_processor_id())),
  16. TP_STRUCT__entry(
  17. __field( int, reason)
  18. __field(unsigned long, pages)
  19. ),
  20. TP_fast_assign(
  21. __entry->reason = reason;
  22. __entry->pages = pages;
  23. ),
  24. TP_printk("pages:%ld reason:%s (%d)",
  25. __entry->pages,
  26. __print_symbolic(__entry->reason, TLB_FLUSH_REASON),
  27. __entry->reason)
  28. );
  29. #endif /* _TRACE_TLB_H */
  30. /* This part must be outside protection */
  31. #include <trace/define_trace.h>