summaryrefslogtreecommitdiff
path: root/runtime/common_runtime_test.cc
diff options
context:
space:
mode:
author Vladimir Marko <vmarko@google.com> 2021-11-12 12:45:23 +0000
committer Vladimir Marko <vmarko@google.com> 2021-11-15 09:53:15 +0000
commit483c41a99b8f0b63cbdcac9f1cd1f2dcb5756b0c (patch)
tree0607ab807d82679a1097a24461a955909ba61dfe /runtime/common_runtime_test.cc
parent9575c124c3d77e9f07e8c101571776ac9270af83 (diff)
ART: Use core image to speed up some gtests.
Host timing of art_compiler_tests --no_isolate --gtest_filter='<pattern>' for different patterns: "ms total" before after LoadStoreEliminationTest* 16945 4750 LoadStoreAnalysisTest* 2647 689 ReferenceTypePropagationTest* 13542 3929 InstructionSimplifierTest* 1452 406 Host timing of art_runtime_tests --no_isolate --gtest_filter='<pattern>' for different patterns: "ms total" before after RegType*Test* 2976 1675 DexCacheTest* 265 74 JavaVmExtTest* 785 230 Host timing of art_libartbase_tests --no_isolate --gtest_filter='<pattern>' for different patterns: "ms total" before after FlagsTests* 691 214 Host timing of art_dex2oat_tests --no_isolate --gtest_filter='<pattern>' for different patterns: "ms total" before after VerifierDepsTest* 3567 874 Test: m test-art-host-gtest Change-Id: I20df90e3d38aaa286e22ba070c7845bcb09e3bca
Diffstat (limited to 'runtime/common_runtime_test.cc')
-rw-r--r--runtime/common_runtime_test.cc11
1 files changed, 9 insertions, 2 deletions
diff --git a/runtime/common_runtime_test.cc b/runtime/common_runtime_test.cc
index 4eb34083d1..3f643e8db8 100644
--- a/runtime/common_runtime_test.cc
+++ b/runtime/common_runtime_test.cc
@@ -71,7 +71,11 @@ using android::base::StringPrintf;
static bool unstarted_initialized_ = false;
CommonRuntimeTestImpl::CommonRuntimeTestImpl()
- : class_linker_(nullptr), java_lang_dex_file_(nullptr) {
+ : class_linker_(nullptr),
+ java_lang_dex_file_(nullptr),
+ boot_class_path_(),
+ callbacks_(),
+ use_boot_image_(false) {
}
CommonRuntimeTestImpl::~CommonRuntimeTestImpl() {
@@ -94,6 +98,9 @@ void CommonRuntimeTestImpl::SetUp() {
options.push_back(std::make_pair(boot_class_path_string, nullptr));
options.push_back(std::make_pair(boot_class_path_locations_string, nullptr));
+ if (use_boot_image_) {
+ options.emplace_back("-Ximage:" + GetImageLocation(), nullptr);
+ }
options.push_back(std::make_pair("-Xcheck:jni", nullptr));
options.push_back(std::make_pair(min_heap_string, nullptr));
options.push_back(std::make_pair(max_heap_string, nullptr));
@@ -107,7 +114,7 @@ void CommonRuntimeTestImpl::SetUp() {
SetUpRuntimeOptions(&options);
- // Install compiler-callbacks if SetupRuntimeOptions hasn't deleted them.
+ // Install compiler-callbacks if SetUpRuntimeOptions hasn't deleted them.
if (callbacks_.get() != nullptr) {
options.push_back(std::make_pair("compilercallbacks", callbacks_.get()));
}