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