On Thu, Jul 09, 2026 at 10:46:52AM +0530, [email protected] wrote:
> From: Dhruv Chawla <[email protected]>
> 
> As a follow up to r16-7956-g2e3d991ea1855d, this patch passes the perf profile
> name from Makefile.tpl to the gcc-auto-profile scripts. I initially
> wanted to do this via the PERF_DATA make variable, however the
> autoprofile stage (which invokes gcc-auto-profile) and the autofeedback
> stage (which defines PERF_DATA) don't share the variable definition, so
> there was no clean way to do it. This at least consolidates the file name into
> one location, so that it is easier to modify later on.
> 
> Autoprofilebootstrapped and regtested on aarch64-linux-gnu with SPE.
> 
> ChangeLog:
> 
>       * Makefile.in: Regenerate.
>       * Makefile.tpl: Pass "--perf perf.data" to gcc-auto-profile. Separate
>       the make invocation from perf using "--".
> 
> gcc/ChangeLog:
> 
>       * config/aarch64/gcc-auto-profile: Replace explicit perf.data
>       with perf_file variable. Add parsing for "--perf" flag.
>       * config/i386/gcc-auto-profile: Likewise.

This is the wrong way to edit config/i386/gcc-auto-profile, you have to change
the generation script in contrib/gen_autofdo_event.py and then rerun it.

I think some earlier change did this already incorrectly, but that's
no reason to do it again.

The rest looks fine to me.

-Andi

Reply via email to