summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Pirama Arumuga Nainar <pirama@google.com> 2017-11-16 22:40:00 -0800
committer Pirama Arumuga Nainar <pirama@google.com> 2017-11-17 10:31:48 -0800
commit0dfd4be9ae2a4bd049c964591b90b611aaa4023f (patch)
treeaeced6abf2933e251fd5a7dfdc97e89471ef3245
parent58180b0282f20e569e3c66b573ec94464a06f19b (diff)
Apply PGO for all modules in hwui
Bug: http://b/65598278 Since hwui source files get statically linked into hwuimicro and hwuimacro, we need to enable PGO for them (to instrument and collect profiles). For consistency, apply PGO to all hwui modules (including the unit tests) so we test the actual build configuration for libhwui. For now, we don't use any profile so this CL affects the build only when instrumentation is turned on using 'ANDROID_PGO_INSTRUMENT=hwui'. Test: Build with ANDROID_PGO_INSTRUMENT=hwui, run hwuimacro and hwuimicro and verify profile generation Change-Id: I9d35953d544e0ccc180eb164ff53466239194c0f
-rw-r--r--libs/hwui/Android.bp31
1 files changed, 18 insertions, 13 deletions
diff --git a/libs/hwui/Android.bp b/libs/hwui/Android.bp
index 24ce1e4c23d0..5c577aecca28 100644
--- a/libs/hwui/Android.bp
+++ b/libs/hwui/Android.bp
@@ -2,9 +2,10 @@ cc_defaults {
name: "hwui_defaults",
defaults: [
"hwui_static_deps",
- "skia_deps"
+ "skia_deps",
//"hwui_bugreport_font_cache_usage",
//"hwui_compile_for_perf",
+ "hwui_pgo",
],
cpp_std: "c++17",
@@ -109,6 +110,22 @@ cc_defaults {
include_dirs: ["frameworks/native/opengl/libs/GLES2"],
}
+// Build libhwui with PGO by default.
+// Location of PGO profile data is defined in build/soong/cc/pgo.go
+// and is separate from hwui.
+// To turn it off, set ANDROID_PGO_NO_PROFILE_USE environment variable
+// or set enable_profile_use property to false.
+cc_defaults {
+ name: "hwui_pgo",
+
+ pgo: {
+ instrumentation: true,
+ profile_file: "hwui/hwui.profdata",
+ benchmarks: ["hwui"],
+ enable_profile_use: false,
+ },
+}
+
// ------------------------
// library
// ------------------------
@@ -255,18 +272,6 @@ cc_library {
// Has moderate overhead
"hwui_enable_opengl_validation",
],
-
- // Build libhwui with PGO by default.
- // Location of PGO profile data is defined in build/soong/cc/pgo.go
- // and is separate from hwui.
- // To turn it off, set ANDROID_PGO_NO_PROFILE_USE environment variable
- // or set enable_profile_use property to false.
- pgo: {
- instrumentation: true,
- profile_file: "hwui/hwui.profdata",
- benchmarks: ["hwui"],
- enable_profile_use: false,
- },
}
// ------------------------