OSDN Git Service

JNI direct buffer function speedup, part 1.
authorAndy McFadden <fadden@android.com>
Wed, 22 Jul 2009 22:07:27 +0000 (15:07 -0700)
committerAndy McFadden <fadden@android.com>
Wed, 22 Jul 2009 22:13:01 +0000 (15:13 -0700)
commit5f612b82bbc2fcfb13865acd3c3835febab23466
tree599bcfbfcafee012919f71af86172e6fd21df292
parent6fbc4eb48bf368199f31a25fae60f8f7a378cc52
JNI direct buffer function speedup, part 1.

This is a fairly straightforward improvement to GetDirectBufferAddress,
caching classes and methodIDs instead of looking them up on every call.
This is the best we can do without making the function more vulnerable
to internal changes to Harmony's NIO implementation.

It looks like we need to take this farther, but this way we have a
relatively fast and relatively safe version to fall back on.

For internal bug 1943379.
vm/Globals.h
vm/Jni.c