ANDROID: simplify vendor hooks for non-GKI builds
Vendor hooks required explicitly defining macros or inline functions to handle the non-GKI build case (!CONFIG_ANDROID_VENDOR_HOOKS). Added support for generating them automatically so the macros are no longer required. Both models are now supported so we can transition. Bug: 177416721 Signed-off-by: Todd Kjos <tkjos@google.com> Change-Id: I01acc389d315a5d509b0c48116854342a42e1058
This commit is contained in:
@@ -9,6 +9,8 @@
|
||||
|
||||
#include <linux/tracepoint.h>
|
||||
|
||||
#if defined(CONFIG_TRACEPOINTS) && defined(CONFIG_ANDROID_VENDOR_HOOKS)
|
||||
|
||||
#define DECLARE_HOOK DECLARE_TRACE
|
||||
|
||||
#ifdef TRACE_HEADER_MULTI_READ
|
||||
@@ -102,3 +104,10 @@
|
||||
PARAMS(__data, args))
|
||||
|
||||
#endif /* TRACE_HEADER_MULTI_READ */
|
||||
|
||||
#else /* !CONFIG_TRACEPOINTS || !CONFIG_ANDROID_VENDOR_HOOKS */
|
||||
/* suppress trace hooks */
|
||||
#define DECLARE_HOOK DECLARE_EVENT_NOP
|
||||
#define DECLARE_RESTRICTED_HOOK(name, proto, args, cond) \
|
||||
DECLARE_EVENT_NOP(name, PARAMS(proto), PARAMS(args))
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user