/* SPDX-License-Identifier: GPL-2.0 */ #undef TRACE_SYSTEM #define TRACE_SYSTEM mm #define TRACE_INCLUDE_PATH trace/hooks #if !defined(_TRACE_HOOK_MM_H) || defined(TRACE_HEADER_MULTI_READ) #define _TRACE_HOOK_MM_H #include #include #include #include DECLARE_RESTRICTED_HOOK(android_rvh_set_skip_swapcache_flags, TP_PROTO(gfp_t *flags), TP_ARGS(flags), 1); DECLARE_RESTRICTED_HOOK(android_rvh_set_gfp_zone_flags, TP_PROTO(gfp_t *flags), TP_ARGS(flags), 1); DECLARE_RESTRICTED_HOOK(android_rvh_set_readahead_gfp_mask, TP_PROTO(gfp_t *flags), TP_ARGS(flags), 1); DECLARE_HOOK(android_vh_cma_alloc_start, TP_PROTO(s64 *ts), TP_ARGS(ts)); DECLARE_HOOK(android_vh_cma_alloc_finish, TP_PROTO(struct cma *cma, struct page *page, unsigned long count, unsigned int align, gfp_t gfp_mask, s64 ts), TP_ARGS(cma, page, count, align, gfp_mask, ts)); DECLARE_HOOK(android_vh_rmqueue, TP_PROTO(struct zone *preferred_zone, struct zone *zone, unsigned int order, gfp_t gfp_flags, unsigned int alloc_flags, int migratetype), TP_ARGS(preferred_zone, zone, order, gfp_flags, alloc_flags, migratetype)); DECLARE_HOOK(android_vh_pagecache_get_page, TP_PROTO(struct address_space *mapping, pgoff_t index, int fgp_flags, gfp_t gfp_mask, struct page *page), TP_ARGS(mapping, index, fgp_flags, gfp_mask, page)); DECLARE_HOOK(android_vh_meminfo_proc_show, TP_PROTO(struct seq_file *m), TP_ARGS(m)); DECLARE_HOOK(android_vh_exit_mm, TP_PROTO(struct mm_struct *mm), TP_ARGS(mm)); DECLARE_HOOK(android_vh_show_mem, TP_PROTO(unsigned int filter, nodemask_t *nodemask), TP_ARGS(filter, nodemask)); DECLARE_HOOK(android_vh_alloc_pages_slowpath, TP_PROTO(gfp_t gfp_mask, unsigned int order, unsigned long delta), TP_ARGS(gfp_mask, order, delta)); DECLARE_HOOK(android_vh_print_slabinfo_header, TP_PROTO(struct seq_file *m), TP_ARGS(m)); struct slabinfo; DECLARE_HOOK(android_vh_cache_show, TP_PROTO(struct seq_file *m, struct slabinfo *sinfo, struct kmem_cache *s), TP_ARGS(m, sinfo, s)); /* macro versions of hooks are no longer required */ #endif /* _TRACE_HOOK_MM_H */ /* This part must be outside protection */ #include