ANDROID: vendor_hooks: Add hooks for oem percpu-rwsem optimaton

Recently we have discovered many lag issues caused by percpu_rwsem
lock-holding tasks not being scheduled for a long time. we need to
identify them and provide appropriate scheduling protection in our
oem scheduler.
To support this, we add one hook below:
	trace_android_vh_percpu_rwsem_wq_add

Bug: 301066838
Change-Id: Id770c1a7978842abfc62d3fa9aeb5ac7a1904972
Signed-off-by: xieliujie <xieliujie@oppo.com>
This commit is contained in:
xieliujie
2024-02-23 17:12:36 +08:00
committed by Treehugger Robot
parent 5af73be864
commit 5723a22d27
3 changed files with 6 additions and 0 deletions
+4
View File
@@ -18,6 +18,7 @@ struct rt_mutex;
struct rt_mutex_base;
struct rw_semaphore;
struct task_struct;
struct percpu_rw_semaphore;
DECLARE_HOOK(android_vh_mutex_wait_start,
TP_PROTO(struct mutex *lock),
@@ -102,6 +103,9 @@ DECLARE_HOOK(android_vh_flush_work_wait_finish,
DECLARE_HOOK(android_vh_sched_show_task,
TP_PROTO(struct task_struct *task),
TP_ARGS(task));
DECLARE_HOOK(android_vh_percpu_rwsem_wq_add,
TP_PROTO(struct percpu_rw_semaphore *sem, bool reader),
TP_ARGS(sem, reader));
struct mutex_waiter;
DECLARE_HOOK(android_vh_alter_mutex_list_add,