diff --git a/drivers/android/vendor_hooks.c b/drivers/android/vendor_hooks.c index a8e07630e2d9..49a57f2dbe41 100644 --- a/drivers/android/vendor_hooks.c +++ b/drivers/android/vendor_hooks.c @@ -105,6 +105,7 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_cpu_idle_exit); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_mpam_set); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_wq_lockup_pool); EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_alloc_and_link_pwqs); +EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_alloc_workqueue); EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_create_worker); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_ipi_stop); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_sysrq_crash); diff --git a/include/trace/hooks/wqlockup.h b/include/trace/hooks/wqlockup.h index b17c3a08e615..ef3e1a3f1c4d 100644 --- a/include/trace/hooks/wqlockup.h +++ b/include/trace/hooks/wqlockup.h @@ -10,6 +10,10 @@ * Following tracepoints are not exported in tracefs and provide a * mechanism for vendor modules to hook and extend functionality */ +DECLARE_RESTRICTED_HOOK(android_rvh_alloc_workqueue, + TP_PROTO(struct workqueue_struct *wq, unsigned int *flags, int *max_active), + TP_ARGS(wq, flags, max_active), 1); + DECLARE_RESTRICTED_HOOK(android_rvh_create_worker, TP_PROTO(struct task_struct *p, struct workqueue_attrs *attrs), TP_ARGS(p, attrs), 1); diff --git a/kernel/workqueue.c b/kernel/workqueue.c index 6a2f60a2fcd6..73d8c0485e2c 100644 --- a/kernel/workqueue.c +++ b/kernel/workqueue.c @@ -5707,6 +5707,7 @@ static struct workqueue_struct *__alloc_workqueue(const char *fmt, max_active = wq_clamp_max_active(max_active, flags, wq->name); } + trace_android_rvh_alloc_workqueue(wq, &flags, &max_active); /* init wq */ wq->flags = flags; wq->max_active = max_active;