From: "Darrick J. Wong" <darrick.wong@oracle.com>
To: Eric Sandeen <sandeen@sandeen.net>
Cc: linux-xfs@vger.kernel.org
Subject: Re: [PATCH 6/6] xfs: stringify scrub types in ftrace output
Date: Tue, 18 Dec 2018 10:41:41 -0800 [thread overview]
Message-ID: <20181218184141.GE27208@magnolia> (raw)
In-Reply-To: <32a11dec-500d-1b18-49fa-86aa8c45f0f7@sandeen.net>
On Tue, Dec 18, 2018 at 11:30:16AM -0600, Eric Sandeen wrote:
> On 11/28/18 5:29 PM, Darrick J. Wong wrote:
> > From: Darrick J. Wong <darrick.wong@oracle.com>
> >
> > Use __print_symbolic to print the scrub type in ftrace output.
> >
> > Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
> > ---
> > fs/xfs/scrub/trace.h | 103 +++++++++++++++++++++++++++++++++++++-------------
> > 1 file changed, 77 insertions(+), 26 deletions(-)
> >
> >
> > diff --git a/fs/xfs/scrub/trace.h b/fs/xfs/scrub/trace.h
> > index 0141eb1ac091..3c83e8b3b39c 100644
> > --- a/fs/xfs/scrub/trace.h
> > +++ b/fs/xfs/scrub/trace.h
> > @@ -26,6 +26,57 @@ TRACE_DEFINE_ENUM(XFS_BTNUM_FINOi);
> > TRACE_DEFINE_ENUM(XFS_BTNUM_RMAPi);
> > TRACE_DEFINE_ENUM(XFS_BTNUM_REFCi);
> >
> > +TRACE_DEFINE_ENUM(XFS_SCRUB_TYPE_PROBE);
> > +TRACE_DEFINE_ENUM(XFS_SCRUB_TYPE_SB);
> > +TRACE_DEFINE_ENUM(XFS_SCRUB_TYPE_AGF);
> > +TRACE_DEFINE_ENUM(XFS_SCRUB_TYPE_AGFL);
> > +TRACE_DEFINE_ENUM(XFS_SCRUB_TYPE_AGI);
> > +TRACE_DEFINE_ENUM(XFS_SCRUB_TYPE_BNOBT);
> > +TRACE_DEFINE_ENUM(XFS_SCRUB_TYPE_CNTBT);
> > +TRACE_DEFINE_ENUM(XFS_SCRUB_TYPE_INOBT);
> > +TRACE_DEFINE_ENUM(XFS_SCRUB_TYPE_FINOBT);
> > +TRACE_DEFINE_ENUM(XFS_SCRUB_TYPE_RMAPBT);
> > +TRACE_DEFINE_ENUM(XFS_SCRUB_TYPE_REFCNTBT);
> > +TRACE_DEFINE_ENUM(XFS_SCRUB_TYPE_INODE);
> > +TRACE_DEFINE_ENUM(XFS_SCRUB_TYPE_BMBTD);
> > +TRACE_DEFINE_ENUM(XFS_SCRUB_TYPE_BMBTA);
> > +TRACE_DEFINE_ENUM(XFS_SCRUB_TYPE_BMBTC);
> > +TRACE_DEFINE_ENUM(XFS_SCRUB_TYPE_DIR);
> > +TRACE_DEFINE_ENUM(XFS_SCRUB_TYPE_XATTR);
> > +TRACE_DEFINE_ENUM(XFS_SCRUB_TYPE_SYMLINK);
> > +TRACE_DEFINE_ENUM(XFS_SCRUB_TYPE_PARENT);
> > +TRACE_DEFINE_ENUM(XFS_SCRUB_TYPE_RTBITMAP);
> > +TRACE_DEFINE_ENUM(XFS_SCRUB_TYPE_RTSUM);
> > +TRACE_DEFINE_ENUM(XFS_SCRUB_TYPE_UQUOTA);
> > +TRACE_DEFINE_ENUM(XFS_SCRUB_TYPE_GQUOTA);
> > +TRACE_DEFINE_ENUM(XFS_SCRUB_TYPE_PQUOTA);
> > +
> > +#define XFS_SCRUB_TYPE_STRINGS \
>
> Hm I thought you just moved these sorts of #defines /out/ of the trace files
> and adjacent to their type definitions in core header files; why not this one?
[paraphrasing a conversation on irc]
So I'm becoming more convinced that these stringify things should all
just move to xfs_trace.h and scrub/trace.h. The /only/ users are the
tracepoints, but (according to Dave, I think?) the reason for putting
them next to the enum definition is so that we don't forget to update
the string list when we update the enums.
However, now that we know we have to maintain this TRACE_DEFINE_ENUM
hugpile (and it has to be in the trace header file) we might as well
move the stringify crap to the trace headers and leave a comment in
xfs_format.h.
--D
> > + { XFS_SCRUB_TYPE_PROBE, "probe" }, \
> > + { XFS_SCRUB_TYPE_SB, "sb" }, \
> > + { XFS_SCRUB_TYPE_AGF, "agf" }, \
> > + { XFS_SCRUB_TYPE_AGFL, "agfl" }, \
> > + { XFS_SCRUB_TYPE_AGI, "agi" }, \
> > + { XFS_SCRUB_TYPE_BNOBT, "bnobt" }, \
>
> -Eric
next prev parent reply other threads:[~2018-12-18 18:41 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-28 23:28 [PATCH 0/6] xfs-5.0: ftrace cleanups Darrick J. Wong
2018-11-28 23:28 ` [PATCH 1/6] xfs: fix symbolic enum printing in ftrace output Darrick J. Wong
2018-12-18 17:14 ` Eric Sandeen
2018-11-28 23:29 ` [PATCH 2/6] xfs: fix function pointer type in ftrace format Darrick J. Wong
2018-12-18 17:16 ` Eric Sandeen
2018-11-28 23:29 ` [PATCH 3/6] xfs: move XFS_AG_BTREE_CMP_FORMAT_STR mappings to libxfs Darrick J. Wong
2018-12-18 17:23 ` Eric Sandeen
2018-11-28 23:29 ` [PATCH 4/6] xfs: move XFS_INODE_FORMAT_STR " Darrick J. Wong
2018-12-18 17:24 ` Eric Sandeen
2018-12-18 18:30 ` Darrick J. Wong
2018-12-18 17:25 ` Eric Sandeen
2018-12-18 18:35 ` Darrick J. Wong
2018-11-28 23:29 ` [PATCH 5/6] xfs: stringify btree cursor types in ftrace output Darrick J. Wong
2018-12-18 17:21 ` Eric Sandeen
2018-12-18 17:27 ` Eric Sandeen
2018-12-18 18:35 ` Darrick J. Wong
2018-11-28 23:29 ` [PATCH 6/6] xfs: stringify scrub " Darrick J. Wong
2018-12-18 17:30 ` Eric Sandeen
2018-12-18 18:41 ` Darrick J. Wong [this message]
2018-12-18 20:31 ` Darrick J. Wong
-- strict thread matches above, loose matches on Subject: below --
2018-12-18 20:39 [PATCH v2 0/6] xfs: ftrace cleanups Darrick J. Wong
2018-12-18 20:40 ` [PATCH 6/6] xfs: stringify scrub types in ftrace output Darrick J. Wong
2018-12-18 20:44 ` Eric Sandeen
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=20181218184141.GE27208@magnolia \
--to=darrick.wong@oracle.com \
--cc=linux-xfs@vger.kernel.org \
--cc=sandeen@sandeen.net \
/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