diff --git a/include/trace/hooks/audio_usboffload.h b/include/trace/hooks/audio_usboffload.h index 1b9dd276b8a8..bf189646b741 100644 --- a/include/trace/hooks/audio_usboffload.h +++ b/include/trace/hooks/audio_usboffload.h @@ -9,7 +9,8 @@ #include -struct usb_interface; +/* struct usb_interface */ +#include struct snd_usb_audio; DECLARE_HOOK(android_vh_audio_usb_offload_vendor_set, diff --git a/include/trace/hooks/binder.h b/include/trace/hooks/binder.h index 49bb899cd333..8f78a1abdfcd 100644 --- a/include/trace/hooks/binder.h +++ b/include/trace/hooks/binder.h @@ -10,8 +10,11 @@ * Following tracepoints are not exported in tracefs and provide a * mechanism for vendor modules to hook and extend functionality */ -struct binder_transaction; -struct task_struct; +/* struct task_struct */ +#include +/* struct binder_transaction_data */ +#include +#include <../drivers/android/binder_internal.h> struct seq_file; DECLARE_HOOK(android_vh_binder_transaction_init, TP_PROTO(struct binder_transaction *t), @@ -25,9 +28,6 @@ DECLARE_HOOK(android_vh_binder_set_priority, DECLARE_HOOK(android_vh_binder_restore_priority, TP_PROTO(struct binder_transaction *t, struct task_struct *task), TP_ARGS(t, task)); -struct binder_proc; -struct binder_thread; -struct binder_transaction_data; DECLARE_HOOK(android_vh_binder_wakeup_ilocked, TP_PROTO(struct task_struct *task, bool sync, struct binder_proc *proc), TP_ARGS(task, sync, proc)); diff --git a/include/trace/hooks/block.h b/include/trace/hooks/block.h index 0d9d7db39968..8cbc717c0a47 100644 --- a/include/trace/hooks/block.h +++ b/include/trace/hooks/block.h @@ -10,7 +10,8 @@ #include #include -struct blk_mq_tag_set; +/* struct blk_mq_tag_set */ +#include struct blk_mq_tags; struct blk_mq_alloc_data; diff --git a/include/trace/hooks/cgroup.h b/include/trace/hooks/cgroup.h index 4b082f4841c0..fd6cb092cec9 100644 --- a/include/trace/hooks/cgroup.h +++ b/include/trace/hooks/cgroup.h @@ -7,12 +7,14 @@ #define _TRACE_HOOK_CGROUP_H #include -struct task_struct; +/* struct cgroup_subsys */ +#include +/* struct task_struct */ +#include DECLARE_HOOK(android_vh_cgroup_set_task, TP_PROTO(int ret, struct task_struct *task), TP_ARGS(ret, task)); -struct cgroup_subsys; struct cgroup_taskset; struct cgroup; DECLARE_HOOK(android_vh_cgroup_attach, diff --git a/include/trace/hooks/cpuidle.h b/include/trace/hooks/cpuidle.h index b1ee27ed6707..1d3094b8f808 100644 --- a/include/trace/hooks/cpuidle.h +++ b/include/trace/hooks/cpuidle.h @@ -9,7 +9,8 @@ #include -struct cpuidle_device; +/* struct cpuidle_device */ +#include DECLARE_HOOK(android_vh_cpu_idle_enter, TP_PROTO(int *state, struct cpuidle_device *dev), diff --git a/include/trace/hooks/cpuidle_psci.h b/include/trace/hooks/cpuidle_psci.h index eef0032c0879..ed3f775f14fd 100644 --- a/include/trace/hooks/cpuidle_psci.h +++ b/include/trace/hooks/cpuidle_psci.h @@ -10,7 +10,8 @@ * mechanism for vendor modules to hook and extend functionality */ -struct cpuidle_device; +/* struct cpuidle_device */ +#include DECLARE_HOOK(android_vh_cpuidle_psci_enter, TP_PROTO(struct cpuidle_device *dev, bool s2idle), TP_ARGS(dev, s2idle)); diff --git a/include/trace/hooks/creds.h b/include/trace/hooks/creds.h index 69a68081f2a3..737f673538ac 100644 --- a/include/trace/hooks/creds.h +++ b/include/trace/hooks/creds.h @@ -10,8 +10,10 @@ * Following tracepoints are not exported in tracefs and provide a * mechanism for vendor modules to hook and extend functionality */ -struct cred; -struct task_struct; +/* struct cred */ +#include +/* struct task_struct */ +#include DECLARE_RESTRICTED_HOOK(android_rvh_commit_creds, TP_PROTO(const struct task_struct *task, const struct cred *new), TP_ARGS(task, new), 1); diff --git a/include/trace/hooks/dmabuf.h b/include/trace/hooks/dmabuf.h index bb3bc22c7620..397dd3096d7d 100644 --- a/include/trace/hooks/dmabuf.h +++ b/include/trace/hooks/dmabuf.h @@ -11,7 +11,8 @@ #include -struct dma_buf; +/* struct dma_buf */ +#include DECLARE_HOOK(android_vh_dma_buf_release, TP_PROTO(struct dma_buf *data), TP_ARGS(data)); diff --git a/include/trace/hooks/drm_atomic.h b/include/trace/hooks/drm_atomic.h index 1fcb9d9c95db..927e5d0293f6 100644 --- a/include/trace/hooks/drm_atomic.h +++ b/include/trace/hooks/drm_atomic.h @@ -11,8 +11,10 @@ #include -struct drm_atomic_state; -struct drm_crtc; +/* struct drm_atomic_state */ +#include +/* struct drm_crtc */ +#include DECLARE_HOOK(android_vh_drm_atomic_check_modeset, TP_PROTO(struct drm_atomic_state *state, struct drm_crtc *crtc, bool *allow), TP_ARGS(state, crtc, allow)) diff --git a/include/trace/hooks/drm_framebuffer.h b/include/trace/hooks/drm_framebuffer.h index 718ad3509332..677dbf4b50ad 100644 --- a/include/trace/hooks/drm_framebuffer.h +++ b/include/trace/hooks/drm_framebuffer.h @@ -11,7 +11,8 @@ #include -struct drm_framebuffer; +/* struct drm_framebuffer */ +#include DECLARE_HOOK(android_vh_atomic_remove_fb, TP_PROTO(struct drm_framebuffer *fb, bool *allow), TP_ARGS(fb, allow)) diff --git a/include/trace/hooks/dtask.h b/include/trace/hooks/dtask.h index 3a6c8b607c89..2dd4baef99ca 100644 --- a/include/trace/hooks/dtask.h +++ b/include/trace/hooks/dtask.h @@ -10,7 +10,14 @@ * Following tracepoints are not exported in tracefs and provide a * mechanism for vendor modules to hook and extend functionality */ -struct mutex; +/* struct mutex */ +#include +/* struct rt_mutex_base */ +#include +/* struct rw_semaphore */ +#include +/* struct task_struct */ +#include DECLARE_HOOK(android_vh_mutex_wait_start, TP_PROTO(struct mutex *lock), TP_ARGS(lock)); @@ -21,7 +28,6 @@ DECLARE_HOOK(android_vh_mutex_init, TP_PROTO(struct mutex *lock), TP_ARGS(lock)); -struct rt_mutex_base; DECLARE_HOOK(android_vh_rtmutex_wait_start, TP_PROTO(struct rt_mutex_base *lock), TP_ARGS(lock)); @@ -29,7 +35,6 @@ DECLARE_HOOK(android_vh_rtmutex_wait_finish, TP_PROTO(struct rt_mutex_base *lock), TP_ARGS(lock)); -struct rw_semaphore; DECLARE_HOOK(android_vh_rwsem_read_wait_start, TP_PROTO(struct rw_semaphore *sem), TP_ARGS(sem)); @@ -43,7 +48,6 @@ DECLARE_HOOK(android_vh_rwsem_write_wait_finish, TP_PROTO(struct rw_semaphore *sem), TP_ARGS(sem)); -struct task_struct; DECLARE_HOOK(android_vh_sched_show_task, TP_PROTO(struct task_struct *task), TP_ARGS(task)); diff --git a/include/trace/hooks/fips140.h b/include/trace/hooks/fips140.h index fd4a42c013c7..31960c814028 100644 --- a/include/trace/hooks/fips140.h +++ b/include/trace/hooks/fips140.h @@ -7,7 +7,8 @@ #define _TRACE_HOOK_FIPS140_H #include -struct crypto_aes_ctx; +/* struct crypto_aes_ctx */ +#include /* * These hooks exist only for the benefit of the FIPS140 crypto module, which diff --git a/include/trace/hooks/fpsimd.h b/include/trace/hooks/fpsimd.h index 10337180a7be..3f8951eeceb6 100644 --- a/include/trace/hooks/fpsimd.h +++ b/include/trace/hooks/fpsimd.h @@ -9,7 +9,8 @@ #include -struct task_struct; +/* struct task_struct */ +#include DECLARE_HOOK(android_vh_is_fpsimd_save, TP_PROTO(struct task_struct *prev, struct task_struct *next), diff --git a/include/trace/hooks/gic.h b/include/trace/hooks/gic.h index 2a12bf941b60..1c2bb9cd7c2c 100644 --- a/include/trace/hooks/gic.h +++ b/include/trace/hooks/gic.h @@ -8,8 +8,9 @@ #define _TRACE_HOOK_GIC_H #include +/* struct irq_data */ +#include struct gic_chip_data; -struct irq_data; DECLARE_HOOK(android_vh_gic_resume, TP_PROTO(struct gic_chip_data *gd), diff --git a/include/trace/hooks/gic_v3.h b/include/trace/hooks/gic_v3.h index ad8d27fa9c3e..ba3539163c6d 100644 --- a/include/trace/hooks/gic_v3.h +++ b/include/trace/hooks/gic_v3.h @@ -9,8 +9,10 @@ * Following tracepoints are not exported in tracefs and provide a * mechanism for vendor modules to hook and extend functionality */ -struct irq_data; -struct cpumask; +/* struct cpumask */ +#include +/* struct irq_data */ +#include DECLARE_HOOK(android_vh_gic_v3_affinity_init, TP_PROTO(int irq, u32 offset, u64 *affinity), TP_ARGS(irq, offset, affinity)); diff --git a/include/trace/hooks/iommu.h b/include/trace/hooks/iommu.h index f615320e44d6..cf554c6bb92d 100644 --- a/include/trace/hooks/iommu.h +++ b/include/trace/hooks/iommu.h @@ -11,11 +11,12 @@ #include +/* struct iova_domain */ +#include DECLARE_RESTRICTED_HOOK(android_rvh_iommu_setup_dma_ops, TP_PROTO(struct device *dev, u64 dma_base, u64 dma_limit), TP_ARGS(dev, dma_base, dma_limit), 1); -struct iova_domain; DECLARE_HOOK(android_vh_iommu_iovad_alloc_iova, TP_PROTO(struct device *dev, struct iova_domain *iovad, dma_addr_t iova, size_t size), diff --git a/include/trace/hooks/mmc.h b/include/trace/hooks/mmc.h index 80e403b43280..7f3405912f32 100644 --- a/include/trace/hooks/mmc.h +++ b/include/trace/hooks/mmc.h @@ -6,10 +6,14 @@ #if !defined(_TRACE_HOOK_MMC_H) || defined(TRACE_HEADER_MULTI_READ) #define _TRACE_HOOK_MMC_H #include -struct blk_mq_queue_data; -struct mmc_host; -struct mmc_card; -struct sdhci_host; +/* struct blk_mq_queue_data */ +#include +/* struct mmc_host */ +#include +/* struct mmc_card */ +#include +/* struct sdhci_host */ +#include "../../drivers/mmc/host/sdhci.h" /* * Following tracepoints are not exported in tracefs and provide a diff --git a/include/trace/hooks/module.h b/include/trace/hooks/module.h index 78b49869ca65..19f468a086ff 100644 --- a/include/trace/hooks/module.h +++ b/include/trace/hooks/module.h @@ -10,7 +10,8 @@ * Following tracepoints are not exported in tracefs and provide a * mechanism for vendor modules to hook and extend functionality */ -struct module; +/* struct module */ +#include DECLARE_HOOK(android_vh_set_module_permit_before_init, TP_PROTO(const struct module *mod), TP_ARGS(mod)); diff --git a/include/trace/hooks/mpam.h b/include/trace/hooks/mpam.h index 50f5a68fdae2..3175f6faeab6 100644 --- a/include/trace/hooks/mpam.h +++ b/include/trace/hooks/mpam.h @@ -10,7 +10,8 @@ * Following tracepoints are not exported in tracefs and provide a * mechanism for vendor modules to hook and extend functionality */ -struct task_struct; +/* struct task_struct */ +#include DECLARE_HOOK(android_vh_mpam_set, TP_PROTO(struct task_struct *prev, struct task_struct *next), TP_ARGS(prev, next)); diff --git a/include/trace/hooks/net.h b/include/trace/hooks/net.h index 0b6de6f659cf..542944b39087 100644 --- a/include/trace/hooks/net.h +++ b/include/trace/hooks/net.h @@ -8,9 +8,12 @@ #define _TRACE_HOOK_NET_VH_H #include -struct packet_type; -struct list_head; -struct sk_buff; +/* struct packet_type */ +#include +/* struct sk_buff */ +#include +/* struct list_head */ +#include DECLARE_HOOK(android_vh_ptype_head, TP_PROTO(const struct packet_type *pt, struct list_head *vendor_pt), TP_ARGS(pt, vendor_pt)); diff --git a/include/trace/hooks/pm_domain.h b/include/trace/hooks/pm_domain.h index 2a530d13eac0..66ae1659c4d6 100644 --- a/include/trace/hooks/pm_domain.h +++ b/include/trace/hooks/pm_domain.h @@ -10,7 +10,8 @@ #include -struct generic_pm_domain; +/* struct generic_pm_domain */ +#include DECLARE_HOOK(android_vh_allow_domain_state, TP_PROTO(struct generic_pm_domain *genpd, uint32_t idx, bool *allow), TP_ARGS(genpd, idx, allow)) diff --git a/include/trace/hooks/power.h b/include/trace/hooks/power.h index fad46611a570..3370705d0832 100644 --- a/include/trace/hooks/power.h +++ b/include/trace/hooks/power.h @@ -7,7 +7,8 @@ #define _TRACE_HOOK_POWER_H #include -struct task_struct; +/* struct task_struct */ +#include DECLARE_HOOK(android_vh_try_to_freeze_todo, TP_PROTO(unsigned int todo, unsigned int elapsed_msecs, bool wq_busy), TP_ARGS(todo, elapsed_msecs, wq_busy)); diff --git a/include/trace/hooks/regmap.h b/include/trace/hooks/regmap.h index cb6fc43d3472..5314112ec078 100644 --- a/include/trace/hooks/regmap.h +++ b/include/trace/hooks/regmap.h @@ -8,7 +8,8 @@ #define _TRACE_HOOK_REGMAP_H #include -struct regmap_config; +/* struct regmap_config */ +#include struct regmap; /* diff --git a/include/trace/hooks/remoteproc.h b/include/trace/hooks/remoteproc.h index bcd73a9792cf..fc35ef5c305c 100644 --- a/include/trace/hooks/remoteproc.h +++ b/include/trace/hooks/remoteproc.h @@ -7,11 +7,13 @@ #if !defined(_TRACE_HOOK_RPROC_H) || defined(TRACE_HEADER_MULTI_READ) #define _TRACE_HOOK_RPROC_H -struct rproc; +/* struct rproc */ +#include #include -struct rproc; +/* struct rproc */ +#include /* When recovery succeeds */ DECLARE_HOOK(android_vh_rproc_recovery, diff --git a/include/trace/hooks/rwsem.h b/include/trace/hooks/rwsem.h index e868d5ba398e..60245739cfff 100644 --- a/include/trace/hooks/rwsem.h +++ b/include/trace/hooks/rwsem.h @@ -10,8 +10,8 @@ * 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 DECLARE_HOOK(android_vh_rwsem_init, TP_PROTO(struct rw_semaphore *sem), TP_ARGS(sem)); diff --git a/include/trace/hooks/sched.h b/include/trace/hooks/sched.h index adc1345dd7f0..f0a5126024f2 100644 --- a/include/trace/hooks/sched.h +++ b/include/trace/hooks/sched.h @@ -9,7 +9,14 @@ * Following tracepoints are not exported in tracefs and provide a * mechanism for vendor modules to hook and extend functionality */ -struct task_struct; +/* struct cgroup_subsys_state */ +#include +/* struct em_perf_domain */ +#include +/* enum uclamp_id, struct sched_entity, struct task_struct, struct uclamp_se */ +#include +/* struct sched_attr */ +#include DECLARE_RESTRICTED_HOOK(android_rvh_select_task_rq_fair, TP_PROTO(struct task_struct *p, int prev_cpu, int sd_flag, int wake_flags, int *new_cpu), TP_ARGS(p, prev_cpu, sd_flag, wake_flags, new_cpu), 1); @@ -124,7 +131,6 @@ DECLARE_RESTRICTED_HOOK(android_rvh_find_energy_efficient_cpu, TP_PROTO(struct task_struct *p, int prev_cpu, int sync, int *new_cpu), TP_ARGS(p, prev_cpu, sync, new_cpu), 1); -struct sched_attr; DECLARE_HOOK(android_vh_set_sugov_sched_attr, TP_PROTO(struct sched_attr *attr), TP_ARGS(attr)); @@ -211,7 +217,6 @@ DECLARE_RESTRICTED_HOOK(android_rvh_account_irq_end, TP_PROTO(struct task_struct *curr, int cpu, s64 delta), TP_ARGS(curr, cpu, delta), 1); -struct sched_entity; DECLARE_RESTRICTED_HOOK(android_rvh_place_entity, TP_PROTO(struct cfs_rq *cfs_rq, struct sched_entity *se, int initial, u64 *vruntime), TP_ARGS(cfs_rq, se, initial, vruntime), 1); @@ -237,7 +242,6 @@ DECLARE_RESTRICTED_HOOK(android_rvh_cpu_cgroup_can_attach, TP_PROTO(struct cgroup_taskset *tset, int *retval), TP_ARGS(tset, retval), 1); -struct cgroup_subsys_state; DECLARE_RESTRICTED_HOOK(android_rvh_cpu_cgroup_online, TP_PROTO(struct cgroup_subsys_state *css), TP_ARGS(css), 1); @@ -263,7 +267,6 @@ DECLARE_HOOK(android_vh_map_util_freq, unsigned long cap, unsigned long *next_freq), TP_ARGS(util, freq, cap, next_freq)); -struct em_perf_domain; DECLARE_HOOK(android_vh_em_cpu_energy, TP_PROTO(struct em_perf_domain *pd, unsigned long max_util, unsigned long sum_util, @@ -323,8 +326,6 @@ DECLARE_HOOK(android_vh_irqtime_account_process_tick, TP_PROTO(struct task_struct *p, struct rq *rq, int user_tick, int ticks), TP_ARGS(p, rq, user_tick, ticks)); -enum uclamp_id; -struct uclamp_se; DECLARE_RESTRICTED_HOOK(android_rvh_uclamp_eff_get, TP_PROTO(struct task_struct *p, enum uclamp_id clamp_id, struct uclamp_se *uclamp_max, struct uclamp_se *uclamp_eff, int *ret), @@ -339,7 +340,6 @@ DECLARE_RESTRICTED_HOOK(android_rvh_after_dequeue_task, TP_ARGS(rq, p, flags), 1); struct cfs_rq; -struct sched_entity; struct rq_flags; DECLARE_RESTRICTED_HOOK(android_rvh_enqueue_entity, TP_PROTO(struct cfs_rq *cfs, struct sched_entity *se), diff --git a/include/trace/hooks/sys.h b/include/trace/hooks/sys.h index e2d5d6d4fc14..3ece5d070666 100644 --- a/include/trace/hooks/sys.h +++ b/include/trace/hooks/sys.h @@ -7,7 +7,8 @@ #define _TRACE_HOOK_SYS_H #include -struct task_struct; +/* struct task_struct */ +#include DECLARE_HOOK(android_vh_syscall_prctl_finished, TP_PROTO(int option, struct task_struct *task), TP_ARGS(option, task)); diff --git a/include/trace/hooks/syscall_check.h b/include/trace/hooks/syscall_check.h index 56d8267297ca..2f7e62bbca2d 100644 --- a/include/trace/hooks/syscall_check.h +++ b/include/trace/hooks/syscall_check.h @@ -10,8 +10,10 @@ * Following tracepoints are not exported in tracefs and provide a * mechanism for vendor modules to hook and extend functionality */ -struct file; -union bpf_attr; +/* struct file */ +#include +/* union bpf_attr */ +#include DECLARE_HOOK(android_vh_check_mmap_file, TP_PROTO(const struct file *file, unsigned long prot, unsigned long flag, unsigned long ret), diff --git a/include/trace/hooks/thermal.h b/include/trace/hooks/thermal.h index a63f1e5e3acc..e0193df29f7c 100644 --- a/include/trace/hooks/thermal.h +++ b/include/trace/hooks/thermal.h @@ -10,6 +10,8 @@ #include #include +/* struct thermal_cooling_device, struct thermal_zone_device */ +#include DECLARE_HOOK(android_vh_modify_thermal_request_freq, TP_PROTO(struct cpufreq_policy *policy, unsigned long *request_freq), TP_ARGS(policy, request_freq)); @@ -34,12 +36,10 @@ DECLARE_HOOK(android_vh_thermal_power_cap, TP_PROTO(u32 *power_range), TP_ARGS(power_range)); -struct thermal_zone_device; DECLARE_HOOK(android_vh_get_thermal_zone_device, TP_PROTO(struct thermal_zone_device *tz), TP_ARGS(tz)); -struct thermal_cooling_device; DECLARE_HOOK(android_vh_disable_thermal_cooling_stats, TP_PROTO(struct thermal_cooling_device *cdev, int *disable_stats), TP_ARGS(cdev, disable_stats)); diff --git a/include/trace/hooks/timekeeping.h b/include/trace/hooks/timekeeping.h index 56c20963cc84..e9558e48ea54 100644 --- a/include/trace/hooks/timekeeping.h +++ b/include/trace/hooks/timekeeping.h @@ -9,7 +9,8 @@ #include -struct timekeeper; +/* struct timekeeper */ +#include DECLARE_RESTRICTED_HOOK(android_rvh_tk_based_time_sync, TP_PROTO(struct timekeeper *tk), TP_ARGS(tk), 1); diff --git a/include/trace/hooks/ufshcd.h b/include/trace/hooks/ufshcd.h index f0dc120bb4da..8c65a7bd57c4 100644 --- a/include/trace/hooks/ufshcd.h +++ b/include/trace/hooks/ufshcd.h @@ -9,8 +9,11 @@ * Following tracepoints are not exported in tracefs and provide a * mechanism for vendor modules to hook and extend functionality */ +/* struct request */ +#include +/* struct scsi_device */ +#include struct ufs_hba; -struct request; struct ufshcd_lrb; DECLARE_HOOK(android_vh_ufs_fill_prdt, @@ -48,7 +51,6 @@ DECLARE_HOOK(android_vh_ufs_check_int_errors, TP_PROTO(struct ufs_hba *hba, bool queue_eh_work), TP_ARGS(hba, queue_eh_work)); -struct scsi_device; DECLARE_HOOK(android_vh_ufs_update_sdev, TP_PROTO(struct scsi_device *sdev), TP_ARGS(sdev)); diff --git a/include/trace/hooks/usb.h b/include/trace/hooks/usb.h index 5f5dd68d981d..cc68488e8f5f 100644 --- a/include/trace/hooks/usb.h +++ b/include/trace/hooks/usb.h @@ -10,7 +10,8 @@ * Following tracepoints are not exported in tracefs and provide a * mechanism for vendor modules to hook and extend functionality */ -struct usb_device; +/* struct usb_device */ +#include DECLARE_HOOK(android_vh_usb_new_device_added, TP_PROTO(struct usb_device *udev, int *err), TP_ARGS(udev, err));