diff options
Diffstat (limited to 'include/trace/events/vmscan.h')
-rw-r--r-- | include/trace/events/vmscan.h | 44 |
1 files changed, 43 insertions, 1 deletions
diff --git a/include/trace/events/vmscan.h b/include/trace/events/vmscan.h index 370aa5a87322..c255fcc587bf 100644 --- a/include/trace/events/vmscan.h +++ b/include/trace/events/vmscan.h | |||
@@ -10,6 +10,7 @@ | |||
10 | 10 | ||
11 | #define RECLAIM_WB_ANON 0x0001u | 11 | #define RECLAIM_WB_ANON 0x0001u |
12 | #define RECLAIM_WB_FILE 0x0002u | 12 | #define RECLAIM_WB_FILE 0x0002u |
13 | #define RECLAIM_WB_MIXED 0x0010u | ||
13 | #define RECLAIM_WB_SYNC 0x0004u | 14 | #define RECLAIM_WB_SYNC 0x0004u |
14 | #define RECLAIM_WB_ASYNC 0x0008u | 15 | #define RECLAIM_WB_ASYNC 0x0008u |
15 | 16 | ||
@@ -17,13 +18,20 @@ | |||
17 | (flags) ? __print_flags(flags, "|", \ | 18 | (flags) ? __print_flags(flags, "|", \ |
18 | {RECLAIM_WB_ANON, "RECLAIM_WB_ANON"}, \ | 19 | {RECLAIM_WB_ANON, "RECLAIM_WB_ANON"}, \ |
19 | {RECLAIM_WB_FILE, "RECLAIM_WB_FILE"}, \ | 20 | {RECLAIM_WB_FILE, "RECLAIM_WB_FILE"}, \ |
21 | {RECLAIM_WB_MIXED, "RECLAIM_WB_MIXED"}, \ | ||
20 | {RECLAIM_WB_SYNC, "RECLAIM_WB_SYNC"}, \ | 22 | {RECLAIM_WB_SYNC, "RECLAIM_WB_SYNC"}, \ |
21 | {RECLAIM_WB_ASYNC, "RECLAIM_WB_ASYNC"} \ | 23 | {RECLAIM_WB_ASYNC, "RECLAIM_WB_ASYNC"} \ |
22 | ) : "RECLAIM_WB_NONE" | 24 | ) : "RECLAIM_WB_NONE" |
23 | 25 | ||
24 | #define trace_reclaim_flags(page, sync) ( \ | 26 | #define trace_reclaim_flags(page, sync) ( \ |
25 | (page_is_file_cache(page) ? RECLAIM_WB_FILE : RECLAIM_WB_ANON) | \ | 27 | (page_is_file_cache(page) ? RECLAIM_WB_FILE : RECLAIM_WB_ANON) | \ |
26 | (sync == PAGEOUT_IO_SYNC ? RECLAIM_WB_SYNC : RECLAIM_WB_ASYNC) \ | 28 | (sync == LUMPY_MODE_SYNC ? RECLAIM_WB_SYNC : RECLAIM_WB_ASYNC) \ |
29 | ) | ||
30 | |||
31 | #define trace_shrink_flags(file, sync) ( \ | ||
32 | (sync == LUMPY_MODE_SYNC ? RECLAIM_WB_MIXED : \ | ||
33 | (file ? RECLAIM_WB_FILE : RECLAIM_WB_ANON)) | \ | ||
34 | (sync == LUMPY_MODE_SYNC ? RECLAIM_WB_SYNC : RECLAIM_WB_ASYNC) \ | ||
27 | ) | 35 | ) |
28 | 36 | ||
29 | TRACE_EVENT(mm_vmscan_kswapd_sleep, | 37 | TRACE_EVENT(mm_vmscan_kswapd_sleep, |
@@ -269,6 +277,40 @@ TRACE_EVENT(mm_vmscan_writepage, | |||
269 | show_reclaim_flags(__entry->reclaim_flags)) | 277 | show_reclaim_flags(__entry->reclaim_flags)) |
270 | ); | 278 | ); |
271 | 279 | ||
280 | TRACE_EVENT(mm_vmscan_lru_shrink_inactive, | ||
281 | |||
282 | TP_PROTO(int nid, int zid, | ||
283 | unsigned long nr_scanned, unsigned long nr_reclaimed, | ||
284 | int priority, int reclaim_flags), | ||
285 | |||
286 | TP_ARGS(nid, zid, nr_scanned, nr_reclaimed, priority, reclaim_flags), | ||
287 | |||
288 | TP_STRUCT__entry( | ||
289 | __field(int, nid) | ||
290 | __field(int, zid) | ||
291 | __field(unsigned long, nr_scanned) | ||
292 | __field(unsigned long, nr_reclaimed) | ||
293 | __field(int, priority) | ||
294 | __field(int, reclaim_flags) | ||
295 | ), | ||
296 | |||
297 | TP_fast_assign( | ||
298 | __entry->nid = nid; | ||
299 | __entry->zid = zid; | ||
300 | __entry->nr_scanned = nr_scanned; | ||
301 | __entry->nr_reclaimed = nr_reclaimed; | ||
302 | __entry->priority = priority; | ||
303 | __entry->reclaim_flags = reclaim_flags; | ||
304 | ), | ||
305 | |||
306 | TP_printk("nid=%d zid=%d nr_scanned=%ld nr_reclaimed=%ld priority=%d flags=%s", | ||
307 | __entry->nid, __entry->zid, | ||
308 | __entry->nr_scanned, __entry->nr_reclaimed, | ||
309 | __entry->priority, | ||
310 | show_reclaim_flags(__entry->reclaim_flags)) | ||
311 | ); | ||
312 | |||
313 | |||
272 | #endif /* _TRACE_VMSCAN_H */ | 314 | #endif /* _TRACE_VMSCAN_H */ |
273 | 315 | ||
274 | /* This part must be outside protection */ | 316 | /* This part must be outside protection */ |