From: Chao Yu <chao@kernel.org>
To: Zhang Qilong <zhangqilong3@huawei.com>, jaegeuk@kernel.org
Cc: linux-f2fs-devel@lists.sourceforge.net
Subject: Re: [f2fs-dev] [PATCH -next] f2fs: add a trace interface for f2fs_update_extent_tree_range_compressed
Date: Sun, 18 Sep 2022 18:48:28 +0800 [thread overview]
Message-ID: <2f5e8d93-ea68-70cf-4c9b-07a8bbc3220b@kernel.org> (raw)
In-Reply-To: <20220915134408.69886-1-zhangqilong3@huawei.com>
On 2022/9/15 21:44, Zhang Qilong wrote:
> For f2fs_update_extent_tree_range_compressed, keeping
> the trace and function name consistent to distinguish
> from trace of f2fs_update_extent_tree_range. And we add
> "c_len" into the trace, result like:
>
> [003] ..... 228.568157: f2fs_update_extent_tree_range_compressed:
> dev = (8,0), ino = 5, pgofs = 96, blkaddr = 2548760,
> len = 4, c_len = 1
>
> Signed-off-by: Zhang Qilong <zhangqilong3@huawei.com>
> ---
> fs/f2fs/extent_cache.c | 2 +-
> include/trace/events/f2fs.h | 36 ++++++++++++++++++++++++++++++++++++
> 2 files changed, 37 insertions(+), 1 deletion(-)
>
> diff --git a/fs/f2fs/extent_cache.c b/fs/f2fs/extent_cache.c
> index 761fd42c93f2..df41eca6386a 100644
> --- a/fs/f2fs/extent_cache.c
> +++ b/fs/f2fs/extent_cache.c
> @@ -675,7 +675,7 @@ void f2fs_update_extent_tree_range_compressed(struct inode *inode,
> struct rb_node **insert_p = NULL, *insert_parent = NULL;
> bool leftmost = false;
>
> - trace_f2fs_update_extent_tree_range(inode, fofs, blkaddr, llen);
> + trace_f2fs_update_extent_tree_range_compressed(inode, fofs, blkaddr, llen, c_len);
>
> /* it is safe here to check FI_NO_EXTENT w/o et->lock in ro image */
> if (is_inode_flag_set(inode, FI_NO_EXTENT))
> diff --git a/include/trace/events/f2fs.h b/include/trace/events/f2fs.h
> index b262985f0c3a..54a9f6feca1b 100644
> --- a/include/trace/events/f2fs.h
> +++ b/include/trace/events/f2fs.h
> @@ -1606,6 +1606,42 @@ TRACE_EVENT(f2fs_update_extent_tree_range,
> __entry->len)
> );
>
> +TRACE_EVENT(f2fs_update_extent_tree_range_compressed,
Why not adding parameter c_len in trace_f2fs_update_extent_tree_range()
to avoid duplicated codes...
Thanks,
> +
> + TP_PROTO(struct inode *inode, unsigned int pgofs, block_t blkaddr,
> + unsigned int len,
> + unsigned int c_len),
> +
> + TP_ARGS(inode, pgofs, blkaddr, len, c_len),
> +
> + TP_STRUCT__entry(
> + __field(dev_t, dev)
> + __field(ino_t, ino)
> + __field(unsigned int, pgofs)
> + __field(u32, blk)
> + __field(unsigned int, len)
> + __field(unsigned int, c_len)
> + ),
> +
> + TP_fast_assign(
> + __entry->dev = inode->i_sb->s_dev;
> + __entry->ino = inode->i_ino;
> + __entry->pgofs = pgofs;
> + __entry->blk = blkaddr;
> + __entry->len = len;
> + __entry->c_len = c_len;
> + ),
> +
> + TP_printk("dev = (%d,%d), ino = %lu, pgofs = %u, "
> + "blkaddr = %u, len = %u, "
> + "c_len = %u",
> + show_dev_ino(__entry),
> + __entry->pgofs,
> + __entry->blk,
> + __entry->len,
> + __entry->c_len)
> +);
> +
> TRACE_EVENT(f2fs_shrink_extent_tree,
>
> TP_PROTO(struct f2fs_sb_info *sbi, unsigned int node_cnt,
_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
next prev parent reply other threads:[~2022-09-18 10:48 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-15 13:44 [f2fs-dev] [PATCH -next] f2fs: add a trace interface for f2fs_update_extent_tree_range_compressed Zhang Qilong via Linux-f2fs-devel
2022-09-18 10:48 ` Chao Yu [this message]
2022-09-19 12:00 ` [f2fs-dev] 答复: " zhangqilong via Linux-f2fs-devel
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=2f5e8d93-ea68-70cf-4c9b-07a8bbc3220b@kernel.org \
--to=chao@kernel.org \
--cc=jaegeuk@kernel.org \
--cc=linux-f2fs-devel@lists.sourceforge.net \
--cc=zhangqilong3@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: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).