diff options
author | Andreas Gampe <agampe@google.com> | 2015-04-15 02:37:28 -0700 |
---|---|---|
committer | Andreas Gampe <agampe@google.com> | 2015-04-21 15:03:15 -0700 |
commit | 70bef0d8f6aa30b0da5c6ca56e1bc5729f74654b (patch) | |
tree | aea4a31294c5a6a30c52ee886d5884a0b5b84fde /compiler/common_compiler_test.cc | |
parent | bbf02afc641a393d33342976e269218668c07386 (diff) | |
download | art-70bef0d8f6aa30b0da5c6ca56e1bc5729f74654b.tar.gz art-70bef0d8f6aa30b0da5c6ca56e1bc5729f74654b.tar.bz2 art-70bef0d8f6aa30b0da5c6ca56e1bc5729f74654b.zip |
ART: Add compiled-methods
Add a dex2oat option for compiled-methods, a more granular filter
than compiled-classes. Add compiler-driver support for it.
Refactor dex2oat to reuse file reading.
Add a test to oat_test.
Change-Id: I78d0d040bce7738b4bb7aabe7768b5788d2587ac
Diffstat (limited to 'compiler/common_compiler_test.cc')
-rw-r--r-- | compiler/common_compiler_test.cc | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/compiler/common_compiler_test.cc b/compiler/common_compiler_test.cc index 8ffc86ea3f..05cb8b458e 100644 --- a/compiler/common_compiler_test.cc +++ b/compiler/common_compiler_test.cc @@ -140,6 +140,27 @@ void CommonCompilerTest::MakeExecutable(mirror::ClassLoader* class_loader, const } } +// Get the set of image classes given to the compiler-driver in SetUp. Note: the compiler +// driver assumes ownership of the set, so the test should properly release the set. +std::unordered_set<std::string>* CommonCompilerTest::GetImageClasses() { + // Empty set: by default no classes are retained in the image. + return new std::unordered_set<std::string>(); +} + +// Get the set of compiled classes given to the compiler-driver in SetUp. Note: the compiler +// driver assumes ownership of the set, so the test should properly release the set. +std::unordered_set<std::string>* CommonCompilerTest::GetCompiledClasses() { + // Null, no selection of compiled-classes. + return nullptr; +} + +// Get the set of compiled methods given to the compiler-driver in SetUp. Note: the compiler +// driver assumes ownership of the set, so the test should properly release the set. +std::unordered_set<std::string>* CommonCompilerTest::GetCompiledMethods() { + // Null, no selection of compiled-methods. + return nullptr; +} + void CommonCompilerTest::SetUp() { CommonRuntimeTest::SetUp(); { @@ -165,7 +186,10 @@ void CommonCompilerTest::SetUp() { method_inliner_map_.get(), compiler_kind, instruction_set, instruction_set_features_.get(), - true, new std::unordered_set<std::string>, nullptr, + true, + GetImageClasses(), + GetCompiledClasses(), + GetCompiledMethods(), 2, true, true, "", timer_.get(), -1, "")); } // We typically don't generate an image in unit tests, disable this optimization by default. |