2 #define TRACE_SYSTEM compaction
4 #if !defined(_TRACE_COMPACTION_H) || defined(TRACE_HEADER_MULTI_READ)
5 #define _TRACE_COMPACTION_H
7 #include <linux/types.h>
8 #include <linux/tracepoint.h>
9 #include <trace/events/gfpflags.h>
11 DECLARE_EVENT_CLASS(mm_compaction_isolate_template
,
13 TP_PROTO(unsigned long nr_scanned
,
14 unsigned long nr_taken
),
16 TP_ARGS(nr_scanned
, nr_taken
),
19 __field(unsigned long, nr_scanned
)
20 __field(unsigned long, nr_taken
)
24 __entry
->nr_scanned
= nr_scanned
;
25 __entry
->nr_taken
= nr_taken
;
28 TP_printk("nr_scanned=%lu nr_taken=%lu",
33 DEFINE_EVENT(mm_compaction_isolate_template
, mm_compaction_isolate_migratepages
,
35 TP_PROTO(unsigned long nr_scanned
,
36 unsigned long nr_taken
),
38 TP_ARGS(nr_scanned
, nr_taken
)
41 DEFINE_EVENT(mm_compaction_isolate_template
, mm_compaction_isolate_freepages
,
42 TP_PROTO(unsigned long nr_scanned
,
43 unsigned long nr_taken
),
45 TP_ARGS(nr_scanned
, nr_taken
)
48 TRACE_EVENT(mm_compaction_migratepages
,
50 TP_PROTO(unsigned long nr_migrated
,
51 unsigned long nr_failed
),
53 TP_ARGS(nr_migrated
, nr_failed
),
56 __field(unsigned long, nr_migrated
)
57 __field(unsigned long, nr_failed
)
61 __entry
->nr_migrated
= nr_migrated
;
62 __entry
->nr_failed
= nr_failed
;
65 TP_printk("nr_migrated=%lu nr_failed=%lu",
70 TRACE_EVENT(mm_compaction_begin
,
71 TP_PROTO(unsigned long zone_start
, unsigned long migrate_start
,
72 unsigned long free_start
, unsigned long zone_end
),
74 TP_ARGS(zone_start
, migrate_start
, free_start
, zone_end
),
77 __field(unsigned long, zone_start
)
78 __field(unsigned long, migrate_start
)
79 __field(unsigned long, free_start
)
80 __field(unsigned long, zone_end
)
84 __entry
->zone_start
= zone_start
;
85 __entry
->migrate_start
= migrate_start
;
86 __entry
->free_start
= free_start
;
87 __entry
->zone_end
= zone_end
;
90 TP_printk("zone_start=%lu migrate_start=%lu free_start=%lu zone_end=%lu",
92 __entry
->migrate_start
,
97 TRACE_EVENT(mm_compaction_end
,
107 __entry
->status
= status
;
110 TP_printk("status=%d", __entry
->status
)
113 #endif /* _TRACE_COMPACTION_H */
115 /* This part must be outside protection */
116 #include <trace/define_trace.h>