Files
android_kernel_xiaomi_sm8450/include/trace/hooks/cgroup.h
Elliot Berman 12f4322442 ANDROID: vendor_hooks: Guard cgroup struct with CONFIG_CGROUPS
See commit 573c7f061d ("ANDROID: Guard hooks with their CONFIG_
options"). Needed to do CGROUPS as well due to cgroup_subsys definition
being guarded by CONFIG_CGROUPS in include/linux/cgroup-defs.h.

Bug: 240404657
Change-Id: Ie51f053a9e82ef8d7d1c149374ac02608717429d
Signed-off-by: Elliot Berman <quic_eberman@quicinc.com>
2022-08-01 17:43:07 -07:00

44 lines
1.3 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 <linux/tracepoint.h>
#include <trace/hooks/vendor_hooks.h>
struct cgroup_taskset;
#if defined(__GENKSYMS__) || !IS_ENABLED(CONFIG_CGROUPS)
struct cgroup_subsys;
#else
/* struct cgroup_subsys */
#include <linux/cgroup-defs.h>
#endif
#ifdef __GENKSYMS__
struct task_struct;
#else
/* struct task_struct */
#include <linux/sched.h>
#endif /* __GENKSYMS__ */
DECLARE_HOOK(android_vh_cgroup_set_task,
TP_PROTO(int ret, struct task_struct *task),
TP_ARGS(ret, task));
DECLARE_RESTRICTED_HOOK(android_rvh_cpuset_fork,
TP_PROTO(struct task_struct *p, int *inherit_cpus),
TP_ARGS(p, inherit_cpus), 1);
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);
DECLARE_RESTRICTED_HOOK(android_rvh_refrigerator,
TP_PROTO(bool f),
TP_ARGS(f), 1);
DECLARE_HOOK(android_vh_cgroup_attach,
TP_PROTO(struct cgroup_subsys *ss, struct cgroup_taskset *tset),
TP_ARGS(ss, tset))
#endif
#include <trace/define_trace.h>