summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--build/Android.common_build.mk3
-rw-r--r--build/art.go2
-rw-r--r--runtime/oat.h2
-rwxr-xr-xtest/etc/run-test-jar2
-rwxr-xr-xtest/run-test2
5 files changed, 7 insertions, 4 deletions
diff --git a/build/Android.common_build.mk b/build/Android.common_build.mk
index 4c82506516..f5a95fa0cf 100644
--- a/build/Android.common_build.mk
+++ b/build/Android.common_build.mk
@@ -46,6 +46,9 @@ ifeq ($(ART_BUILD_HOST_DEBUG),false)
$(info Disabling ART_BUILD_HOST_DEBUG)
endif
+# Enable the read barrier by default.
+ART_USE_READ_BARRIER ?= true
+
ART_CPP_EXTENSION := .cc
ifndef LIBART_IMG_HOST_BASE_ADDRESS
diff --git a/build/art.go b/build/art.go
index e6e0544e4d..84269c3f23 100644
--- a/build/art.go
+++ b/build/art.go
@@ -58,7 +58,7 @@ func globalFlags(ctx android.BaseContext) ([]string, []string) {
asflags = append(asflags, "-DART_HEAP_POISONING=1")
}
- if envTrue(ctx, "ART_USE_READ_BARRIER") || ctx.AConfig().ArtUseReadBarrier() {
+ if !envFalse(ctx, "ART_USE_READ_BARRIER") || ctx.AConfig().ArtUseReadBarrier() {
// Used to change the read barrier type. Valid values are BAKER, BROOKS, TABLELOOKUP.
// The default is BAKER.
barrierType := envDefault(ctx, "ART_READ_BARRIER_TYPE", "BAKER")
diff --git a/runtime/oat.h b/runtime/oat.h
index 3b3ab5aa09..953b445e4e 100644
--- a/runtime/oat.h
+++ b/runtime/oat.h
@@ -32,7 +32,7 @@ class InstructionSetFeatures;
class PACKED(4) OatHeader {
public:
static constexpr uint8_t kOatMagic[] = { 'o', 'a', 't', '\n' };
- static constexpr uint8_t kOatVersion[] = { '1', '0', '1', '\0' }; // Array entrypoints change
+ static constexpr uint8_t kOatVersion[] = { '1', '0', '2', '\0' }; // Enabling CC
static constexpr const char* kImageLocationKey = "image-location";
static constexpr const char* kDex2OatCmdLineKey = "dex2oat-cmdline";
diff --git a/test/etc/run-test-jar b/test/etc/run-test-jar
index 5f1071f658..28fa130443 100755
--- a/test/etc/run-test-jar
+++ b/test/etc/run-test-jar
@@ -44,7 +44,7 @@ STRIP_DEX="n"
SECONDARY_DEX=""
TIME_OUT="gdb" # "n" (disabled), "timeout" (use timeout), "gdb" (use gdb)
# Value in seconds
-if [ "$ART_USE_READ_BARRIER" = "true" ]; then
+if [ "$ART_USE_READ_BARRIER" != "false" ]; then
TIME_OUT_VALUE=2400 # 40 minutes.
else
TIME_OUT_VALUE=1200 # 20 minutes.
diff --git a/test/run-test b/test/run-test
index a913e783d3..9b178021ff 100755
--- a/test/run-test
+++ b/test/run-test
@@ -722,7 +722,7 @@ if [[ "$TEST_NAME" =~ ^[0-9]+-checker- ]]; then
#
# TODO: Enable Checker when read barrier support is added to more
# architectures (b/12687968).
- if [ "x$ART_USE_READ_BARRIER" = xtrue ] \
+ if [ "x$ART_USE_READ_BARRIER" != xfalse ] \
&& (([ "x$host_mode" = "xyes" ] \
&& ! arch_supports_read_barrier "$host_arch_name") \
|| ([ "x$target_mode" = "xyes" ] \