summaryrefslogtreecommitdiff
path: root/compiler/driver/compiler_driver_test.cc
diff options
context:
space:
mode:
authorAndreas Gampe <agampe@google.com>2018-04-12 14:25:39 -0700
committerAndreas Gampe <agampe@google.com>2018-04-13 17:26:59 -0700
commitbd600e3e203b3ddd34c2e44bdb705e6902ac7bce (patch)
treea8d88189082d739b33898cf2a69e9a706b580564 /compiler/driver/compiler_driver_test.cc
parent74b9994598f497ee3c6a72bbacad9926527f67f5 (diff)
ART: Remove support for compiled-methods and compiled-classes
This has been superseded by profile support. This reverts commit 70bef0d8f6aa30b0da5c6ca56e1bc5729f74654b. This reverts commit 4bf3ae9930a155f238dfd471413c866912b2579e. Bug: 76145463 Test: mmma art Test: m test-art-host Change-Id: I5a368cd01812e16869352ec219eae095df4919c4
Diffstat (limited to 'compiler/driver/compiler_driver_test.cc')
-rw-r--r--compiler/driver/compiler_driver_test.cc53
1 files changed, 0 insertions, 53 deletions
diff --git a/compiler/driver/compiler_driver_test.cc b/compiler/driver/compiler_driver_test.cc
index 162904c0e7..1332280d20 100644
--- a/compiler/driver/compiler_driver_test.cc
+++ b/compiler/driver/compiler_driver_test.cc
@@ -184,59 +184,6 @@ TEST_F(CompilerDriverTest, AbstractMethodErrorStub) {
}
}
-class CompilerDriverMethodsTest : public CompilerDriverTest {
- protected:
- std::unordered_set<std::string>* GetCompiledMethods() OVERRIDE {
- return new std::unordered_set<std::string>({
- "byte StaticLeafMethods.identity(byte)",
- "int StaticLeafMethods.sum(int, int, int)",
- "double StaticLeafMethods.sum(double, double, double, double)"
- });
- }
-};
-
-TEST_F(CompilerDriverMethodsTest, Selection) {
- Thread* self = Thread::Current();
- jobject class_loader;
- {
- ScopedObjectAccess soa(self);
- class_loader = LoadDex("StaticLeafMethods");
- }
- ASSERT_NE(class_loader, nullptr);
-
- // Need to enable dex-file writability. Methods rejected to be compiled will run through the
- // dex-to-dex compiler.
- for (const DexFile* dex_file : GetDexFiles(class_loader)) {
- ASSERT_TRUE(dex_file->EnableWrite());
- }
-
- CompileAll(class_loader);
-
- ClassLinker* class_linker = Runtime::Current()->GetClassLinker();
- ScopedObjectAccess soa(self);
- StackHandleScope<1> hs(self);
- Handle<mirror::ClassLoader> h_loader(
- hs.NewHandle(soa.Decode<mirror::ClassLoader>(class_loader)));
- mirror::Class* klass = class_linker->FindClass(self, "LStaticLeafMethods;", h_loader);
- ASSERT_NE(klass, nullptr);
-
- std::unique_ptr<std::unordered_set<std::string>> expected(GetCompiledMethods());
-
- const auto pointer_size = class_linker->GetImagePointerSize();
- for (auto& m : klass->GetDirectMethods(pointer_size)) {
- std::string name = m.PrettyMethod(true);
- const void* code = m.GetEntryPointFromQuickCompiledCodePtrSize(pointer_size);
- ASSERT_NE(code, nullptr);
- if (expected->find(name) != expected->end()) {
- expected->erase(name);
- EXPECT_FALSE(class_linker->IsQuickToInterpreterBridge(code));
- } else {
- EXPECT_TRUE(class_linker->IsQuickToInterpreterBridge(code));
- }
- }
- EXPECT_TRUE(expected->empty());
-}
-
class CompilerDriverProfileTest : public CompilerDriverTest {
protected:
ProfileCompilationInfo* GetProfileCompilationInfo() OVERRIDE {