Drop support for kernels < 4.4 from mm_vmscan instrumentation
authorMichael Jeanson <mjeanson@efficios.com>
Mon, 21 Nov 2022 16:58:56 +0000 (11:58 -0500)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Wed, 23 Nov 2022 20:06:36 +0000 (15:06 -0500)
Change-Id: If1fa6ff0239241b4039bb8ad8d7ed38072079032
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
include/instrumentation/events/mm_vmscan.h

index 4ba907b2b1888ae82d4d37bcf5c9397a7d35bbf4..e7e9b613d6a93239707dc5f8729cad8b6c08a0ef 100644 (file)
 #define RECLAIM_WB_MIXED       0x0010u
 #define RECLAIM_WB_SYNC                0x0004u /* Unused, all reclaim async */
 #define RECLAIM_WB_ASYNC       0x0008u
-
-#if ((LTTNG_LINUX_VERSION_CODE <= LTTNG_KERNEL_VERSION(3,0,38)) || \
-       LTTNG_KERNEL_RANGE(3,1,0, 3,2,0))
-typedef int isolate_mode_t;
-#endif
-
 #endif
 
 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,2,0) || \
@@ -292,7 +286,7 @@ LTTNG_TRACEPOINT_EVENT_MAP(mm_shrink_slab_start,
                ctf_integer(int, priority, priority)
        )
 )
