summaryrefslogtreecommitdiff
path: root/runtime/class_linker.h
diff options
context:
space:
mode:
author Mathieu Chartier <mathieuc@google.com> 2014-09-11 14:21:41 -0700
committer Mathieu Chartier <mathieuc@google.com> 2014-09-11 18:04:33 -0700
commitab0ed82ff64ba5a751dcc0a38d0e0c41c53dc923 (patch)
treec67cceb67994868c42cc16ab8416fa93b56ce682 /runtime/class_linker.h
parent3fec7718041302f769995eedda9beef362131842 (diff)
Add fast path to VMClassLoader.findLoadedClass
VMClassLoader.findLoadedClass now calls FindClassInPathClassLoader as a fast path. Exclusive time results (trace view maps launch): Before: nativeFillInStackTrace 1.4% defineClassNative 1.2% findLoadedClass 0.2% After: nativeFillInStackTrace 0.5% defineClassNative 0.0% findLoadedClass 0.9% (cherry picked from commit 194116c836080de14245a3a7c4617d07b8abf8cf) Change-Id: I63fd7b4bccb71789e92bd39d1d3f9d0de22535de
Diffstat (limited to 'runtime/class_linker.h')
-rw-r--r--runtime/class_linker.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/runtime/class_linker.h b/runtime/class_linker.h
index 7afa6a1d85..11ac326c47 100644
--- a/runtime/class_linker.h
+++ b/runtime/class_linker.h
@@ -76,6 +76,12 @@ class ClassLinker {
ConstHandle<mirror::ClassLoader> class_loader)
SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
+ // Find a class in the path class loader, loading it if necessary.
+ mirror::Class* FindClassInPathClassLoader(ScopedObjectAccessAlreadyRunnable& soa,
+ Thread* self, const char* descriptor,
+ ConstHandle<mirror::ClassLoader> class_loader)
+ SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
+
// Finds a class by its descriptor using the "system" class loader, ie by searching the
// boot_class_path_.
mirror::Class* FindSystemClass(Thread* self, const char* descriptor)