|
27 | 27 | {RECLAIM_WB_ASYNC, "RECLAIM_WB_ASYNC"} \
|
28 | 28 | ) : "RECLAIM_WB_NONE"
|
29 | 29 |
|
30 |
| -#define trace_reclaim_flags(page) ( \ |
31 |
| - (page_is_file_cache(page) ? RECLAIM_WB_FILE : RECLAIM_WB_ANON) | \ |
| 30 | +#define trace_reclaim_flags(file) ( \ |
| 31 | + (file ? RECLAIM_WB_FILE : RECLAIM_WB_ANON) | \ |
32 | 32 | (RECLAIM_WB_ASYNC) \
|
33 | 33 | )
|
34 | 34 |
|
35 |
| -#define trace_shrink_flags(file) \ |
36 |
| - ( \ |
37 |
| - (file ? RECLAIM_WB_FILE : RECLAIM_WB_ANON) | \ |
38 |
| - (RECLAIM_WB_ASYNC) \ |
39 |
| - ) |
40 |
| - |
41 | 35 | TRACE_EVENT(mm_vmscan_kswapd_sleep,
|
42 | 36 |
|
43 | 37 | TP_PROTO(int nid),
|
@@ -328,7 +322,8 @@ TRACE_EVENT(mm_vmscan_writepage,
|
328 | 322 |
|
329 | 323 | TP_fast_assign(
|
330 | 324 | __entry->pfn = page_to_pfn(page);
|
331 |
| - __entry->reclaim_flags = trace_reclaim_flags(page); |
| 325 | + __entry->reclaim_flags = trace_reclaim_flags( |
| 326 | + page_is_file_cache(page)); |
332 | 327 | ),
|
333 | 328 |
|
334 | 329 | TP_printk("page=%p pfn=%lu flags=%s",
|
@@ -374,7 +369,7 @@ TRACE_EVENT(mm_vmscan_lru_shrink_inactive,
|
374 | 369 | __entry->nr_ref_keep = stat->nr_ref_keep;
|
375 | 370 | __entry->nr_unmap_fail = stat->nr_unmap_fail;
|
376 | 371 | __entry->priority = priority;
|
377 |
| - __entry->reclaim_flags = trace_shrink_flags(file); |
| 372 | + __entry->reclaim_flags = trace_reclaim_flags(file); |
378 | 373 | ),
|
379 | 374 |
|
380 | 375 | TP_printk("nid=%d nr_scanned=%ld nr_reclaimed=%ld nr_dirty=%ld nr_writeback=%ld nr_congested=%ld nr_immediate=%ld nr_activate_anon=%d nr_activate_file=%d nr_ref_keep=%ld nr_unmap_fail=%ld priority=%d flags=%s",
|
@@ -413,7 +408,7 @@ TRACE_EVENT(mm_vmscan_lru_shrink_active,
|
413 | 408 | __entry->nr_deactivated = nr_deactivated;
|
414 | 409 | __entry->nr_referenced = nr_referenced;
|
415 | 410 | __entry->priority = priority;
|
416 |
| - __entry->reclaim_flags = trace_shrink_flags(file); |
| 411 | + __entry->reclaim_flags = trace_reclaim_flags(file); |
417 | 412 | ),
|
418 | 413 |
|
419 | 414 | TP_printk("nid=%d nr_taken=%ld nr_active=%ld nr_deactivated=%ld nr_referenced=%ld priority=%d flags=%s",
|
@@ -452,7 +447,8 @@ TRACE_EVENT(mm_vmscan_inactive_list_is_low,
|
452 | 447 | __entry->total_active = total_active;
|
453 | 448 | __entry->active = active;
|
454 | 449 | __entry->ratio = ratio;
|
455 |
| - __entry->reclaim_flags = trace_shrink_flags(file) & RECLAIM_WB_LRU; |
| 450 | + __entry->reclaim_flags = trace_reclaim_flags(file) & |
| 451 | + RECLAIM_WB_LRU; |
456 | 452 | ),
|
457 | 453 |
|
458 | 454 | TP_printk("nid=%d reclaim_idx=%d total_inactive=%ld inactive=%ld total_active=%ld active=%ld ratio=%ld flags=%s",
|
|
0 commit comments