diff options
author | Jared Duke <jdduke@google.com> | 2022-02-16 15:43:55 -0800 |
---|---|---|
committer | Jared Duke <jdduke@google.com> | 2022-02-18 18:03:17 +0000 |
commit | fb3f8babc8edd454fd5ee6777bea0bff19cd2acd (patch) | |
tree | cca5c1f67a630f0299301fc1eaac3d7a21841588 /common | |
parent | bd67a59013c73851a225c5129a3684d046aa868f (diff) |
Enable R8 code shrinking for system_server on Pixel
Opt in to whole-program Java optimizations via R8 for Pixel devices.
This can be explicitly disabled during builds via
`SYSTEM_OPTIMIZE_JAVA=false m`.
Note that this change only enables code shrinking for system_server,
and should not impact stack traces. Additional R8 optimizations
will be enabled after broader improvements to retracing infrastructure.
See go/aperf-system-r8-faq for additional details and guidance. Also
note that R8 shrinking optimizations are implicitly disabled in ENG builds.
Enabling for non-Pixel devices will proceed in stages as we flesh
out infrastructure and validate with test populations.
Results: services.jar (20MB -> 17MB)
Bug: 210510433
Test: m + atest FrameworksServicesTests + manual testing on Raven
Change-Id: I13c0674105aa2cab7722f52344486e86e3bde26b
Diffstat (limited to 'common')
-rw-r--r-- | common/pixel-common-device.mk | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/common/pixel-common-device.mk b/common/pixel-common-device.mk index e04d772..4bb4398 100644 --- a/common/pixel-common-device.mk +++ b/common/pixel-common-device.mk @@ -27,6 +27,7 @@ BOARD_VENDOR_SEPOLICY_DIRS += hardware/google/pixel-sepolicy/wifi_sniffer PRODUCT_PACKAGES_DEBUG += wifi_perf_diag BOARD_VENDOR_SEPOLICY_DIRS += hardware/google/pixel-sepolicy/wifi_perf_diag -# Enable whole-program R8 Java optimizations for SystemUI, but also -# allow explicit overriding for testing and development. +# Enable whole-program R8 Java optimizations for SystemUI and system_server, +# but also allow explicit overriding for testing and development. +SYSTEM_OPTIMIZE_JAVA ?= true SYSTEMUI_OPTIMIZE_JAVA ?= true |