-#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,17,0))
-LTTNG_TRACEPOINT_EVENT(mm_vmscan_lru_shrink_inactive,
-
- TP_PROTO(int nid,
- unsigned long nr_scanned, unsigned long nr_reclaimed,
- struct reclaim_stat *stat, int priority, int file),
-
- TP_ARGS(nid, nr_scanned, nr_reclaimed, stat, priority, file),
-
- TP_FIELDS(
- ctf_integer(int, nid, nid)
- ctf_integer(unsigned long, nr_scanned, nr_scanned)
- ctf_integer(unsigned long, nr_reclaimed, nr_reclaimed)
- ctf_integer(unsigned long, nr_dirty, stat->nr_dirty)
- ctf_integer(unsigned long, nr_writeback, stat->nr_writeback)
- ctf_integer(unsigned long, nr_congested, stat->nr_congested)
- ctf_integer(unsigned long, nr_immediate, stat->nr_immediate)
- ctf_integer(unsigned long, nr_activate, stat->nr_activate)
- ctf_integer(unsigned long, nr_ref_keep, stat->nr_ref_keep)
- ctf_integer(unsigned long, nr_unmap_fail, stat->nr_unmap_fail)
- ctf_integer(int, priority, priority)
- ctf_integer(int, reclaim_flags, trace_shrink_flags(file))
- )
-)
-#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,11,0))
-LTTNG_TRACEPOINT_EVENT(mm_vmscan_lru_shrink_inactive,
-
- TP_PROTO(int nid,
- unsigned long nr_scanned, unsigned long nr_reclaimed,
- unsigned long nr_dirty, unsigned long nr_writeback,
- unsigned long nr_congested, unsigned long nr_immediate,
- unsigned long nr_activate, unsigned long nr_ref_keep,
- unsigned long nr_unmap_fail,
- int priority, int file),
-
- TP_ARGS(nid, nr_scanned, nr_reclaimed, nr_dirty, nr_writeback,
- nr_congested, nr_immediate, nr_activate, nr_ref_keep,
- nr_unmap_fail, priority, file),
-
- TP_FIELDS(
- ctf_integer(int, nid, nid)
- ctf_integer(unsigned long, nr_scanned, nr_scanned)
- ctf_integer(unsigned long, nr_reclaimed, nr_reclaimed)
- ctf_integer(unsigned long, nr_dirty, nr_dirty)
- ctf_integer(unsigned long, nr_writeback, nr_writeback)
- ctf_integer(unsigned long, nr_congested, nr_congested)
- ctf_integer(unsigned long, nr_immediate, nr_immediate)
- ctf_integer(unsigned long, nr_activate, nr_activate)
- ctf_integer(unsigned long, nr_ref_keep, nr_ref_keep)
- ctf_integer(unsigned long, nr_unmap_fail, nr_unmap_fail)
- ctf_integer(int, priority, priority)
- ctf_integer(int, reclaim_flags, trace_shrink_flags(file))
- )
-)
-#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,8,0))
-LTTNG_TRACEPOINT_EVENT(mm_vmscan_lru_shrink_inactive,
-
- TP_PROTO(int nid,
- unsigned long nr_scanned, unsigned long nr_reclaimed,
- int priority, int file),
-
- TP_ARGS(nid, nr_scanned, nr_reclaimed, priority, file),
-
- TP_FIELDS(
- ctf_integer(int, nid, nid)
- ctf_integer(unsigned long, nr_scanned, nr_scanned)
- ctf_integer(unsigned long, nr_reclaimed, nr_reclaimed)
- ctf_integer(int, priority, priority)
- ctf_integer(int, reclaim_flags, trace_shrink_flags(file))
- )
-)
-#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,5,0))
-LTTNG_TRACEPOINT_EVENT(mm_vmscan_lru_shrink_inactive,
-
- TP_PROTO(struct zone *zone,
- unsigned long nr_scanned, unsigned long nr_reclaimed,
- int priority, int file),
-
- TP_ARGS(zone, nr_scanned, nr_reclaimed, priority, file),
-
- TP_FIELDS(
- ctf_integer(int, nid, zone_to_nid(zone))
- ctf_integer(int, zid, zone_idx(zone))
- ctf_integer(unsigned long, nr_scanned, nr_scanned)
- ctf_integer(unsigned long, nr_reclaimed, nr_reclaimed)
- ctf_integer(int, priority, priority)
- ctf_integer(int, reclaim_flags, trace_shrink_flags(file))
- )
-)
-#else
-LTTNG_TRACEPOINT_EVENT(mm_vmscan_lru_shrink_inactive,
-
- TP_PROTO(int nid, int zid,
- unsigned long nr_scanned, unsigned long nr_reclaimed,
- int priority, int reclaim_flags),
-
- TP_ARGS(nid, zid, nr_scanned, nr_reclaimed, priority, reclaim_flags),
-
- TP_FIELDS(
- ctf_integer(int, nid, nid)
- ctf_integer(int, zid, zid)
- ctf_integer(unsigned long, nr_scanned, nr_scanned)
- ctf_integer(unsigned long, nr_reclaimed, nr_reclaimed)
- ctf_integer(int, priority, priority)
- ctf_integer(int, reclaim_flags, reclaim_flags)
- )
-)
-#endif
-
-#if (LINUX_VERSION_CODE < 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