Optimize FindClass ClassNotFoundException case
With the current class loaders, there are many exceptions thrown for
each ClassNotFoundexception from FindClass calling
ClassLoader.loadClass. This CL reduces that by throwing directly from
FindClass to avoid these extra exceptions.
Numbers are from logging time taken by QuickDeliverException.
Time spent in exception throwing during startup goes down (Pixel 2 XL):
Camera: 20ms -> 5ms
Calculator: 5ms -> 2ms
Maps: 20ms -> 10ms
Added option -XX:FastClassNotFoundException=<bool> to enable or
disable the feature.
Bug: 130310316
Bug: 130293184
Bug: 130209120
Test: test-art-host
(cherry picked from commit 40b1ba4543cf33e54f32e31cd2f276700c1be63c)
Merged-In: If013a2f2f330684e4f6ab000c19ef3822990e613
Change-Id: Ifca8d8b78e82463488bbb3f5796e9be7d94465b1
6 files changed