From 2b03a1f24600c8c9558fb13d3f8bca1ef0f8ee40 Mon Sep 17 00:00:00 2001 From: Roland Levillain Date: Tue, 6 Jun 2017 16:09:59 +0100 Subject: Instrument ARM64 generated code to check the Marking Register. Generate run-time code in the Optimizing compiler checking that the Marking Register's value matches `self.tls32_.is.gc_marking` in debug mode (on target; and on host with JIT, or with AOT when compiling the core image). If a check fails, abort. Test: m test-art-target Test: m test-art-target with tree built with ART_USE_READ_BARRIER=false Test: ARM64 device boot test with libartd. Bug: 37707231 Change-Id: Ie9b322b22b3d26654a06821e1db71dbda3c43061 --- compiler/optimizing/optimizing_compiler.cc | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'compiler/optimizing/optimizing_compiler.cc') diff --git a/compiler/optimizing/optimizing_compiler.cc b/compiler/optimizing/optimizing_compiler.cc index 51101f104a..a6c33b461d 100644 --- a/compiler/optimizing/optimizing_compiler.cc +++ b/compiler/optimizing/optimizing_compiler.cc @@ -22,8 +22,6 @@ #include -#include "android-base/strings.h" - #ifdef ART_ENABLE_CODEGEN_arm64 #include "instruction_simplifier_arm64.h" #endif @@ -1111,12 +1109,7 @@ Compiler* CreateOptimizingCompiler(CompilerDriver* driver) { bool IsCompilingWithCoreImage() { const std::string& image = Runtime::Current()->GetImageLocation(); - // TODO: This is under-approximating... - if (android::base::EndsWith(image, "core.art") || - android::base::EndsWith(image, "core-optimizing.art")) { - return true; - } - return false; + return CompilerDriver::IsCoreImageFilename(image); } bool EncodeArtMethodInInlineInfo(ArtMethod* method ATTRIBUTE_UNUSED) { -- cgit v1.2.3-59-g8ed1b