Setup PGO for dex2oat and related libraries
Bug: http://b/63768402
Setup PGO for libart-compiler.so, dexlayout.so, and the dex2oat binary.
The setup for vixl is done in an accompanying CL. An instrumented copy
of dex2oat can be produced for the device using:
ANDROID_PGO_INSTRUMENT=dex2oat make
Profiles for the instrumented libraries can be produced by running them
on a representative workload.
Currently, profile use is disabled (via enable_profile_use: false).
This can be turned on once a profile is checked in.
Test: Build with ANDROID_PGO_INSTRUMENT=dex2oat and verify profiles get
generated.
Change-Id: Iea056ebd4a9fe8c805ffc2211394d6e1d726264c
diff --git a/compiler/Android.bp b/compiler/Android.bp
index 164f9c1..d4d72f3 100644
--- a/compiler/Android.bp
+++ b/compiler/Android.bp
@@ -249,6 +249,13 @@
shared_libs: [
"libart",
],
+
+ pgo: {
+ instrumentation: true,
+ profile_file: "dex2oat.profdata",
+ benchmarks: ["dex2oat"],
+ enable_profile_use: false,
+ }
}
art_cc_library {