From 9837939678bb5dcba178e5fb00ed59b5d14c8d9b Mon Sep 17 00:00:00 2001 From: Ian Rogers Date: Mon, 24 Feb 2014 16:53:16 -0800 Subject: Avoid std::string allocations for finding an array class. Introduce ClassLinker::FindArrayClass which performs an array class lookup given the element/component class. This has a 16 element cache of recently looked up arrays. Pass the current thread to ClassLinker Find .. Class routines to avoid calls to Thread::Current(). Avoid some uses of FindClass in the debugger where WellKnownClasses is a faster and more compacting GC friendly alternative. Change-Id: I60e231820b349543a7edb3ceb9cf1ce92db3c843 --- compiler/driver/compiler_driver_test.cc | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'compiler/driver/compiler_driver_test.cc') diff --git a/compiler/driver/compiler_driver_test.cc b/compiler/driver/compiler_driver_test.cc index 0d0c204d0a..ec0a8bdc63 100644 --- a/compiler/driver/compiler_driver_test.cc +++ b/compiler/driver/compiler_driver_test.cc @@ -79,9 +79,8 @@ class CompilerDriverTest : public CommonTest { const DexFile::ClassDef& class_def = dex_file.GetClassDef(i); const char* descriptor = dex_file.GetClassDescriptor(class_def); ScopedObjectAccess soa(Thread::Current()); - Thread* self = Thread::Current(); - SirtRef loader(self, soa.Decode(class_loader)); - mirror::Class* c = class_linker->FindClass(descriptor, loader); + SirtRef loader(soa.Self(), soa.Decode(class_loader)); + mirror::Class* c = class_linker->FindClass(soa.Self(), descriptor, loader); CHECK(c != NULL); for (size_t i = 0; i < c->NumDirectMethods(); i++) { MakeExecutable(c->GetDirectMethod(i)); -- cgit v1.2.3-59-g8ed1b