In order to implement our scheduling tuning policy in certain cases, we need to initialize the variables that we have defined in the user_struct. To achieve this, we will add a vendor hook to user.c at alloc_uid, which will ensure that our own logic is executed during the initialization of the user_struct. Bug: 425550656 Bug: 339371220 Bug: 187458531 Signed-off-by: heshuai1 <heshuai1@xiaomi.com> Change-Id: I078484aac2c3d396aba5971d6d0f491652f3781c (cherry picked from commit c9b8fa644f45e9c99da85d8947f6c7e06771f205) (cherry picked from commit 9ac0923ef565e4de4e1f35edcba6fcb7e45948c9) (cherry picked from commit f0b0ff9fdb8ea1ea56fc7e3c556efdcfa93ec763) [jstultz: Add magic ANDROID_KABI_DECLONLY incantations to try to quiet CRC errors, then split those out into a separate patch] Signed-off-by: John Stultz <jstultz@google.com>
23 lines
589 B
C
23 lines
589 B
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
#undef TRACE_SYSTEM
|
|
#define TRACE_SYSTEM user
|
|
#undef TRACE_INCLUDE_PATH
|
|
#define TRACE_INCLUDE_PATH trace/hooks
|
|
#if !defined(_TRACE_HOOK_USER_H) || defined(TRACE_HEADER_MULTI_READ)
|
|
#define _TRACE_HOOK_USER_H
|
|
#include <trace/hooks/vendor_hooks.h>
|
|
|
|
struct user_struct;
|
|
DECLARE_HOOK(android_vh_alloc_uid,
|
|
TP_PROTO(struct user_struct *user),
|
|
TP_ARGS(user));
|
|
|
|
DECLARE_HOOK(android_vh_free_user,
|
|
TP_PROTO(struct user_struct *up),
|
|
TP_ARGS(up));
|
|
|
|
#endif /* _TRACE_HOOK_USER_H */
|
|
/* This part must be outside protection */
|
|
#include <trace/define_trace.h>
|
|
|