On 18/03/26 21:22, Dhruv Chawla wrote:
External email: Use caution opening links or attachments


On 18/03/26 16:12, Dhruv Chawla wrote:
External email: Use caution opening links or attachments


On 16/03/26 13:33, Richard Biener wrote:
External email: Use caution opening links or attachments


On Mon, 16 Mar 2026, Dhruv Chawla wrote:

On 10/03/26 16:00, Jan Hubicka wrote:
External email: Use caution opening links or attachments


From: Dhruv Chawla <[email protected]>

This option prints the current version of GCOV that is being used by the
AutoFDO infrastructure. This avoids the need to bump the number across
mutiple files in the build system for future increments to it.

Bootstrapped and regtested on aarch64-linux-gnu.

Signed-off-by: Dhruv Chawla <[email protected]>

gcc/ChangeLog:

        * Makefile.in (all.fda): Add `--print-autofdo-gcov-version` to
        profile_merger invocation.
        * auto-profile.cc (AUTO_PROFILE_VERSION): Move from here ...
        * auto-profile.h (AUTO_PROFILE_VERSION): ... to here.
        * common.opt: Add -print-autofdo-gcov-version and
        --print-autofdo-gcov-version.
        * doc/invoke.texi: Document the options.
        * gcc.cc: Add include for auto-profile.h.
        (driver_handle_option): Add OPT_print_autofdo_gcov_version.
        (driver::maybe_print_and_exit): Handle the option.

gcc/c/ChangeLog:

        * Make-lang.in: Add `--print-autofdo-gcov-version` to
        profile_merger and create_gcov invocations.

gcc/cp/ChangeLog:

        * Make-lang.in: Likewise.

gcc/lto/ChangeLog:

        * Make-lang.in: Likewise.

gcc/testsuite/ChangeLog:

        * lib/profopt.exp: Invoke $GCC_UNDER_TEST with
        `--print-autofdo-gcov-version` before running create_gcov to get
        the GCOV version.
OK,
thanks!


(CC += Richi)

I am planning on committing this in the next few days. Will wait for some
time for Richi to respond whether this looks okay for 16 or if I should wait
until 17.

LGTM for 16.

Thanks! Committed as r16-8154-g17880c0f3981d9.


Looks like this broke the sourceware builder because I did not update
common.opt.urls - 
https://builder.sourceware.org/buildbot/#/builders/269/builds/22377/steps/8/logs/stdio.

What is the recommended way to fix this? Is it okay to just apply
the diff from the builder's output?


Committed the following patch as obvious (r16-8170-gec0e76a54fb9f4).

--
Regards,
Dhruv

-- >8 --

Author: Dhruv Chawla <[email protected]>
Date:   Thu Mar 19 06:14:38 2026 -0700

    AutoFDO: Update common.opt.urls with new option

    I had missed updating this earlier while adding the
    --print-autofdo-gcov-version option. Pushing as obvious.

    Signed-off-by: Dhruv Chawla <[email protected]>

    gcc/ChangeLog:

            * common.opt.urls: Added missing entry.

diff --git a/gcc/common.opt.urls b/gcc/common.opt.urls
index b2d7a20da81..6325b083615 100644
--- a/gcc/common.opt.urls
+++ b/gcc/common.opt.urls
@@ -1924,6 +1924,9 @@ UrlSuffix(gcc/Instrumentation-Options.html#index-pg)
 pipe
 UrlSuffix(gcc/Overall-Options.html#index-pipe)

+print-autofdo-gcov-version
+UrlSuffix(gcc/Developer-Options.html#index-print-autofdo-gcov-version)
+
 print-file-name=
 UrlSuffix(gcc/Developer-Options.html#index-print-file-name)



Richard.

--
Richard Biener <[email protected]>
SUSE Software Solutions Germany GmbH,
Frankenstrasse 146, 90461 Nuernberg, Germany;
GF: Jochen Jaser, Andrew McDonald, Werner Knoblich; (HRB 36809, AG Nuernberg)


--
Regards,
Dhruv


--
Regards,
Dhruv

Reply via email to