OSDN Git Service

Add fast path for FindClass using the type dex file.
authorMathieu Chartier <mathieuc@google.com>
Fri, 5 Sep 2014 01:33:17 +0000 (18:33 -0700)
committerMathieu Chartier <mathieuc@google.com>
Tue, 9 Sep 2014 00:44:56 +0000 (17:44 -0700)
commit8a39e7fe02e9a81853dc7a75cb50d9ece07a9b37
tree2855e9117349705f264fc5cbbef6a9aece147efd
parent2c63eee334bca18536060eea2e4a2f7883ef8eb9
Add fast path for FindClass using the type dex file.

If we are using the PathClassLoader with a BootClassLoader
parent, we can handle the common case in the FindClass function
without needing to go back to java code.

Around 10% speedup measured of maps launch, could be noise due to
large variation of app launch times. Eliminates defineClassNative
from being anywhere near the top of sampling profiles.

Bug: 17397179
Bug: 16828525
Change-Id: Ide0db2b5f6cf5b96fc46e89178e0799de667cb88
runtime/class_linker.cc
runtime/mirror/class_loader.h
runtime/well_known_classes.cc
runtime/well_known_classes.h