summaryrefslogtreecommitdiff
path: root/libs/androidfw/AssetManager2.cpp
diff options
context:
space:
mode:
author Jared Duke <jdduke@google.com> 2025-01-27 21:03:43 +0000
committer Jared Duke <jdduke@google.com> 2025-01-28 23:54:31 +0000
commitf11a96283945ac895b31cb1085013bedb87f80ce (patch)
tree35503e86547594af81f243153b99d3fb7116475e /libs/androidfw/AssetManager2.cpp
parent9b20ff48dae49a9cbffc64cbf398d6f7b4139e36 (diff)
Add flag-guarded disabling of default .art file madvise
The compressed .art app image file is read just once during process startup. As such, there is little benefit to running a full madvise before starting decompression, and in some cases this actually leads to (slightly) worse latency. Use a flag to control the default value for the ART runtime's `-XMadviseWillNeedArtFileSize` configuration. Previously, this was set via a makefile default to be UINT_MAX. This default is preserved in the runtime, where the new aconfig flag disables this default and turns off .art file madvise (unless the property is explicitly configured for a particular device). After ramping and validating performance impact, we may consider deprecating and removing this ART runtime flag completely. Flag: android.os.disable_madvise_artfile_default Test: m Test: adb shell aflags enable android.os.disable_madvise_artfile_default && adb shell setprop dalvik.vm.extra-opts -verbose:startup && adb logcat | grep Madvise Bug: 382110550 Change-Id: I16170215da0d06a0fd110112fc17b03002939621
Diffstat (limited to 'libs/androidfw/AssetManager2.cpp')
0 files changed, 0 insertions, 0 deletions