From 22f8e5c82d12951be38cd893426e13bee33fd69d Mon Sep 17 00:00:00 2001 From: Andreas Gampe Date: Wed, 9 Jul 2014 11:38:21 -0700 Subject: Revert "Revert "ART: Key-Value Store in Oat header"" This reverts commit 452bee5da9811f62123978e142bd67b385e9ff82. Heap-allocate a couple of objects in dex2oat to avoid large frame size. Includes fixes originally in 100596 and 100605. Change-Id: Id51a44198c973c91f0a3f87b9d992a5dc110c6f8 --- compiler/image_test.cc | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'compiler/image_test.cc') diff --git a/compiler/image_test.cc b/compiler/image_test.cc index d52ec0ad5a..6b2698085c 100644 --- a/compiler/image_test.cc +++ b/compiler/image_test.cc @@ -25,6 +25,7 @@ #include "compiler/image_writer.h" #include "compiler/oat_writer.h" #include "gc/space/image_space.h" +#include "implicit_check_options.h" #include "lock_word.h" #include "mirror/object-inl.h" #include "signal_catcher.h" @@ -77,8 +78,11 @@ TEST_F(ImageTest, WriteRead) { t.NewTiming("WriteElf"); ScopedObjectAccess soa(Thread::Current()); - OatWriter oat_writer(class_linker->GetBootClassPath(), - 0, 0, "", compiler_driver_.get(), &timings); + SafeMap key_value_store; + key_value_store.Put(ImplicitCheckOptions::kImplicitChecksOatHeaderKey, + ImplicitCheckOptions::Serialize(true, true, true)); + OatWriter oat_writer(class_linker->GetBootClassPath(), 0, 0, compiler_driver_.get(), &timings, + &key_value_store); bool success = compiler_driver_->WriteElf(GetTestAndroidRoot(), !kIsTargetBuild, class_linker->GetBootClassPath(), @@ -138,6 +142,9 @@ TEST_F(ImageTest, WriteRead) { std::string image("-Ximage:"); image.append(image_location.GetFilename()); options.push_back(std::make_pair(image.c_str(), reinterpret_cast(NULL))); + // Turn off implicit checks for this runtime, as we compiled the image with them off. + std::string explicit_checks("-implicit-checks:none"); + options.push_back(std::make_pair(explicit_checks.c_str(), reinterpret_cast(NULL))); if (!Runtime::Create(options, false)) { LOG(FATAL) << "Failed to create runtime"; -- cgit v1.2.3-59-g8ed1b