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: Tue, 17 Nov 2026 18:36:09 +0000 [thread overview]
Message-ID: <sashiko-outbox-219362@kernel.org> (raw)
In-Reply-To: <avybp3O2zxcLozKB@google.com>
Thank you for your contribution! Sashiko AI review found 2 potential
issues to consider:
- [High] tracing: missing Signed-off-by trailer and unformatted email
reply changelog
- [Low] tracing: ENABLE_DEFAULT_TRACERS stays unselected for direct
TRACING selectors
--
commit 3e6de7d49bb4a2d1503d2aeab72b682a01dfe176
Author: Brian Norris <briannorris@chromium.org>
> tracing: 'select' GENERIC_TRACER, not 'depends'
>
> On Tue, Nov 17, 2026 at 08:55:52AM -0500, Steven Rostedt wrote:
> > On Mon, 16 Nov 2026 22:58:01 +0000
> > sashiko-bot@kernel.org wrote:
> >
> > > [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.
> >
> > Actually, the selftests should depend on TRACING and not GENERIC_TRACER. It
> > may have been that the self tests were added before the trace events.
> >
> > But it should not "select" a config. The selftest are only to be selected
> > if there is something to test.
>
> OK, I can respin with 'depends on TRACING'.
>
> However, I think the Kconfig setup for kernel/trace/ is still a bit
> haphazard. For example, it's reasonably common to want EVENT_TRACING but
> not the more invasive tracing (like FUNCTION_TRACER; and therefore no
> GENERIC_TRACER) -- this is how all Android kernels are built, for one.
>
> But there's no user-configurable way to enable EVENT_TRACING. We only
> get it implicitly if something else inadvertently selects 'FTRACE'
> (which selects EVENT_TRACING). For Android, that's CONFIG_KPROBES and
> CONFIG_HIST_TRIGGERS.
>
> ...or is that what ENABLE_DEFAULT_TRACERS is? Its name doesn't really
> suggest that, and it's mutually exclusive witih many other tracers, so
> it's a bit awkward making choices, as the whole system appears much less
> orthogonal than expected.
>
> Anyway, my point is that it's not exactly straightforward to enable the
> features you want and get the tests you want.
>
> I've appended a diff that seems a bit more user-friendly to me. It
> makes it more explicit in the menu how event-tracing is forced-on by
> many other tracers, but is user-configurable when it's not forced. I can
> formally submit it (in 2 patches) if you'd like.
>
> Brian
[Severity: High]
This commit is missing a Signed-off-by trailer, its body is an unedited
mailing-list reply rather than a commit changelog, and the subject line
states the opposite of the FTRACE_STARTUP_TEST change (which switches
"depends on GENERIC_TRACER" to "depends on TRACING").
> diff --git a/kernel/trace/Kconfig b/kernel/trace/Kconfig
> index c41397eccee50..f49397f7c92d6 100644
> --- a/kernel/trace/Kconfig
> +++ b/kernel/trace/Kconfig
> @@ -198,6 +198,7 @@ config TRACING
> config GENERIC_TRACER
> bool
> select TRACING
> + select ENABLE_DEFAULT_TRACERS
>
> #
> # Minimum requirements an architecture has to meet for us to
> @@ -595,7 +596,6 @@ config MMIOTRACE
>
> config ENABLE_DEFAULT_TRACERS
> bool "Trace process context switches and events"
> - depends on !GENERIC_TRACER
> select TRACING
> help
> This tracer hooks to various trace points in the kernel,
[Severity: Low]
Does ENABLE_DEFAULT_TRACERS remain unselected when TRACING is enabled by
options that do not select GENERIC_TRACER?
Options such as KPROBE_EVENTS and HIST_TRIGGERS select TRACING directly
(which in turn selects EVENT_TRACING and CONTEXT_SWITCH_TRACER) without
selecting GENERIC_TRACER. When those options are enabled with
GENERIC_TRACER=n, event tracing is already forced on, but
ENABLE_DEFAULT_TRACERS stays n and appears in menuconfig as a mutable
toggle that has no effect on the build.
Also, the comment above config TRACING still explains that GENERIC_TRACER
and TRACING are separate so that ENABLE_DEFAULT_TRACERS is hidden when
selected by another tracer, which no longer matches the Kconfig logic once
"depends on !GENERIC_TRACER" is removed.
--
Sashiko AI review · https://sashiko.dev/#/patchset/avybp3O2zxcLozKB@google.com?part=1
next prev parent reply other threads:[~2026-11-17 18:36 UTC|newest]
Thread overview: 14+ 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
2026-11-17 13:55 ` Steven Rostedt
2026-11-17 18:23 ` Brian Norris
2026-11-17 18:36 ` sashiko-bot [this message]
2026-11-17 18:42 ` Brian Norris
2026-11-17 19:22 ` Steven Rostedt
2026-11-17 19:23 ` Steven Rostedt
2026-11-17 20:35 ` Brian Norris
2026-11-17 21:10 ` Steven Rostedt
2026-11-17 21:41 ` Brian Norris
2026-11-18 0:58 ` Masami Hiramatsu (Google)
2026-11-17 13:53 ` Steven Rostedt
2026-11-17 17:45 ` Brian Norris
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-219362@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.