Lines Matching refs:self

32 static inline void GoToRunnableFast(Thread* self) REQUIRES_SHARED(Locks::mutator_lock_);
35 Thread* self ATTRIBUTE_UNUSED) { in ReadBarrierJni()
51 extern uint32_t JniMethodFastStart(Thread* self) { in JniMethodFastStart() argument
52 JNIEnvExt* env = self->GetJniEnv(); in JniMethodFastStart()
58 ArtMethod* native_method = *self->GetManagedStack()->GetTopQuickFrame(); in JniMethodFastStart()
66 extern uint32_t JniMethodStart(Thread* self) { in JniMethodStart() argument
67 JNIEnvExt* env = self->GetJniEnv(); in JniMethodStart()
71 ArtMethod* native_method = *self->GetManagedStack()->GetTopQuickFrame(); in JniMethodStart()
77 self->TransitionFromRunnableToSuspended(kNative); in JniMethodStart()
82 extern uint32_t JniMethodStartSynchronized(jobject to_lock, Thread* self) { in JniMethodStartSynchronized() argument
83 self->DecodeJObject(to_lock)->MonitorEnter(self); in JniMethodStartSynchronized()
84 return JniMethodStart(self); in JniMethodStartSynchronized()
88 static void GoToRunnable(Thread* self) NO_THREAD_SAFETY_ANALYSIS { in GoToRunnable() argument
89 ArtMethod* native_method = *self->GetManagedStack()->GetTopQuickFrame(); in GoToRunnable()
92 self->TransitionFromSuspendedToRunnable(); in GoToRunnable()
94 GoToRunnableFast(self); in GoToRunnable()
98 ALWAYS_INLINE static inline void GoToRunnableFast(Thread* self) { in GoToRunnableFast() argument
101 ArtMethod* native_method = *self->GetManagedStack()->GetTopQuickFrame(); in GoToRunnableFast()
107 if (UNLIKELY(self->TestAllFlags())) { in GoToRunnableFast()
110 DCHECK(Locks::mutator_lock_->IsSharedHeld(self)); in GoToRunnableFast()
111 self->CheckSuspend(); in GoToRunnableFast()
115 static void PopLocalReferences(uint32_t saved_local_ref_cookie, Thread* self) in PopLocalReferences() argument
117 JNIEnvExt* env = self->GetJniEnv(); in PopLocalReferences()
123 self->PopHandleScope(); in PopLocalReferences()
127 static inline void UnlockJniSynchronizedMethod(jobject locked, Thread* self) in UnlockJniSynchronizedMethod() argument
131 if (UNLIKELY(self->IsExceptionPending())) { in UnlockJniSynchronizedMethod()
132 saved_exception = self->GetException(); in UnlockJniSynchronizedMethod()
133 self->ClearException(); in UnlockJniSynchronizedMethod()
136 self->DecodeJObject(locked)->MonitorExit(self); in UnlockJniSynchronizedMethod()
137 if (UNLIKELY(self->IsExceptionPending())) { in UnlockJniSynchronizedMethod()
141 << self->GetException()->Dump(); in UnlockJniSynchronizedMethod()
145 self->SetException(saved_exception); in UnlockJniSynchronizedMethod()
152 extern void JniMethodEnd(uint32_t saved_local_ref_cookie, Thread* self) { in JniMethodEnd() argument
153 GoToRunnable(self); in JniMethodEnd()
154 PopLocalReferences(saved_local_ref_cookie, self); in JniMethodEnd()
157 extern void JniMethodFastEnd(uint32_t saved_local_ref_cookie, Thread* self) { in JniMethodFastEnd() argument
158 GoToRunnableFast(self); in JniMethodFastEnd()
159 PopLocalReferences(saved_local_ref_cookie, self); in JniMethodFastEnd()
164 Thread* self) { in JniMethodEndSynchronized() argument
165 GoToRunnable(self); in JniMethodEndSynchronized()
166 UnlockJniSynchronizedMethod(locked, self); // Must decode before pop. in JniMethodEndSynchronized()
167 PopLocalReferences(saved_local_ref_cookie, self); in JniMethodEndSynchronized()
173 Thread* self) in JniMethodEndWithReferenceHandleResult() argument
177 if (!self->IsExceptionPending()) { in JniMethodEndWithReferenceHandleResult()
178 o = self->DecodeJObject(result); in JniMethodEndWithReferenceHandleResult()
180 PopLocalReferences(saved_local_ref_cookie, self); in JniMethodEndWithReferenceHandleResult()
182 if (UNLIKELY(self->GetJniEnv()->IsCheckJniEnabled())) { in JniMethodEndWithReferenceHandleResult()
184 StackHandleScope<1> hs(self); in JniMethodEndWithReferenceHandleResult()
186 CheckReferenceResult(h_obj, self); in JniMethodEndWithReferenceHandleResult()
194 Thread* self) { in JniMethodFastEndWithReference() argument
195 GoToRunnableFast(self); in JniMethodFastEndWithReference()
196 return JniMethodEndWithReferenceHandleResult(result, saved_local_ref_cookie, self); in JniMethodFastEndWithReference()
201 Thread* self) { in JniMethodEndWithReference() argument
202 GoToRunnable(self); in JniMethodEndWithReference()
203 return JniMethodEndWithReferenceHandleResult(result, saved_local_ref_cookie, self); in JniMethodEndWithReference()
209 Thread* self) { in JniMethodEndWithReferenceSynchronized() argument
210 GoToRunnable(self); in JniMethodEndWithReferenceSynchronized()
211 UnlockJniSynchronizedMethod(locked, self); in JniMethodEndWithReferenceSynchronized()
212 return JniMethodEndWithReferenceHandleResult(result, saved_local_ref_cookie, self); in JniMethodEndWithReferenceSynchronized()
215 extern uint64_t GenericJniMethodEnd(Thread* self, in GenericJniMethodEnd() argument
228 GoToRunnable(self); in GenericJniMethodEnd()
234 HandleScope* handle_scope = down_cast<HandleScope*>(self->GetTopHandleScope()); in GenericJniMethodEnd()
237 UnlockJniSynchronizedMethod(lock, self); in GenericJniMethodEnd()
242 result.l, saved_local_ref_cookie, self)); in GenericJniMethodEnd()
245 PopLocalReferences(saved_local_ref_cookie, self); // Invalidates top handle scope. in GenericJniMethodEnd()