mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-08 11:50:43 +09:00
ANDROID: softlockup: add vendor hook for a softlockup task
Add hook to gather data of softlockup and summarize it with other information. Bug: 222638752 Signed-off-by: Sangmoon Kim <sangmoon.kim@samsung.com> Change-Id: I5263bbd573c3fa4b4c981ac26c943721ce09506d
This commit is contained in:
@@ -46,6 +46,7 @@
|
||||
#include <trace/hooks/remoteproc.h>
|
||||
#include <trace/hooks/hung_task.h>
|
||||
#include <trace/hooks/bug.h>
|
||||
#include <trace/hooks/softlockup.h>
|
||||
|
||||
/*
|
||||
* Export tracepoints that act as a bare tracehook (ie: have no trace event
|
||||
@@ -227,3 +228,4 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_setscheduler_uclamp);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_do_wake_up_sync);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_set_wake_flags);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_report_bug);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_watchdog_timer_softlockup);
|
||||
|
||||
18
include/trace/hooks/softlockup.h
Normal file
18
include/trace/hooks/softlockup.h
Normal file
@@ -0,0 +1,18 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 */
|
||||
#undef TRACE_SYSTEM
|
||||
#define TRACE_SYSTEM softlockup
|
||||
#define TRACE_INCLUDE_PATH trace/hooks
|
||||
|
||||
#if !defined(_TRACE_HOOK_SOFTLOCKUP_H) || defined(TRACE_HEADER_MULTI_READ)
|
||||
#define _TRACE_HOOK_SOFTLOCKUP_H
|
||||
#include <linux/tracepoint.h>
|
||||
#include <trace/hooks/vendor_hooks.h>
|
||||
|
||||
struct pt_regs;
|
||||
DECLARE_HOOK(android_vh_watchdog_timer_softlockup,
|
||||
TP_PROTO(int duration, struct pt_regs *regs, bool is_panic),
|
||||
TP_ARGS(duration, regs, is_panic));
|
||||
|
||||
#endif /* _TRACE_HOOK_SOFTLOCKUP_H */
|
||||
/* This part must be outside protection */
|
||||
#include <trace/define_trace.h>
|
||||
@@ -27,6 +27,8 @@
|
||||
#include <asm/irq_regs.h>
|
||||
#include <linux/kvm_para.h>
|
||||
|
||||
#include <trace/hooks/softlockup.h>
|
||||
|
||||
static DEFINE_MUTEX(watchdog_mutex);
|
||||
|
||||
#if defined(CONFIG_HARDLOCKUP_DETECTOR) || defined(CONFIG_HAVE_NMI_WATCHDOG)
|
||||
@@ -439,6 +441,7 @@ static enum hrtimer_restart watchdog_timer_fn(struct hrtimer *hrtimer)
|
||||
clear_bit_unlock(0, &soft_lockup_nmi_warn);
|
||||
}
|
||||
|
||||
trace_android_vh_watchdog_timer_softlockup(duration, regs, !!softlockup_panic);
|
||||
add_taint(TAINT_SOFTLOCKUP, LOCKDEP_STILL_OK);
|
||||
if (softlockup_panic)
|
||||
panic("softlockup: hung tasks");
|
||||
|
||||
Reference in New Issue
Block a user