JNI: Faster jobject decoding by avoiding checks.
Avoid costly runtime checks in Thread::DecodeJObject() and
IndirectReferenceTable::Get() that it calls and replace them
with DCHECK()s and checks in CheckJNI. This improves the
performance of JNI interface in release mode for processes
that do not use CheckJNI (default for non-debuggable apps).
The results for StringToBytesBenchmark on blueline little
cores running at fixed frequency 1420800 are approximately
(medians from 3 runs) before after
timeGetBytesAscii EMPTY 477.70 408.18
timeGetBytesIso88591 EMPTY 473.00 412.15
timeGetBytesUtf8 EMPTY 468.96 402.78
Test: m test-art-host-gtest
Test: testrunner.py --host --optimizing
Test: blueline-userdebug boots.
Bug: 172332525
Change-Id: Ibea788bb54879d1fca0608c30fde008063aaafcc
8 files changed