Merge "Support instrumenting all PGO-enabled modules"
This commit is contained in:
14
cc/pgo.go
14
cc/pgo.go
@@ -197,7 +197,7 @@ func (pgo *pgo) begin(ctx BaseModuleContext) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// This module should be instrumented if ANDROID_PGO_INSTRUMENT is set
|
// This module should be instrumented if ANDROID_PGO_INSTRUMENT is set
|
||||||
// and includes a benchmark listed for this module
|
// and includes 'all', 'ALL' or a benchmark listed for this module.
|
||||||
//
|
//
|
||||||
// TODO Validate that each benchmark instruments at least one module
|
// TODO Validate that each benchmark instruments at least one module
|
||||||
pgo.Properties.ShouldProfileModule = false
|
pgo.Properties.ShouldProfileModule = false
|
||||||
@@ -207,10 +207,14 @@ func (pgo *pgo) begin(ctx BaseModuleContext) {
|
|||||||
pgoBenchmarksMap[b] = true
|
pgoBenchmarksMap[b] = true
|
||||||
}
|
}
|
||||||
|
|
||||||
for _, b := range pgo.Properties.Pgo.Benchmarks {
|
if pgoBenchmarksMap["all"] == true || pgoBenchmarksMap["ALL"] == true {
|
||||||
if pgoBenchmarksMap[b] == true {
|
pgo.Properties.ShouldProfileModule = true
|
||||||
pgo.Properties.ShouldProfileModule = true
|
} else {
|
||||||
break
|
for _, b := range pgo.Properties.Pgo.Benchmarks {
|
||||||
|
if pgoBenchmarksMap[b] == true {
|
||||||
|
pgo.Properties.ShouldProfileModule = true
|
||||||
|
break
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user