Possible in-build cache failures

152 views
Skip to first unread message

Al Sutton

unread,
Feb 23, 2024, 4:37:21 PMFeb 23
to android-...@googlegroups.com
Just wondering if anyone else is seeing this behaviour in a single Android 14 checkout location (android-platform-14.0.0_r4 in ~/firmware/aosp-14/ in my case) when switching between ABIs for a target.

* Build 1; x86_64 emulator which does a full build as expected
* Build 2; arm64-v8a emulator which does pretty much a full build
* Build 3; x86_64 emulator triggers lots of rebuilding (seems to be mostly the final steps of apk creation and repackaging of image files)
* Build 4; arm64-v8a emulator again triggers lots of rebuilding (seems to be mostly the final steps of apk creation and repackaging of image files)

(Each build consists of a new shell, then running envsetup.sh, lunch, and finally m. out/ isn't cleared between builds)

My expectation would be that there'd be enough information in out/ for build 3 and build 4 to be close to a no-op, but, instead, they're lengthy builds because most apps go through the expensive APK assembly steps again;

e.g. SettingsProvider

2024-02-23T11:40:01.8869547Z [  0% 36/10623] AAPT2 link out/target/product/emulator_arm64/obj/APPS/SettingsProvider__auto_generated_rro_vendor_intermediates/package-res.apk
2024-02-23T11:40:01.9882815Z [  0% 56/10623] AAPT2 link out/target/product/emulator_arm64/obj/APPS/SettingsProvider__auto_generated_rro_product_intermediates/package-res.apk
2024-02-23T11:40:02.4829841Z [  2% 247/10623] //frameworks/base/packages/SettingsProvider:SettingsProvider write dexpreopt.config
2024-02-23T11:40:02.4947269Z [  2% 258/10623] Copy: out/target/product/emulator_arm64/dexpreopt_config/SettingsProvider_dexpreopt.config
2024-02-23T11:40:02.5365123Z [  2% 298/10623] target Package: SettingsProvider__auto_generated_rro_vendor (out/target/product/emulator_arm64/obj/APPS/SettingsProvider__auto_generated_rro_vendor_intermediates/package.apk)
2024-02-23T11:40:02.5762054Z [  2% 316/10623] Install: out/target/product/emulator_arm64/vendor/overlay/SettingsProvider__auto_generated_rro_vendor.apk
2024-02-23T11:40:09.5979516Z [ 16% 1700/10623] //frameworks/base/packages/SettingsProvider:SettingsProvider license metadata
2024-02-23T11:40:09.6290609Z [ 16% 1704/10623] Copy: out/target/product/emulator_arm64/obj/METAAPPS/SettingsProvider_intermediates/SettingsProvider.meta_lic

e.g. Virtualization;

2024-02-23T11:45:21.6098811Z [ 28% 2919/10072] //packages/modules/Virtualization/javalib:framework-virtualization.stubs.source metalava merged
2024-02-23T11:45:21.7161365Z [ 29% 2921/10071] //packages/modules/Virtualization/javalib:framework-virtualization.stubs javac
2024-02-23T11:45:22.3011261Z [ 29% 2928/10069] //packages/modules/Virtualization/javalib:framework-virtualization.stubs turbine
2024-02-23T11:45:23.0649431Z [ 29% 2933/10066] //packages/modules/Virtualization/javalib:framework-virtualization.stubs.source.module_lib metalava merged
2024-02-23T11:45:23.0693345Z [ 29% 2934/10065] //packages/modules/Virtualization/javalib:framework-virtualization.stubs.source.system metalava merged
2024-02-23T11:45:23.1568197Z [ 29% 2935/10064] //packages/modules/Virtualization/javalib:framework-virtualization.stubs.source.test metalava merged
2024-02-23T11:45:23.9070002Z [ 29% 2941/10061] //packages/modules/Virtualization/javalib:framework-virtualization.stubs d8
2024-02-23T11:45:23.9606324Z [ 29% 2943/10060] //packages/modules/Virtualization/javalib:framework-virtualization.stubs.module_lib turbine
2024-02-23T11:45:24.4043914Z [ 29% 2947/10057] //packages/modules/Virtualization/javalib:framework-virtualization.stubs.system turbine
2024-02-23T11:45:24.4827069Z [ 29% 2948/10056] //packages/modules/Virtualization/javalib:framework-virtualization.stubs.test turbine
2024-02-23T11:45:24.7902320Z [ 29% 2950/10054] //packages/modules/Virtualization/javalib:framework-virtualization.stubs.system javac
2024-02-23T11:45:25.2559060Z [ 29% 2957/10047] //packages/modules/Virtualization/javalib:framework-virtualization.stubs.test javac
2024-02-23T11:45:27.5138785Z [ 29% 2976/10037] //packages/modules/Virtualization/javalib:framework-virtualization.stubs.system d8
2024-02-23T11:45:27.9667194Z [ 29% 2979/10035] //packages/modules/Virtualization/javalib:framework-virtualization.stubs.test d8

Anyone else seeing this and have any thoughts on ways to speed up builds by improving the cache hit rate?
Reply all
Reply to author
Forward
0 new messages