compaction.h 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. #undef TRACE_SYSTEM
  2. #define TRACE_SYSTEM compaction
  3. #if !defined(_TRACE_COMPACTION_H) || defined(TRACE_HEADER_MULTI_READ)
  4. #define _TRACE_COMPACTION_H
  5. #include <linux/types.h>
  6. #include <linux/tracepoint.h>
  7. #include "gfpflags.h"
  8. DECLARE_EVENT_CLASS(mm_compaction_isolate_template,
  9. TP_PROTO(unsigned long nr_scanned,
  10. unsigned long nr_taken),
  11. TP_ARGS(nr_scanned, nr_taken),
  12. TP_STRUCT__entry(
  13. __field(unsigned long, nr_scanned)
  14. __field(unsigned long, nr_taken)
  15. ),
  16. TP_fast_assign(
  17. __entry->nr_scanned = nr_scanned;
  18. __entry->nr_taken = nr_taken;
  19. ),
  20. TP_printk("nr_scanned=%lu nr_taken=%lu",
  21. __entry->nr_scanned,
  22. __entry->nr_taken)
  23. );
  24. DEFINE_EVENT(mm_compaction_isolate_template, mm_compaction_isolate_migratepages,
  25. TP_PROTO(unsigned long nr_scanned,
  26. unsigned long nr_taken),
  27. TP_ARGS(nr_scanned, nr_taken)
  28. );
  29. DEFINE_EVENT(mm_compaction_isolate_template, mm_compaction_isolate_freepages,
  30. TP_PROTO(unsigned long nr_scanned,
  31. unsigned long nr_taken),
  32. TP_ARGS(nr_scanned, nr_taken)
  33. );
  34. TRACE_EVENT(mm_compaction_migratepages,
  35. TP_PROTO(unsigned long nr_migrated,
  36. unsigned long nr_failed),
  37. TP_ARGS(nr_migrated, nr_failed),
  38. TP_STRUCT__entry(
  39. __field(unsigned long, nr_migrated)
  40. __field(unsigned long, nr_failed)
  41. ),
  42. TP_fast_assign(
  43. __entry->nr_migrated = nr_migrated;
  44. __entry->nr_failed = nr_failed;
  45. ),
  46. TP_printk("nr_migrated=%lu nr_failed=%lu",
  47. __entry->nr_migrated,
  48. __entry->nr_failed)
  49. );
  50. #endif /* _TRACE_COMPACTION_H */
  51. /* This part must be outside protection */
  52. #include <trace/define_trace.h>