diff options
author | Ian Rogers <irogers@google.com> | 2013-10-18 15:42:20 -0700 |
---|---|---|
committer | Ian Rogers <irogers@google.com> | 2013-10-20 14:55:26 -0700 |
commit | 1eb512d33f94d1dd7ea38263307ba0f7a0dfa653 (patch) | |
tree | b4d4d9b16013ab90fb4b40d23013d7ef44bb5852 /runtime/native/java_lang_DexCache.cc | |
parent | b917ea1a62aa0ab8eca3f689ef64b5be34e11abb (diff) | |
download | android_art-1eb512d33f94d1dd7ea38263307ba0f7a0dfa653.tar.gz android_art-1eb512d33f94d1dd7ea38263307ba0f7a0dfa653.tar.bz2 android_art-1eb512d33f94d1dd7ea38263307ba0f7a0dfa653.zip |
Fast JNI support.
Use a modifier to signal a native method is a fast JNI method. If the
modifier is set then don't perform runnable transitions.
Change-Id: I7835b4d837bfdd1cb8e2d54b919c0d5e6cf90499
Diffstat (limited to 'runtime/native/java_lang_DexCache.cc')
-rw-r--r-- | runtime/native/java_lang_DexCache.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/runtime/native/java_lang_DexCache.cc b/runtime/native/java_lang_DexCache.cc index 9b83206c37..51cd5b80d5 100644 --- a/runtime/native/java_lang_DexCache.cc +++ b/runtime/native/java_lang_DexCache.cc @@ -17,13 +17,13 @@ #include "dex_file.h" #include "mirror/dex_cache.h" #include "mirror/object-inl.h" -#include "scoped_thread_state_change.h" +#include "scoped_fast_native_object_access.h" #include "well_known_classes.h" namespace art { static jobject DexCache_getDexNative(JNIEnv* env, jobject javaDexCache) { - ScopedObjectAccess soa(env); + ScopedFastNativeObjectAccess soa(env); mirror::DexCache* dex_cache = soa.Decode<mirror::DexCache*>(javaDexCache); // Should only be called while holding the lock on the dex cache. DCHECK_EQ(dex_cache->GetLockOwnerThreadId(), soa.Self()->GetThreadId()); @@ -46,7 +46,7 @@ static jobject DexCache_getDexNative(JNIEnv* env, jobject javaDexCache) { } static JNINativeMethod gMethods[] = { - NATIVE_METHOD(DexCache, getDexNative, "()Lcom/android/dex/Dex;"), + NATIVE_METHOD(DexCache, getDexNative, "!()Lcom/android/dex/Dex;"), }; void register_java_lang_DexCache(JNIEnv* env) { |