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
55 lines
1.6 KiB
C
55 lines
1.6 KiB
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
#undef TRACE_SYSTEM
|
|
#define TRACE_SYSTEM cgroup
|
|
#undef TRACE_INCLUDE_PATH
|
|
#define TRACE_INCLUDE_PATH trace/hooks
|
|
#if !defined(_TRACE_HOOK_CGROUP_H) || defined(TRACE_HEADER_MULTI_READ)
|
|
#define _TRACE_HOOK_CGROUP_H
|
|
#include <trace/hooks/vendor_hooks.h>
|
|
|
|
struct cgroup;
|
|
struct cgroup_taskset;
|
|
struct cgroup_subsys;
|
|
struct cgroup_subsys_state;
|
|
struct task_struct;
|
|
|
|
DECLARE_HOOK(android_vh_cgroup_set_task,
|
|
TP_PROTO(int ret, struct task_struct *task),
|
|
TP_ARGS(ret, task));
|
|
|
|
DECLARE_HOOK(android_vh_cgroup_attach,
|
|
TP_PROTO(struct cgroup_subsys *ss, struct cgroup_taskset *tset),
|
|
TP_ARGS(ss, tset))
|
|
DECLARE_RESTRICTED_HOOK(android_rvh_cgroup_force_kthread_migration,
|
|
TP_PROTO(struct task_struct *tsk, struct cgroup *dst_cgrp, bool *force_migration),
|
|
TP_ARGS(tsk, dst_cgrp, force_migration), 1);
|
|
struct mem_cgroup;
|
|
DECLARE_HOOK(android_rvh_memcgv2_init,
|
|
TP_PROTO(struct mem_cgroup *memcg),
|
|
TP_ARGS(memcg));
|
|
|
|
DECLARE_HOOK(android_rvh_memcgv2_calc_decayed_watermark,
|
|
TP_PROTO(struct mem_cgroup *memcg),
|
|
TP_ARGS(memcg));
|
|
|
|
struct page_counter;
|
|
DECLARE_HOOK(android_rvh_update_watermark,
|
|
TP_PROTO(u64 new, struct page_counter *counter),
|
|
TP_ARGS(new, counter));
|
|
|
|
DECLARE_RESTRICTED_HOOK(android_rvh_cpu_cgroup_attach,
|
|
TP_PROTO(struct cgroup_taskset *tset),
|
|
TP_ARGS(tset), 1);
|
|
|
|
DECLARE_RESTRICTED_HOOK(android_rvh_cpu_cgroup_can_attach,
|
|
TP_PROTO(struct cgroup_taskset *tset, int *retval),
|
|
TP_ARGS(tset, retval), 1);
|
|
|
|
DECLARE_RESTRICTED_HOOK(android_rvh_cpu_cgroup_online,
|
|
TP_PROTO(struct cgroup_subsys_state *css),
|
|
TP_ARGS(css), 1);
|
|
|
|
#endif
|
|
|
|
#include <trace/define_trace.h>
|