Linux EXT4 FS development
 help / color / mirror / Atom feed
From: Jan Kara <jack@suse.cz>
To: Gou Hao <gouhao@uniontech.com>
Cc: tytso@mit.edu, adilger.kernel@dilger.ca, rostedt@goodmis.org,
	mhiramat@kernel.org, mathieu.desnoyers@efficios.com,
	wenqing.lz@taobao.com, jack@suse.cz, linux-ext4@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org,
	gouhaojake@163.com, wangyuli@uniontech.com
Subject: Re: [PATCH] ext4: make trace_ext4_ext_load_extent print-format correctly
Date: Tue, 10 Dec 2024 14:13:19 +0100	[thread overview]
Message-ID: <20241210131319.ckytlh7djftuesmr@quack3> (raw)
In-Reply-To: <20241210071948.12636-1-gouhao@uniontech.com>

On Tue 10-12-24 15:19:48, Gou Hao wrote:
> In commit '7d7ea89e756e', pass the 3rd param of trace_ext4_ext_load_extent
> to _RET_IP, without modifying the print-format of it.
> 
> before this:
> 147.827896: ext4_ext_load_extent: dev 8,35 ino 272218 lblk 1135807 pblk 18446744072651077338
> 
> after this:
> 35.118227: ext4_ext_load_extent: dev 8,35 ino 272218 pblk 1135807 caller ext4_find_extent+0x17a/0x320 [ext4]
> 
> Fixes: 7d7ea89e756e ("ext4: refactor code to read the extent tree block")
> Signed-off-by: Gou Hao <gouhao@uniontech.com>

Curious nobody notice earlier. Anyway, feel free to add:

Reviewed-by: Jan Kara <jack@suse.cz>

								Honza

> ---
>  include/trace/events/ext4.h | 12 ++++++------
>  1 file changed, 6 insertions(+), 6 deletions(-)
> 
> diff --git a/include/trace/events/ext4.h b/include/trace/events/ext4.h
> index 156908641..55061c36a 100644
> --- a/include/trace/events/ext4.h
> +++ b/include/trace/events/ext4.h
> @@ -1707,28 +1707,28 @@ DEFINE_EVENT(ext4__map_blocks_exit, ext4_ind_map_blocks_exit,
>  );
>  
>  TRACE_EVENT(ext4_ext_load_extent,
> -	TP_PROTO(struct inode *inode, ext4_lblk_t lblk, ext4_fsblk_t pblk),
> +	TP_PROTO(struct inode *inode, ext4_fsblk_t pblk, unsigned long IP),
>  
> -	TP_ARGS(inode, lblk, pblk),
> +	TP_ARGS(inode, pblk, IP),
>  
>  	TP_STRUCT__entry(
>  		__field(	dev_t,		dev		)
>  		__field(	ino_t,		ino		)
>  		__field(	ext4_fsblk_t,	pblk		)
> -		__field(	ext4_lblk_t,	lblk		)
> +		__field(	unsigned long,	ip		)
>  	),
>  
>  	TP_fast_assign(
>  		__entry->dev    = inode->i_sb->s_dev;
>  		__entry->ino    = inode->i_ino;
>  		__entry->pblk	= pblk;
> -		__entry->lblk	= lblk;
> +		__entry->ip	= IP;
>  	),
>  
> -	TP_printk("dev %d,%d ino %lu lblk %u pblk %llu",
> +	TP_printk("dev %d,%d ino %lu pblk %llu caller %pS",
>  		  MAJOR(__entry->dev), MINOR(__entry->dev),
>  		  (unsigned long) __entry->ino,
> -		  __entry->lblk, __entry->pblk)
> +		  __entry->pblk, (void *)__entry->ip)
>  );
>  
>  TRACE_EVENT(ext4_load_inode,
> -- 
> 2.43.0
> 
-- 
Jan Kara <jack@suse.com>
SUSE Labs, CR

      reply	other threads:[~2024-12-10 13:13 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-10  7:19 [PATCH] ext4: make trace_ext4_ext_load_extent print-format correctly Gou Hao
2024-12-10 13:13 ` Jan Kara [this message]

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=20241210131319.ckytlh7djftuesmr@quack3 \
    --to=jack@suse.cz \
    --cc=adilger.kernel@dilger.ca \
    --cc=gouhao@uniontech.com \
    --cc=gouhaojake@163.com \
    --cc=linux-ext4@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-trace-kernel@vger.kernel.org \
    --cc=mathieu.desnoyers@efficios.com \
    --cc=mhiramat@kernel.org \
    --cc=rostedt@goodmis.org \
    --cc=tytso@mit.edu \
    --cc=wangyuli@uniontech.com \
    --cc=wenqing.lz@taobao.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