Revert "Revert "ANDROID: workqueue: add vendor hook for wq lockup information""

This reverts commit 7a6ea55aa0.

This hook was removed because there is no user.
But the new project needs this hook.

Bug: 263703180

Change-Id: I14e286fd6d426d4ffdb4cb440477f0fae65e980e
Signed-off-by: Sangmoon Kim <sangmoon.kim@samsung.com>
This commit is contained in:
Sangmoon Kim
2022-12-26 20:53:40 +09:00
committed by Treehugger Robot
parent f2a236c7ae
commit b42eddeb28
3 changed files with 25 additions and 0 deletions

View File

@@ -41,6 +41,7 @@
#include <trace/hooks/topology.h>
#include <trace/hooks/mpam.h>
#include <trace/hooks/gic.h>
#include <trace/hooks/wqlockup.h>
#include <trace/hooks/debug.h>
#include <trace/hooks/sysrqcrash.h>
#include <trace/hooks/printk.h>
@@ -148,6 +149,7 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_cpu_idle_exit);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_mpam_set);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_find_busiest_group);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_gic_resume);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_wq_lockup_pool);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_ipi_stop);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_sysrq_crash);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_dump_throttled_rt_tasks);

View File

@@ -0,0 +1,21 @@
/* SPDX-License-Identifier: GPL-2.0 */
#undef TRACE_SYSTEM
#define TRACE_SYSTEM wqlockup
#define TRACE_INCLUDE_PATH trace/hooks
#if !defined(_TRACE_HOOK_WQLOCKUP_H) || defined(TRACE_HEADER_MULTI_READ)
#define _TRACE_HOOK_WQLOCKUP_H
#include <trace/hooks/vendor_hooks.h>
/*
* Following tracepoints are not exported in tracefs and provide a
* mechanism for vendor modules to hook and extend functionality
*/
DECLARE_HOOK(android_vh_wq_lockup_pool,
TP_PROTO(int cpu, unsigned long pool_ts),
TP_ARGS(cpu, pool_ts));
/* macro versions of hooks are no longer required */
#endif /* _TRACE_HOOK_WQLOCKUP_H */
/* This part must be outside protection */
#include <trace/define_trace.h>

View File

@@ -54,6 +54,7 @@
#include "workqueue_internal.h"
#include <trace/hooks/wqlockup.h>
#include <trace/hooks/workqueue.h>
/* events/workqueue.h uses default TRACE_INCLUDE_PATH */
#undef TRACE_INCLUDE_PATH
@@ -5842,6 +5843,7 @@ static void wq_watchdog_timer_fn(struct timer_list *unused)
pr_cont_pool_info(pool);
pr_cont(" stuck for %us!\n",
jiffies_to_msecs(now - pool_ts) / 1000);
trace_android_vh_wq_lockup_pool(pool->cpu, pool_ts);
}
}