From 1eb512d33f94d1dd7ea38263307ba0f7a0dfa653 Mon Sep 17 00:00:00 2001 From: Ian Rogers Date: Fri, 18 Oct 2013 15:42:20 -0700 Subject: 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 --- runtime/native/java_lang_DexCache.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'runtime/native/java_lang_DexCache.cc') 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(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) { -- cgit v1.2.3-59-g8ed1b