Re: [PATCH] kbuild: AutoFDO: Disable Profi (-fno-sample-profile-use-profi)

From: Doug Anderson

Date: Fri Nov 06 2026 - 14:41:14 EST


Hi,

On Fri, Nov 6, 2026 at 10:17 AM Nick Desaulniers
<ndesaulniers@xxxxxxxxxx> wrote:
>
> On Fri, Nov 6, 2026 at 10:13 AM Rong Xu <xur@xxxxxxxxxx> wrote:
> >
> > As far as I know, Profi is enabled in the Clang front-end initially. I
> > remember reviewing a patch that enabled Profi for the Rust front-end,
> > though it's possible that has already been merged.
> >
> > It seems strange that these flags diverge between C and Rust. Could we
> > add a comment to indicate that Profi is currently not enabled in Rust?
> >
> > Rong
> >
> > On Fri, Nov 6, 2026 at 10:06 AM Doug Anderson <dianders@xxxxxxxxxxxx> wrote:
> > >
> > > Hi,
> > >
> > > On Fri, Nov 6, 2026 at 9:43 AM Rong Xu <xur@xxxxxxxxxx> wrote:
> > > >
> > > > Just one thing: I think we should also have this flag for Rust so Rust
> > > > and c are consistent.
> > >
> > > Please see the commit message, which says:
> > >
> > > > RUSTFLAGS_AUTOFDO_CLANG and KBUILD_LDFLAGS do not need changes because
> > > > SampleProfileUseProfi remains false by default in the LLVM backend and
> > > > is only enabled by the Clang driver.
> > >
> > > Is that incorrect?
>
> Probably better to be explicit, rather than rely on the implicit
> default value, which sounds like it may be changing over time.

Sure. v2 posted here:

https://lore.kernel.org/r/20261106113800.v2.1.I0b27923381ef34cc99cdf8b65fea2e1bafce6370@changeid