From: Gao Xiang <gaoxiang25@huawei.com> To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>, <devel@driverdev.osuosl.org> Cc: <linux-fsdevel@vger.kernel.org>, <linux-kernel@vger.kernel.org>, <linux-erofs@lists.ozlabs.org>, <yuchao0@huawei.com>, <miaoxie@huawei.com>, <weidu.du@huawei.com>, <hsiangkao@aol.com>, <chao@kernel.org> Subject: [PATCH 12/25] staging: erofs: support tracepoint Date: Thu, 26 Jul 2018 20:21:55 +0800 [thread overview] Message-ID: <1532607728-103372-13-git-send-email-gaoxiang25@huawei.com> (raw) In-Reply-To: <1532607728-103372-1-git-send-email-gaoxiang25@huawei.com> From: Chao Yu <yuchao0@huawei.com> 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> --- drivers/staging/erofs/data.c | 13 +- drivers/staging/erofs/include/trace/events/erofs.h | 240 +++++++++++++++++++++ drivers/staging/erofs/inode.c | 4 + drivers/staging/erofs/namei.c | 4 + drivers/staging/erofs/super.c | 3 + 5 files changed, 261 insertions(+), 3 deletions(-) create mode 100644 drivers/staging/erofs/include/trace/events/erofs.h diff --git a/drivers/staging/erofs/data.c b/drivers/staging/erofs/data.c index 4ddb5c0..47d1787 100644 --- a/drivers/staging/erofs/data.c +++ b/drivers/staging/erofs/data.c @@ -13,6 +13,8 @@ #include "internal.h" #include <linux/prefetch.h> +#include <trace/events/erofs.h> + static inline void read_endio(struct bio *bio) { int i; @@ -113,6 +115,7 @@ static int erofs_map_blocks_flatmode(struct inode *inode, u64 offset = map->m_la; struct erofs_vnode *vi = EROFS_V(inode); + trace_erofs_map_blocks_flatmode_enter(inode, map, flags); BUG_ON(is_inode_layout_compression(inode)); nblocks = DIV_ROUND_UP(inode->i_size, PAGE_SIZE); @@ -150,8 +153,7 @@ static int erofs_map_blocks_flatmode(struct inode *inode, out: map->m_llen = map->m_plen; - debugln("%s, m_la 0x%llx m_pa %llx m_len %llu", - __func__, map->m_la, map->m_pa, map->m_plen); + trace_erofs_map_blocks_flatmode_exit(inode, map, flags, 0); return 0; } @@ -305,6 +307,8 @@ static int erofs_raw_access_readpage(struct file *file, struct page *page) erofs_off_t last_block; struct bio *bio; + trace_erofs_readpage(page, true); + bio = erofs_read_raw_page(NULL, page->mapping, page, &last_block, 1, false); @@ -322,9 +326,12 @@ static int erofs_raw_access_readpages(struct file *filp, erofs_off_t last_block; struct bio *bio = NULL; gfp_t gfp = readahead_gfp_mask(mapping); + struct page *page = list_last_entry(pages, struct page, lru); + + trace_erofs_readpages(mapping->host, page, nr_pages, true); for (; nr_pages; --nr_pages) { - struct page *page = list_entry(pages->prev, struct page, lru); + page = list_entry(pages->prev, struct page, lru); prefetchw(&page->flags); list_del(&page->lru); diff --git a/drivers/staging/erofs/include/trace/events/erofs.h b/drivers/staging/erofs/include/trace/events/erofs.h new file mode 100644 index 0000000..5aead93 --- /dev/null +++ b/drivers/staging/erofs/include/trace/events/erofs.h @@ -0,0 +1,240 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +#undef TRACE_SYSTEM +#define TRACE_SYSTEM erofs + +#if !defined(_TRACE_EROFS_H) || defined(TRACE_HEADER_MULTI_READ) +#define _TRACE_EROFS_H + +#include <linux/tracepoint.h> + +#define show_dev(dev) MAJOR(dev), MINOR(dev) +#define show_dev_nid(entry) show_dev(entry->dev), entry->nid + +#define show_file_type(type) \ + __print_symbolic(type, \ + { 0, "FILE" }, \ + { 1, "DIR" }) + +#define show_map_flags(flags) __print_flags(flags, "|", \ + { EROFS_GET_BLOCKS_RAW, "RAW" }) + +#define show_mflags(flags) __print_flags(flags, "", \ + { EROFS_MAP_MAPPED, "M" }, \ + { EROFS_MAP_META, "I" }, \ + { EROFS_MAP_ZIPPED, "Z" }) + +TRACE_EVENT(erofs_lookup, + + TP_PROTO(struct inode *dir, struct dentry *dentry, unsigned int flags), + + TP_ARGS(dir, dentry, flags), + + TP_STRUCT__entry( + __field(dev_t, dev ) + __field(erofs_nid_t, nid ) + __field(const char *, name ) + __field(unsigned int, flags ) + ), + + TP_fast_assign( + __entry->dev = dir->i_sb->s_dev; + __entry->nid = EROFS_V(dir)->nid; + __entry->name = dentry->d_name.name; + __entry->flags = flags; + ), + + TP_printk("dev = (%d,%d), pnid = %llu, name:%s, flags:%x", + show_dev_nid(__entry), + __entry->name, + __entry->flags) +); + +TRACE_EVENT(erofs_fill_inode, + TP_PROTO(struct inode *inode, int isdir), + TP_ARGS(inode, isdir), + + TP_STRUCT__entry( + __field(dev_t, dev ) + __field(erofs_nid_t, nid ) + __field(erofs_blk_t, blkaddr ) + __field(unsigned int, ofs ) + __field(int, isdir ) + ), + + TP_fast_assign( + __entry->dev = inode->i_sb->s_dev; + __entry->nid = EROFS_V(inode)->nid; + __entry->blkaddr = erofs_blknr(iloc(EROFS_I_SB(inode), __entry->nid)); + __entry->ofs = erofs_blkoff(iloc(EROFS_I_SB(inode), __entry->nid)); + __entry->isdir = isdir; + ), + + TP_printk("dev = (%d,%d), nid = %llu, blkaddr %u ofs %u, isdir %d", + show_dev_nid(__entry), + __entry->blkaddr, __entry->ofs, + __entry->isdir) +); + +TRACE_EVENT(erofs_readpage, + + TP_PROTO(struct page *page, bool raw), + + TP_ARGS(page, raw), + + TP_STRUCT__entry( + __field(dev_t, dev ) + __field(erofs_nid_t, nid ) + __field(int, dir ) + __field(pgoff_t, index ) + __field(int, uptodate) + __field(bool, raw ) + ), + + TP_fast_assign( + __entry->dev = page->mapping->host->i_sb->s_dev; + __entry->nid = EROFS_V(page->mapping->host)->nid; + __entry->dir = S_ISDIR(page->mapping->host->i_mode); + __entry->index = page->index; + __entry->uptodate = PageUptodate(page); + __entry->raw = raw; + ), + + TP_printk("dev = (%d,%d), nid = %llu, %s, index = %lu, uptodate = %d " + "raw = %d", + show_dev_nid(__entry), + show_file_type(__entry->dir), + (unsigned long)__entry->index, + __entry->uptodate, + __entry->raw) +); + +TRACE_EVENT(erofs_readpages, + + TP_PROTO(struct inode *inode, struct page *page, unsigned int nrpage, + bool raw), + + TP_ARGS(inode, page, nrpage, raw), + + TP_STRUCT__entry( + __field(dev_t, dev ) + __field(erofs_nid_t, nid ) + __field(pgoff_t, start ) + __field(unsigned int, nrpage ) + __field(bool, raw ) + ), + + TP_fast_assign( + __entry->dev = inode->i_sb->s_dev; + __entry->nid = EROFS_V(inode)->nid; + __entry->start = page->index; + __entry->nrpage = nrpage; + __entry->raw = raw; + ), + + TP_printk("dev = (%d,%d), nid = %llu, start = %lu nrpage = %u raw = %d", + show_dev_nid(__entry), + (unsigned long)__entry->start, + __entry->nrpage, + __entry->raw) +); + +DECLARE_EVENT_CLASS(erofs__map_blocks_enter, + TP_PROTO(struct inode *inode, struct erofs_map_blocks *map, + unsigned int flags), + + TP_ARGS(inode, map, flags), + + TP_STRUCT__entry( + __field( dev_t, dev ) + __field( erofs_nid_t, nid ) + __field( erofs_off_t, la ) + __field( u64, llen ) + __field( unsigned int, flags ) + ), + + TP_fast_assign( + __entry->dev = inode->i_sb->s_dev; + __entry->nid = EROFS_V(inode)->nid; + __entry->la = map->m_la; + __entry->llen = map->m_llen; + __entry->flags = flags; + ), + + TP_printk("dev = (%d,%d), nid = %llu, la %llu llen %llu flags %s", + show_dev_nid(__entry), + __entry->la, __entry->llen, show_map_flags(__entry->flags)) +); + +DEFINE_EVENT(erofs__map_blocks_enter, erofs_map_blocks_flatmode_enter, + TP_PROTO(struct inode *inode, struct erofs_map_blocks *map, + unsigned flags), + + TP_ARGS(inode, map, flags) +); + +DECLARE_EVENT_CLASS(erofs__map_blocks_exit, + TP_PROTO(struct inode *inode, struct erofs_map_blocks *map, + unsigned int flags, int ret), + + TP_ARGS(inode, map, flags, ret), + + TP_STRUCT__entry( + __field( dev_t, dev ) + __field( erofs_nid_t, nid ) + __field( unsigned int, flags ) + __field( erofs_off_t, la ) + __field( erofs_off_t, pa ) + __field( u64, llen ) + __field( u64, plen ) + __field( unsigned int, mflags ) + __field( int, ret ) + ), + + TP_fast_assign( + __entry->dev = inode->i_sb->s_dev; + __entry->nid = EROFS_V(inode)->nid; + __entry->flags = flags; + __entry->la = map->m_la; + __entry->pa = map->m_pa; + __entry->llen = map->m_llen; + __entry->plen = map->m_plen; + __entry->mflags = map->m_flags; + __entry->ret = ret; + ), + + TP_printk("dev = (%d,%d), nid = %llu, flags %s " + "la %llu pa %llu llen %llu plen %llu mflags %s ret %d", + show_dev_nid(__entry), show_map_flags(__entry->flags), + __entry->la, __entry->pa, __entry->llen, __entry->plen, + show_mflags(__entry->mflags), __entry->ret) +); + +DEFINE_EVENT(erofs__map_blocks_exit, erofs_map_blocks_flatmode_exit, + TP_PROTO(struct inode *inode, struct erofs_map_blocks *map, + unsigned flags, int ret), + + TP_ARGS(inode, map, flags, ret) +); + +TRACE_EVENT(erofs_destroy_inode, + TP_PROTO(struct inode *inode), + + TP_ARGS(inode), + + TP_STRUCT__entry( + __field( dev_t, dev ) + __field( erofs_nid_t, nid ) + ), + + TP_fast_assign( + __entry->dev = inode->i_sb->s_dev; + __entry->nid = EROFS_V(inode)->nid; + ), + + TP_printk("dev = (%d,%d), nid = %llu", show_dev_nid(__entry)) +); + +#endif /* _TRACE_EROFS_H */ + + /* This part must be outside protection */ +#include <trace/define_trace.h> 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)); diff --git a/drivers/staging/erofs/namei.c b/drivers/staging/erofs/namei.c index 989876b..d2a0da3 100644 --- a/drivers/staging/erofs/namei.c +++ b/drivers/staging/erofs/namei.c @@ -13,6 +13,8 @@ #include "internal.h" #include "xattr.h" +#include <trace/events/erofs.h> + /* based on the value of qn->len is accurate */ static inline int dirnamecmp(struct qstr *qn, struct qstr *qd, unsigned *matched) @@ -209,6 +211,8 @@ static struct dentry *erofs_lookup(struct inode *dir, /* dentry must be unhashed in lookup, no need to worry about */ DBG_BUGON(!d_unhashed(dentry)); + trace_erofs_lookup(dir, dentry, flags); + /* file name exceeds fs limit */ if (unlikely(dentry->d_name.len > EROFS_NAME_LEN)) return ERR_PTR(-ENAMETOOLONG); diff --git a/drivers/staging/erofs/super.c b/drivers/staging/erofs/super.c index 701425f..054375d 100644 --- a/drivers/staging/erofs/super.c +++ b/drivers/staging/erofs/super.c @@ -17,6 +17,9 @@ #include <linux/seq_file.h> #include "internal.h" +#define CREATE_TRACE_POINTS +#include <trace/events/erofs.h> + static struct kmem_cache *erofs_inode_cachep __read_mostly; static void init_once(void *ptr) -- 1.9.1
WARNING: multiple messages have this Message-ID (diff)
From: gaoxiang25@huawei.com (Gao Xiang) Subject: [PATCH 12/25] staging: erofs: support tracepoint Date: Thu, 26 Jul 2018 20:21:55 +0800 [thread overview] Message-ID: <1532607728-103372-13-git-send-email-gaoxiang25@huawei.com> (raw) In-Reply-To: <1532607728-103372-1-git-send-email-gaoxiang25@huawei.com> From: Chao Yu <yuchao0@huawei.com> Add basic tracepoints for ->readpage{,s}, ->lookup, ->destroy_inode, fill_inode and map_blocks. Reviewed-by: Gao Xiang <gaoxiang25 at huawei.com> Signed-off-by: Chao Yu <yuchao0 at huawei.com> --- drivers/staging/erofs/data.c | 13 +- drivers/staging/erofs/include/trace/events/erofs.h | 240 +++++++++++++++++++++ drivers/staging/erofs/inode.c | 4 + drivers/staging/erofs/namei.c | 4 + drivers/staging/erofs/super.c | 3 + 5 files changed, 261 insertions(+), 3 deletions(-) create mode 100644 drivers/staging/erofs/include/trace/events/erofs.h diff --git a/drivers/staging/erofs/data.c b/drivers/staging/erofs/data.c index 4ddb5c0..47d1787 100644 --- a/drivers/staging/erofs/data.c +++ b/drivers/staging/erofs/data.c @@ -13,6 +13,8 @@ #include "internal.h" #include <linux/prefetch.h> +#include <trace/events/erofs.h> + static inline void read_endio(struct bio *bio) { int i; @@ -113,6 +115,7 @@ static int erofs_map_blocks_flatmode(struct inode *inode, u64 offset = map->m_la; struct erofs_vnode *vi = EROFS_V(inode); + trace_erofs_map_blocks_flatmode_enter(inode, map, flags); BUG_ON(is_inode_layout_compression(inode)); nblocks = DIV_ROUND_UP(inode->i_size, PAGE_SIZE); @@ -150,8 +153,7 @@ static int erofs_map_blocks_flatmode(struct inode *inode, out: map->m_llen = map->m_plen; - debugln("%s, m_la 0x%llx m_pa %llx m_len %llu", - __func__, map->m_la, map->m_pa, map->m_plen); + trace_erofs_map_blocks_flatmode_exit(inode, map, flags, 0); return 0; } @@ -305,6 +307,8 @@ static int erofs_raw_access_readpage(struct file *file, struct page *page) erofs_off_t last_block; struct bio *bio; + trace_erofs_readpage(page, true); + bio = erofs_read_raw_page(NULL, page->mapping, page, &last_block, 1, false); @@ -322,9 +326,12 @@ static int erofs_raw_access_readpages(struct file *filp, erofs_off_t last_block; struct bio *bio = NULL; gfp_t gfp = readahead_gfp_mask(mapping); + struct page *page = list_last_entry(pages, struct page, lru); + + trace_erofs_readpages(mapping->host, page, nr_pages, true); for (; nr_pages; --nr_pages) { - struct page *page = list_entry(pages->prev, struct page, lru); + page = list_entry(pages->prev, struct page, lru); prefetchw(&page->flags); list_del(&page->lru); diff --git a/drivers/staging/erofs/include/trace/events/erofs.h b/drivers/staging/erofs/include/trace/events/erofs.h new file mode 100644 index 0000000..5aead93 --- /dev/null +++ b/drivers/staging/erofs/include/trace/events/erofs.h @@ -0,0 +1,240 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +#undef TRACE_SYSTEM +#define TRACE_SYSTEM erofs + +#if !defined(_TRACE_EROFS_H) || defined(TRACE_HEADER_MULTI_READ) +#define _TRACE_EROFS_H + +#include <linux/tracepoint.h> + +#define show_dev(dev) MAJOR(dev), MINOR(dev) +#define show_dev_nid(entry) show_dev(entry->dev), entry->nid + +#define show_file_type(type) \ + __print_symbolic(type, \ + { 0, "FILE" }, \ + { 1, "DIR" }) + +#define show_map_flags(flags) __print_flags(flags, "|", \ + { EROFS_GET_BLOCKS_RAW, "RAW" }) + +#define show_mflags(flags) __print_flags(flags, "", \ + { EROFS_MAP_MAPPED, "M" }, \ + { EROFS_MAP_META, "I" }, \ + { EROFS_MAP_ZIPPED, "Z" }) + +TRACE_EVENT(erofs_lookup, + + TP_PROTO(struct inode *dir, struct dentry *dentry, unsigned int flags), + + TP_ARGS(dir, dentry, flags), + + TP_STRUCT__entry( + __field(dev_t, dev ) + __field(erofs_nid_t, nid ) + __field(const char *, name ) + __field(unsigned int, flags ) + ), + + TP_fast_assign( + __entry->dev = dir->i_sb->s_dev; + __entry->nid = EROFS_V(dir)->nid; + __entry->name = dentry->d_name.name; + __entry->flags = flags; + ), + + TP_printk("dev = (%d,%d), pnid = %llu, name:%s, flags:%x", + show_dev_nid(__entry), + __entry->name, + __entry->flags) +); + +TRACE_EVENT(erofs_fill_inode, + TP_PROTO(struct inode *inode, int isdir), + TP_ARGS(inode, isdir), + + TP_STRUCT__entry( + __field(dev_t, dev ) + __field(erofs_nid_t, nid ) + __field(erofs_blk_t, blkaddr ) + __field(unsigned int, ofs ) + __field(int, isdir ) + ), + + TP_fast_assign( + __entry->dev = inode->i_sb->s_dev; + __entry->nid = EROFS_V(inode)->nid; + __entry->blkaddr = erofs_blknr(iloc(EROFS_I_SB(inode), __entry->nid)); + __entry->ofs = erofs_blkoff(iloc(EROFS_I_SB(inode), __entry->nid)); + __entry->isdir = isdir; + ), + + TP_printk("dev = (%d,%d), nid = %llu, blkaddr %u ofs %u, isdir %d", + show_dev_nid(__entry), + __entry->blkaddr, __entry->ofs, + __entry->isdir) +); + +TRACE_EVENT(erofs_readpage, + + TP_PROTO(struct page *page, bool raw), + + TP_ARGS(page, raw), + + TP_STRUCT__entry( + __field(dev_t, dev ) + __field(erofs_nid_t, nid ) + __field(int, dir ) + __field(pgoff_t, index ) + __field(int, uptodate) + __field(bool, raw ) + ), + + TP_fast_assign( + __entry->dev = page->mapping->host->i_sb->s_dev; + __entry->nid = EROFS_V(page->mapping->host)->nid; + __entry->dir = S_ISDIR(page->mapping->host->i_mode); + __entry->index = page->index; + __entry->uptodate = PageUptodate(page); + __entry->raw = raw; + ), + + TP_printk("dev = (%d,%d), nid = %llu, %s, index = %lu, uptodate = %d " + "raw = %d", + show_dev_nid(__entry), + show_file_type(__entry->dir), + (unsigned long)__entry->index, + __entry->uptodate, + __entry->raw) +); + +TRACE_EVENT(erofs_readpages, + + TP_PROTO(struct inode *inode, struct page *page, unsigned int nrpage, + bool raw), + + TP_ARGS(inode, page, nrpage, raw), + + TP_STRUCT__entry( + __field(dev_t, dev ) + __field(erofs_nid_t, nid ) + __field(pgoff_t, start ) + __field(unsigned int, nrpage ) + __field(bool, raw ) + ), + + TP_fast_assign( + __entry->dev = inode->i_sb->s_dev; + __entry->nid = EROFS_V(inode)->nid; + __entry->start = page->index; + __entry->nrpage = nrpage; + __entry->raw = raw; + ), + + TP_printk("dev = (%d,%d), nid = %llu, start = %lu nrpage = %u raw = %d", + show_dev_nid(__entry), + (unsigned long)__entry->start, + __entry->nrpage, + __entry->raw) +); + +DECLARE_EVENT_CLASS(erofs__map_blocks_enter, + TP_PROTO(struct inode *inode, struct erofs_map_blocks *map, + unsigned int flags), + + TP_ARGS(inode, map, flags), + + TP_STRUCT__entry( + __field( dev_t, dev ) + __field( erofs_nid_t, nid ) + __field( erofs_off_t, la ) + __field( u64, llen ) + __field( unsigned int, flags ) + ), + + TP_fast_assign( + __entry->dev = inode->i_sb->s_dev; + __entry->nid = EROFS_V(inode)->nid; + __entry->la = map->m_la; + __entry->llen = map->m_llen; + __entry->flags = flags; + ), + + TP_printk("dev = (%d,%d), nid = %llu, la %llu llen %llu flags %s", + show_dev_nid(__entry), + __entry->la, __entry->llen, show_map_flags(__entry->flags)) +); + +DEFINE_EVENT(erofs__map_blocks_enter, erofs_map_blocks_flatmode_enter, + TP_PROTO(struct inode *inode, struct erofs_map_blocks *map, + unsigned flags), + + TP_ARGS(inode, map, flags) +); + +DECLARE_EVENT_CLASS(erofs__map_blocks_exit, + TP_PROTO(struct inode *inode, struct erofs_map_blocks *map, + unsigned int flags, int ret), + + TP_ARGS(inode, map, flags, ret), + + TP_STRUCT__entry( + __field( dev_t, dev ) + __field( erofs_nid_t, nid ) + __field( unsigned int, flags ) + __field( erofs_off_t, la ) + __field( erofs_off_t, pa ) + __field( u64, llen ) + __field( u64, plen ) + __field( unsigned int, mflags ) + __field( int, ret ) + ), + + TP_fast_assign( + __entry->dev = inode->i_sb->s_dev; + __entry->nid = EROFS_V(inode)->nid; + __entry->flags = flags; + __entry->la = map->m_la; + __entry->pa = map->m_pa; + __entry->llen = map->m_llen; + __entry->plen = map->m_plen; + __entry->mflags = map->m_flags; + __entry->ret = ret; + ), + + TP_printk("dev = (%d,%d), nid = %llu, flags %s " + "la %llu pa %llu llen %llu plen %llu mflags %s ret %d", + show_dev_nid(__entry), show_map_flags(__entry->flags), + __entry->la, __entry->pa, __entry->llen, __entry->plen, + show_mflags(__entry->mflags), __entry->ret) +); + +DEFINE_EVENT(erofs__map_blocks_exit, erofs_map_blocks_flatmode_exit, + TP_PROTO(struct inode *inode, struct erofs_map_blocks *map, + unsigned flags, int ret), + + TP_ARGS(inode, map, flags, ret) +); + +TRACE_EVENT(erofs_destroy_inode, + TP_PROTO(struct inode *inode), + + TP_ARGS(inode), + + TP_STRUCT__entry( + __field( dev_t, dev ) + __field( erofs_nid_t, nid ) + ), + + TP_fast_assign( + __entry->dev = inode->i_sb->s_dev; + __entry->nid = EROFS_V(inode)->nid; + ), + + TP_printk("dev = (%d,%d), nid = %llu", show_dev_nid(__entry)) +); + +#endif /* _TRACE_EROFS_H */ + + /* This part must be outside protection */ +#include <trace/define_trace.h> 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)); diff --git a/drivers/staging/erofs/namei.c b/drivers/staging/erofs/namei.c index 989876b..d2a0da3 100644 --- a/drivers/staging/erofs/namei.c +++ b/drivers/staging/erofs/namei.c @@ -13,6 +13,8 @@ #include "internal.h" #include "xattr.h" +#include <trace/events/erofs.h> + /* based on the value of qn->len is accurate */ static inline int dirnamecmp(struct qstr *qn, struct qstr *qd, unsigned *matched) @@ -209,6 +211,8 @@ static struct dentry *erofs_lookup(struct inode *dir, /* dentry must be unhashed in lookup, no need to worry about */ DBG_BUGON(!d_unhashed(dentry)); + trace_erofs_lookup(dir, dentry, flags); + /* file name exceeds fs limit */ if (unlikely(dentry->d_name.len > EROFS_NAME_LEN)) return ERR_PTR(-ENAMETOOLONG); diff --git a/drivers/staging/erofs/super.c b/drivers/staging/erofs/super.c index 701425f..054375d 100644 --- a/drivers/staging/erofs/super.c +++ b/drivers/staging/erofs/super.c @@ -17,6 +17,9 @@ #include <linux/seq_file.h> #include "internal.h" +#define CREATE_TRACE_POINTS +#include <trace/events/erofs.h> + static struct kmem_cache *erofs_inode_cachep __read_mostly; static void init_once(void *ptr) -- 1.9.1
next prev parent reply other threads:[~2018-07-26 12:26 UTC|newest] Thread overview: 112+ messages / expand[flat|nested] mbox.gz Atom feed top 2018-05-31 11:06 [NOMERGE] [RFC PATCH 00/12] erofs: introduce erofs file system Gao Xiang 2018-06-01 7:48 ` Richard Weinberger 2018-06-01 9:11 ` Gao Xiang 2018-06-01 9:28 ` Richard Weinberger 2018-06-01 11:16 ` Gao Xiang 2018-06-07 10:26 ` Pavel Machek 2018-07-27 0:55 ` Joey Pabalinas 2018-07-27 0:57 ` Joey Pabalinas 2018-07-26 12:21 ` [PATCH 00/25] staging: " Gao Xiang 2018-07-26 12:21 ` Gao Xiang 2018-07-26 12:21 ` [PATCH 01/25] staging: erofs: add on-disk layout Gao Xiang 2018-07-26 12:21 ` Gao Xiang 2018-07-26 12:21 ` [PATCH 02/25] staging: erofs: add erofs in-memory stuffs Gao Xiang 2018-07-26 12:21 ` Gao Xiang 2018-07-26 12:21 ` [PATCH 03/25] staging: erofs: add super block operations Gao Xiang 2018-07-26 12:21 ` Gao Xiang 2018-07-26 12:21 ` [PATCH 04/25] staging: erofs: add raw address_space operations Gao Xiang 2018-07-26 12:21 ` Gao Xiang 2018-07-26 12:21 ` [PATCH 05/25] staging: erofs: add inode operations Gao Xiang 2018-07-26 12:21 ` Gao Xiang 2018-07-26 12:21 ` [PATCH 06/25] staging: erofs: add directory operations Gao Xiang 2018-07-26 12:21 ` Gao Xiang 2018-07-26 12:21 ` [PATCH 07/25] staging: erofs: add namei functions Gao Xiang 2018-07-26 12:21 ` Gao Xiang 2018-07-26 12:21 ` [PATCH 08/25] staging: erofs: update Kconfig and Makefile Gao Xiang 2018-07-26 12:21 ` Gao Xiang 2018-07-26 12:21 ` [PATCH 09/25] staging: erofs: introduce xattr & acl support Gao Xiang 2018-07-26 12:21 ` Gao Xiang 2018-07-26 12:21 ` [PATCH 10/25] staging: erofs: support special inode Gao Xiang 2018-07-26 12:21 ` Gao Xiang 2018-07-26 12:21 ` [PATCH 11/25] staging: erofs: introduce error injection infrastructure Gao Xiang 2018-07-26 12:21 ` Gao Xiang 2018-07-26 12:21 ` Gao Xiang [this message] 2018-07-26 12:21 ` [PATCH 12/25] staging: erofs: support tracepoint Gao Xiang 2018-07-26 12:21 ` [PATCH 13/25] staging: erofs: <linux/tagptr.h>: introduce tagged pointer Gao Xiang 2018-07-26 12:21 ` Gao Xiang 2018-07-26 12:21 ` [PATCH 14/25] staging: erofs: introduce pagevec for unzip subsystem Gao Xiang 2018-07-26 12:21 ` Gao Xiang 2018-07-26 12:21 ` [PATCH 15/25] staging: erofs: add erofs_map_blocks_iter Gao Xiang 2018-07-26 12:21 ` Gao Xiang 2018-07-26 12:21 ` [PATCH 16/25] staging: erofs: add erofs_allocpage Gao Xiang 2018-07-26 12:21 ` Gao Xiang 2018-07-26 12:22 ` [PATCH 17/25] staging: erofs: globalize prepare_bio and __submit_bio Gao Xiang 2018-07-26 12:22 ` Gao Xiang 2018-07-26 12:22 ` [PATCH 18/25] staging: erofs: introduce a customized LZ4 decompression Gao Xiang 2018-07-26 12:22 ` Gao Xiang 2018-07-26 12:22 ` [PATCH 19/25] staging: erofs: add a generic z_erofs VLE decompressor Gao Xiang 2018-07-26 12:22 ` Gao Xiang 2018-07-26 12:22 ` [PATCH 20/25] staging: erofs: introduce superblock registration Gao Xiang 2018-07-26 12:22 ` Gao Xiang 2018-07-26 12:22 ` [PATCH 21/25] staging: erofs: introduce erofs shrinker Gao Xiang 2018-07-26 12:22 ` Gao Xiang 2018-07-26 12:22 ` [PATCH 22/25] staging: erofs: introduce workstation for decompression Gao Xiang 2018-07-26 12:22 ` Gao Xiang 2018-07-26 12:22 ` [PATCH 23/25] staging: erofs: introduce VLE decompression support Gao Xiang 2018-07-26 12:22 ` Gao Xiang 2018-07-26 12:22 ` [PATCH 24/25] staging: erofs: introduce cached decompression Gao Xiang 2018-07-26 12:22 ` Gao Xiang 2018-07-26 12:22 ` [PATCH 25/25] staging: erofs: add a TODO and update MAINTAINERS for staging Gao Xiang 2018-07-26 12:22 ` Gao Xiang 2018-07-28 7:10 ` [PATCH] staging: erofs: fix a compile warning of Z_EROFS_VLE_VMAP_ONSTACK_PAGES Gao Xiang 2018-07-28 7:10 ` Gao Xiang 2018-07-28 10:43 ` Chao Yu 2018-07-28 10:43 ` Chao Yu 2018-07-29 5:34 ` [PATCH 1/2] staging: erofs: fix compile error without built-in decompression support Gao Xiang 2018-07-29 5:34 ` Gao Xiang 2018-07-29 5:37 ` [PATCH 2/2] staging: erofs: fix conditional uninitialized `pcn' in z_erofs_map_blocks_iter Gao Xiang 2018-07-29 5:37 ` Gao Xiang 2018-07-30 1:51 ` [PATCH] staging: erofs: use the wrapped PTR_ERR_OR_ZERO instead of open code Gao Xiang 2018-07-30 1:51 ` Gao Xiang 2018-07-30 6:58 ` Chao Yu 2018-07-30 6:58 ` Chao Yu 2018-08-01 6:38 ` [PATCH 1/2] staging: erofs: add the missing break in z_erofs_map_blocks_iter Gao Xiang 2018-08-01 6:38 ` Gao Xiang 2018-08-01 6:38 ` [PATCH 2/2] staging: erofs: remove a redundant marco in xattr Gao Xiang 2018-08-01 6:38 ` Gao Xiang 2018-08-01 9:02 ` [PATCH 1/2] staging: erofs: add the missing break in z_erofs_map_blocks_iter Dan Carpenter 2018-08-01 9:02 ` Dan Carpenter 2018-08-01 9:19 ` Gao Xiang 2018-08-01 9:19 ` Gao Xiang 2018-08-01 9:36 ` [PATCH RESEND " Gao Xiang 2018-08-01 9:36 ` Gao Xiang 2018-08-01 11:36 ` Dan Carpenter 2018-08-01 11:36 ` Dan Carpenter 2018-08-01 12:08 ` Gao Xiang 2018-08-01 12:08 ` Gao Xiang 2018-07-30 2:07 ` [PATCH 2/2] staging: erofs: fix conditional uninitialized `pcn' " Chao Yu 2018-07-30 2:07 ` Chao Yu 2018-07-30 2:07 ` [PATCH 1/2] staging: erofs: fix compile error without built-in decompression support Chao Yu 2018-07-30 2:07 ` Chao Yu 2018-07-30 2:32 ` Gao Xiang 2018-07-30 2:32 ` Gao Xiang 2018-07-30 3:07 ` Chao Yu 2018-07-30 3:07 ` Chao Yu 2018-07-30 3:55 ` Gao Xiang 2018-07-30 3:55 ` Gao Xiang 2018-07-30 3:34 ` [FOR INTERNAL REVIEW] [PATCH RESEND 1/3] staging: erofs: fix incorrect code in erofs_shrink_scan Gao Xiang 2018-07-30 3:34 ` [FOR INTERNAL REVIEW] [PATCH RESEND 2/3] staging: erofs: add 'erofs_' prefixes for try_to_free_(all_)cached_page(s) Gao Xiang 2018-07-30 6:57 ` Chao Yu 2018-07-30 3:34 ` [FOR INTERNAL REVIEW] [PATCH RESEND 3/3] staging: erofs: fix conditional uninitialized `pcn' in z_erofs_map_blocks_iter Gao Xiang 2018-07-30 6:56 ` [FOR INTERNAL REVIEW] [PATCH RESEND 1/3] staging: erofs: fix incorrect code in erofs_shrink_scan Chao Yu 2018-07-27 0:25 ` [PATCH 00/25] staging: erofs: introduce erofs file system Christian Kujau 2018-07-27 1:39 ` Gao Xiang 2018-07-27 1:39 ` Gao Xiang 2018-07-27 1:56 ` Gao Xiang 2018-07-27 1:56 ` Gao Xiang 2018-07-28 7:25 ` Greg Kroah-Hartman 2018-07-28 7:25 ` Greg Kroah-Hartman 2018-07-28 9:33 ` Gao Xiang 2018-07-28 9:33 ` Gao Xiang 2018-07-28 10:34 ` Chao Yu 2018-07-28 10:34 ` Chao Yu
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=1532607728-103372-13-git-send-email-gaoxiang25@huawei.com \ --to=gaoxiang25@huawei.com \ --cc=chao@kernel.org \ --cc=devel@driverdev.osuosl.org \ --cc=gregkh@linuxfoundation.org \ --cc=hsiangkao@aol.com \ --cc=linux-erofs@lists.ozlabs.org \ --cc=linux-fsdevel@vger.kernel.org \ --cc=linux-kernel@vger.kernel.org \ --cc=miaoxie@huawei.com \ --cc=weidu.du@huawei.com \ --cc=yuchao0@huawei.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.