summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Stjernholm <mast@google.com>2023-12-19 18:18:51 +0000
committerMartin Stjernholm <mast@google.com>2023-12-20 20:03:54 +0000
commit430efa22208e7b7bb4ef9987046af90b6c9611ff (patch)
tree68469784acf101b496f60f7b29577afecce0aaf7
parente3530976ca9a01652961aa4e554e19959b3fb156 (diff)
downloadart-430efa22208e7b7bb4ef9987046af90b6c9611ff.tar.gz
Remove the disable_cdex P/H flag.
Compact dex is now always rejected. Test: banchan com.android.art && m adb install out/dist/com.android.art.apex adb reboot adb shell pm bg-dexopt-job adb shell "find data/app data/dalvik-cache -name \*.vdex \ | sort | xargs ls -l" > before adb shell pm bg-dexopt-job adb shell "find data/app data/dalvik-cache -name \*.vdex \ | sort | xargs ls -l" > after diff before after -> check that vdex files haven't changed Bug: 256664509 Change-Id: If65c06b110100665320c42ef55572d33201b77a0
-rw-r--r--libartbase/base/globals.h6
-rw-r--r--odrefresh/odr_config.h1
-rw-r--r--runtime/oat_file_assistant.cc16
-rw-r--r--runtime/oat_file_assistant.h6
4 files changed, 9 insertions, 20 deletions
diff --git a/libartbase/base/globals.h b/libartbase/base/globals.h
index 45bb0260e4..858e1f6468 100644
--- a/libartbase/base/globals.h
+++ b/libartbase/base/globals.h
@@ -124,12 +124,6 @@ static constexpr bool kHostStaticBuildEnabled = true;
static constexpr bool kHostStaticBuildEnabled = false;
#endif
-// System property for phenotype flag to test disabling compact dex and in
-// particular dexlayout.
-// TODO(b/256664509): Clean this up.
-static constexpr char kPhDisableCompactDex[] =
- "persist.device_config.runtime_native_boot.disable_compact_dex";
-
// Helper class that acts as a global constant which can be initialized with
// a dynamically computed value while not being subject to static initialization
// order issues via gating access to the value through a function which ensures
diff --git a/odrefresh/odr_config.h b/odrefresh/odr_config.h
index 78af97c9a0..5aee588992 100644
--- a/odrefresh/odr_config.h
+++ b/odrefresh/odr_config.h
@@ -74,7 +74,6 @@ struct SystemPropertyConfig {
const android::base::NoDestructor<std::vector<SystemPropertyConfig>> kSystemProperties{
{SystemPropertyConfig{.name = "persist.device_config.runtime_native_boot.force_disable_uffd_gc",
.default_value = "false"},
- SystemPropertyConfig{.name = kPhDisableCompactDex, .default_value = "false"},
SystemPropertyConfig{.name = kSystemPropertySystemServerCompilerFilterOverride,
.default_value = ""},
// For testing only (cf. odsign_e2e_tests_full).
diff --git a/runtime/oat_file_assistant.cc b/runtime/oat_file_assistant.cc
index c58e47a13a..41f7709979 100644
--- a/runtime/oat_file_assistant.cc
+++ b/runtime/oat_file_assistant.cc
@@ -313,8 +313,8 @@ int OatFileAssistant::GetDexOptNeeded(CompilerFilter::Filter target_compiler_fil
bool profile_changed,
bool downgrade) {
OatFileInfo& info = GetBestInfo();
- if (info.CheckDisableCompactDexExperiment()) { // TODO(b/256664509): Clean this up.
- VLOG(oat) << "Should recompile: disable cdex experiment";
+ if (info.CheckDisableCompactDex()) { // TODO(b/256664509): Clean this up.
+ VLOG(oat) << "Should recompile: disable cdex";
return kDex2OatFromScratch;
}
DexOptNeeded dexopt_needed = info.GetDexOptNeeded(
@@ -335,7 +335,7 @@ bool OatFileAssistant::GetDexOptNeeded(CompilerFilter::Filter target_compiler_fi
DexOptTrigger dexopt_trigger,
/*out*/ DexOptStatus* dexopt_status) {
OatFileInfo& info = GetBestInfo();
- if (info.CheckDisableCompactDexExperiment()) { // TODO(b/256664509): Clean this up.
+ if (info.CheckDisableCompactDex()) { // TODO(b/256664509): Clean this up.
dexopt_status->location_ = kLocationNoneOrError;
return true;
}
@@ -1271,14 +1271,10 @@ std::unique_ptr<OatFile> OatFileAssistant::OatFileInfo::ReleaseFileForUse() {
return std::unique_ptr<OatFile>();
}
-// Check if we should reject vdex containing cdex code as part of the
-// disable_cdex experiment.
+// Check if we should reject vdex containing cdex code as part of the cdex
+// deprecation.
// TODO(b/256664509): Clean this up.
-bool OatFileAssistant::OatFileInfo::CheckDisableCompactDexExperiment() {
- std::string ph_disable_compact_dex = android::base::GetProperty(kPhDisableCompactDex, "false");
- if (ph_disable_compact_dex != "true") {
- return false;
- }
+bool OatFileAssistant::OatFileInfo::CheckDisableCompactDex() {
const OatFile* oat_file = GetFile();
if (oat_file == nullptr) {
return false;
diff --git a/runtime/oat_file_assistant.h b/runtime/oat_file_assistant.h
index 2653600f8e..c8337f82f2 100644
--- a/runtime/oat_file_assistant.h
+++ b/runtime/oat_file_assistant.h
@@ -433,10 +433,10 @@ 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.
+ // Check if we should reject vdex containing cdex code as part of the cdex
+ // deprecation.
// TODO(b/256664509): Clean this up.
- bool CheckDisableCompactDexExperiment();
+ bool CheckDisableCompactDex();
private:
// Returns true if the oat file is usable but at least one dexopt trigger is matched. This