fix: mm, vmscan signatures changed in linux 6.7.0-rc1
[lttng-modules.git] / include / instrumentation / events / mm_vmscan.h
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 #undef TRACE_SYSTEM
3 #define TRACE_SYSTEM mm_vmscan
4
5 #if !defined(LTTNG_TRACE_MM_VMSCAN_H) || defined(TRACE_HEADER_MULTI_READ)
6 #define LTTNG_TRACE_MM_VMSCAN_H
7
8 #include <lttng/tracepoint-event.h>
9 #include <linux/types.h>
10 #include <linux/mm.h>
11 #include <linux/memcontrol.h>
12 #include <lttng/kernel-version.h>
13
14 #ifndef _TRACE_VMSCAN_DEF
15 #define _TRACE_VMSCAN_DEF
16 #define RECLAIM_WB_ANON 0x0001u
17 #define RECLAIM_WB_FILE 0x0002u
18 #define RECLAIM_WB_MIXED 0x0010u
19 #define RECLAIM_WB_SYNC 0x0004u /* Unused, all reclaim async */
20 #define RECLAIM_WB_ASYNC 0x0008u
21 #endif
22
23 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,2,0) || \
24 LTTNG_RHEL_KERNEL_RANGE(4,18,0,305,0,0, 4,19,0,0,0,0))
25
26 #include <linux/mm_inline.h>
27
28 #define trace_reclaim_flags(file) ( \
29 (file ? RECLAIM_WB_FILE : RECLAIM_WB_ANON) | \
30 (RECLAIM_WB_ASYNC) \
31 )
32
33 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,5,0))
34
35 #include <linux/mm_inline.h>
36
37 #define trace_reclaim_flags(page) ( \
38 (page_is_file_cache(page) ? RECLAIM_WB_FILE : RECLAIM_WB_ANON) | \
39 (RECLAIM_WB_ASYNC) \
40 )
41
42 #define trace_shrink_flags(file) \
43 ( \
44 (file ? RECLAIM_WB_FILE : RECLAIM_WB_ANON) | \
45 (RECLAIM_WB_ASYNC) \
46 )
47
48 #endif
49
50 LTTNG_TRACEPOINT_EVENT(mm_vmscan_kswapd_sleep,
51
52 TP_PROTO(int nid),
53
54 TP_ARGS(nid),
55
56 TP_FIELDS(
57 ctf_integer(int, nid, nid)
58 )
59 )
60
61 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,8,0))
62
63 LTTNG_TRACEPOINT_EVENT(mm_vmscan_kswapd_wake,
64
65 TP_PROTO(int nid, int zid, int order),
66
67 TP_ARGS(nid, zid, order),
68
69 TP_FIELDS(
70 ctf_integer(int, nid, nid)
71 ctf_integer(int, zid, zid)
72 ctf_integer(int, order, order)
73 )
74 )
75
76 #else
77
78 LTTNG_TRACEPOINT_EVENT(mm_vmscan_kswapd_wake,
79
80 TP_PROTO(int nid, int order),
81
82 TP_ARGS(nid, order),
83
84 TP_FIELDS(
85 ctf_integer(int, nid, nid)
86 ctf_integer(int, order, order)
87 )
88 )
89
90 #endif
91
92 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,17,0))
93 LTTNG_TRACEPOINT_EVENT(mm_vmscan_wakeup_kswapd,
94
95 TP_PROTO(int nid, int zid, int order, gfp_t gfp_flags),
96
97 TP_ARGS(nid, zid, order, gfp_flags),
98
99 TP_FIELDS(
100 ctf_integer(int, nid, nid)
101 ctf_integer(int, zid, zid)
102 ctf_integer(int, order, order)
103 ctf_integer(gfp_t, gfp_flags, gfp_flags)
104 )
105 )
106 #else
107 LTTNG_TRACEPOINT_EVENT(mm_vmscan_wakeup_kswapd,
108
109 TP_PROTO(int nid, int zid, int order),
110
111 TP_ARGS(nid, zid, order),
112
113 TP_FIELDS(
114 ctf_integer(int, nid, nid)
115 ctf_integer(int, zid, zid)
116 ctf_integer(int, order, order)
117 )
118 )
119 #endif
120
121 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,2,0) || \
122 LTTNG_RHEL_KERNEL_RANGE(4,18,0,305,0,0, 4,19,0,0,0,0))
123
124 LTTNG_TRACEPOINT_EVENT_CLASS(mm_vmscan_direct_reclaim_begin_template,
125
126 TP_PROTO(int order, gfp_t gfp_flags),
127
128 TP_ARGS(order, gfp_flags),
129
130 TP_FIELDS(
131 ctf_integer(int, order, order)
132 ctf_integer(gfp_t, gfp_flags, gfp_flags)
133 )
134 )
135
136 LTTNG_TRACEPOINT_EVENT_INSTANCE(mm_vmscan_direct_reclaim_begin_template, mm_vmscan_direct_reclaim_begin,
137
138 TP_PROTO(int order, gfp_t gfp_flags),
139
140 TP_ARGS(order, gfp_flags)
141 )
142
143 LTTNG_TRACEPOINT_EVENT_INSTANCE(mm_vmscan_direct_reclaim_begin_template, mm_vmscan_memcg_reclaim_begin,
144
145 TP_PROTO(int order, gfp_t gfp_flags),
146
147 TP_ARGS(order, gfp_flags)
148 )
149
150 LTTNG_TRACEPOINT_EVENT_INSTANCE(mm_vmscan_direct_reclaim_begin_template, mm_vmscan_memcg_softlimit_reclaim_begin,
151
152 TP_PROTO(int order, gfp_t gfp_flags),
153
154 TP_ARGS(order, gfp_flags)
155 )
156
157 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,8,0))
158
159 LTTNG_TRACEPOINT_EVENT_CLASS(mm_vmscan_direct_reclaim_begin_template,
160
161 TP_PROTO(int order, int may_writepage, gfp_t gfp_flags, int classzone_idx),
162
163 TP_ARGS(order, may_writepage, gfp_flags, classzone_idx),
164
165 TP_FIELDS(
166 ctf_integer(int, order, order)
167 ctf_integer(int, may_writepage, may_writepage)
168 ctf_integer(gfp_t, gfp_flags, gfp_flags)
169 ctf_integer(int, classzone_idx, classzone_idx)
170 )
171 )
172
173 LTTNG_TRACEPOINT_EVENT_INSTANCE(mm_vmscan_direct_reclaim_begin_template, mm_vmscan_direct_reclaim_begin,
174
175 TP_PROTO(int order, int may_writepage, gfp_t gfp_flags, int classzone_idx),
176
177 TP_ARGS(order, may_writepage, gfp_flags, classzone_idx)
178 )
179
180 LTTNG_TRACEPOINT_EVENT_INSTANCE(mm_vmscan_direct_reclaim_begin_template, mm_vmscan_memcg_reclaim_begin,
181
182 TP_PROTO(int order, int may_writepage, gfp_t gfp_flags, int classzone_idx),
183
184 TP_ARGS(order, may_writepage, gfp_flags, classzone_idx)
185 )
186
187 LTTNG_TRACEPOINT_EVENT_INSTANCE(mm_vmscan_direct_reclaim_begin_template, mm_vmscan_memcg_softlimit_reclaim_begin,
188
189 TP_PROTO(int order, int may_writepage, gfp_t gfp_flags, int classzone_idx),
190
191 TP_ARGS(order, may_writepage, gfp_flags, classzone_idx)
192 )
193
194 #else
195
196 LTTNG_TRACEPOINT_EVENT_CLASS(mm_vmscan_direct_reclaim_begin_template,
197
198 TP_PROTO(int order, int may_writepage, gfp_t gfp_flags),
199
200 TP_ARGS(order, may_writepage, gfp_flags),
201
202 TP_FIELDS(
203 ctf_integer(int, order, order)
204 ctf_integer(int, may_writepage, may_writepage)
205 ctf_integer(gfp_t, gfp_flags, gfp_flags)
206 )
207 )
208
209 LTTNG_TRACEPOINT_EVENT_INSTANCE(mm_vmscan_direct_reclaim_begin_template, mm_vmscan_direct_reclaim_begin,
210
211 TP_PROTO(int order, int may_writepage, gfp_t gfp_flags),
212
213 TP_ARGS(order, may_writepage, gfp_flags)
214 )
215
216 LTTNG_TRACEPOINT_EVENT_INSTANCE(mm_vmscan_direct_reclaim_begin_template, mm_vmscan_memcg_reclaim_begin,
217
218 TP_PROTO(int order, int may_writepage, gfp_t gfp_flags),
219
220 TP_ARGS(order, may_writepage, gfp_flags)
221 )
222
223 LTTNG_TRACEPOINT_EVENT_INSTANCE(mm_vmscan_direct_reclaim_begin_template, mm_vmscan_memcg_softlimit_reclaim_begin,
224
225 TP_PROTO(int order, int may_writepage, gfp_t gfp_flags),
226
227 TP_ARGS(order, may_writepage, gfp_flags)
228 )
229
230 #endif
231
232 LTTNG_TRACEPOINT_EVENT_CLASS(mm_vmscan_direct_reclaim_end_template,
233
234 TP_PROTO(unsigned long nr_reclaimed),
235
236 TP_ARGS(nr_reclaimed),
237
238 TP_FIELDS(
239 ctf_integer(unsigned long, nr_reclaimed, nr_reclaimed)
240 )
241 )
242
243 LTTNG_TRACEPOINT_EVENT_INSTANCE(mm_vmscan_direct_reclaim_end_template, mm_vmscan_direct_reclaim_end,
244
245 TP_PROTO(unsigned long nr_reclaimed),
246
247 TP_ARGS(nr_reclaimed)
248 )
249
250 LTTNG_TRACEPOINT_EVENT_INSTANCE(mm_vmscan_direct_reclaim_end_template, mm_vmscan_memcg_reclaim_end,
251
252 TP_PROTO(unsigned long nr_reclaimed),
253
254 TP_ARGS(nr_reclaimed)
255 )
256
257 LTTNG_TRACEPOINT_EVENT_INSTANCE(mm_vmscan_direct_reclaim_end_template, mm_vmscan_memcg_softlimit_reclaim_end,
258
259 TP_PROTO(unsigned long nr_reclaimed),
260
261 TP_ARGS(nr_reclaimed)
262 )
263
264 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,16,0))
265 LTTNG_TRACEPOINT_EVENT_MAP(mm_shrink_slab_start,
266
267 mm_vmscan_shrink_slab_start,
268
269 TP_PROTO(struct shrinker *shr, struct shrink_control *sc,
270 long nr_objects_to_shrink, unsigned long cache_items,
271 unsigned long long delta, unsigned long total_scan,
272 int priority),
273
274 TP_ARGS(shr, sc, nr_objects_to_shrink, cache_items, delta, total_scan,
275 priority),
276
277 TP_FIELDS(
278 ctf_integer_hex(struct shrinker *, shr, shr)
279 ctf_integer_hex(void *, shrink, shr->scan_objects)
280 ctf_integer(int, nid, sc->nid)
281 ctf_integer(long, nr_objects_to_shrink, nr_objects_to_shrink)
282 ctf_integer(gfp_t, gfp_flags, sc->gfp_mask)
283 ctf_integer(unsigned long, cache_items, cache_items)
284 ctf_integer(unsigned long long, delta, delta)
285 ctf_integer(unsigned long, total_scan, total_scan)
286 ctf_integer(int, priority, priority)
287 )
288 )
289 #else
290 LTTNG_TRACEPOINT_EVENT_MAP(mm_shrink_slab_start,
291
292 mm_vmscan_shrink_slab_start,
293
294 TP_PROTO(struct shrinker *shr, struct shrink_control *sc,
295 long nr_objects_to_shrink, unsigned long pgs_scanned,
296 unsigned long lru_pgs, unsigned long cache_items,
297 unsigned long long delta, unsigned long total_scan),
298
299 TP_ARGS(shr, sc, nr_objects_to_shrink, pgs_scanned, lru_pgs,
300 cache_items, delta, total_scan),
301
302 TP_FIELDS(
303 ctf_integer_hex(struct shrinker *, shr, shr)
304 ctf_integer_hex(void *, shrink, shr->scan_objects)
305 ctf_integer(long, nr_objects_to_shrink, nr_objects_to_shrink)
306 ctf_integer(gfp_t, gfp_flags, sc->gfp_mask)
307 ctf_integer(unsigned long, pgs_scanned, pgs_scanned)
308 ctf_integer(unsigned long, lru_pgs, lru_pgs)
309 ctf_integer(unsigned long, cache_items, cache_items)
310 ctf_integer(unsigned long long, delta, delta)
311 ctf_integer(unsigned long, total_scan, total_scan)
312 )
313 )
314 #endif
315
316 LTTNG_TRACEPOINT_EVENT_MAP(mm_shrink_slab_end,
317
318 mm_vmscan_shrink_slab_end,
319
320 TP_PROTO(struct shrinker *shr, int nid, int shrinker_retval,
321 long unused_scan_cnt, long new_scan_cnt, long total_scan),
322
323 TP_ARGS(shr, nid, shrinker_retval, unused_scan_cnt, new_scan_cnt,
324 total_scan),
325
326 TP_FIELDS(
327 ctf_integer_hex(struct shrinker *, shr, shr)
328 ctf_integer(int, nid, nid)
329 ctf_integer_hex(void *, shrink, shr->scan_objects)
330 ctf_integer(long, unused_scan, unused_scan_cnt)
331 ctf_integer(long, new_scan, new_scan_cnt)
332 ctf_integer(int, retval, shrinker_retval)
333 ctf_integer(long, total_scan, total_scan)
334 )
335 )
336
337 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(6,7,0))
338 LTTNG_TRACEPOINT_EVENT(mm_vmscan_lru_isolate,
339
340 TP_PROTO(int classzone_idx,
341 int order,
342 unsigned long nr_requested,
343 unsigned long nr_scanned,
344 unsigned long nr_skipped,
345 unsigned long nr_taken,
346 int lru
347 ),
348
349 TP_ARGS(classzone_idx, order, nr_requested, nr_scanned, nr_skipped,
350 nr_taken, lru
351 ),
352
353 TP_FIELDS(
354 ctf_integer(int, classzone_idx, classzone_idx)
355 ctf_integer(int, order, order)
356 ctf_integer(unsigned long, nr_requested, nr_requested)
357 ctf_integer(unsigned long, nr_scanned, nr_scanned)
358 ctf_integer(unsigned long, nr_skipped, nr_skipped)
359 ctf_integer(unsigned long, nr_taken, nr_taken)
360 ctf_integer(int, lru, lru)
361 )
362 )
363 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,11,0))
364 LTTNG_TRACEPOINT_EVENT(mm_vmscan_lru_isolate,
365
366 TP_PROTO(int classzone_idx,
367 int order,
368 unsigned long nr_requested,
369 unsigned long nr_scanned,
370 unsigned long nr_skipped,
371 unsigned long nr_taken,
372 isolate_mode_t isolate_mode,
373 int lru
374 ),
375
376 TP_ARGS(classzone_idx, order, nr_requested, nr_scanned, nr_skipped,
377 nr_taken, isolate_mode, lru
378 ),
379
380 TP_FIELDS(
381 ctf_integer(int, classzone_idx, classzone_idx)
382 ctf_integer(int, order, order)
383 ctf_integer(unsigned long, nr_requested, nr_requested)
384 ctf_integer(unsigned long, nr_scanned, nr_scanned)
385 ctf_integer(unsigned long, nr_skipped, nr_skipped)
386 ctf_integer(unsigned long, nr_taken, nr_taken)
387 ctf_integer(isolate_mode_t, isolate_mode, isolate_mode)
388 ctf_integer(int, lru, lru)
389 )
390 )
391 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,8,0))
392 LTTNG_TRACEPOINT_EVENT_CLASS(mm_vmscan_lru_isolate_template,
393
394 TP_PROTO(int classzone_idx,
395 int order,
396 unsigned long nr_requested,
397 unsigned long nr_scanned,
398 unsigned long nr_taken,
399 isolate_mode_t isolate_mode,
400 int file
401 ),
402
403 TP_ARGS(classzone_idx, order, nr_requested, nr_scanned, nr_taken,
404 isolate_mode, file
405 ),
406
407
408 TP_FIELDS(
409 ctf_integer(int, classzone_idx, classzone_idx)
410 ctf_integer(int, order, order)
411 ctf_integer(unsigned long, nr_requested, nr_requested)
412 ctf_integer(unsigned long, nr_scanned, nr_scanned)
413 ctf_integer(unsigned long, nr_taken, nr_taken)
414 ctf_integer(isolate_mode_t, isolate_mode, isolate_mode)
415 ctf_integer(int, file, file)
416 )
417 )
418
419 LTTNG_TRACEPOINT_EVENT_INSTANCE(mm_vmscan_lru_isolate_template, mm_vmscan_lru_isolate,
420
421 TP_PROTO(int classzone_idx,
422 int order,
423 unsigned long nr_requested,
424 unsigned long nr_scanned,
425 unsigned long nr_taken,
426 isolate_mode_t isolate_mode,
427 int file
428 ),
429
430 TP_ARGS(classzone_idx, order, nr_requested, nr_scanned, nr_taken,
431 isolate_mode, file
432 )
433
434 )
435
436 LTTNG_TRACEPOINT_EVENT_INSTANCE(mm_vmscan_lru_isolate_template, mm_vmscan_memcg_isolate,
437
438 TP_PROTO(int classzone_idx,
439 int order,
440 unsigned long nr_requested,
441 unsigned long nr_scanned,
442 unsigned long nr_taken,
443 isolate_mode_t isolate_mode,
444 int file
445 ),
446
447 TP_ARGS(classzone_idx, order, nr_requested, nr_scanned, nr_taken,
448 isolate_mode, file
449 )
450 )
451 #else
452 LTTNG_TRACEPOINT_EVENT_CLASS(mm_vmscan_lru_isolate_template,
453
454 TP_PROTO(int order,
455 unsigned long nr_requested,
456 unsigned long nr_scanned,
457 unsigned long nr_taken,
458 isolate_mode_t isolate_mode,
459 int file
460 ),
461
462 TP_ARGS(order, nr_requested, nr_scanned, nr_taken,
463 isolate_mode, file
464 ),
465
466
467 TP_FIELDS(
468 ctf_integer(int, order, order)
469 ctf_integer(unsigned long, nr_requested, nr_requested)
470 ctf_integer(unsigned long, nr_scanned, nr_scanned)
471 ctf_integer(unsigned long, nr_taken, nr_taken)
472 ctf_integer(isolate_mode_t, isolate_mode, isolate_mode)
473 ctf_integer(int, file, file)
474 )
475 )
476
477 LTTNG_TRACEPOINT_EVENT_INSTANCE(mm_vmscan_lru_isolate_template, mm_vmscan_lru_isolate,
478
479 TP_PROTO(int order,
480 unsigned long nr_requested,
481 unsigned long nr_scanned,
482 unsigned long nr_taken,
483 isolate_mode_t isolate_mode,
484 int file
485 ),
486
487 TP_ARGS(order, nr_requested, nr_scanned, nr_taken,
488 isolate_mode, file
489 )
490
491 )
492
493 LTTNG_TRACEPOINT_EVENT_INSTANCE(mm_vmscan_lru_isolate_template, mm_vmscan_memcg_isolate,
494
495 TP_PROTO(int order,
496 unsigned long nr_requested,
497 unsigned long nr_scanned,
498 unsigned long nr_taken,
499 isolate_mode_t isolate_mode,
500 int file
501 ),
502
503 TP_ARGS(order, nr_requested, nr_scanned, nr_taken,
504 isolate_mode, file
505 )
506 )
507 #endif
508
509 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,7,0))
510 LTTNG_TRACEPOINT_EVENT(mm_vmscan_writepage,
511
512 TP_PROTO(struct page *page),
513
514 TP_ARGS(page),
515
516 TP_FIELDS(
517 ctf_integer_hex(struct page *, page, page)
518 ctf_integer(int, reclaim_flags, trace_reclaim_flags(
519 page_is_file_lru(page)))
520 )
521 )
522 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,2,0))
523 LTTNG_TRACEPOINT_EVENT(mm_vmscan_writepage,
524
525 TP_PROTO(struct page *page),
526
527 TP_ARGS(page),
528
529 TP_FIELDS(
530 ctf_integer_hex(struct page *, page, page)
531 ctf_integer(int, reclaim_flags, trace_reclaim_flags(
532 page_is_file_cache(page)))
533 )
534 )
535 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,5,0))
536 LTTNG_TRACEPOINT_EVENT(mm_vmscan_writepage,
537
538 TP_PROTO(struct page *page),
539
540 TP_ARGS(page),
541
542 TP_FIELDS(
543 ctf_integer_hex(struct page *, page, page)
544 ctf_integer(int, reclaim_flags, trace_reclaim_flags(page))
545 )
546 )
547 #else
548 LTTNG_TRACEPOINT_EVENT(mm_vmscan_writepage,
549
550 TP_PROTO(struct page *page,
551 int reclaim_flags),
552
553 TP_ARGS(page, reclaim_flags),
554
555 TP_FIELDS(
556 ctf_integer_hex(struct page *, page, page)
557 ctf_integer(int, reclaim_flags, reclaim_flags)
558 )
559 )
560 #endif
561
562 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,2,0) || \
563 LTTNG_RHEL_KERNEL_RANGE(4,18,0,305,0,0, 4,19,0,0,0,0))
564 LTTNG_TRACEPOINT_EVENT(mm_vmscan_lru_shrink_inactive,
565
566 TP_PROTO(int nid,
567 unsigned long nr_scanned, unsigned long nr_reclaimed,
568 struct reclaim_stat *stat, int priority, int file),
569
570 TP_ARGS(nid, nr_scanned, nr_reclaimed, stat, priority, file),
571
572 TP_FIELDS(
573 ctf_integer(int, nid, nid)
574 ctf_integer(unsigned long, nr_scanned, nr_scanned)
575 ctf_integer(unsigned long, nr_reclaimed, nr_reclaimed)
576 ctf_integer(unsigned long, nr_dirty, stat->nr_dirty)
577 ctf_integer(unsigned long, nr_writeback, stat->nr_writeback)
578 ctf_integer(unsigned long, nr_congested, stat->nr_congested)
579 ctf_integer(unsigned long, nr_immediate, stat->nr_immediate)
580 ctf_integer(unsigned long, nr_activate_anon, stat->nr_activate[0])
581 ctf_integer(unsigned long, nr_activate_file, stat->nr_activate[1])
582 ctf_integer(unsigned long, nr_ref_keep, stat->nr_ref_keep)
583 ctf_integer(unsigned long, nr_unmap_fail, stat->nr_unmap_fail)
584 ctf_integer(int, priority, priority)
585 ctf_integer(int, reclaim_flags, trace_reclaim_flags(file))
586 )
587 )
588 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,17,0))
589 LTTNG_TRACEPOINT_EVENT(mm_vmscan_lru_shrink_inactive,
590
591 TP_PROTO(int nid,
592 unsigned long nr_scanned, unsigned long nr_reclaimed,
593 struct reclaim_stat *stat, int priority, int file),
594
595 TP_ARGS(nid, nr_scanned, nr_reclaimed, stat, priority, file),
596
597 TP_FIELDS(
598 ctf_integer(int, nid, nid)
599 ctf_integer(unsigned long, nr_scanned, nr_scanned)
600 ctf_integer(unsigned long, nr_reclaimed, nr_reclaimed)
601 ctf_integer(unsigned long, nr_dirty, stat->nr_dirty)
602 ctf_integer(unsigned long, nr_writeback, stat->nr_writeback)
603 ctf_integer(unsigned long, nr_congested, stat->nr_congested)
604 ctf_integer(unsigned long, nr_immediate, stat->nr_immediate)
605 ctf_integer(unsigned long, nr_activate, stat->nr_activate)
606 ctf_integer(unsigned long, nr_ref_keep, stat->nr_ref_keep)
607 ctf_integer(unsigned long, nr_unmap_fail, stat->nr_unmap_fail)
608 ctf_integer(int, priority, priority)
609 ctf_integer(int, reclaim_flags, trace_shrink_flags(file))
610 )
611 )
612 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,11,0))
613 LTTNG_TRACEPOINT_EVENT(mm_vmscan_lru_shrink_inactive,
614
615 TP_PROTO(int nid,
616 unsigned long nr_scanned, unsigned long nr_reclaimed,
617 unsigned long nr_dirty, unsigned long nr_writeback,
618 unsigned long nr_congested, unsigned long nr_immediate,
619 unsigned long nr_activate, unsigned long nr_ref_keep,
620 unsigned long nr_unmap_fail,
621 int priority, int file),
622
623 TP_ARGS(nid, nr_scanned, nr_reclaimed, nr_dirty, nr_writeback,
624 nr_congested, nr_immediate, nr_activate, nr_ref_keep,
625 nr_unmap_fail, priority, file),
626
627 TP_FIELDS(
628 ctf_integer(int, nid, nid)
629 ctf_integer(unsigned long, nr_scanned, nr_scanned)
630 ctf_integer(unsigned long, nr_reclaimed, nr_reclaimed)
631 ctf_integer(unsigned long, nr_dirty, nr_dirty)
632 ctf_integer(unsigned long, nr_writeback, nr_writeback)
633 ctf_integer(unsigned long, nr_congested, nr_congested)
634 ctf_integer(unsigned long, nr_immediate, nr_immediate)
635 ctf_integer(unsigned long, nr_activate, nr_activate)
636 ctf_integer(unsigned long, nr_ref_keep, nr_ref_keep)
637 ctf_integer(unsigned long, nr_unmap_fail, nr_unmap_fail)
638 ctf_integer(int, priority, priority)
639 ctf_integer(int, reclaim_flags, trace_shrink_flags(file))
640 )
641 )
642 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,8,0))
643 LTTNG_TRACEPOINT_EVENT(mm_vmscan_lru_shrink_inactive,
644
645 TP_PROTO(int nid,
646 unsigned long nr_scanned, unsigned long nr_reclaimed,
647 int priority, int file),
648
649 TP_ARGS(nid, nr_scanned, nr_reclaimed, priority, file),
650
651 TP_FIELDS(
652 ctf_integer(int, nid, nid)
653 ctf_integer(unsigned long, nr_scanned, nr_scanned)
654 ctf_integer(unsigned long, nr_reclaimed, nr_reclaimed)
655 ctf_integer(int, priority, priority)
656 ctf_integer(int, reclaim_flags, trace_shrink_flags(file))
657 )
658 )
659 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,5,0))
660 LTTNG_TRACEPOINT_EVENT(mm_vmscan_lru_shrink_inactive,
661
662 TP_PROTO(struct zone *zone,
663 unsigned long nr_scanned, unsigned long nr_reclaimed,
664 int priority, int file),
665
666 TP_ARGS(zone, nr_scanned, nr_reclaimed, priority, file),
667
668 TP_FIELDS(
669 ctf_integer(int, nid, zone_to_nid(zone))
670 ctf_integer(int, zid, zone_idx(zone))
671 ctf_integer(unsigned long, nr_scanned, nr_scanned)
672 ctf_integer(unsigned long, nr_reclaimed, nr_reclaimed)
673 ctf_integer(int, priority, priority)
674 ctf_integer(int, reclaim_flags, trace_shrink_flags(file))
675 )
676 )
677 #else
678 LTTNG_TRACEPOINT_EVENT(mm_vmscan_lru_shrink_inactive,
679
680 TP_PROTO(int nid, int zid,
681 unsigned long nr_scanned, unsigned long nr_reclaimed,
682 int priority, int reclaim_flags),
683
684 TP_ARGS(nid, zid, nr_scanned, nr_reclaimed, priority, reclaim_flags),
685
686 TP_FIELDS(
687 ctf_integer(int, nid, nid)
688 ctf_integer(int, zid, zid)
689 ctf_integer(unsigned long, nr_scanned, nr_scanned)
690 ctf_integer(unsigned long, nr_reclaimed, nr_reclaimed)
691 ctf_integer(int, priority, priority)
692 ctf_integer(int, reclaim_flags, reclaim_flags)
693 )
694 )
695 #endif
696
697 #endif /* LTTNG_TRACE_MM_VMSCAN_H */
698
699 /* This part must be outside protection */
700 #include <lttng/define_trace.h>
This page took 0.047605 seconds and 4 git commands to generate.