staging: erofs: support tracepoint
Add basic tracepoints for ->readpage{,s}, ->lookup,
->destroy_inode, fill_inode and map_blocks.
Reviewed-by: Gao Xiang <gaoxiang25@huawei.com>
Signed-off-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
diff --git a/drivers/staging/erofs/inode.c b/drivers/staging/erofs/inode.c
index a6d3e12..613c977 100644
--- a/drivers/staging/erofs/inode.c
+++ b/drivers/staging/erofs/inode.c
@@ -12,6 +12,8 @@
*/
#include "xattr.h"
+#include <trace/events/erofs.h>
+
/* no locking */
static int read_inode(struct inode *inode, void *data)
{
@@ -152,6 +154,8 @@ static int fill_inode(struct inode *inode, int isdir)
erofs_blk_t blkaddr;
unsigned ofs;
+ trace_erofs_fill_inode(inode, isdir);
+
blkaddr = erofs_blknr(iloc(sbi, vi->nid));
ofs = erofs_blkoff(iloc(sbi, vi->nid));