diff options
author | Mathieu Chartier <mathieuc@google.com> | 2014-09-11 13:14:31 -0700 |
---|---|---|
committer | Mathieu Chartier <mathieuc@google.com> | 2014-09-11 16:55:49 -0700 |
commit | 2e158932354e5950eb59c79498ab46b0586885fd (patch) | |
tree | 6cccc50847537d9dd807b49347b7bec846e5ec6e /runtime/jni_internal.cc | |
parent | 02308cf78484bcd125d92ebb27185d890889b92a (diff) | |
download | art-2e158932354e5950eb59c79498ab46b0586885fd.tar.gz art-2e158932354e5950eb59c79498ab46b0586885fd.tar.bz2 art-2e158932354e5950eb59c79498ab46b0586885fd.zip |
Delete pin table
The pin table was brought over from dalvik but not really needed
since ART doesn't support pinning in movable spaces. The only
thing it did was hold objects live for JNI functions.
This shouldn't be necessary since people keep jni references to
these objects or else they could never release the elements.
Bug: 17456946
(cherry picked from commit a967c62e4e6675d3553445aa8e95a09e7a3381b0)
Change-Id: Ibed0d029157ffb9e75ecd80d4d544d690986c090
Diffstat (limited to 'runtime/jni_internal.cc')
-rw-r--r-- | runtime/jni_internal.cc | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/runtime/jni_internal.cc b/runtime/jni_internal.cc index 3e9ae09bde..36f01dbf4b 100644 --- a/runtime/jni_internal.cc +++ b/runtime/jni_internal.cc @@ -1695,7 +1695,6 @@ class JNI { ScopedObjectAccess soa(env); mirror::String* s = soa.Decode<mirror::String*>(java_string); mirror::CharArray* chars = s->GetCharArray(); - soa.Vm()->PinPrimitiveArray(soa.Self(), chars); gc::Heap* heap = Runtime::Current()->GetHeap(); if (heap->IsMovableObject(chars)) { if (is_copy != nullptr) { @@ -1724,7 +1723,6 @@ class JNI { if (chars != (s_chars->GetData() + s->GetOffset())) { delete[] chars; } - soa.Vm()->UnpinPrimitiveArray(soa.Self(), s->GetCharArray()); } static const jchar* GetStringCritical(JNIEnv* env, jstring java_string, jboolean* is_copy) { @@ -1733,7 +1731,6 @@ class JNI { mirror::String* s = soa.Decode<mirror::String*>(java_string); mirror::CharArray* chars = s->GetCharArray(); int32_t offset = s->GetOffset(); - soa.Vm()->PinPrimitiveArray(soa.Self(), chars); gc::Heap* heap = Runtime::Current()->GetHeap(); if (heap->IsMovableObject(chars)) { StackHandleScope<1> hs(soa.Self()); @@ -1749,8 +1746,6 @@ class JNI { static void ReleaseStringCritical(JNIEnv* env, jstring java_string, const jchar* chars) { CHECK_NON_NULL_ARGUMENT_RETURN_VOID(java_string); ScopedObjectAccess soa(env); - soa.Vm()->UnpinPrimitiveArray(soa.Self(), - soa.Decode<mirror::String*>(java_string)->GetCharArray()); gc::Heap* heap = Runtime::Current()->GetHeap(); mirror::String* s = soa.Decode<mirror::String*>(java_string); mirror::CharArray* s_chars = s->GetCharArray(); @@ -1906,7 +1901,6 @@ class JNI { // Re-decode in case the object moved since IncrementDisableGC waits for GC to complete. array = soa.Decode<mirror::Array*>(java_array); } - soa.Vm()->PinPrimitiveArray(soa.Self(), array); if (is_copy != nullptr) { *is_copy = JNI_FALSE; } @@ -2331,7 +2325,6 @@ class JNI { if (UNLIKELY(array == nullptr)) { return nullptr; } - soa.Vm()->PinPrimitiveArray(soa.Self(), array); // Only make a copy if necessary. if (Runtime::Current()->GetHeap()->IsMovableObject(array)) { if (is_copy != nullptr) { @@ -2394,7 +2387,6 @@ class JNI { // Non copy to a movable object must means that we had disabled the moving GC. heap->DecrementDisableMovingGC(soa.Self()); } - soa.Vm()->UnpinPrimitiveArray(soa.Self(), array); } } |