aboutsummaryrefslogtreecommitdiffstats
path: root/cc/pgo.go
diff options
context:
space:
mode:
Diffstat (limited to 'cc/pgo.go')
-rw-r--r--cc/pgo.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/cc/pgo.go b/cc/pgo.go
index 758c3d6d..3ce67be7 100644
--- a/cc/pgo.go
+++ b/cc/pgo.go
@@ -38,6 +38,10 @@ const profileSamplingFlag = "-gline-tables-only"
const profileUseInstrumentFormat = "-fprofile-use=%s"
const profileUseSamplingFormat = "-fprofile-sample-use=%s"
+func recordMissingProfileFile(ctx ModuleContext, missing string) {
+ getNamedMapForConfig(ctx.Config(), modulesMissingProfileFile).Store(missing, true)
+}
+
type PgoProperties struct {
Pgo struct {
Instrumentation *bool
@@ -96,6 +100,10 @@ func (props *PgoProperties) getPgoProfileFile(ctx ModuleContext) android.Optiona
}
}
+ // Record that this module's profile file is absent
+ missing := *props.Pgo.Profile_file + ":" + ctx.ModuleDir() + "/Android.bp:" + ctx.ModuleName()
+ recordMissingProfileFile(ctx, missing)
+
return android.OptionalPathForPath(nil)
}