public inbox for linux-kbuild@vger.kernel.org
 help / color / mirror / Atom feed
From: xur@google.com
To: "Alexey Gladkov" <legion@kernel.org>,
	"Alice Ryhl" <aliceryhl@google.com>,
	"Ard Biesheuvel" <ardb@kernel.org>,
	"Bill Wendling" <morbo@google.com>,
	"Han Shen" <shenhan@google.com>, "Ingo Molnar" <mingo@kernel.org>,
	"Josh Poimboeuf" <jpoimboe@kernel.org>,
	"Justin Stitt" <justinstitt@google.com>,
	"Kees Cook" <kees@kernel.org>,
	"Linus Walleij" <linus.walleij@linaro.org>,
	"Masahiro Yamada" <masahiroy@kernel.org>,
	"Miguel Ojeda" <ojeda@kernel.org>,
	"Nathan Chancellor" <nathan@kernel.org>,
	"Nick Desaulniers" <nick.desaulniers+lkml@gmail.com>,
	"Nicolas Schier" <nicolas.schier@linux.dev>,
	"Peter Zijlstra" <peterz@infradead.org>,
	"Tamir Duberstein" <tamird@gmail.com>,
	"Thomas Gleixner" <tglx@linutronix.de>,
	"Thomas Weißschuh" <thomas.weissschuh@linutronix.de>,
	"Yabin Cui" <yabinc@google.com>,
	"Sriraman Tallam" <tmsriram@google.com>
Cc: linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org,
	 llvm@lists.linux.dev, Rong Xu <xur@google.com>
Subject: [PATCH v2 3/4] kbuild: Remove MFS flags from Propeller profile generate builds
Date: Tue, 14 Oct 2025 19:11:55 +0000	[thread overview]
Message-ID: <20251014191156.3836703-4-xur@google.com> (raw)
In-Reply-To: <20251014191156.3836703-1-xur@google.com>

From: Rong Xu <xur@google.com>

Propeller profile generation requires Machine Function Splitter (MFS)
to be disabled.

Change-Id: I12579e6f2cfaecefbed0ce85f1904f79783562a1
Signed-off-by: Rong Xu <xur@google.com>
---
 scripts/Makefile.propeller | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/scripts/Makefile.propeller b/scripts/Makefile.propeller
index fa018098506b8..8c3e514dbcc04 100644
--- a/scripts/Makefile.propeller
+++ b/scripts/Makefile.propeller
@@ -13,8 +13,14 @@ else
   else
     CFLAGS_PROPELLER_CLANG := -fbasic-block-sections=labels
   endif
+  # Disable Machine Function Splitter for Propeller.
+  # Propeller profile generation requires Machine Function Splitter to be disabled.
+  # We use -fno-split-machine-functions to override any prior AutoFDO/PGO flags
+  #(in Makefile.lib), assuming Propeller options are applied afterward.
+  CFLAGS_PROPELLER_CLANG += -fno-split-machine-functions
 endif
 
+
 # Propeller requires debug information to embed module names in the profiles.
 # If CONFIG_DEBUG_INFO is not enabled, set -gmlt option. Skip this for AutoFDO,
 # as the option should already be set.
@@ -33,6 +39,8 @@ ifdef CONFIG_LTO_CLANG_THIN
     else
        _ldflags_propeller += --lto-basic-block-sections=labels
     endif
+    # Again, we need to disable Machine Function Splitter.
+    LDFLAGS_vmlinux := $(filter-out -plugin-opt=-split-machine-functions, $(LDFLAGS_vmlinux))
   endif
 endif
 
-- 
2.51.0.788.g6d19910ace-goog


  parent reply	other threads:[~2025-10-14 19:12 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-14 19:11 [PATCH v2 0/4] kbuild: Fixes for AutoFDO and Propeller builds xur
2025-10-14 19:11 ` [PATCH v2 1/4] kbuild: Fix Propeller flags xur
2025-10-14 19:11 ` [PATCH v2 2/4] kbuild: Disable AutoFDO and Propeller flags for kernel modules xur
2025-10-16  1:29   ` kernel test robot
2025-10-16  2:38   ` kernel test robot
2025-10-14 19:11 ` xur [this message]
2025-10-14 19:11 ` [PATCH v2 4/4] kbuild: Add config to assert profile accuracy for aggressive optimization xur
2025-10-15  3:38   ` Han Shen

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=20251014191156.3836703-4-xur@google.com \
    --to=xur@google.com \
    --cc=aliceryhl@google.com \
    --cc=ardb@kernel.org \
    --cc=jpoimboe@kernel.org \
    --cc=justinstitt@google.com \
    --cc=kees@kernel.org \
    --cc=legion@kernel.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=llvm@lists.linux.dev \
    --cc=masahiroy@kernel.org \
    --cc=mingo@kernel.org \
    --cc=morbo@google.com \
    --cc=nathan@kernel.org \
    --cc=nick.desaulniers+lkml@gmail.com \
    --cc=nicolas.schier@linux.dev \
    --cc=ojeda@kernel.org \
    --cc=peterz@infradead.org \
    --cc=shenhan@google.com \
    --cc=tamird@gmail.com \
    --cc=tglx@linutronix.de \
    --cc=thomas.weissschuh@linutronix.de \
    --cc=tmsriram@google.com \
    --cc=yabinc@google.com \
    /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