From 0880a82de58824a7dbd94c583f6ca3deb200bc9d Mon Sep 17 00:00:00 2001 From: Yi Kong Date: Tue, 14 Nov 2023 23:49:40 +0000 Subject: [PATCH] Revert "afdo: Remove -fprofile-sample-accurate flag" This reverts commit febf8b9bdf40b086a50930901a7ccfaaa628bcba. We are still seeing flaky performance alerts from microbenchmarks even with this change, and this has caused binary size / memory usage increase. Let's add this flag back and observe whether performance regression reports become more frequent. Change-Id: I0fec1296b1f49b21b59d81add677f6a926ee88dc --- cc/afdo.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cc/afdo.go b/cc/afdo.go index ac210d44a..91cf0b8a2 100644 --- a/cc/afdo.go +++ b/cc/afdo.go @@ -35,7 +35,7 @@ var ( var afdoProfileProjectsConfigKey = android.NewOnceKey("AfdoProfileProjects") // This flag needs to be in both CFlags and LdFlags to ensure correct symbol ordering -const afdoFlagsFormat = "-fprofile-sample-use=%s" +const afdoFlagsFormat = "-fprofile-sample-use=%s -fprofile-sample-accurate" func recordMissingAfdoProfileFile(ctx android.BaseModuleContext, missing string) { getNamedMapForConfig(ctx.Config(), modulesMissingProfileFileKey).Store(missing, true)