-#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,1,0))
+#else
 LTTNG_TRACEPOINT_EVENT_MAP(mm_shrink_slab_start,
 
        mm_vmscan_shrink_slab_start,
@@ -307,11 +301,7 @@ LTTNG_TRACEPOINT_EVENT_MAP(mm_shrink_slab_start,
 
        TP_FIELDS(
                ctf_integer_hex(struct shrinker *, shr, shr)
-#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,12,0))
                ctf_integer_hex(void *, shrink, shr->scan_objects)
-#else /* #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,12,0)) */
-               ctf_integer_hex(void *, shrink, shr->shrink)
-#endif /* #else #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,12,0)) */
                ctf_integer(long, nr_objects_to_shrink, nr_objects_to_shrink)
                ctf_integer(gfp_t, gfp_flags, sc->gfp_mask)
                ctf_integer(unsigned long, pgs_scanned, pgs_scanned)
@@ -323,7 +313,6 @@ LTTNG_TRACEPOINT_EVENT_MAP(mm_shrink_slab_start,
 )
 #endif
 
-#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,16,0))
 LTTNG_TRACEPOINT_EVENT_MAP(mm_shrink_slab_end,
 
        mm_vmscan_shrink_slab_end,
@@ -344,30 +333,6 @@ LTTNG_TRACEPOINT_EVENT_MAP(mm_shrink_slab_end,
                ctf_integer(long, total_scan, total_scan)
        )
 )
-#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,1,0))
-LTTNG_TRACEPOINT_EVENT_MAP(mm_shrink_slab_end,
-
-       mm_vmscan_shrink_slab_end,
-
-       TP_PROTO(struct shrinker *shr, int shrinker_retval,
-               long unused_scan_cnt, long new_scan_cnt),
-
-       TP_ARGS(shr, shrinker_retval, unused_scan_cnt, new_scan_cnt),
-
-       TP_FIELDS(
-               ctf_integer_hex(struct shrinker *, shr, shr)
-#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,12,0))
-               ctf_integer_hex(void *, shrink, shr->scan_objects)
-#else /* #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,12,0)) */
-               ctf_integer_hex(void *, shrink, shr->shrink)
-#endif /* #else #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,12,0)) */
-               ctf_integer(long, unused_scan, unused_scan_cnt)
-               ctf_integer(long, new_scan, new_scan_cnt)
-               ctf_integer(int, retval, shrinker_retval)
-               ctf_integer(long, total_scan, new_scan_cnt - unused_scan_cnt)
-       )
-)
-#endif
 
 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,11,0))
 LTTNG_TRACEPOINT_EVENT(mm_vmscan_lru_isolate,
@@ -464,28 +429,12 @@ LTTNG_TRACEPOINT_EVENT_CLASS(mm_vmscan_lru_isolate_template,
                unsigned long nr_requested,
                unsigned long nr_scanned,
                unsigned long nr_taken,
-#if (LTTNG_LINUX_VERSION_CODE < LTTNG_KERNEL_VERSION(3,5,0))
-               unsigned long nr_lumpy_taken,
-               unsigned long nr_lumpy_dirty,
-               unsigned long nr_lumpy_failed,
-#endif
-#if (LTTNG_LINUX_VERSION_CODE < LTTNG_KERNEL_VERSION(3,3,0))
-               isolate_mode_t isolate_mode
-#else
                isolate_mode_t isolate_mode,
                int file
-#endif
        ),
 
        TP_ARGS(order, nr_requested, nr_scanned, nr_taken,
-#if (LTTNG_LINUX_VERSION_CODE < LTTNG_KERNEL_VERSION(3,5,0))
-               nr_lumpy_taken, nr_lumpy_dirty, nr_lumpy_failed,
-#endif
-#if (LTTNG_LINUX_VERSION_CODE < LTTNG_KERNEL_VERSION(3,3,0))
-               isolate_mode
-#else
                isolate_mode, file
-#endif
        ),
 
 
@@ -494,15 +443,8 @@ LTTNG_TRACEPOINT_EVENT_CLASS(mm_vmscan_lru_isolate_template,
                ctf_integer(unsigned long, nr_requested, nr_requested)
                ctf_integer(unsigned long, nr_scanned, nr_scanned)
                ctf_integer(unsigned long, nr_taken, nr_taken)
-#if (LTTNG_LINUX_VERSION_CODE < LTTNG_KERNEL_VERSION(3,5,0))
-               ctf_integer(unsigned long, nr_lumpy_taken, nr_lumpy_taken)
-               ctf_integer(unsigned long, nr_lumpy_dirty, nr_lumpy_dirty)
-               ctf_integer(unsigned long, nr_lumpy_failed, nr_lumpy_failed)
-#endif
                ctf_integer(isolate_mode_t, isolate_mode, isolate_mode)
-#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,3,0))
                ctf_integer(int, file, file)
-#endif
        )
 )
 
@@ -512,28 +454,12 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(mm_vmscan_lru_isolate_template, mm_vmscan_lru_is
                unsigned long nr_requested,
                unsigned long nr_scanned,
                unsigned long nr_taken,
-#if (LTTNG_LINUX_VERSION_CODE < LTTNG_KERNEL_VERSION(3,5,0))
-               unsigned long nr_lumpy_taken,
-               unsigned long nr_lumpy_dirty,
-               unsigned long nr_lumpy_failed,
-#endif
-#if (LTTNG_LINUX_VERSION_CODE < LTTNG_KERNEL_VERSION(3,3,0))
-               isolate_mode_t isolate_mode
-#else
                isolate_mode_t isolate_mode,
                int file
-#endif
        ),
 
        TP_ARGS(order, nr_requested, nr_scanned, nr_taken,
-#if (LTTNG_LINUX_VERSION_CODE < LTTNG_KERNEL_VERSION(3,5,0))
-               nr_lumpy_taken, nr_lumpy_dirty, nr_lumpy_failed,
-#endif
-#if (LTTNG_LINUX_VERSION_CODE < LTTNG_KERNEL_VERSION(3,3,0))
-               isolate_mode
-#else
                isolate_mode, file
-#endif
        )
 
 )
