From: Steven Rostedt <rostedt@goodmis.org>
To: Huajun Li <huajun.li@intel.com>
Cc: namjae.jeon@samsung.com, linux-kernel@vger.kernel.org,
linux-f2fs-devel@lists.sourceforge.net,
linux-fsdevel@vger.kernel.org
Subject: Re: [f2fs-dev] [RFC 5/5] f2fs: add tracepoints to debug inline data operations
Date: Mon, 03 Jun 2013 09:50:00 -0400 [thread overview]
Message-ID: <1370267400.26799.90.camel@gandalf.local.home> (raw)
In-Reply-To: <1370253854-15084-6-git-send-email-huajun.li@intel.com>
On Mon, 2013-06-03 at 18:04 +0800, Huajun Li wrote:
> From: Haicheng Li <haicheng.li@linux.intel.com>
>
> Add tracepoints for: f2fs_read_inline_data(), f2fs_convert_inline_data(),
> f2fs_write_inline_data().
>
> Cc: Steven Rostedt <rostedt@goodmis.org>
> Signed-off-by: Haicheng Li <haicheng.li@linux.intel.com>
> Signed-off-by: Huajun Li <huajun.li@intel.com>
> ---
> fs/f2fs/inline.c | 4 +++
> include/trace/events/f2fs.h | 69 +++++++++++++++++++++++++++++++++++++++++++
> 2 files changed, 73 insertions(+)
>
> diff --git a/fs/f2fs/inline.c b/fs/f2fs/inline.c
> index a2aa056..9ec66e5 100644
> --- a/fs/f2fs/inline.c
> +++ b/fs/f2fs/inline.c
> @@ -14,6 +14,7 @@
> #include <linux/f2fs_fs.h>
>
> #include "f2fs.h"
> +#include <trace/events/f2fs.h>
>
> void f2fs_clear_inode_inline_flag(struct f2fs_inode *raw_inode)
> {
> @@ -44,6 +45,7 @@ static int f2fs_read_inline_data(struct inode *inode, struct page *page)
> if (IS_ERR(ipage))
> return PTR_ERR(ipage);
>
> + trace_f2fs_read_inline_data(inode, page);
> src_addr = page_address(ipage);
> dst_addr = page_address(page);
>
> @@ -107,6 +109,7 @@ int f2fs_convert_inline_data(struct page *p,
> set_page_dirty(ipage);
> f2fs_put_page(ipage, 1);
>
> + trace_f2fs_convert_inline_data(inode, page);
> if (!p->index) {
> SetPageUptodate(page);
> } else {
> @@ -138,6 +141,7 @@ int f2fs_write_inline_data(struct inode *inode,
> if (IS_ERR(ipage))
> return PTR_ERR(ipage);
>
> + trace_f2fs_write_inline_data(inode, page);
> src_addr = page_address(page);
> dst_addr = page_address(ipage);
>
> diff --git a/include/trace/events/f2fs.h b/include/trace/events/f2fs.h
> index 52ae548..bc7a84e 100644
> --- a/include/trace/events/f2fs.h
> +++ b/include/trace/events/f2fs.h
> @@ -676,6 +676,75 @@ TRACE_EVENT(f2fs_write_checkpoint,
> __entry->msg)
> );
>
> +TRACE_EVENT(f2fs_read_inline_data,
> +
> + TP_PROTO(struct inode *inode, struct page *page),
> +
> + TP_ARGS(inode, page),
> +
> + TP_STRUCT__entry(
> + __field(dev_t, dev)
> + __field(ino_t, ino)
> + __field(pgoff_t, index)
> + ),
> +
> + TP_fast_assign(
> + __entry->dev = inode->i_sb->s_dev;
> + __entry->ino = inode->i_ino;
> + __entry->index = page->index;
> + ),
> +
> + TP_printk("dev = (%d,%d), ino = %lu, index = %lu",
> + show_dev_ino(__entry),
> + (unsigned long)__entry->index)
> +);
> +
> +TRACE_EVENT(f2fs_convert_inline_data,
> +
> + TP_PROTO(struct inode *inode, struct page *page),
> +
> + TP_ARGS(inode, page),
> +
> + TP_STRUCT__entry(
> + __field(dev_t, dev)
> + __field(ino_t, ino)
> + __field(pgoff_t, index)
> + ),
> +
> + TP_fast_assign(
> + __entry->dev = inode->i_sb->s_dev;
> + __entry->ino = inode->i_ino;
> + __entry->index = page->index;
> + ),
> +
> + TP_printk("dev = (%d,%d), ino = %lu, index = %lu",
> + show_dev_ino(__entry),
> + (unsigned long)__entry->index)
> +);
> +
> +TRACE_EVENT(f2fs_write_inline_data,
> +
> + TP_PROTO(struct inode *inode, struct page *page),
> +
> + TP_ARGS(inode, page),
> +
> + TP_STRUCT__entry(
> + __field(dev_t, dev)
> + __field(ino_t, ino)
> + __field(pgoff_t, index)
> + ),
> +
> + TP_fast_assign(
> + __entry->dev = inode->i_sb->s_dev;
> + __entry->ino = inode->i_ino;
> + __entry->index = page->index;
> + ),
> +
> + TP_printk("dev = (%d,%d), ino = %lu, index = %lu",
> + show_dev_ino(__entry),
> + (unsigned long)__entry->index)
> +);
Can you convert the above to use DECLARE_EVENT_CLASS() and
DEFINE_EVENT(), as the above three are basically the same. You'll save a
few K in text by doing so.
Thanks,
-- Steve
> +
> #endif /* _TRACE_F2FS_H */
>
> /* This part must be outside protection */
------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite
It's a free troubleshooting tool designed for production
Get down to code-level detail for bottlenecks, with <2% overhead.
Download for free and get started troubleshooting in minutes.
http://p.sf.net/sfu/appdyn_d2d_ap2
next prev parent reply other threads:[~2013-06-03 13:50 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-03 10:04 [f2fs-dev] [RFC 0/5] Enable f2fs support inline data Huajun Li
2013-06-03 10:04 ` [RFC 1/5] f2fs: Add helper functions and flag to " Huajun Li
2013-06-03 10:04 ` [f2fs-dev] [RFC 2/5] f2fs: Handle inline data read and write Huajun Li
2013-06-03 10:04 ` [f2fs-dev] [RFC 3/5] f2fs: Key functions to handle inline data Huajun Li
2013-06-03 10:04 ` [f2fs-dev] [RFC 4/5] f2fs: Add Kconfig interface for inline data support Huajun Li
2013-06-03 10:04 ` [f2fs-dev] [RFC 5/5] f2fs: add tracepoints to debug inline data operations Huajun Li
2013-06-03 13:50 ` Steven Rostedt [this message]
2013-06-03 23:45 ` Haicheng Li
2013-06-04 2:19 ` [RFC 0/5] Enable f2fs support inline data Jaegeuk Kim
2013-06-04 4:23 ` [f2fs-dev] " Namjae Jeon
2013-06-04 6:01 ` Haicheng Li
2013-06-05 7:13 ` [f2fs-dev] " Jaegeuk Kim
2013-06-08 7:25 ` Huajun Li
2013-06-09 22:55 ` Jaegeuk Kim
2013-08-07 11:36 ` Jaegeuk Kim
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=1370267400.26799.90.camel@gandalf.local.home \
--to=rostedt@goodmis.org \
--cc=huajun.li@intel.com \
--cc=linux-f2fs-devel@lists.sourceforge.net \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=namjae.jeon@samsung.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).