From: Brian Foster <bfoster@redhat.com>
To: Carlos Maiolino <cmaiolino@redhat.com>
Cc: xfs@oss.sgi.com
Subject: Re: [PATCH] Add caller function output to xfs_log_force tracepoint
Date: Wed, 16 Mar 2016 07:40:20 -0400 [thread overview]
Message-ID: <20160316114020.GA8096@bfoster.bfoster> (raw)
In-Reply-To: <1458032019-31953-1-git-send-email-cmaiolino@redhat.com>
On Tue, Mar 15, 2016 at 09:53:39AM +0100, Carlos Maiolino wrote:
> I had sent this patch yesterday, but for some reason it didn't reach xfs list,
> sending again.
>
>
> Output the caller of xfs_log_force might be useful when tracing log checkpoint
> problems without the need to build kernel with DEBUG.
>
> Signed-off-by: Carlos Maiolino <cmaiolino@redhat.com>
> ---
Reviewed-by: Brian Foster <bfoster@redhat.com>
> fs/xfs/xfs_log.c | 4 ++--
> fs/xfs/xfs_trace.h | 10 ++++++----
> 2 files changed, 8 insertions(+), 6 deletions(-)
>
> diff --git a/fs/xfs/xfs_log.c b/fs/xfs/xfs_log.c
> index b49ccf5..8c08015b 100644
> --- a/fs/xfs/xfs_log.c
> +++ b/fs/xfs/xfs_log.c
> @@ -3378,7 +3378,7 @@ xfs_log_force(
> {
> int error;
>
> - trace_xfs_log_force(mp, 0);
> + trace_xfs_log_force(mp, 0, _RET_IP_);
> error = _xfs_log_force(mp, flags, NULL);
> if (error)
> xfs_warn(mp, "%s: error %d returned.", __func__, error);
> @@ -3527,7 +3527,7 @@ xfs_log_force_lsn(
> {
> int error;
>
> - trace_xfs_log_force(mp, lsn);
> + trace_xfs_log_force(mp, lsn, _RET_IP_);
> error = _xfs_log_force_lsn(mp, lsn, flags, NULL);
> if (error)
> xfs_warn(mp, "%s: error %d returned.", __func__, error);
> diff --git a/fs/xfs/xfs_trace.h b/fs/xfs/xfs_trace.h
> index c8d5842..384bb17 100644
> --- a/fs/xfs/xfs_trace.h
> +++ b/fs/xfs/xfs_trace.h
> @@ -1053,19 +1053,21 @@ DECLARE_EVENT_CLASS(xfs_log_item_class,
> )
>
> TRACE_EVENT(xfs_log_force,
> - TP_PROTO(struct xfs_mount *mp, xfs_lsn_t lsn),
> - TP_ARGS(mp, lsn),
> + TP_PROTO(struct xfs_mount *mp, xfs_lsn_t lsn, unsigned long caller_ip),
> + TP_ARGS(mp, lsn, caller_ip),
> TP_STRUCT__entry(
> __field(dev_t, dev)
> __field(xfs_lsn_t, lsn)
> + __field(unsigned long, caller_ip)
> ),
> TP_fast_assign(
> __entry->dev = mp->m_super->s_dev;
> __entry->lsn = lsn;
> + __entry->caller_ip = caller_ip;
> ),
> - TP_printk("dev %d:%d lsn 0x%llx",
> + TP_printk("dev %d:%d lsn 0x%llx caller %ps",
> MAJOR(__entry->dev), MINOR(__entry->dev),
> - __entry->lsn)
> + __entry->lsn, (void *)__entry->caller_ip)
> )
>
> #define DEFINE_LOG_ITEM_EVENT(name) \
> --
> 2.4.3
>
> _______________________________________________
> xfs mailing list
> xfs@oss.sgi.com
> http://oss.sgi.com/mailman/listinfo/xfs
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
prev parent reply other threads:[~2016-03-16 11:40 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-15 8:53 [PATCH] Add caller function output to xfs_log_force tracepoint Carlos Maiolino
2016-03-16 11:40 ` Brian Foster [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=20160316114020.GA8096@bfoster.bfoster \
--to=bfoster@redhat.com \
--cc=cmaiolino@redhat.com \
--cc=xfs@oss.sgi.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