@@ -544,28 +470,12 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(mm_vmscan_lru_isolate_template, mm_vmscan_memcg_
                unsigned long nr_requested,
                unsigned long nr_scanned,
                unsigned long nr_taken,
-#if (LTTNG_LINUX_VERSION_CODE < LTTNG_KERNEL_VERSION(3,5,0))
-               unsigned long nr_lumpy_taken,
-               unsigned long nr_lumpy_dirty,
-               unsigned long nr_lumpy_failed,
-#endif
-#if (LTTNG_LINUX_VERSION_CODE < LTTNG_KERNEL_VERSION(3,3,0))
-               isolate_mode_t isolate_mode
-#else
                isolate_mode_t isolate_mode,
                int file
-#endif
        ),
 
        TP_ARGS(order, nr_requested, nr_scanned, nr_taken,
-#if (LTTNG_LINUX_VERSION_CODE < LTTNG_KERNEL_VERSION(3,5,0))
-               nr_lumpy_taken, nr_lumpy_dirty, nr_lumpy_failed,
-#endif
-#if (LTTNG_LINUX_VERSION_CODE < LTTNG_KERNEL_VERSION(3,3,0))
-               isolate_mode
-#else
                isolate_mode, file
-#endif
        )
 )
 #endif
@@ -758,70 +668,6 @@ LTTNG_TRACEPOINT_EVENT(mm_vmscan_lru_shrink_inactive,
 )
 #endif
 
-#if (LTTNG_LINUX_VERSION_CODE < LTTNG_KERNEL_VERSION(3,5,0))
-LTTNG_TRACEPOINT_EVENT_MAP(replace_swap_token,
-
-       mm_vmscan_replace_swap_token,
-
-       TP_PROTO(struct mm_struct *old_mm,
-                struct mm_struct *new_mm),
-
-       TP_ARGS(old_mm, new_mm),
-
-       TP_FIELDS(
-               ctf_integer_hex(struct mm_struct *, old_mm, old_mm)
-               ctf_integer(unsigned int, old_prio, old_mm ? old_mm->token_priority : 0)
-               ctf_integer_hex(struct mm_struct *, new_mm, new_mm)
-               ctf_integer(unsigned int, new_prio, new_mm->token_priority)
-       )
-)
-
-LTTNG_TRACEPOINT_EVENT_CLASS(mm_vmscan_put_swap_token_template,
-       TP_PROTO(struct mm_struct *swap_token_mm),
-
-       TP_ARGS(swap_token_mm),
-
-       TP_FIELDS(
-               ctf_integer_hex(struct mm_struct*, swap_token_mm, swap_token_mm)
-       )
-)
-
-LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(mm_vmscan_put_swap_token_template, put_swap_token,
-
-       mm_vmscan_put_swap_token,
-
-       TP_PROTO(struct mm_struct *swap_token_mm),
-       TP_ARGS(swap_token_mm)
-)
-
-LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(mm_vmscan_put_swap_token_template, disable_swap_token,
-
-       mm_vmscan_disable_swap_token,
-
-       TP_PROTO(struct mm_struct *swap_token_mm),
-       TP_ARGS(swap_token_mm)
-)
-
-LTTNG_TRACEPOINT_EVENT_MAP(update_swap_token_priority,
-
-       mm_vmscan_update_swap_token_priority,
-
-       TP_PROTO(struct mm_struct *mm,
-                unsigned int old_prio,
-                struct mm_struct *swap_token_mm),
-
-       TP_ARGS(mm, old_prio, swap_token_mm),
-
-       TP_FIELDS(
-               ctf_integer_hex(struct mm_struct *, mm, mm)
-               ctf_integer(unsigned int, old_prio, old_prio)
-               ctf_integer(unsigned int, new_prio, mm->token_priority)
-               ctf_integer_hex(struct mm_struct *, swap_token_mm, swap_token_mm)
-               ctf_integer(unsigned int, swap_token_prio, swap_token_mm ? swap_token_mm->token_priority : 0)
-       )
-)
-#endif
-
 #endif /* LTTNG_TRACE_MM_VMSCAN_H */
 
 /* This part must be outside protection */
This page took 0.028507 seconds and 4 git commands to generate.