Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ANDROID: hung_task: Add vendor hook for hung task detect
Add vendor hook for hung task detect, so we can decide which threads need to check, avoiding false alarms. And the NULL tracehook is used to indicate one check cycle is finished, so additional checks can be done after one hung task check cycle. Bug: 188684133 Change-Id: I5d7dfeb071cbfda8121134c38a458202aaa3a8c6 Signed-off-by: Huang Yiwei <quic_hyiwei@quicinc.com>
- Loading branch information
Huang Yiwei
committed
Jan 30, 2023
1 parent
b5a5282
commit 3e4fa52
Showing
3 changed files
with
38 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
/* SPDX-License-Identifier: GPL-2.0 */ | ||
#undef TRACE_SYSTEM | ||
#define TRACE_SYSTEM hung_task | ||
|
||
#define TRACE_INCLUDE_PATH trace/hooks | ||
|
||
#if !defined(_TRACE_HOOK_HUNG_TASK_H) || defined(TRACE_HEADER_MULTI_READ) | ||
#define _TRACE_HOOK_HUNG_TASK_H | ||
|
||
#include <trace/hooks/vendor_hooks.h> | ||
|
||
DECLARE_HOOK(android_vh_check_uninterrupt_tasks, | ||
TP_PROTO(struct task_struct *t, unsigned long timeout, | ||
bool *need_check), | ||
TP_ARGS(t, timeout, need_check)); | ||
|
||
DECLARE_HOOK(android_vh_check_uninterrupt_tasks_done, | ||
TP_PROTO(void *unused), | ||
TP_ARGS(unused)); | ||
|
||
#endif /* _TRACE_HOOK_HUNG_TASK_H */ | ||
/* This part must be outside protection */ | ||
#include <trace/define_trace.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters