diff --git a/drivers/android/vendor_hooks.c b/drivers/android/vendor_hooks.c index 98c329486bcc..6f2dc7fccaaf 100644 --- a/drivers/android/vendor_hooks.c +++ b/drivers/android/vendor_hooks.c @@ -134,6 +134,7 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_ufs_transfer_rsp_status); EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_f2fs_down_read); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_f2fs_improve_priority); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_f2fs_restore_priority); +EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_f2fs_printk); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_io_statistics); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_cgroup_attach); EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_iommu_setup_dma_ops); diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c index 3722d44418ce..d26adaeb4d14 100644 --- a/fs/f2fs/super.c +++ b/fs/f2fs/super.c @@ -39,6 +39,9 @@ #define CREATE_TRACE_POINTS #include +#undef CREATE_TRACE_POINTS +#include + static struct kmem_cache *f2fs_inode_cachep; #ifdef CONFIG_F2FS_FAULT_INJECTION @@ -291,7 +294,7 @@ void f2fs_printk(struct f2fs_sb_info *sbi, bool limit_rate, else printk("%c%cF2FS-fs (%s): %pV\n", KERN_SOH_ASCII, level, sbi->sb->s_id, &vaf); - + trace_android_vh_f2fs_printk(sbi, &vaf, level, limit_rate); va_end(args); } diff --git a/include/trace/hooks/fs.h b/include/trace/hooks/fs.h index eff712e6a503..016f951e92a3 100644 --- a/include/trace/hooks/fs.h +++ b/include/trace/hooks/fs.h @@ -8,6 +8,8 @@ #define _TRACE_HOOK_FS_H #include +struct f2fs_sb_info; +struct va_format; DECLARE_RESTRICTED_HOOK(android_rvh_f2fs_down_read, TP_PROTO(wait_queue_head_t *read_waiters, struct rw_semaphore *rwsem, bool *skip), @@ -21,6 +23,10 @@ DECLARE_HOOK(android_vh_f2fs_restore_priority, TP_PROTO(struct task_struct *p, int saved_prio), TP_ARGS(p, saved_prio)); +DECLARE_HOOK(android_vh_f2fs_printk, + TP_PROTO(struct f2fs_sb_info *sbi, struct va_format *vaf, int level, bool limit_rate), + TP_ARGS(sbi, vaf, level, limit_rate)); + #endif /* _TRACE_HOOK_FS_H */ /* This part must be outside protection */