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
diff --git a/runtime/thread.cc b/runtime/thread.cc
index 8949a5b..8b93b91 100644
--- a/runtime/thread.cc
+++ b/runtime/thread.cc
@@ -1529,7 +1529,7 @@
}
SirtRef<mirror::ClassLoader> class_loader(this, cl);
SirtRef<mirror::Class>
- exception_class(this, runtime->GetClassLinker()->FindClass(exception_class_descriptor,
+ exception_class(this, runtime->GetClassLinker()->FindClass(this, exception_class_descriptor,
class_loader));
if (UNLIKELY(exception_class.get() == nullptr)) {
CHECK(IsExceptionPending());