summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2023-12-08 13:35:21 +0000
committerAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2023-12-08 13:35:31 +0000
commit48dda3b085f7783fa37289697dc46edb9a1e5fdd (patch)
tree271be43f4233beeca26d533f5d438862620e6008
parent3b072364164657d70436cbec60d1892a64ea73ad (diff)
parentbadea1db5e66421ccff9e0cca02e76fcb3fc0f32 (diff)
downloadart-48dda3b085f7783fa37289697dc46edb9a1e5fdd.tar.gz
Make change and version bump to aml_art_341411010 for mainline module file: build/apex/manifest-art.json
Merge cherrypicks of ['googleplex-android-review.googlesource.com/25586870'] into sparse-11178687-L65700030000699060. SPARSE_CHANGE: I378fe28b657704031501c669beddec4afa4838c4 Change-Id: I8891e3b46bd9e5ad14c420e062cd3af62792103b
-rw-r--r--build/apex/manifest-art.json2
-rw-r--r--odrefresh/odr_common.cc6
-rw-r--r--odrefresh/odr_common.h4
-rw-r--r--odrefresh/odr_common_test.cc16
-rw-r--r--odrefresh/odr_config.h4
-rw-r--r--odrefresh/odrefresh.cc9
-rw-r--r--runtime/Android.bp1
-rw-r--r--runtime/gc/collector/mark_compact.cc8
8 files changed, 12 insertions, 38 deletions
diff --git a/build/apex/manifest-art.json b/build/apex/manifest-art.json
index 6e37a9c302..da9db5b506 100644
--- a/build/apex/manifest-art.json
+++ b/build/apex/manifest-art.json
@@ -3,7 +3,7 @@
// Placeholder module version to be replaced during build.
// Do not change!
- "version": 341411000,
+ "version": 341411010,
"provideNativeLibs": [
"libjdwp.so"
diff --git a/odrefresh/odr_common.cc b/odrefresh/odr_common.cc
index 191defc125..16a6af5778 100644
--- a/odrefresh/odr_common.cc
+++ b/odrefresh/odr_common.cc
@@ -88,10 +88,8 @@ void SystemPropertyForeach(std::function<void(const char* name, const char* valu
&action);
}
-bool CheckBuildUserfaultFdGc(bool build_enable_uffd_gc,
- bool is_at_least_t,
- bool kernel_supports_uffd) {
- bool runtime_uses_uffd_gc = (build_enable_uffd_gc || is_at_least_t) && kernel_supports_uffd;
+bool CheckBuildUserfaultFdGc(bool build_enable_uffd_gc, bool kernel_supports_uffd) {
+ bool runtime_uses_uffd_gc = kernel_supports_uffd;
return build_enable_uffd_gc == runtime_uses_uffd_gc;
}
diff --git a/odrefresh/odr_common.h b/odrefresh/odr_common.h
index d887bf0449..2421e41017 100644
--- a/odrefresh/odr_common.h
+++ b/odrefresh/odr_common.h
@@ -45,9 +45,7 @@ bool ShouldDisableRefresh(const std::string& sdk_version_str);
void SystemPropertyForeach(std::function<void(const char* name, const char* value)> action);
// Returns true if the build-time UFFD GC matches the runtime's choice.
-bool CheckBuildUserfaultFdGc(bool build_enable_uffd_gc,
- bool is_at_least_t,
- bool kernel_supports_uffd);
+bool CheckBuildUserfaultFdGc(bool build_enable_uffd_gc, bool kernel_supports_uffd);
} // namespace odrefresh
} // namespace art
diff --git a/odrefresh/odr_common_test.cc b/odrefresh/odr_common_test.cc
index 204c04bc53..77becad0a2 100644
--- a/odrefresh/odr_common_test.cc
+++ b/odrefresh/odr_common_test.cc
@@ -57,21 +57,13 @@ TEST(OdrCommonTest, ShouldDisableRefresh) {
TEST(OdrCommonTest, CheckBuildUserfaultFdGc) {
EXPECT_TRUE(CheckBuildUserfaultFdGc(
- /*build_enable_uffd_gc=*/false, /*is_at_least_t=*/false, /*kernel_supports_uffd=*/false));
+ /*build_enable_uffd_gc=*/false, /*kernel_supports_uffd=*/false));
EXPECT_FALSE(CheckBuildUserfaultFdGc(
- /*build_enable_uffd_gc=*/true, /*is_at_least_t=*/false, /*kernel_supports_uffd=*/false));
- EXPECT_TRUE(CheckBuildUserfaultFdGc(
- /*build_enable_uffd_gc=*/false, /*is_at_least_t=*/true, /*kernel_supports_uffd=*/false));
- EXPECT_FALSE(CheckBuildUserfaultFdGc(
- /*build_enable_uffd_gc=*/true, /*is_at_least_t=*/true, /*kernel_supports_uffd=*/false));
- EXPECT_TRUE(CheckBuildUserfaultFdGc(
- /*build_enable_uffd_gc=*/false, /*is_at_least_t=*/false, /*kernel_supports_uffd=*/true));
- EXPECT_TRUE(CheckBuildUserfaultFdGc(
- /*build_enable_uffd_gc=*/true, /*is_at_least_t=*/false, /*kernel_supports_uffd=*/true));
+ /*build_enable_uffd_gc=*/true, /*kernel_supports_uffd=*/false));
EXPECT_FALSE(CheckBuildUserfaultFdGc(
- /*build_enable_uffd_gc=*/false, /*is_at_least_t=*/true, /*kernel_supports_uffd=*/true));
+ /*build_enable_uffd_gc=*/false, /*kernel_supports_uffd=*/true));
EXPECT_TRUE(CheckBuildUserfaultFdGc(
- /*build_enable_uffd_gc=*/true, /*is_at_least_t=*/true, /*kernel_supports_uffd=*/true));
+ /*build_enable_uffd_gc=*/true, /*kernel_supports_uffd=*/true));
}
} // namespace odrefresh
diff --git a/odrefresh/odr_config.h b/odrefresh/odr_config.h
index 2a42a5e4e0..78af97c9a0 100644
--- a/odrefresh/odr_config.h
+++ b/odrefresh/odr_config.h
@@ -72,9 +72,7 @@ struct SystemPropertyConfig {
// default value should not trigger re-compilation. This is to comply with the phenotype flag
// requirement (go/platform-experiments-flags#pre-requisites).
const android::base::NoDestructor<std::vector<SystemPropertyConfig>> kSystemProperties{
- {SystemPropertyConfig{.name = "persist.device_config.runtime_native_boot.enable_uffd_gc_2",
- .default_value = "false"},
- SystemPropertyConfig{.name = "persist.device_config.runtime_native_boot.force_disable_uffd_gc",
+ {SystemPropertyConfig{.name = "persist.device_config.runtime_native_boot.force_disable_uffd_gc",
.default_value = "false"},
SystemPropertyConfig{.name = kPhDisableCompactDex, .default_value = "false"},
SystemPropertyConfig{.name = kSystemPropertySystemServerCompilerFilterOverride,
diff --git a/odrefresh/odrefresh.cc b/odrefresh/odrefresh.cc
index 7ff6aa4272..85fc9d1f32 100644
--- a/odrefresh/odrefresh.cc
+++ b/odrefresh/odrefresh.cc
@@ -106,7 +106,6 @@ using ::android::base::Split;
using ::android::base::StartsWith;
using ::android::base::StringPrintf;
using ::android::base::Timer;
-using ::android::modules::sdklevel::IsAtLeastT;
using ::android::modules::sdklevel::IsAtLeastU;
using ::art::tools::CmdlineBuilder;
@@ -1093,19 +1092,15 @@ WARN_UNUSED bool OnDeviceRefresh::CheckSystemPropertiesHaveNotChanged(
WARN_UNUSED bool OnDeviceRefresh::CheckBuildUserfaultFdGc() const {
bool build_enable_uffd_gc =
config_.GetSystemProperties().GetBool("ro.dalvik.vm.enable_uffd_gc", /*default_value=*/false);
- bool is_at_least_t = IsAtLeastT();
bool kernel_supports_uffd = KernelSupportsUffd();
- if (!art::odrefresh::CheckBuildUserfaultFdGc(
- build_enable_uffd_gc, is_at_least_t, kernel_supports_uffd)) {
+ if (!art::odrefresh::CheckBuildUserfaultFdGc(build_enable_uffd_gc, kernel_supports_uffd)) {
// Assuming the system property reflects how the dexpreopted boot image was
// compiled, and it doesn't agree with runtime support, we need to recompile
// it. This happens if we're running on S, T or U, or if the system image
// was built with a wrong PRODUCT_ENABLE_UFFD_GC flag.
LOG(INFO) << ART_FORMAT(
- "Userfaultfd GC check failed (build_enable_uffd_gc: {}, is_at_least_t: {}, "
- "kernel_supports_uffd: {}).",
+ "Userfaultfd GC check failed (build_enable_uffd_gc: {}, kernel_supports_uffd: {}).",
build_enable_uffd_gc,
- is_at_least_t,
kernel_supports_uffd);
return false;
}
diff --git a/runtime/Android.bp b/runtime/Android.bp
index 3c3b9f8681..1c4b8714e1 100644
--- a/runtime/Android.bp
+++ b/runtime/Android.bp
@@ -449,7 +449,6 @@ libart_cc_defaults {
"heapprofd_client_api",
],
static_libs: [
- "libmodules-utils-build",
"libstatslog_art",
],
generated_sources: [
diff --git a/runtime/gc/collector/mark_compact.cc b/runtime/gc/collector/mark_compact.cc
index 8cd92a71f2..a7252a1036 100644
--- a/runtime/gc/collector/mark_compact.cc
+++ b/runtime/gc/collector/mark_compact.cc
@@ -58,7 +58,6 @@
#include "thread_list.h"
#ifdef ART_TARGET_ANDROID
-#include "android-modules-utils/sdk_level.h"
#include "com_android_art.h"
#endif
@@ -90,7 +89,6 @@ namespace {
using ::android::base::GetBoolProperty;
using ::android::base::ParseBool;
using ::android::base::ParseBoolResult;
-using ::android::modules::sdklevel::IsAtLeastT;
} // namespace
#endif
@@ -262,12 +260,8 @@ static bool SysPropSaysUffdGc() {
// The phenotype flag can change at time time after boot, but it shouldn't take effect until a
// reboot. Therefore, we read the phenotype flag from the cache info, which is generated on boot.
std::unordered_map<std::string, std::string> cached_properties = GetCachedProperties();
- bool phenotype_enable = GetCachedBoolProperty(
- cached_properties, "persist.device_config.runtime_native_boot.enable_uffd_gc_2", false);
- bool phenotype_force_disable = GetCachedBoolProperty(
+ return !GetCachedBoolProperty(
cached_properties, "persist.device_config.runtime_native_boot.force_disable_uffd_gc", false);
- bool build_enable = GetBoolProperty("ro.dalvik.vm.enable_uffd_gc", false);
- return (phenotype_enable || build_enable || IsAtLeastT()) && !phenotype_force_disable;
}
#else
// Never called.