Skip to content

Commit

Permalink
Automated rollback of commit 132a5f9.
Browse files Browse the repository at this point in the history
*** Reason for rollback ***

Going forward, the FDO type SAFDO will no longer be used to distinguish regular and configless AutoFDO.  Both flavours will use FDO type AFDO.

*** Original change description ***

Have getFdoBuildStamp return "SAFDO" when a .afdo profile is supplied along with xbinary_fdo.

This change enables the fdo_type build stamp to be set to SAFDO in order to distinguish and track the prevalence of SAFDO in the fleet. As an alternative to this implementation, I also considered defining an SAFDO build feature and using a new file extention to identify SAFDO file. This CL is here unknown commit. I decided this implementation is preferable since from a blaze perspective, SAFDO is really...

***

PiperOrigin-RevId: 595128289
Change-Id: Ie1bc2f1a7dc023ec42965cfee477a391434863bb
  • Loading branch information
Googler authored and copybara-github committed Jan 2, 2024
1 parent 23978ce commit 9bf9ced
Showing 1 changed file with 1 addition and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -291,11 +291,7 @@ public static String getFdoBuildStamp(
FeatureConfiguration featureConfiguration) {
FdoContext.BranchFdoProfile branchFdoProfile = fdoContext.getBranchFdoProfile();
if (branchFdoProfile != null) {
// If the profile has a .afdo extension and was supplied to the build via the xbinary_fdo
// flag, then this is a safdo profile.
if (branchFdoProfile.isAutoFdo() && cppConfiguration.getXFdoProfileLabel() != null) {
return featureConfiguration.isEnabled(CppRuleClasses.AUTOFDO) ? "SAFDO" : null;
}

if (branchFdoProfile.isAutoFdo()) {
return featureConfiguration.isEnabled(CppRuleClasses.AUTOFDO) ? "AFDO" : null;
}
Expand Down

0 comments on commit 9bf9ced

Please sign in to comment.