From 2a5d7283bba919eadb92ac311c1d563a14098ab5 Mon Sep 17 00:00:00 2001 From: Andreas Gampe Date: Tue, 2 Jan 2018 11:53:35 -0800 Subject: ART: Emit runtime read barrier checks only in slow-debug Move runtime read barrier check emission to slow-debug to have better control over when this instrumentation is done. Bug: 35644369 Bug: 68025088 Test: m test-art-host Test: manual inspection of core image code Change-Id: I69b3b6f243c30813a741fe9e0a460f1543c6bc5d --- compiler/optimizing/optimizing_cfi_test.cc | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'compiler/optimizing/optimizing_cfi_test.cc') diff --git a/compiler/optimizing/optimizing_cfi_test.cc b/compiler/optimizing/optimizing_cfi_test.cc index 4ad29961be..e2b2106f65 100644 --- a/compiler/optimizing/optimizing_cfi_test.cc +++ b/compiler/optimizing/optimizing_cfi_test.cc @@ -18,6 +18,7 @@ #include #include "arch/instruction_set.h" +#include "base/runtime_debug.h" #include "cfi_test.h" #include "driver/compiler_options.h" #include "gtest/gtest.h" @@ -56,6 +57,9 @@ class OptimizingCFITest : public CFITest { ArenaAllocator* GetAllocator() { return pool_and_allocator_.GetAllocator(); } void SetUpFrame(InstructionSet isa) { + // Ensure that slow-debug is off, so that there is no unexpected read-barrier check emitted. + SetRuntimeDebugFlagsEnabled(false); + // Setup simple context. std::string error; isa_features_ = InstructionSetFeatures::FromVariant(isa, "default", &error); -- cgit v1.2.3-59-g8ed1b