hc
2024-05-10 37f49e37ab4cb5d0bc4c60eb5c6d4dd57db767bb
kernel/include/trace/events/compaction.h
....@@ -64,6 +64,7 @@
6464 TP_ARGS(start_pfn, end_pfn, nr_scanned, nr_taken)
6565 );
6666
67
+#ifdef CONFIG_COMPACTION
6768 TRACE_EVENT(mm_compaction_migratepages,
6869
6970 TP_PROTO(unsigned long nr_all,
....@@ -132,7 +133,6 @@
132133 __entry->sync ? "sync" : "async")
133134 );
134135
135
-#ifdef CONFIG_COMPACTION
136136 TRACE_EVENT(mm_compaction_end,
137137 TP_PROTO(unsigned long zone_start, unsigned long migrate_pfn,
138138 unsigned long free_pfn, unsigned long zone_end, bool sync,
....@@ -166,7 +166,6 @@
166166 __entry->sync ? "sync" : "async",
167167 __print_symbolic(__entry->status, COMPACTION_STATUS))
168168 );
169
-#endif
170169
171170 TRACE_EVENT(mm_compaction_try_to_compact_pages,
172171
....@@ -189,13 +188,12 @@
189188 __entry->prio = prio;
190189 ),
191190
192
- TP_printk("order=%d gfp_mask=0x%x priority=%d",
191
+ TP_printk("order=%d gfp_mask=%s priority=%d",
193192 __entry->order,
194
- __entry->gfp_mask,
193
+ show_gfp_flags(__entry->gfp_mask),
195194 __entry->prio)
196195 );
197196
198
-#ifdef CONFIG_COMPACTION
199197 DECLARE_EVENT_CLASS(mm_compaction_suitable_template,
200198
201199 TP_PROTO(struct zone *zone,
....@@ -296,7 +294,6 @@
296294
297295 TP_ARGS(zone, order)
298296 );
299
-#endif
300297
301298 TRACE_EVENT(mm_compaction_kcompactd_sleep,
302299
....@@ -317,41 +314,46 @@
317314
318315 DECLARE_EVENT_CLASS(kcompactd_wake_template,
319316
320
- TP_PROTO(int nid, int order, enum zone_type classzone_idx),
317
+ TP_PROTO(int nid, int order, enum zone_type highest_zoneidx),
321318
322
- TP_ARGS(nid, order, classzone_idx),
319
+ TP_ARGS(nid, order, highest_zoneidx),
323320
324321 TP_STRUCT__entry(
325322 __field(int, nid)
326323 __field(int, order)
327
- __field(enum zone_type, classzone_idx)
324
+ __field(enum zone_type, highest_zoneidx)
328325 ),
329326
330327 TP_fast_assign(
331328 __entry->nid = nid;
332329 __entry->order = order;
333
- __entry->classzone_idx = classzone_idx;
330
+ __entry->highest_zoneidx = highest_zoneidx;
334331 ),
335332
333
+ /*
334
+ * classzone_idx is previous name of the highest_zoneidx.
335
+ * Reason not to change it is the ABI requirement of the tracepoint.
336
+ */
336337 TP_printk("nid=%d order=%d classzone_idx=%-8s",
337338 __entry->nid,
338339 __entry->order,
339
- __print_symbolic(__entry->classzone_idx, ZONE_TYPE))
340
+ __print_symbolic(__entry->highest_zoneidx, ZONE_TYPE))
340341 );
341342
342343 DEFINE_EVENT(kcompactd_wake_template, mm_compaction_wakeup_kcompactd,
343344
344
- TP_PROTO(int nid, int order, enum zone_type classzone_idx),
345
+ TP_PROTO(int nid, int order, enum zone_type highest_zoneidx),
345346
346
- TP_ARGS(nid, order, classzone_idx)
347
+ TP_ARGS(nid, order, highest_zoneidx)
347348 );
348349
349350 DEFINE_EVENT(kcompactd_wake_template, mm_compaction_kcompactd_wake,
350351
351
- TP_PROTO(int nid, int order, enum zone_type classzone_idx),
352
+ TP_PROTO(int nid, int order, enum zone_type highest_zoneidx),
352353
353
- TP_ARGS(nid, order, classzone_idx)
354
+ TP_ARGS(nid, order, highest_zoneidx)
354355 );
356
+#endif
355357
356358 #endif /* _TRACE_COMPACTION_H */
357359