ANDROID: GKI: use public type definitions in vendor hooks

This change is intended to reduce the chance of a missed ABI break
involving vendor hooks.

The following type is now fully defined in ABI XML.

* `struct timekeeper`

symbol '__traceiter_android_rvh_account_irq' changed
  CRC changed from 0x18e0dccf to 0x4e82c102

symbol '__traceiter_android_rvh_after_dequeue_task' changed
  CRC changed from 0x7efc419b to 0x1c0066e1

symbol '__traceiter_android_rvh_after_enqueue_task' changed
  CRC changed from 0xd6f0f603 to 0xf7eaafb8

... 75 omitted; 78 symbols have only CRC changes

Bug: 233047575
Change-Id: I8c04eede1b9d9e788abce95cb31dbd19916774ef
Signed-off-by: Giuliano Procida <gprocida@google.com>
This commit is contained in:
Giuliano Procida 2022-06-10 15:06:16 +01:00 committed by Carlos Llamas
parent 6b7259073e
commit d5f809c84d
32 changed files with 103 additions and 60 deletions

View File

@ -9,7 +9,8 @@
#include <trace/hooks/vendor_hooks.h> #include <trace/hooks/vendor_hooks.h>
struct usb_interface; /* struct usb_interface */
#include <linux/usb.h>
struct snd_usb_audio; struct snd_usb_audio;
DECLARE_HOOK(android_vh_audio_usb_offload_vendor_set, DECLARE_HOOK(android_vh_audio_usb_offload_vendor_set,

View File

@ -10,8 +10,11 @@
* 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
*/ */
struct binder_transaction; /* struct task_struct */
struct task_struct; #include <linux/sched.h>
/* struct binder_transaction_data */
#include <uapi/linux/android/binder.h>
#include <../drivers/android/binder_internal.h>
struct seq_file; struct seq_file;
DECLARE_HOOK(android_vh_binder_transaction_init, DECLARE_HOOK(android_vh_binder_transaction_init,
TP_PROTO(struct binder_transaction *t), TP_PROTO(struct binder_transaction *t),
@ -25,9 +28,6 @@ DECLARE_HOOK(android_vh_binder_set_priority,
DECLARE_HOOK(android_vh_binder_restore_priority, DECLARE_HOOK(android_vh_binder_restore_priority,
TP_PROTO(struct binder_transaction *t, struct task_struct *task), TP_PROTO(struct binder_transaction *t, struct task_struct *task),
TP_ARGS(t, task)); TP_ARGS(t, task));
struct binder_proc;
struct binder_thread;
struct binder_transaction_data;
DECLARE_HOOK(android_vh_binder_wakeup_ilocked, DECLARE_HOOK(android_vh_binder_wakeup_ilocked,
TP_PROTO(struct task_struct *task, bool sync, struct binder_proc *proc), TP_PROTO(struct task_struct *task, bool sync, struct binder_proc *proc),
TP_ARGS(task, sync, proc)); TP_ARGS(task, sync, proc));

View File

@ -10,7 +10,8 @@
#include <linux/tracepoint.h> #include <linux/tracepoint.h>
#include <trace/hooks/vendor_hooks.h> #include <trace/hooks/vendor_hooks.h>
struct blk_mq_tag_set; /* struct blk_mq_tag_set */
#include <linux/blk-mq.h>
struct blk_mq_tags; struct blk_mq_tags;
struct blk_mq_alloc_data; struct blk_mq_alloc_data;

View File

@ -7,12 +7,14 @@
#define _TRACE_HOOK_CGROUP_H #define _TRACE_HOOK_CGROUP_H
#include <trace/hooks/vendor_hooks.h> #include <trace/hooks/vendor_hooks.h>
struct task_struct; /* struct cgroup_subsys */
#include <linux/cgroup-defs.h>
/* struct task_struct */
#include <linux/sched.h>
DECLARE_HOOK(android_vh_cgroup_set_task, DECLARE_HOOK(android_vh_cgroup_set_task,
TP_PROTO(int ret, struct task_struct *task), TP_PROTO(int ret, struct task_struct *task),
TP_ARGS(ret, task)); TP_ARGS(ret, task));
struct cgroup_subsys;
struct cgroup_taskset; struct cgroup_taskset;
struct cgroup; struct cgroup;
DECLARE_HOOK(android_vh_cgroup_attach, DECLARE_HOOK(android_vh_cgroup_attach,

View File

@ -9,7 +9,8 @@
#include <trace/hooks/vendor_hooks.h> #include <trace/hooks/vendor_hooks.h>
struct cpuidle_device; /* struct cpuidle_device */
#include <linux/cpuidle.h>
DECLARE_HOOK(android_vh_cpu_idle_enter, DECLARE_HOOK(android_vh_cpu_idle_enter,
TP_PROTO(int *state, struct cpuidle_device *dev), TP_PROTO(int *state, struct cpuidle_device *dev),

View File

@ -10,7 +10,8 @@
* mechanism for vendor modules to hook and extend functionality * mechanism for vendor modules to hook and extend functionality
*/ */
struct cpuidle_device; /* struct cpuidle_device */
#include <linux/cpuidle.h>
DECLARE_HOOK(android_vh_cpuidle_psci_enter, DECLARE_HOOK(android_vh_cpuidle_psci_enter,
TP_PROTO(struct cpuidle_device *dev, bool s2idle), TP_PROTO(struct cpuidle_device *dev, bool s2idle),
TP_ARGS(dev, s2idle)); TP_ARGS(dev, s2idle));

View File

@ -10,8 +10,10 @@
* 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
*/ */
struct cred; /* struct cred */
struct task_struct; #include <linux/cred.h>
/* struct task_struct */
#include <linux/sched.h>
DECLARE_RESTRICTED_HOOK(android_rvh_commit_creds, DECLARE_RESTRICTED_HOOK(android_rvh_commit_creds,
TP_PROTO(const struct task_struct *task, const struct cred *new), TP_PROTO(const struct task_struct *task, const struct cred *new),
TP_ARGS(task, new), 1); TP_ARGS(task, new), 1);

View File

@ -11,7 +11,8 @@
#include <trace/hooks/vendor_hooks.h> #include <trace/hooks/vendor_hooks.h>
struct dma_buf; /* struct dma_buf */
#include <linux/dma-buf.h>
DECLARE_HOOK(android_vh_dma_buf_release, DECLARE_HOOK(android_vh_dma_buf_release,
TP_PROTO(struct dma_buf *data), TP_PROTO(struct dma_buf *data),
TP_ARGS(data)); TP_ARGS(data));

View File

@ -11,8 +11,10 @@
#include <trace/hooks/vendor_hooks.h> #include <trace/hooks/vendor_hooks.h>
struct drm_atomic_state; /* struct drm_atomic_state */
struct drm_crtc; #include <drm/drm_atomic.h>
/* struct drm_crtc */
#include <drm/drm_crtc.h>
DECLARE_HOOK(android_vh_drm_atomic_check_modeset, DECLARE_HOOK(android_vh_drm_atomic_check_modeset,
TP_PROTO(struct drm_atomic_state *state, struct drm_crtc *crtc, bool *allow), TP_PROTO(struct drm_atomic_state *state, struct drm_crtc *crtc, bool *allow),
TP_ARGS(state, crtc, allow)) TP_ARGS(state, crtc, allow))

View File

@ -11,7 +11,8 @@
#include <trace/hooks/vendor_hooks.h> #include <trace/hooks/vendor_hooks.h>
struct drm_framebuffer; /* struct drm_framebuffer */
#include <drm/drm_framebuffer.h>
DECLARE_HOOK(android_vh_atomic_remove_fb, DECLARE_HOOK(android_vh_atomic_remove_fb,
TP_PROTO(struct drm_framebuffer *fb, bool *allow), TP_PROTO(struct drm_framebuffer *fb, bool *allow),
TP_ARGS(fb, allow)) TP_ARGS(fb, allow))

View File

@ -10,7 +10,14 @@
* 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
*/ */
struct mutex; /* struct mutex */
#include <linux/mutex.h>
/* struct rt_mutex_base */
#include <linux/rtmutex.h>
/* struct rw_semaphore */
#include <linux/rwsem.h>
/* struct task_struct */
#include <linux/sched.h>
DECLARE_HOOK(android_vh_mutex_wait_start, DECLARE_HOOK(android_vh_mutex_wait_start,
TP_PROTO(struct mutex *lock), TP_PROTO(struct mutex *lock),
TP_ARGS(lock)); TP_ARGS(lock));
@ -21,7 +28,6 @@ DECLARE_HOOK(android_vh_mutex_init,
TP_PROTO(struct mutex *lock), TP_PROTO(struct mutex *lock),
TP_ARGS(lock)); TP_ARGS(lock));
struct rt_mutex_base;
DECLARE_HOOK(android_vh_rtmutex_wait_start, DECLARE_HOOK(android_vh_rtmutex_wait_start,
TP_PROTO(struct rt_mutex_base *lock), TP_PROTO(struct rt_mutex_base *lock),
TP_ARGS(lock)); TP_ARGS(lock));
@ -29,7 +35,6 @@ DECLARE_HOOK(android_vh_rtmutex_wait_finish,
TP_PROTO(struct rt_mutex_base *lock), TP_PROTO(struct rt_mutex_base *lock),
TP_ARGS(lock)); TP_ARGS(lock));
struct rw_semaphore;
DECLARE_HOOK(android_vh_rwsem_read_wait_start, DECLARE_HOOK(android_vh_rwsem_read_wait_start,
TP_PROTO(struct rw_semaphore *sem), TP_PROTO(struct rw_semaphore *sem),
TP_ARGS(sem)); TP_ARGS(sem));
@ -43,7 +48,6 @@ DECLARE_HOOK(android_vh_rwsem_write_wait_finish,
TP_PROTO(struct rw_semaphore *sem), TP_PROTO(struct rw_semaphore *sem),
TP_ARGS(sem)); TP_ARGS(sem));
struct task_struct;
DECLARE_HOOK(android_vh_sched_show_task, DECLARE_HOOK(android_vh_sched_show_task,
TP_PROTO(struct task_struct *task), TP_PROTO(struct task_struct *task),
TP_ARGS(task)); TP_ARGS(task));

View File

@ -7,7 +7,8 @@
#define _TRACE_HOOK_FIPS140_H #define _TRACE_HOOK_FIPS140_H
#include <trace/hooks/vendor_hooks.h> #include <trace/hooks/vendor_hooks.h>
struct crypto_aes_ctx; /* struct crypto_aes_ctx */
#include <crypto/aes.h>
/* /*
* These hooks exist only for the benefit of the FIPS140 crypto module, which * These hooks exist only for the benefit of the FIPS140 crypto module, which

View File

@ -9,7 +9,8 @@
#include <trace/hooks/vendor_hooks.h> #include <trace/hooks/vendor_hooks.h>
struct task_struct; /* struct task_struct */
#include <linux/sched.h>
DECLARE_HOOK(android_vh_is_fpsimd_save, DECLARE_HOOK(android_vh_is_fpsimd_save,
TP_PROTO(struct task_struct *prev, struct task_struct *next), TP_PROTO(struct task_struct *prev, struct task_struct *next),

View File

@ -8,8 +8,9 @@
#define _TRACE_HOOK_GIC_H #define _TRACE_HOOK_GIC_H
#include <trace/hooks/vendor_hooks.h> #include <trace/hooks/vendor_hooks.h>
/* struct irq_data */
#include <linux/irq.h>
struct gic_chip_data; struct gic_chip_data;
struct irq_data;
DECLARE_HOOK(android_vh_gic_resume, DECLARE_HOOK(android_vh_gic_resume,
TP_PROTO(struct gic_chip_data *gd), TP_PROTO(struct gic_chip_data *gd),

View File

@ -9,8 +9,10 @@
* 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
*/ */
struct irq_data; /* struct cpumask */
struct cpumask; #include <linux/cpumask.h>
/* struct irq_data */
#include <linux/irq.h>
DECLARE_HOOK(android_vh_gic_v3_affinity_init, DECLARE_HOOK(android_vh_gic_v3_affinity_init,
TP_PROTO(int irq, u32 offset, u64 *affinity), TP_PROTO(int irq, u32 offset, u64 *affinity),
TP_ARGS(irq, offset, affinity)); TP_ARGS(irq, offset, affinity));

View File

@ -11,11 +11,12 @@
#include <trace/hooks/vendor_hooks.h> #include <trace/hooks/vendor_hooks.h>
/* struct iova_domain */
#include <linux/iova.h>
DECLARE_RESTRICTED_HOOK(android_rvh_iommu_setup_dma_ops, DECLARE_RESTRICTED_HOOK(android_rvh_iommu_setup_dma_ops,
TP_PROTO(struct device *dev, u64 dma_base, u64 dma_limit), TP_PROTO(struct device *dev, u64 dma_base, u64 dma_limit),
TP_ARGS(dev, dma_base, dma_limit), 1); TP_ARGS(dev, dma_base, dma_limit), 1);
struct iova_domain;
DECLARE_HOOK(android_vh_iommu_iovad_alloc_iova, DECLARE_HOOK(android_vh_iommu_iovad_alloc_iova,
TP_PROTO(struct device *dev, struct iova_domain *iovad, dma_addr_t iova, size_t size), TP_PROTO(struct device *dev, struct iova_domain *iovad, dma_addr_t iova, size_t size),

View File

@ -6,10 +6,14 @@
#if !defined(_TRACE_HOOK_MMC_H) || defined(TRACE_HEADER_MULTI_READ) #if !defined(_TRACE_HOOK_MMC_H) || defined(TRACE_HEADER_MULTI_READ)
#define _TRACE_HOOK_MMC_H #define _TRACE_HOOK_MMC_H
#include <trace/hooks/vendor_hooks.h> #include <trace/hooks/vendor_hooks.h>
struct blk_mq_queue_data; /* struct blk_mq_queue_data */
struct mmc_host; #include <linux/blk-mq.h>
struct mmc_card; /* struct mmc_host */
struct sdhci_host; #include <linux/mmc/host.h>
/* struct mmc_card */
#include <linux/mmc/card.h>
/* struct sdhci_host */
#include "../../drivers/mmc/host/sdhci.h"
/* /*
* Following tracepoints are not exported in tracefs and provide a * Following tracepoints are not exported in tracefs and provide a

View File

@ -10,7 +10,8 @@
* 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
*/ */
struct module; /* struct module */
#include <linux/module.h>
DECLARE_HOOK(android_vh_set_module_permit_before_init, DECLARE_HOOK(android_vh_set_module_permit_before_init,
TP_PROTO(const struct module *mod), TP_PROTO(const struct module *mod),
TP_ARGS(mod)); TP_ARGS(mod));

View File

@ -10,7 +10,8 @@
* 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
*/ */
struct task_struct; /* struct task_struct */
#include <linux/sched.h>
DECLARE_HOOK(android_vh_mpam_set, DECLARE_HOOK(android_vh_mpam_set,
TP_PROTO(struct task_struct *prev, struct task_struct *next), TP_PROTO(struct task_struct *prev, struct task_struct *next),
TP_ARGS(prev, next)); TP_ARGS(prev, next));

View File

@ -8,9 +8,12 @@
#define _TRACE_HOOK_NET_VH_H #define _TRACE_HOOK_NET_VH_H
#include <trace/hooks/vendor_hooks.h> #include <trace/hooks/vendor_hooks.h>
struct packet_type; /* struct packet_type */
struct list_head; #include <linux/netdevice.h>
struct sk_buff; /* struct sk_buff */
#include <linux/skbuff.h>
/* struct list_head */
#include <linux/types.h>
DECLARE_HOOK(android_vh_ptype_head, DECLARE_HOOK(android_vh_ptype_head,
TP_PROTO(const struct packet_type *pt, struct list_head *vendor_pt), TP_PROTO(const struct packet_type *pt, struct list_head *vendor_pt),
TP_ARGS(pt, vendor_pt)); TP_ARGS(pt, vendor_pt));

View File

@ -10,7 +10,8 @@
#include <trace/hooks/vendor_hooks.h> #include <trace/hooks/vendor_hooks.h>
struct generic_pm_domain; /* struct generic_pm_domain */
#include <linux/pm_domain.h>
DECLARE_HOOK(android_vh_allow_domain_state, DECLARE_HOOK(android_vh_allow_domain_state,
TP_PROTO(struct generic_pm_domain *genpd, uint32_t idx, bool *allow), TP_PROTO(struct generic_pm_domain *genpd, uint32_t idx, bool *allow),
TP_ARGS(genpd, idx, allow)) TP_ARGS(genpd, idx, allow))

View File

@ -7,7 +7,8 @@
#define _TRACE_HOOK_POWER_H #define _TRACE_HOOK_POWER_H
#include <trace/hooks/vendor_hooks.h> #include <trace/hooks/vendor_hooks.h>
struct task_struct; /* struct task_struct */
#include <linux/sched.h>
DECLARE_HOOK(android_vh_try_to_freeze_todo, DECLARE_HOOK(android_vh_try_to_freeze_todo,
TP_PROTO(unsigned int todo, unsigned int elapsed_msecs, bool wq_busy), TP_PROTO(unsigned int todo, unsigned int elapsed_msecs, bool wq_busy),
TP_ARGS(todo, elapsed_msecs, wq_busy)); TP_ARGS(todo, elapsed_msecs, wq_busy));

View File

@ -8,7 +8,8 @@
#define _TRACE_HOOK_REGMAP_H #define _TRACE_HOOK_REGMAP_H
#include <trace/hooks/vendor_hooks.h> #include <trace/hooks/vendor_hooks.h>
struct regmap_config; /* struct regmap_config */
#include <linux/regmap.h>
struct regmap; struct regmap;
/* /*

View File

@ -7,11 +7,13 @@
#if !defined(_TRACE_HOOK_RPROC_H) || defined(TRACE_HEADER_MULTI_READ) #if !defined(_TRACE_HOOK_RPROC_H) || defined(TRACE_HEADER_MULTI_READ)
#define _TRACE_HOOK_RPROC_H #define _TRACE_HOOK_RPROC_H
struct rproc; /* struct rproc */
#include <linux/remoteproc.h>
#include <trace/hooks/vendor_hooks.h> #include <trace/hooks/vendor_hooks.h>
struct rproc; /* struct rproc */
#include <linux/remoteproc.h>
/* When recovery succeeds */ /* When recovery succeeds */
DECLARE_HOOK(android_vh_rproc_recovery, DECLARE_HOOK(android_vh_rproc_recovery,

View File

@ -10,8 +10,8 @@
* 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) #if defined(CONFIG_TRACEPOINTS) && defined(CONFIG_ANDROID_VENDOR_HOOKS)
struct rw_semaphore; /* struct rw_semaphore, struct rwsem_waiter */
struct rwsem_waiter; #include <linux/rwsem.h>
DECLARE_HOOK(android_vh_rwsem_init, DECLARE_HOOK(android_vh_rwsem_init,
TP_PROTO(struct rw_semaphore *sem), TP_PROTO(struct rw_semaphore *sem),
TP_ARGS(sem)); TP_ARGS(sem));

View File

@ -9,7 +9,14 @@
* 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
*/ */
struct task_struct; /* struct cgroup_subsys_state */
#include <linux/cgroup-defs.h>
/* struct em_perf_domain */
#include <linux/energy_model.h>
/* enum uclamp_id, struct sched_entity, struct task_struct, struct uclamp_se */
#include <linux/sched.h>
/* struct sched_attr */
#include <uapi/linux/sched/types.h>
DECLARE_RESTRICTED_HOOK(android_rvh_select_task_rq_fair, 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_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); 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_PROTO(struct task_struct *p, int prev_cpu, int sync, int *new_cpu),
TP_ARGS(p, prev_cpu, sync, new_cpu), 1); TP_ARGS(p, prev_cpu, sync, new_cpu), 1);
struct sched_attr;
DECLARE_HOOK(android_vh_set_sugov_sched_attr, DECLARE_HOOK(android_vh_set_sugov_sched_attr,
TP_PROTO(struct sched_attr *attr), TP_PROTO(struct sched_attr *attr),
TP_ARGS(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_PROTO(struct task_struct *curr, int cpu, s64 delta),
TP_ARGS(curr, cpu, delta), 1); TP_ARGS(curr, cpu, delta), 1);
struct sched_entity;
DECLARE_RESTRICTED_HOOK(android_rvh_place_entity, DECLARE_RESTRICTED_HOOK(android_rvh_place_entity,
TP_PROTO(struct cfs_rq *cfs_rq, struct sched_entity *se, int initial, u64 *vruntime), TP_PROTO(struct cfs_rq *cfs_rq, struct sched_entity *se, int initial, u64 *vruntime),
TP_ARGS(cfs_rq, se, initial, vruntime), 1); 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_PROTO(struct cgroup_taskset *tset, int *retval),
TP_ARGS(tset, retval), 1); TP_ARGS(tset, retval), 1);
struct cgroup_subsys_state;
DECLARE_RESTRICTED_HOOK(android_rvh_cpu_cgroup_online, DECLARE_RESTRICTED_HOOK(android_rvh_cpu_cgroup_online,
TP_PROTO(struct cgroup_subsys_state *css), TP_PROTO(struct cgroup_subsys_state *css),
TP_ARGS(css), 1); TP_ARGS(css), 1);
@ -263,7 +267,6 @@ DECLARE_HOOK(android_vh_map_util_freq,
unsigned long cap, unsigned long *next_freq), unsigned long cap, unsigned long *next_freq),
TP_ARGS(util, freq, cap, next_freq)); TP_ARGS(util, freq, cap, next_freq));
struct em_perf_domain;
DECLARE_HOOK(android_vh_em_cpu_energy, DECLARE_HOOK(android_vh_em_cpu_energy,
TP_PROTO(struct em_perf_domain *pd, TP_PROTO(struct em_perf_domain *pd,
unsigned long max_util, unsigned long sum_util, 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_PROTO(struct task_struct *p, struct rq *rq, int user_tick, int ticks),
TP_ARGS(p, rq, user_tick, ticks)); TP_ARGS(p, rq, user_tick, ticks));
enum uclamp_id;
struct uclamp_se;
DECLARE_RESTRICTED_HOOK(android_rvh_uclamp_eff_get, DECLARE_RESTRICTED_HOOK(android_rvh_uclamp_eff_get,
TP_PROTO(struct task_struct *p, enum uclamp_id clamp_id, TP_PROTO(struct task_struct *p, enum uclamp_id clamp_id,
struct uclamp_se *uclamp_max, struct uclamp_se *uclamp_eff, int *ret), 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); TP_ARGS(rq, p, flags), 1);
struct cfs_rq; struct cfs_rq;
struct sched_entity;
struct rq_flags; struct rq_flags;
DECLARE_RESTRICTED_HOOK(android_rvh_enqueue_entity, DECLARE_RESTRICTED_HOOK(android_rvh_enqueue_entity,
TP_PROTO(struct cfs_rq *cfs, struct sched_entity *se), TP_PROTO(struct cfs_rq *cfs, struct sched_entity *se),

View File

@ -7,7 +7,8 @@
#define _TRACE_HOOK_SYS_H #define _TRACE_HOOK_SYS_H
#include <trace/hooks/vendor_hooks.h> #include <trace/hooks/vendor_hooks.h>
struct task_struct; /* struct task_struct */
#include <linux/sched.h>
DECLARE_HOOK(android_vh_syscall_prctl_finished, DECLARE_HOOK(android_vh_syscall_prctl_finished,
TP_PROTO(int option, struct task_struct *task), TP_PROTO(int option, struct task_struct *task),
TP_ARGS(option, task)); TP_ARGS(option, task));

View File

@ -10,8 +10,10 @@
* 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
*/ */
struct file; /* struct file */
union bpf_attr; #include <linux/fs.h>
/* union bpf_attr */
#include <uapi/linux/bpf.h>
DECLARE_HOOK(android_vh_check_mmap_file, DECLARE_HOOK(android_vh_check_mmap_file,
TP_PROTO(const struct file *file, unsigned long prot, TP_PROTO(const struct file *file, unsigned long prot,
unsigned long flag, unsigned long ret), unsigned long flag, unsigned long ret),

View File

@ -10,6 +10,8 @@
#include <trace/hooks/vendor_hooks.h> #include <trace/hooks/vendor_hooks.h>
#include <linux/cpufreq.h> #include <linux/cpufreq.h>
/* struct thermal_cooling_device, struct thermal_zone_device */
#include <linux/thermal.h>
DECLARE_HOOK(android_vh_modify_thermal_request_freq, DECLARE_HOOK(android_vh_modify_thermal_request_freq,
TP_PROTO(struct cpufreq_policy *policy, unsigned long *request_freq), TP_PROTO(struct cpufreq_policy *policy, unsigned long *request_freq),
TP_ARGS(policy, request_freq)); TP_ARGS(policy, request_freq));
@ -34,12 +36,10 @@ DECLARE_HOOK(android_vh_thermal_power_cap,
TP_PROTO(u32 *power_range), TP_PROTO(u32 *power_range),
TP_ARGS(power_range)); TP_ARGS(power_range));
struct thermal_zone_device;
DECLARE_HOOK(android_vh_get_thermal_zone_device, DECLARE_HOOK(android_vh_get_thermal_zone_device,
TP_PROTO(struct thermal_zone_device *tz), TP_PROTO(struct thermal_zone_device *tz),
TP_ARGS(tz)); TP_ARGS(tz));
struct thermal_cooling_device;
DECLARE_HOOK(android_vh_disable_thermal_cooling_stats, DECLARE_HOOK(android_vh_disable_thermal_cooling_stats,
TP_PROTO(struct thermal_cooling_device *cdev, int *disable_stats), TP_PROTO(struct thermal_cooling_device *cdev, int *disable_stats),
TP_ARGS(cdev, disable_stats)); TP_ARGS(cdev, disable_stats));

View File

@ -9,7 +9,8 @@
#include <trace/hooks/vendor_hooks.h> #include <trace/hooks/vendor_hooks.h>
struct timekeeper; /* struct timekeeper */
#include <linux/timekeeper_internal.h>
DECLARE_RESTRICTED_HOOK(android_rvh_tk_based_time_sync, DECLARE_RESTRICTED_HOOK(android_rvh_tk_based_time_sync,
TP_PROTO(struct timekeeper *tk), TP_PROTO(struct timekeeper *tk),
TP_ARGS(tk), 1); TP_ARGS(tk), 1);

View File

@ -9,8 +9,11 @@
* 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
*/ */
/* struct request */
#include <linux/blkdev.h>
/* struct scsi_device */
#include <scsi/scsi_device.h>
struct ufs_hba; struct ufs_hba;
struct request;
struct ufshcd_lrb; struct ufshcd_lrb;
DECLARE_HOOK(android_vh_ufs_fill_prdt, 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_PROTO(struct ufs_hba *hba, bool queue_eh_work),
TP_ARGS(hba, queue_eh_work)); TP_ARGS(hba, queue_eh_work));
struct scsi_device;
DECLARE_HOOK(android_vh_ufs_update_sdev, DECLARE_HOOK(android_vh_ufs_update_sdev,
TP_PROTO(struct scsi_device *sdev), TP_PROTO(struct scsi_device *sdev),
TP_ARGS(sdev)); TP_ARGS(sdev));

View File

@ -10,7 +10,8 @@
* 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
*/ */
struct usb_device; /* struct usb_device */
#include <linux/usb.h>
DECLARE_HOOK(android_vh_usb_new_device_added, DECLARE_HOOK(android_vh_usb_new_device_added,
TP_PROTO(struct usb_device *udev, int *err), TP_PROTO(struct usb_device *udev, int *err),
TP_ARGS(udev, err)); TP_ARGS(udev, err));