diff --git a/drivers/android/vendor_hooks.c b/drivers/android/vendor_hooks.c index 7b4b1abbb537..2ed3b8b2bccf 100644 --- a/drivers/android/vendor_hooks.c +++ b/drivers/android/vendor_hooks.c @@ -55,3 +55,4 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_alter_rwsem_list_add); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_alter_futex_plist_add); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_is_fpsimd_save); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_ipi_stop); +EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_printk_store); diff --git a/include/trace/hooks/debug.h b/include/trace/hooks/debug.h index 99ae33889b0d..392525e806d4 100644 --- a/include/trace/hooks/debug.h +++ b/include/trace/hooks/debug.h @@ -15,8 +15,13 @@ struct pt_regs; DECLARE_HOOK(android_vh_ipi_stop, TP_PROTO(struct pt_regs *regs), TP_ARGS(regs)) + +DECLARE_HOOK(android_vh_printk_store, + TP_PROTO(int facility, int level), + TP_ARGS(facility, level)) #else #define trace_android_vh_ipi_stop(regs) +#define trace_android_vh_printk_store(facility, level) #endif #endif /* _TRACE_HOOK_DEBUG_H */ diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c index 971197f5d8ee..36ad47c35dd7 100644 --- a/kernel/printk/printk.c +++ b/kernel/printk/printk.c @@ -55,6 +55,8 @@ #include #define CREATE_TRACE_POINTS #include +#undef CREATE_TRACE_POINTS +#include #include "console_cmdline.h" #include "braille.h" @@ -2007,6 +2009,7 @@ asmlinkage int vprintk_emit(int facility, int level, pending_output = (curr_log_seq != log_next_seq); logbuf_unlock_irqrestore(flags); + trace_android_vh_printk_store(facility, level); /* If called from the scheduler, we can not call up(). */ if (!in_sched && pending_output) { /*