diff options
author | 2023-05-11 20:57:47 +0100 | |
---|---|---|
committer | 2023-05-26 18:23:16 +0000 | |
commit | ef6ac1d5293920559feaebcaeb6413a6864dbb70 (patch) | |
tree | 5cf8003066ced5722420b63a3caac6593ea6afd2 /runtime/oat_file_assistant.h | |
parent | 066a89ed8f30008509631a225ddf2587c6495715 (diff) |
Recompile packages with cdex in vdex'es in background dexopt when the
disable cdex experiment is enabled.
Test: adb install out/dist/com.google.android.art.apex
adb reboot && adb wait-for-device
m AppUsedByOtherApp
adb install-multiple out/target/product/vsoc_x86_64/testcases/AppUsedByOtherApp/x86_64/AppUsedByOtherApp.apk AppUsedByOtherApp.dm
# where AppUsedByOtherApp.dm is created from a non-empty profile
adb root && adb wait-for-device
adb shell pm bg-dexopt-job
adb shell find data/app data/dalvik-cache -name \*.vdex \
\| xargs grep cdex001
# -> matches are found, e.g. in system apps
adb shell pm compile -f -m speed-profile \
android.compilation.cts.appusedbyotherapp
adb shell grep cdex001 \
/data/app/\*/android.compilation.cts.appusedbyotherapp-\*/oat/x86_64/base.vdex
# -> check that a match is found
adb shell setprop \
persist.device_config.runtime_native_boot.disable_compact_dex \
true
adb shell pm bg-dexopt-job
adb shell find data/app data/dalvik-cache -name \*.vdex \
\| xargs grep cdex001
# -> check that no matches are found
on SC, TM and UDC platform images
Bug: 256664509
Bug: 282137215
Change-Id: I720ffc5861768dc43f70789c0dfbad7ceedc5c9a
(cherry picked from commit 35ea7e066db64f4c9c740894d2c428707015a8c0)
Merged-In: I720ffc5861768dc43f70789c0dfbad7ceedc5c9a
Diffstat (limited to 'runtime/oat_file_assistant.h')
-rw-r--r-- | runtime/oat_file_assistant.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/runtime/oat_file_assistant.h b/runtime/oat_file_assistant.h index 2b6bb70d31..54287eb5f1 100644 --- a/runtime/oat_file_assistant.h +++ b/runtime/oat_file_assistant.h @@ -434,6 +434,11 @@ class OatFileAssistant { // the OatFileInfo object. std::unique_ptr<OatFile> ReleaseFileForUse(); + // Check if we should reject vdex containing cdex code as part of the + // disable_cdex experiment. + // TODO(b/256664509): Clean this up. + bool CheckDisableCompactDexExperiment(); + private: // Returns true if the oat file is usable but at least one dexopt trigger is matched. This // function should only be called if the oat file is usable. |