On Fri, Mar 06, 2026 at 01:23:27PM +0530, [email protected] wrote:
>       for component_in_prev in "$(components_in_prev)"; do \
>         perf_path=../prev-$$component_in_prev/$(PERF_DATA); \
> -       echo "Perf path:"; \
> -       echo $$perf_path; \
> +       echo "Perf path:" $$perf_path "..." `[ -f $$perf_path ] && echo 
> exists || echo does not exist`; \
>         if [ -f $$perf_path ]; then \
>           profile_name=cc1_$$component_in_prev.fda; \
> -         $(CREATE_GCOV) -binary ../stage1-gcc/cc1$(exeext) -gcov 
> $$profile_name -profile $$perf_path -gcov_version 3 || exit 1; \
> +         if [ "x`perf buildid-list -i $$perf_path | grep '/cc1$$' && echo 
> yes`" != "x" ]; then \

The open coded perfs should be also using AFDO_PROFILER

Or really just $(PERF)

> diff --git a/gcc/configure.ac b/gcc/configure.ac
> index d12382d2fa3..04503800423 100644
> --- a/gcc/configure.ac
> +++ b/gcc/configure.ac
> @@ -7894,6 +7894,21 @@ gif=`if test x$enable_x86_64_mfentry = xyes; then echo 
> 1; else echo 0; fi`
>  AC_DEFINE_UNQUOTED(ENABLE_X86_64_MFENTRY, $gif,
>  [Define to enable -mfentry by default on x86-64.])
>  
> +AFDO_PROFILER=perf
> +case "$cpu_type" in
> +  aarch64)
> +    AC_MSG_CHECKING(AArch64 build supports SPE profiling for 
> autoprofiledbootstrap)
> +    aarch64_spe_support=no
> +    if test -x /usr/bin/perf && test -n "$(/usr/bin/perf list | grep 
> arm_spe)"; then
> +      AFDO_PROFILER=perf_spe

But I'm actually surprised about this, I thought the standard perf
supported spe. Are you sure most users have a perf_spe?

The rest looks good to me.

-Andi

Reply via email to