Files
kernel_arpi/include/trace/hooks/mm.h
Prakash Gupta 4d7fc7aaec ANDROID: mm, oom: add vendor hook to prevent oom panic
In some cases we would like to bypass oom panic and give the system more
time to cleanup memory. Add vendor hook to allow skipping the oom panic.

Bug: 186875166
Change-Id: I64e74b2c013d6f18d74504777c6559d9ae07e008
Signed-off-by: Prakash Gupta <guptap@codeaurora.org>
Signed-off-by: Sudarshan Rajagopalan <quic_sudaraja@quicinc.com>
2022-01-25 23:20:59 +00:00

34 lines
898 B
C

/* 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 <linux/types.h>
#include <linux/mm.h>
#include <linux/oom.h>
#include <linux/tracepoint.h>
#include <trace/hooks/vendor_hooks.h>
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_oom_check_panic,
TP_PROTO(struct oom_control *oc, int *ret),
TP_ARGS(oc, ret));
#endif /* _TRACE_HOOK_MM_H */
/* This part must be outside protection */
#include <trace/define_trace.h>