ANDROID: Add vendor hooks to signal.
Add vendor hook to get signal for vendor-specific tuning. Conflicts: drivers/android/vendor_hooks.c Bug: 184898838 Signed-off-by: Zhuguangqing <zhuguangqing@xiaomi.com> Change-Id: I83a28b0a6eb413976f4c57f2314d008ad792fa0d (cherry picked from commit d623f1ff724d5cdc0913e020b2a1b562868aa4d8)
This commit is contained in:
parent
fd2e5c65ed
commit
4f746c15d7
|
@ -66,6 +66,7 @@
|
|||
#include <trace/hooks/mmc.h>
|
||||
#include <trace/hooks/evdev.h>
|
||||
#include <trace/hooks/ipv4.h>
|
||||
#include <trace/hooks/signal.h>
|
||||
|
||||
/*
|
||||
* Export tracepoints that act as a bare tracehook (ie: have no trace event
|
||||
|
@ -92,6 +93,7 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_binder_priority_skip);
|
|||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_binder_set_priority);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_binder_restore_priority);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_binder_wakeup_ilocked);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_do_send_sig_info);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_alter_futex_plist_add);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_mutex_wait_start);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_mutex_wait_finish);
|
||||
|
|
|
@ -0,0 +1,17 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0 */
|
||||
#undef TRACE_SYSTEM
|
||||
#define TRACE_SYSTEM signal
|
||||
#undef TRACE_INCLUDE_PATH
|
||||
#define TRACE_INCLUDE_PATH trace/hooks
|
||||
#if !defined(_TRACE_HOOK_SIGNAL_H) || defined(TRACE_HEADER_MULTI_READ)
|
||||
#define _TRACE_HOOK_SIGNAL_H
|
||||
#include <linux/tracepoint.h>
|
||||
#include <trace/hooks/vendor_hooks.h>
|
||||
|
||||
struct task_struct;
|
||||
DECLARE_HOOK(android_vh_do_send_sig_info,
|
||||
TP_PROTO(int sig, struct task_struct *killer, struct task_struct *dst),
|
||||
TP_ARGS(sig, killer, dst));
|
||||
#endif /* _TRACE_HOOK_SIGNAL_H */
|
||||
/* This part must be outside protection */
|
||||
#include <trace/define_trace.h>
|
|
@ -56,6 +56,8 @@
|
|||
#include <asm/cacheflush.h>
|
||||
#include <asm/syscall.h> /* for syscall_get_* */
|
||||
|
||||
#undef CREATE_TRACE_POINTS
|
||||
#include <trace/hooks/signal.h>
|
||||
/*
|
||||
* SLAB caches for signal bits.
|
||||
*/
|
||||
|
@ -1289,7 +1291,7 @@ int do_send_sig_info(int sig, struct kernel_siginfo *info, struct task_struct *p
|
|||
{
|
||||
unsigned long flags;
|
||||
int ret = -ESRCH;
|
||||
|
||||
trace_android_vh_do_send_sig_info(sig, current, p);
|
||||
if (lock_task_sighand(p, &flags)) {
|
||||
ret = send_signal(sig, info, p, type);
|
||||
unlock_task_sighand(p, &flags);
|
||||
|
|
Loading…
Reference in New Issue