mirror of
https://github.com/torvalds/linux.git
synced 2026-06-06 21:45:45 +02:00
ANDROID: Add vendor hooks when syscall prctl finished
Add vendor hook when syscall prctl finished for vendor-specific tuning. Bug: 181819699 Signed-off-by: Frankie Chang <frankie.chang@mediatek.com> Change-Id: Ica42d80ab4b540045330e9c5b211e0e814eed0ff (cherry picked from commit d150b26653e7a3d15383a09384aace140b537ff4)
This commit is contained in:
parent
02a9f884d5
commit
772beecd5b
|
|
@ -39,6 +39,7 @@
|
|||
#include <trace/hooks/thermal.h>
|
||||
#include <trace/hooks/ufshcd.h>
|
||||
#include <trace/hooks/cgroup.h>
|
||||
#include <trace/hooks/sys.h>
|
||||
|
||||
/*
|
||||
* Export tracepoints that act as a bare tracehook (ie: have no trace event
|
||||
|
|
@ -174,3 +175,4 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_set_wake_flags);
|
|||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_uclamp_eff_value);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_cpufreq_transition);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_cgroup_set_task);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_syscall_prctl_finished);
|
||||
|
|
|
|||
17
include/trace/hooks/sys.h
Normal file
17
include/trace/hooks/sys.h
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0 */
|
||||
#undef TRACE_SYSTEM
|
||||
#define TRACE_SYSTEM sys
|
||||
#undef TRACE_INCLUDE_PATH
|
||||
#define TRACE_INCLUDE_PATH trace/hooks
|
||||
#if !defined(_TRACE_HOOK_SYS_H) || defined(TRACE_HEADER_MULTI_READ)
|
||||
#define _TRACE_HOOK_SYS_H
|
||||
#include <linux/tracepoint.h>
|
||||
#include <trace/hooks/vendor_hooks.h>
|
||||
|
||||
struct task_struct;
|
||||
DECLARE_HOOK(android_vh_syscall_prctl_finished,
|
||||
TP_PROTO(int option, struct task_struct *task),
|
||||
TP_ARGS(option, task));
|
||||
#endif
|
||||
|
||||
#include <trace/define_trace.h>
|
||||
|
|
@ -76,6 +76,8 @@
|
|||
|
||||
#include "uid16.h"
|
||||
|
||||
#include <trace/hooks/sys.h>
|
||||
|
||||
#ifndef SET_UNALIGN_CTL
|
||||
# define SET_UNALIGN_CTL(a, b) (-EINVAL)
|
||||
#endif
|
||||
|
|
@ -2686,6 +2688,7 @@ SYSCALL_DEFINE5(prctl, int, option, unsigned long, arg2, unsigned long, arg3,
|
|||
error = -EINVAL;
|
||||
break;
|
||||
}
|
||||
trace_android_vh_syscall_prctl_finished(option, me);
|
||||
return error;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user