Linux Trace Kernel
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Brian Norris" <briannorris@chromium.org>
Cc: linux-trace-kernel@vger.kernel.org
Subject: Re: [PATCH] tracing: 'select' GENERIC_TRACER, not 'depends'
Date: Mon, 16 Nov 2026 22:58:01 +0000	[thread overview]
Message-ID: <sashiko-outbox-217828@kernel.org> (raw)
In-Reply-To: <20261116144652.1.Iecb63200dd245f62032a3b1f60ae78cc48868094@changeid>

Thank you for your contribution! Sashiko AI review found 2 potential
issues to consider:
- [Low] tracing: FTRACE_STARTUP_TEST misuses select GENERIC_TRACER
- [Low] tracing: inaccurate Fixes trailer commit in commit message
--

commit 4d561c782a03c23e0e690cb6af78d98e81aa94d6
Author: Brian Norris <briannorris@chromium.org>

> tracing: 'select' GENERIC_TRACER, not 'depends'
>
> GENERIC_TRACER is not a user-selectable symbol, so it's impossible to
> enable FTRACE_STARTUP_TEST unless one also enables some other symbol
> that 'selects' GENERIC_TRACER for us.
>
> This very file also suggests:
>
>   All tracer options should select GENERIC_TRACER
>
> So, use 'select', not 'depends on'.
>
> Fixes: 60a11774b38f ("ftrace: add self-tests")
> Signed-off-by: Brian Norris <briannorris@chromium.org>

[Severity: Low]
Commit 60a11774b38f ("ftrace: add self-tests") added FTRACE_STARTUP_TEST
with "depends on TRACING" before GENERIC_TRACER existed.  Should the Fixes
tag instead reference 5e0a09391087 ("tracing: fix config options to not
show when automatically selected"), which introduced GENERIC_TRACER and
changed FTRACE_STARTUP_TEST to depend on it?

> diff --git a/kernel/trace/Kconfig b/kernel/trace/Kconfig
> index c41397eccee50..347658dabbe33 100644
> --- a/kernel/trace/Kconfig
> +++ b/kernel/trace/Kconfig
> @@ -1135,7 +1135,7 @@ config FTRACE_SELFTEST
>  
>  config FTRACE_STARTUP_TEST
>  	bool "Perform a startup test on ftrace"
> -	depends on GENERIC_TRACER
> +	select GENERIC_TRACER
>  	select FTRACE_SELFTEST
>  	help
>  	  This option performs a series of startup tests on ftrace. On bootup

[Severity: Low]
Should FTRACE_STARTUP_TEST depend on TRACING (or select TRACING) instead
of selecting GENERIC_TRACER?

GENERIC_TRACER is meant only for full tracer options so that
ENABLE_DEFAULT_TRACERS is hidden when a full tracer is enabled:

kernel/trace/Kconfig:
    # All tracer options should select GENERIC_TRACER. For those options that are
    # enabled by all tracers (context switch and event tracer) they select TRACING.
    ...
    config ENABLE_DEFAULT_TRACERS
    	bool "Trace process context switches and events"
    	depends on !GENERIC_TRACER
    	select TRACING

Because FTRACE_STARTUP_TEST is a test option rather than a tracer, having
it select GENERIC_TRACER disables and hides ENABLE_DEFAULT_TRACERS when no
full tracer is configured, and implicitly pulls in TRACING even when all
tracers are disabled.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261116144652.1.Iecb63200dd245f62032a3b1f60ae78cc48868094@changeid?part=1

      reply	other threads:[~2026-11-16 22:58 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-16 22:46 [PATCH] tracing: 'select' GENERIC_TRACER, not 'depends' Brian Norris
2026-11-16 22:58 ` sashiko-bot [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=sashiko-outbox-217828@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=briannorris@chromium.org \
    --cc=linux-trace-kernel@vger.kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    /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