Orange Pi5 kernel

Deprecated Linux kernel 5.10.110 for OrangePi 5/5B/5+ boards

3 Commits   0 Branches   0 Tags
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   1) /* SPDX-License-Identifier: GPL-2.0 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   2) #undef TRACE_SYSTEM
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   3) #define TRACE_SYSTEM mm
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   4) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   5) #define TRACE_INCLUDE_PATH trace/hooks
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   6) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   7) #if !defined(_TRACE_HOOK_MM_H) || defined(TRACE_HEADER_MULTI_READ)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   8) #define _TRACE_HOOK_MM_H
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   9) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  10) #include <linux/types.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  11) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  12) #include <linux/mm.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  13) #include <linux/oom.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  14) #include <linux/tracepoint.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  15) #include <trace/hooks/vendor_hooks.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  16) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  17) #ifdef __GENKSYMS__
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  18) struct slabinfo;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  19) struct cgroup_subsys_state;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  20) struct device;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  21) struct mem_cgroup;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  22) struct readahead_control;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  23) #else
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  24) /* struct slabinfo */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  25) #include <../mm/slab.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  26) /* struct cgroup_subsys_state */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  27) #include <linux/cgroup-defs.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  28) /* struct device */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  29) #include <linux/device.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  30) /* struct mem_cgroup */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  31) #include <linux/memcontrol.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  32) /* struct readahead_control */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  33) #include <linux/pagemap.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  34) #endif /* __GENKSYMS__ */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  35) struct cma;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  36) struct swap_slots_cache;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  37) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  38) DECLARE_RESTRICTED_HOOK(android_rvh_set_skip_swapcache_flags,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  39) 			TP_PROTO(gfp_t *flags),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  40) 			TP_ARGS(flags), 1);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  41) DECLARE_RESTRICTED_HOOK(android_rvh_set_gfp_zone_flags,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  42) 			TP_PROTO(gfp_t *flags),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  43) 			TP_ARGS(flags), 1);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  44) DECLARE_RESTRICTED_HOOK(android_rvh_set_readahead_gfp_mask,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  45) 			TP_PROTO(gfp_t *flags),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  46) 			TP_ARGS(flags), 1);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  47) DECLARE_HOOK(android_vh_cma_alloc_start,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  48) 	TP_PROTO(s64 *ts),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  49) 	TP_ARGS(ts));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  50) DECLARE_HOOK(android_vh_cma_alloc_finish,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  51) 	TP_PROTO(struct cma *cma, struct page *page, unsigned long count,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  52) 		 unsigned int align, gfp_t gfp_mask, s64 ts),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  53) 	TP_ARGS(cma, page, count, align, gfp_mask, ts));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  54) DECLARE_HOOK(android_vh_rmqueue,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  55) 	TP_PROTO(struct zone *preferred_zone, struct zone *zone,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  56) 		unsigned int order, gfp_t gfp_flags,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  57) 		unsigned int alloc_flags, int migratetype),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  58) 	TP_ARGS(preferred_zone, zone, order,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  59) 		gfp_flags, alloc_flags, migratetype));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  60) DECLARE_HOOK(android_vh_pagecache_get_page,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  61) 	TP_PROTO(struct address_space *mapping, pgoff_t index,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  62) 		int fgp_flags, gfp_t gfp_mask, struct page *page),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  63) 	TP_ARGS(mapping, index, fgp_flags, gfp_mask, page));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  64) DECLARE_HOOK(android_vh_filemap_fault_get_page,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  65) 	TP_PROTO(struct vm_fault *vmf, struct page **page, bool *retry),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  66) 	TP_ARGS(vmf, page, retry));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  67) DECLARE_HOOK(android_vh_filemap_fault_cache_page,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  68) 	TP_PROTO(struct vm_fault *vmf, struct page *page),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  69) 	TP_ARGS(vmf, page));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  70) DECLARE_HOOK(android_vh_meminfo_proc_show,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  71) 	TP_PROTO(struct seq_file *m),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  72) 	TP_ARGS(m));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  73) DECLARE_HOOK(android_vh_exit_mm,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  74) 	TP_PROTO(struct mm_struct *mm),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  75) 	TP_ARGS(mm));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  76) DECLARE_HOOK(android_vh_get_from_fragment_pool,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  77) 	TP_PROTO(struct mm_struct *mm, struct vm_unmapped_area_info *info,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  78) 		unsigned long *addr),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  79) 	TP_ARGS(mm, info, addr));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  80) DECLARE_HOOK(android_vh_exclude_reserved_zone,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  81) 	TP_PROTO(struct mm_struct *mm, struct vm_unmapped_area_info *info),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  82) 	TP_ARGS(mm, info));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  83) DECLARE_HOOK(android_vh_include_reserved_zone,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  84) 	TP_PROTO(struct mm_struct *mm, struct vm_unmapped_area_info *info,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  85) 		unsigned long *addr),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  86) 	TP_ARGS(mm, info, addr));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  87) DECLARE_HOOK(android_vh_show_mem,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  88) 	TP_PROTO(unsigned int filter, nodemask_t *nodemask),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  89) 	TP_ARGS(filter, nodemask));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  90) struct dirty_throttle_control;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  91) DECLARE_HOOK(android_vh_mm_dirty_limits,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  92) 	TP_PROTO(struct dirty_throttle_control *const gdtc, bool strictlimit,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  93) 		unsigned long dirty, unsigned long bg_thresh,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  94) 		unsigned long nr_reclaimable, unsigned long pages_dirtied),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  95) 	TP_ARGS(gdtc, strictlimit, dirty, bg_thresh,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  96) 		nr_reclaimable, pages_dirtied));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  97) DECLARE_HOOK(android_vh_oom_check_panic,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  98) 	TP_PROTO(struct oom_control *oc, int *ret),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  99) 	TP_ARGS(oc, ret));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 100) DECLARE_HOOK(android_vh_save_vmalloc_stack,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 101) 	TP_PROTO(unsigned long flags, struct vm_struct *vm),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 102) 	TP_ARGS(flags, vm));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 103) DECLARE_HOOK(android_vh_show_stack_hash,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 104) 	TP_PROTO(struct seq_file *m, struct vm_struct *v),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 105) 	TP_ARGS(m, v));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 106) DECLARE_HOOK(android_vh_save_track_hash,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 107) 	TP_PROTO(bool alloc, unsigned long p),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 108) 	TP_ARGS(alloc, p));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 109) DECLARE_HOOK(android_vh_vmpressure,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 110) 	TP_PROTO(struct mem_cgroup *memcg, bool *bypass),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 111) 	TP_ARGS(memcg, bypass));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 112) DECLARE_HOOK(android_vh_mem_cgroup_alloc,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 113) 	TP_PROTO(struct mem_cgroup *memcg),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 114) 	TP_ARGS(memcg));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 115) DECLARE_HOOK(android_vh_mem_cgroup_free,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 116) 	TP_PROTO(struct mem_cgroup *memcg),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 117) 	TP_ARGS(memcg));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 118) DECLARE_HOOK(android_vh_mem_cgroup_id_remove,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 119) 	TP_PROTO(struct mem_cgroup *memcg),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 120) 	TP_ARGS(memcg));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 121) DECLARE_HOOK(android_vh_mem_cgroup_css_online,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 122) 	TP_PROTO(struct cgroup_subsys_state *css, struct mem_cgroup *memcg),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 123) 	TP_ARGS(css, memcg));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 124) DECLARE_HOOK(android_vh_mem_cgroup_css_offline,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 125) 	TP_PROTO(struct cgroup_subsys_state *css, struct mem_cgroup *memcg),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 126) 	TP_ARGS(css, memcg));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 127) DECLARE_HOOK(android_vh_kmalloc_slab,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 128) 	TP_PROTO(unsigned int index, gfp_t flags, struct kmem_cache **s),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 129) 	TP_ARGS(index, flags, s));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 130) DECLARE_HOOK(android_vh_mmap_region,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 131) 	TP_PROTO(struct vm_area_struct *vma, unsigned long addr),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 132) 	TP_ARGS(vma, addr));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 133) DECLARE_HOOK(android_vh_try_to_unmap_one,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 134) 	TP_PROTO(struct vm_area_struct *vma, struct page *page, unsigned long addr, bool ret),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 135) 	TP_ARGS(vma, page, addr, ret));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 136) DECLARE_HOOK(android_vh_drain_all_pages_bypass,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 137) 	TP_PROTO(gfp_t gfp_mask, unsigned int order, unsigned long alloc_flags,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 138) 		int migratetype, unsigned long did_some_progress,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 139) 		bool *bypass),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 140) 	TP_ARGS(gfp_mask, order, alloc_flags, migratetype, did_some_progress, bypass));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 141) DECLARE_HOOK(android_vh_cma_drain_all_pages_bypass,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 142) 	TP_PROTO(unsigned int migratetype, bool *bypass),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 143) 	TP_ARGS(migratetype, bypass));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 144) DECLARE_HOOK(android_vh_pcplist_add_cma_pages_bypass,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 145) 	TP_PROTO(int migratetype, bool *bypass),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 146) 	TP_ARGS(migratetype, bypass));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 147) DECLARE_HOOK(android_vh_subpage_dma_contig_alloc,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 148) 	TP_PROTO(bool *allow_subpage_alloc, struct device *dev, size_t *size),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 149) 	TP_ARGS(allow_subpage_alloc, dev, size));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 150) DECLARE_HOOK(android_vh_ra_tuning_max_page,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 151) 	TP_PROTO(struct readahead_control *ractl, unsigned long *max_page),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 152) 	TP_ARGS(ractl, max_page));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 153) DECLARE_HOOK(android_vh_handle_pte_fault_end,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 154) 	TP_PROTO(struct vm_fault *vmf, unsigned long highest_memmap_pfn),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 155) 	TP_ARGS(vmf, highest_memmap_pfn));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 156) DECLARE_HOOK(android_vh_cow_user_page,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 157) 	TP_PROTO(struct vm_fault *vmf, struct page *page),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 158) 	TP_ARGS(vmf, page));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 159) DECLARE_HOOK(android_vh_swapin_add_anon_rmap,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 160) 	TP_PROTO(struct vm_fault *vmf, struct page *page),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 161) 	TP_ARGS(vmf, page));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 162) DECLARE_HOOK(android_vh_waiting_for_page_migration,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 163) 	TP_PROTO(struct page *page),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 164) 	TP_ARGS(page));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 165) DECLARE_HOOK(android_vh_migrate_page_states,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 166) 	TP_PROTO(struct page *page, struct page *newpage),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 167) 	TP_ARGS(page, newpage));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 168) DECLARE_HOOK(android_vh_page_referenced_one_end,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 169) 	TP_PROTO(struct vm_area_struct *vma, struct page *page, int referenced),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 170) 	TP_ARGS(vma, page, referenced));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 171) DECLARE_HOOK(android_vh_count_pswpin,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 172) 	TP_PROTO(struct swap_info_struct *sis),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 173) 	TP_ARGS(sis));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 174) DECLARE_HOOK(android_vh_count_pswpout,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 175) 	TP_PROTO(struct swap_info_struct *sis),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 176) 	TP_ARGS(sis));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 177) DECLARE_HOOK(android_vh_count_swpout_vm_event,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 178) 	TP_PROTO(struct swap_info_struct *sis, struct page *page, bool *skip),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 179) 	TP_ARGS(sis, page, skip));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 180) DECLARE_HOOK(android_vh_swap_slot_cache_active,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 181) 	TP_PROTO(bool swap_slot_cache_active),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 182) 	TP_ARGS(swap_slot_cache_active));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 183) DECLARE_HOOK(android_vh_drain_slots_cache_cpu,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 184) 	TP_PROTO(struct swap_slots_cache *cache, unsigned int type,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 185) 		bool free_slots, bool *skip),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 186) 	TP_ARGS(cache, type, free_slots, skip));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 187) DECLARE_HOOK(android_vh_alloc_swap_slot_cache,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 188) 	TP_PROTO(struct swap_slots_cache *cache, int *ret, bool *skip),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 189) 	TP_ARGS(cache, ret, skip));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 190) DECLARE_HOOK(android_vh_free_swap_slot,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 191) 	TP_PROTO(swp_entry_t entry, struct swap_slots_cache *cache, bool *skip),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 192) 	TP_ARGS(entry, cache, skip));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 193) DECLARE_HOOK(android_vh_get_swap_page,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 194) 	TP_PROTO(struct page *page, swp_entry_t *entry,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 195) 		struct swap_slots_cache *cache, bool *found),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 196) 	TP_ARGS(page, entry, cache, found));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 197) DECLARE_HOOK(android_vh_page_isolated_for_reclaim,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 198) 	TP_PROTO(struct mm_struct *mm, struct page *page),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 199) 	TP_ARGS(mm, page));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 200) DECLARE_HOOK(android_vh_account_swap_pages,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 201) 	TP_PROTO(struct swap_info_struct *si, bool *skip),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 202) 	TP_ARGS(si, skip));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 203) DECLARE_HOOK(android_vh_unuse_swap_page,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 204) 	TP_PROTO(struct swap_info_struct *si, struct page *page),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 205) 	TP_ARGS(si, page));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 206) DECLARE_HOOK(android_vh_init_swap_info_struct,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 207) 	TP_PROTO(struct swap_info_struct *p, struct plist_head *swap_avail_heads),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 208) 	TP_ARGS(p, swap_avail_heads));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 209) DECLARE_HOOK(android_vh_si_swapinfo,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 210) 	TP_PROTO(struct swap_info_struct *si, bool *skip),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 211) 	TP_ARGS(si, skip));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 212) DECLARE_HOOK(android_vh_alloc_si,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 213) 	TP_PROTO(struct swap_info_struct **p, bool *skip),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 214) 	TP_ARGS(p, skip));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 215) DECLARE_HOOK(android_vh_free_pages,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 216) 	TP_PROTO(struct page *page, unsigned int order),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 217) 	TP_ARGS(page, order));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 218) /* macro versions of hooks are no longer required */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 219) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 220) #endif /* _TRACE_HOOK_MM_H */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 221) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 222) /* This part must be outside protection */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 223) #include <trace/define_trace.h>