ANDROID: remove CONFIG_TRACEPOINTS from hook definition headers

Remove the obsolete use of CONFIG_TRACEPOINTS in hook definition
header files. The !CONFIG_TRACEPOINTS case is correctly handled
by the included trace header files.

Bug: 233047575
Signed-off-by: Todd Kjos <tkjos@google.com>
Change-Id: I957649bcfef375284f2885cf732ff2960c303837
This commit is contained in:
Todd Kjos
2022-09-06 20:30:26 +00:00
parent 5fdf33a8be
commit 4bc072dd20
3 changed files with 1 additions and 24 deletions

View File

@@ -9,17 +9,12 @@
#include <trace/hooks/vendor_hooks.h> #include <trace/hooks/vendor_hooks.h>
#if defined(CONFIG_TRACEPOINTS) && defined(CONFIG_ANDROID_VENDOR_HOOKS)
/* struct pt_regs */ /* struct pt_regs */
#include <asm/ptrace.h> #include <asm/ptrace.h>
DECLARE_HOOK(android_vh_ipi_stop, DECLARE_HOOK(android_vh_ipi_stop,
TP_PROTO(struct pt_regs *regs), TP_PROTO(struct pt_regs *regs),
TP_ARGS(regs)) TP_ARGS(regs))
#else
#define trace_android_vh_ipi_stop(regs)
#define trace_android_vh_ipi_stop_rcuidle(regs)
#endif
#endif /* _TRACE_HOOK_DEBUG_H */ #endif /* _TRACE_HOOK_DEBUG_H */
/* This part must be outside protection */ /* This part must be outside protection */

View File

@@ -12,8 +12,6 @@
#include <trace/hooks/vendor_hooks.h> #include <trace/hooks/vendor_hooks.h>
#if defined(CONFIG_TRACEPOINTS) && defined(CONFIG_ANDROID_VENDOR_HOOKS)
DECLARE_HOOK(android_vh_ftrace_oops_enter, DECLARE_HOOK(android_vh_ftrace_oops_enter,
TP_PROTO(bool *ftrace_check), TP_PROTO(bool *ftrace_check),
TP_ARGS(ftrace_check)); TP_ARGS(ftrace_check));
@@ -34,16 +32,6 @@ DECLARE_HOOK(android_vh_ftrace_dump_buffer,
TP_PROTO(struct trace_seq *trace_buf, bool *dump_printk), TP_PROTO(struct trace_seq *trace_buf, bool *dump_printk),
TP_ARGS(trace_buf, dump_printk)); TP_ARGS(trace_buf, dump_printk));
#else
#define trace_android_vh_ftrace_oops_enter(ftrace_check)
#define trace_android_vh_ftrace_oops_exit(ftrace_check)
#define trace_android_vh_ftrace_size_check(size, ftrace_check)
#define trace_android_vh_ftrace_format_check(ftrace_check)
#define trace_android_vh_ftrace_dump_buffer(trace_buf, dump_printk)
#endif
#endif /* _TRACE_HOOK_FTRACE_DUMP_H */ #endif /* _TRACE_HOOK_FTRACE_DUMP_H */
/* This part must be outside protection */ /* This part must be outside protection */
#include <trace/define_trace.h> #include <trace/define_trace.h>

View File

@@ -9,7 +9,7 @@
* Following tracepoints are not exported in tracefs and provide a * Following tracepoints are not exported in tracefs and provide a
* mechanism for vendor modules to hook and extend functionality * mechanism for vendor modules to hook and extend functionality
*/ */
#if defined(CONFIG_TRACEPOINTS) && defined(CONFIG_ANDROID_VENDOR_HOOKS)
/* struct rw_semaphore, struct rwsem_waiter */ /* struct rw_semaphore, struct rwsem_waiter */
#include <linux/rwsem.h> #include <linux/rwsem.h>
DECLARE_HOOK(android_vh_rwsem_init, DECLARE_HOOK(android_vh_rwsem_init,
@@ -26,12 +26,6 @@ DECLARE_HOOK(android_vh_alter_rwsem_list_add,
struct rw_semaphore *sem, struct rw_semaphore *sem,
bool *already_on_list), bool *already_on_list),
TP_ARGS(waiter, sem, already_on_list)); TP_ARGS(waiter, sem, already_on_list));
#else
#define trace_android_vh_rwsem_init(sem)
#define trace_android_vh_rwsem_wake(sem)
#define trace_android_vh_rwsem_write_finished(sem)
#define trace_android_vh_alter_rwsem_list_add(waiter, sem, already_on_list)
#endif
#endif /* _TRACE_HOOK_RWSEM_H */ #endif /* _TRACE_HOOK_RWSEM_H */
/* This part must be outside protection */ /* This part must be outside protection */
#include <trace/define_trace.h> #include <trace/define_trace.h>