[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <u5yiybx34ghfisslqv4dudyph2opwedq6qdwy7ag2bcnawnnqc@cue4hs5gse32>
Date: Fri, 21 Mar 2025 11:53:50 -0700
From: Josh Poimboeuf <jpoimboe@...nel.org>
To: Steven Rostedt <rostedt@...dmis.org>
Cc: Thomas Gleixner <tglx@...utronix.de>, x86@...nel.org,
linux-kernel@...r.kernel.org, Ingo Molnar <mingo@...nel.org>,
Peter Zijlstra <peterz@...radead.org>, Masahiro Yamada <masahiroy@...nel.org>
Subject: Re: [PATCH] tracing: Disable branch profiling in noinstr code
On Fri, Mar 21, 2025 at 02:28:26PM -0400, Steven Rostedt wrote:
> On Fri, 21 Mar 2025 10:21:34 -0700
> Josh Poimboeuf <jpoimboe@...nel.org> wrote:
>
> > I *basically* did that, albeit in more of a surgical manner by editing a
> > lot of the makefiles in arch/x86/*/.
> >
> > Let me see if I can figure out how to do that more broadly at the
> > arch/x86 level.
>
> Ah, I thought there was a way to do it recursively, but I don't see a
> way to do that.
>
> Masahiro, do you know of a way that we can add a CFLAGS option to a
> directory and all its siblings without modifying all the Makefiles?
This appears to work:
diff --git a/arch/x86/Kbuild b/arch/x86/Kbuild
index cf0ad89f5639..ff8f0e2fbf4b 100644
--- a/arch/x86/Kbuild
+++ b/arch/x86/Kbuild
@@ -1,4 +1,7 @@
# SPDX-License-Identifier: GPL-2.0
+
+subdir-ccflags-$(CONFIG_TRACE_BRANCH_PROFILING) += -DDISABLE_BRANCH_PROFILING
+
obj-$(CONFIG_ARCH_HAS_CC_PLATFORM) += coco/
obj-y += entry/
--
Josh
Powered by blists - more mailing lists