To avoid changing the visibiliy of data types when including hook definition headers remove header file inclusions from the hook definition header files. Instead, the hook definition headers should just have forward declarations that don't require full definition. To provide full definitions of the types for the KMI, the headers that define the types should be included by the source file that instantiates the hooks - normally vendor_hooks.c. Bug: 233047575 Signed-off-by: Todd Kjos <tkjos@google.com> Change-Id: Iaaa1a6f45a356569c04ad2fea0b1514e0454f041
53 lines
2.0 KiB
C
53 lines
2.0 KiB
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
#undef TRACE_SYSTEM
|
|
#define TRACE_SYSTEM binder
|
|
#undef TRACE_INCLUDE_PATH
|
|
#define TRACE_INCLUDE_PATH trace/hooks
|
|
#if !defined(_TRACE_HOOK_BINDER_H) || defined(TRACE_HEADER_MULTI_READ)
|
|
#define _TRACE_HOOK_BINDER_H
|
|
#include <trace/hooks/vendor_hooks.h>
|
|
/*
|
|
* Following tracepoints are not exported in tracefs and provide a
|
|
* mechanism for vendor modules to hook and extend functionality
|
|
*/
|
|
|
|
struct binder_proc;
|
|
struct binder_thread;
|
|
struct binder_transaction;
|
|
struct task_struct;
|
|
struct binder_transaction_data;
|
|
|
|
DECLARE_HOOK(android_vh_binder_transaction_init,
|
|
TP_PROTO(struct binder_transaction *t),
|
|
TP_ARGS(t));
|
|
DECLARE_HOOK(android_vh_binder_priority_skip,
|
|
TP_PROTO(struct task_struct *task, bool *skip),
|
|
TP_ARGS(task, skip));
|
|
DECLARE_HOOK(android_vh_binder_set_priority,
|
|
TP_PROTO(struct binder_transaction *t, struct task_struct *task),
|
|
TP_ARGS(t, task));
|
|
DECLARE_HOOK(android_vh_binder_restore_priority,
|
|
TP_PROTO(struct binder_transaction *t, struct task_struct *task),
|
|
TP_ARGS(t, task));
|
|
DECLARE_HOOK(android_vh_binder_wakeup_ilocked,
|
|
TP_PROTO(struct task_struct *task, bool sync, struct binder_proc *proc),
|
|
TP_ARGS(task, sync, proc));
|
|
DECLARE_HOOK(android_vh_binder_wait_for_work,
|
|
TP_PROTO(bool do_proc_work, struct binder_thread *tsk, struct binder_proc *proc),
|
|
TP_ARGS(do_proc_work, tsk, proc));
|
|
DECLARE_HOOK(android_vh_sync_txn_recvd,
|
|
TP_PROTO(struct task_struct *tsk, struct task_struct *from),
|
|
TP_ARGS(tsk, from));
|
|
DECLARE_RESTRICTED_HOOK(android_rvh_binder_transaction,
|
|
TP_PROTO(struct binder_proc *target_proc, struct binder_proc *proc,
|
|
struct binder_thread *thread, struct binder_transaction_data *tr),
|
|
TP_ARGS(target_proc, proc, thread, tr), 1);
|
|
DECLARE_HOOK(android_vh_binder_print_transaction_info,
|
|
TP_PROTO(struct seq_file *m, struct binder_proc *proc,
|
|
const char *prefix, struct binder_transaction *t),
|
|
TP_ARGS(m, proc, prefix, t));
|
|
|
|
#endif /* _TRACE_HOOK_BINDER_H */
|
|
/* This part must be outside protection */
|
|
#include <trace/define_trace.h>
|