ANDROID: vendor_hooks: add waiting information for blocked tasks

- Add the hook to print messages for sched_show_task.

Bug: 162776704
Signed-off-by: Sangmoon Kim <sangmoon.kim@samsung.com>
Change-Id: Ib436fbd8d0ad509c3b5a73ea8f5170e0761a13fd
(cherry picked from commit 9ad8ff902e)
(cherry picked from commit b519ac423787d38f467ca479d2126b7204d6f498)
This commit is contained in:
Sangmoon Kim
2020-08-05 22:13:43 +09:00
committed by Treehugger Robot
parent d28522eb37
commit f0ff9d0ac5
3 changed files with 22 additions and 0 deletions
+2
View File
@@ -35,6 +35,7 @@
#include <trace/hooks/remoteproc.h>
#include <trace/hooks/timer.h>
#include <trace/hooks/fpsimd.h>
#include <trace/hooks/dtask.h>
/*
* Export tracepoints that act as a bare tracehook (ie: have no trace event
@@ -95,3 +96,4 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_rproc_recovery);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_rproc_recovery_set);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_timer_calc_index);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_is_fpsimd_save);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_sched_show_task);
+18
View File
@@ -0,0 +1,18 @@
/* SPDX-License-Identifier: GPL-2.0 */
#undef TRACE_SYSTEM
#define TRACE_SYSTEM dtask
#define TRACE_INCLUDE_PATH trace/hooks
#if !defined(_TRACE_HOOK_DTASK_H) || defined(TRACE_HEADER_MULTI_READ)
#define _TRACE_HOOK_DTASK_H
#include <trace/hooks/vendor_hooks.h>
struct task_struct;
DECLARE_HOOK(android_vh_sched_show_task,
TP_PROTO(struct task_struct *task),
TP_ARGS(task));
#endif /* _TRACE_HOOK_DTASK_H */
/* This part must be outside protection */
#include <trace/define_trace.h>
+2
View File
@@ -99,6 +99,7 @@
#include <trace/hooks/sched.h>
#include <trace/hooks/cgroup.h>
#include <trace/hooks/dtask.h>
EXPORT_TRACEPOINT_SYMBOL_GPL(ipi_send_cpu);
EXPORT_TRACEPOINT_SYMBOL_GPL(ipi_send_cpumask);
@@ -7689,6 +7690,7 @@ void sched_show_task(struct task_struct *p)
print_worker_info(KERN_INFO, p);
print_stop_info(KERN_INFO, p);
print_scx_info(KERN_INFO, p);
trace_android_vh_sched_show_task(p);
show_stack(p, NULL, KERN_INFO);
put_task_stack(p);
}