From: "Darrick J. Wong" <darrick.wong@oracle.com>
To: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Cc: linux-xfs@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] xfs: allow disabling xfs tracepoints via Kconfig
Date: Mon, 4 Feb 2019 13:37:38 -0800 [thread overview]
Message-ID: <20190204213738.GB7991@magnolia> (raw)
In-Reply-To: <20190204212035.9919-1-linux@rasmusvillemoes.dk>
On Mon, Feb 04, 2019 at 10:20:35PM +0100, Rasmus Villemoes wrote:
> linux/tracepoints.h allows individual subsystems to disable their
> tracepoints. Add such a knob for xfs. Disabling XFS_TRACEPOINTS
> reduces the resident size of xfs.ko by about a third, or ~350 KiB.
LOL. :)
> $ size /tmp/xfs/{a,b}/xfs.ko
> text data bss dec hex filename
> 671726 4129 632 676487 a5287 /tmp/xfs/a/xfs.ko
> 893192 166737 632 1060561 102ed1 /tmp/xfs/b/xfs.ko
>
> Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
> ---
> fs/xfs/Kconfig | 9 +++++++++
> fs/xfs/xfs_trace.h | 4 ++++
I think a similar thing ought to apply to fs/xfs/scrub/trace.h, right?
More general questions:
(a) Do we want to be doing this on a per-subsystem basis?
(b) Since xfs_scrub is a separate trace domain, do we want a separate
Kconfig item for toggling scrub trace, or is one big one enough?
(I can't think of why I'd want one on and the other off.)
--D
> 2 files changed, 13 insertions(+)
>
> diff --git a/fs/xfs/Kconfig b/fs/xfs/Kconfig
> index 457ac9f97377..d099e6d9f6c5 100644
> --- a/fs/xfs/Kconfig
> +++ b/fs/xfs/Kconfig
> @@ -141,3 +141,12 @@ config XFS_ASSERT_FATAL
> result in warnings.
>
> This behavior can be modified at runtime via sysfs.
> +
> +config XFS_TRACEPOINTS
> + bool "XFS tracepoints"
> + default y
> + depends on XFS_FS && TRACEPOINTS
> + help
> + Say Y here to build XFS with tracepoints.
> +
> + You can say N here to reduce the size of the kernel image.
> diff --git a/fs/xfs/xfs_trace.h b/fs/xfs/xfs_trace.h
> index 6fcc893dfc91..5fb3d5c0483e 100644
> --- a/fs/xfs/xfs_trace.h
> +++ b/fs/xfs/xfs_trace.h
> @@ -6,6 +6,10 @@
> #undef TRACE_SYSTEM
> #define TRACE_SYSTEM xfs
>
> +#ifndef CONFIG_XFS_TRACEPOINTS
> +#define NOTRACE
> +#endif
> +
> #if !defined(_TRACE_XFS_H) || defined(TRACE_HEADER_MULTI_READ)
> #define _TRACE_XFS_H
>
> --
> 2.20.1
>
next prev parent reply other threads:[~2019-02-04 21:37 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-04 21:20 [PATCH] xfs: allow disabling xfs tracepoints via Kconfig Rasmus Villemoes
2019-02-04 21:37 ` Darrick J. Wong [this message]
2019-02-04 21:53 ` Dave Chinner
2019-02-04 22:12 ` Rasmus Villemoes
2019-02-04 23:13 ` Dave Chinner
2019-02-05 10:00 ` Rasmus Villemoes
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=20190204213738.GB7991@magnolia \
--to=darrick.wong@oracle.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-xfs@vger.kernel.org \
--cc=linux@rasmusvillemoes.dk \
/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