From: Michael Jeanson Date: Mon, 21 Nov 2022 16:58:56 +0000 (-0500) Subject: Drop support for kernels < 4.4 from mm_vmscan instrumentation X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=64ac073a24efe7cd1d6b03dcca680cda3aa05f6e;p=lttng-modules.git Drop support for kernels < 4.4 from mm_vmscan instrumentation Change-Id: If1fa6ff0239241b4039bb8ad8d7ed38072079032 Signed-off-by: Michael Jeanson Signed-off-by: Mathieu Desnoyers --- diff --git a/include/instrumentation/events/mm_vmscan.h b/include/instrumentation/events/mm_vmscan.h index 4ba907b2..e7e9b613 100644 --- a/include/instrumentation/events/mm_vmscan.h +++ b/include/instrumentation/events/mm_vmscan.h @@ -18,12 +18,6 @@ #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 */