From: Steven Rostedt <rostedt@goodmis.org>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
Linux trace kernel <linux-trace-kernel@vger.kernel.org>,
Masami Hiramatsu <mhiramat@kernel.org>,
Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
Mark Rutland <mark.rutland@arm.com>,
Alexandre Ghiti <alex@ghiti.fr>, ChenMiao <chenmiao.ku@gmail.com>,
linux-arch@vger.kernel.org
Subject: Re: [RFC][PATCH] ftrace: Make DYNAMIC_FTRACE always enabled for architectures that support it
Date: Thu, 3 Jul 2025 15:26:43 -0400 [thread overview]
Message-ID: <20250703152643.0a4a45fe@gandalf.local.home> (raw)
In-Reply-To: <CAHk-=wjXjq7wJM-xnTCcGCxg2viUcN6JfHBETpvD94HX7HTHFQ@mail.gmail.com>
On Thu, 3 Jul 2025 09:57:37 -0700
Linus Torvalds <torvalds@linux-foundation.org> wrote:
> IOW, I think that if we do this, we should just get rid of the
> "HAVE_DYNAMIC_FTRACE{_XYZ}" config variables entirely, and just make
> architectures say
>
> select DYNAMIC_FTRACE if FUNCTION_TRACER
>
> because the "HAVE_xyz" config variables seem to add no actual value,
> only confusion.
>
> Or am I missing some reason for still having that extra config
> variable indirection?
I always thought the "HAVE_" configs was a way for architectures to state
that it supports something but doesn't necessarily enable it. Whereas the
not "HAVE_" configs are user selectable.
If I go and make all the architectures have:
select DYNAMIC_FTRACE if FUNCTION_TRACER
it seems to be duplicating the work, where all the architectures need to
know the dependencies. To me, that belongs in the generic configs.
The FUNCTION_TRACER config is user selectable, and DYNMIC_FTRACE gets set
when the arch supports dynamic ftrace and the user enables function tracing.
Now, I probably could go and try to clean up some of the HAVE_FTRACE_*
configs. Ftrace has a lot of code that is tightly coupled to architecture
specific code because it relies on trampolines written in assembly.
Throughout the years, I added new features and optimizations that required
architecture fixes. As a lot of the architectures support ftrace but I have
no idea how to update them, I implemented the change in x86 and added a
HAVE_FTRACE_* config so that other architectures could have time to update
to the new feature too and the old way still works.
I should look to see what hasn't been ported to every architecture that
supports ftrace and remove the configs that are now universal.
-- Steve
next prev parent reply other threads:[~2025-07-03 19:26 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-03 15:52 [RFC][PATCH] ftrace: Make DYNAMIC_FTRACE always enabled for architectures that support it Steven Rostedt
2025-07-03 16:57 ` Linus Torvalds
2025-07-03 19:26 ` Steven Rostedt [this message]
2025-07-03 19:49 ` Steven Rostedt
2025-07-03 19:52 ` Steven Rostedt
2025-07-03 20:58 ` Linus Torvalds
2025-07-04 15:12 ` Steven Rostedt
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=20250703152643.0a4a45fe@gandalf.local.home \
--to=rostedt@goodmis.org \
--cc=alex@ghiti.fr \
--cc=chenmiao.ku@gmail.com \
--cc=linux-arch@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-trace-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=mathieu.desnoyers@efficios.com \
--cc=mhiramat@kernel.org \
--cc=torvalds@linux-foundation.org \
/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