1 /* SPDX-License-Identifier: GPL-2.0 */ 2 #undef TRACE_SYSTEM 3 #define TRACE_SYSTEM vmscan 4 5 #define TRACE_INCLUDE_PATH trace/hooks 6 7 #if !defined(_TRACE_HOOK_VMSCAN_H) || defined(TRACE_HEADER_MULTI_READ) 8 #define _TRACE_HOOK_VMSCAN_H 9 10 #include <linux/tracepoint.h> 11 #include <trace/hooks/vendor_hooks.h> 12 13 DECLARE_HOOK(android_vh_tune_scan_type, 14 TP_PROTO(char *scan_type), 15 TP_ARGS(scan_type)); 16 DECLARE_HOOK(android_vh_tune_swappiness, 17 TP_PROTO(int *swappiness), 18 TP_ARGS(swappiness)); 19 DECLARE_HOOK(android_vh_shrink_slab_bypass, 20 TP_PROTO(gfp_t gfp_mask, int nid, struct mem_cgroup *memcg, int priority, bool *bypass), 21 TP_ARGS(gfp_mask, nid, memcg, priority, bypass)); 22 DECLARE_HOOK(android_vh_tune_inactive_ratio, 23 TP_PROTO(unsigned long *inactive_ratio, int file), 24 TP_ARGS(inactive_ratio, file)) 25 DECLARE_RESTRICTED_HOOK(android_rvh_set_balance_anon_file_reclaim, 26 TP_PROTO(bool *balance_anon_file_reclaim), 27 TP_ARGS(balance_anon_file_reclaim), 1); 28 DECLARE_HOOK(android_vh_page_referenced_check_bypass, 29 TP_PROTO(struct page *page, unsigned long nr_to_scan, int lru, bool *bypass), 30 TP_ARGS(page, nr_to_scan, lru, bypass)); 31 DECLARE_HOOK(android_vh_page_trylock_get_result, 32 TP_PROTO(struct page *page, bool *trylock_fail), 33 TP_ARGS(page, trylock_fail)); 34 DECLARE_HOOK(android_vh_handle_failed_page_trylock, 35 TP_PROTO(struct list_head *page_list), 36 TP_ARGS(page_list)); 37 DECLARE_HOOK(android_vh_page_trylock_set, 38 TP_PROTO(struct page *page), 39 TP_ARGS(page)); 40 DECLARE_HOOK(android_vh_page_trylock_clear, 41 TP_PROTO(struct page *page), 42 TP_ARGS(page)); 43 DECLARE_HOOK(android_vh_shrink_node_memcgs, 44 TP_PROTO(struct mem_cgroup *memcg, bool *skip), 45 TP_ARGS(memcg, skip)); 46 DECLARE_HOOK(android_vh_inactive_is_low, 47 TP_PROTO(unsigned long gb, unsigned long *inactive_ratio, 48 enum lru_list inactive_lru, bool *skip), 49 TP_ARGS(gb, inactive_ratio, inactive_lru, skip)); 50 DECLARE_HOOK(android_vh_snapshot_refaults, 51 TP_PROTO(struct lruvec *target_lruvec), 52 TP_ARGS(target_lruvec)); 53 DECLARE_HOOK(android_vh_check_page_look_around_ref, 54 TP_PROTO(struct page *page, int *skip), 55 TP_ARGS(page, skip)); 56 DECLARE_HOOK(android_vh_vmscan_kswapd_done, 57 TP_PROTO(int node_id, unsigned int highest_zoneidx, unsigned int alloc_order, 58 unsigned int reclaim_order), 59 TP_ARGS(node_id, highest_zoneidx, alloc_order, reclaim_order)); 60 #endif /* _TRACE_HOOK_VMSCAN_H */ 61 /* This part must be outside protection */ 62 #include <trace/define_trace.h> 63