lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 03 Jun 2013 09:50:00 -0400
From:	Steven Rostedt <rostedt@...dmis.org>
To:	Huajun Li <huajun.li@...el.com>
Cc:	jaegeuk.kim@...sung.com, linux-fsdevel@...r.kernel.org,
	huajun.li.lee@...il.com, namjae.jeon@...sung.com,
	linux-kernel@...r.kernel.org,
	linux-f2fs-devel@...ts.sourceforge.net,
	Haicheng Li <haicheng.li@...ux.intel.com>
Subject: Re: [RFC 5/5] f2fs: add tracepoints to debug inline data operations

On Mon, 2013-06-03 at 18:04 +0800, Huajun Li wrote:
> From: Haicheng Li <haicheng.li@...ux.intel.com>
> 
> Add tracepoints for: f2fs_read_inline_data(), f2fs_convert_inline_data(),
> f2fs_write_inline_data().
> 
> Cc: Steven Rostedt <rostedt@...dmis.org>
> Signed-off-by: Haicheng Li <haicheng.li@...ux.intel.com>
> Signed-off-by: Huajun Li <huajun.li@...el.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 */


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