Lines Matching refs:self

318   Thread* self = Thread::Current();  in ~Runtime()  local
319 const bool attach_shutdown_thread = self == nullptr; in ~Runtime()
337 self = Thread::Current(); in ~Runtime()
396 MutexLock mu(self, *Locks::runtime_shutdown_lock_); in ~Runtime()
399 shutdown_cond_->Wait(self); in ~Runtime()
404 CHECK(self != nullptr); in ~Runtime()
407 self->ClearException(); in ~Runtime()
408 self->GetJniEnv()->CallStaticVoidMethod(WellKnownClasses::java_lang_Daemons, in ~Runtime()
418 ScopedObjectAccess soa(self); in ~Runtime()
424 self = nullptr; in ~Runtime()
428 heap_->WaitForGcToComplete(gc::kGcCauseBackground, self); in ~Runtime()
528 Thread* self = Thread::Current(); in Dump() local
533 DumpAllThreads(os, self); in Dump()
535 if (self == nullptr) { in Dump()
540 if (Locks::mutator_lock_->IsExclusiveHeld(self) || Locks::mutator_lock_->IsSharedHeld(self)) { in Dump()
541 DumpThread(os, self); in Dump()
543 if (Locks::mutator_lock_->SharedTryLock(self)) { in Dump()
544 DumpThread(os, self); in Dump()
545 Locks::mutator_lock_->SharedUnlock(self); in Dump()
552 void DumpThread(std::ostream& os, Thread* self) const NO_THREAD_SAFETY_ANALYSIS { in DumpThread()
553 DCHECK(Locks::mutator_lock_->IsExclusiveHeld(self) || Locks::mutator_lock_->IsSharedHeld(self)); in DumpThread()
554 self->Dump(os); in DumpThread()
555 if (self->IsExceptionPending()) { in DumpThread()
556 mirror::Throwable* exception = self->GetException(); in DumpThread()
561 void DumpAllThreads(std::ostream& os, Thread* self) const { in DumpAllThreads()
570 bool tll_already_held = Locks::thread_list_lock_->IsExclusiveHeld(self); in DumpAllThreads()
571 bool tscl_already_held = Locks::thread_suspend_count_lock_->IsExclusiveHeld(self); in DumpAllThreads()
579 bool ml_already_exlusively_held = Locks::mutator_lock_->IsExclusiveHeld(self); in DumpAllThreads()
584 bool ml_already_held = Locks::mutator_lock_->IsSharedHeld(self); in DumpAllThreads()
827 void Runtime::RunRootClinits(Thread* self) { in RunRootClinits() argument
828 class_linker_->RunRootClinits(self); in RunRootClinits()
837 StackHandleScope<1> hs(self); in RunRootClinits()
839 class_linker_->EnsureInitialized(self, klass, true, true); in RunRootClinits()
840 self->AssertNoPendingException(); in RunRootClinits()
860 Thread* self = Thread::Current(); in Start() local
862 self->TransitionFromRunnableToSuspended(kNative); in Start()
867 ScopedObjectAccess soa(self); in Start()
877 self->AssertNoPendingException(); in Start()
880 self->AssertNoPendingException(); in Start()
900 InitThreadGroups(self); in Start()
924 ScopedObjectAccess soa(self); in Start()
937 InitNonZygoteOrPostFork(self->GetJniEnv(), in Start()
949 ScopedObjectAccess soa(self); in Start()
950 self->GetJniEnv()->AssertLocalsEmpty(); in Start()
956 ScopedObjectAccess soa(self); in Start()
961 ScopedObjectAccess soa(self); in Start()
962 self->GetJniEnv()->AssertLocalsEmpty(); in Start()
969 ScopedThreadStateChange tsc(self, kWaitingForMethodTracingStart); in Start()
1094 bool Runtime::IsShuttingDown(Thread* self) { in IsShuttingDown() argument
1095 MutexLock mu(self, *Locks::runtime_shutdown_lock_); in IsShuttingDown()
1103 Thread* self = Thread::Current(); in StartDaemonThreads() local
1106 CHECK_EQ(self->GetState(), kNative); in StartDaemonThreads()
1108 JNIEnv* env = self->GetJniEnv(); in StartDaemonThreads()
1159 static inline void CreatePreAllocatedException(Thread* self, in CreatePreAllocatedException() argument
1165 DCHECK_EQ(self, Thread::Current()); in CreatePreAllocatedException()
1168 ObjPtr<mirror::Class> klass = class_linker->FindSystemClass(self, exception_class_descriptor); in CreatePreAllocatedException()
1172 klass->Alloc(self, allocator_type)); in CreatePreAllocatedException()
1176 ObjPtr<mirror::String> message = mirror::String::AllocFromModifiedUtf8(self, msg); in CreatePreAllocatedException()
1545 Thread* self = Thread::Attach("main", false, nullptr, false); in Init() local
1546 CHECK_EQ(self->GetThreadId(), ThreadList::kMainThreadId); in Init()
1547 CHECK(self != nullptr); in Init()
1549 self->SetIsRuntimeThread(IsAotCompiler()); in Init()
1552 self->TransitionFromSuspendedToRunnable(); in Init()
1596 class_linker_->AddExtraBootDexFiles(self, std::move(extra_boot_class_path)); in Init()
1601 ScopedThreadSuspension sts(self, ThreadState::kNative); in Init()
1670 CreatePreAllocatedException(self, in Init()
1677 CreatePreAllocatedException(self, in Init()
1685 CreatePreAllocatedException(self, in Init()
1694 CreatePreAllocatedException(self, in Init()
1703 GetJniIdManager()->Init(self); in Init()
1710 ScopedThreadSuspension sts(self, ThreadState::kNative); in Init()
1781 ScopedObjectAccess soa(self); in Init()
1873 Thread* self = Thread::Current(); in InitNativeMethods() local
1874 JNIEnv* env = self->GetJniEnv(); in InitNativeMethods()
1877 CHECK_EQ(self->GetState(), kNative); in InitNativeMethods()
1928 void Runtime::InitThreadGroups(Thread* self) { in InitThreadGroups() argument
1929 JNIEnvExt* env = self->GetJniEnv(); in InitThreadGroups()
2046 Thread* self = Thread::Current(); in SetStatsEnabled() local
2047 MutexLock mu(self, *Locks::instrument_entrypoints_lock_); in SetStatsEnabled()
2051 self->GetStats()->Clear(~0); in SetStatsEnabled()
2114 Thread* self = Thread::Attach(thread_name, as_daemon, thread_group, create_peer); in AttachCurrentThread() local
2116 if (self != nullptr && create_peer && !IsAotCompiler()) { in AttachCurrentThread()
2117 ScopedObjectAccess soa(self); in AttachCurrentThread()
2118 self->NotifyThreadGroup(soa, thread_group); in AttachCurrentThread()
2120 return self != nullptr; in AttachCurrentThread()
2125 Thread* self = Thread::Current(); in DetachCurrentThread() local
2126 if (self == nullptr) { in DetachCurrentThread()
2129 if (self->HasManagedStack()) { in DetachCurrentThread()
2132 thread_list_->Unregister(self); in DetachCurrentThread()
2486 void Runtime::AbortTransactionAndThrowAbortError(Thread* self, const std::string& abort_message) { in AbortTransactionAndThrowAbortError() argument
2495 GetTransaction()->ThrowAbortError(self, &abort_message); in AbortTransactionAndThrowAbortError()
2498 void Runtime::ThrowTransactionAbortError(Thread* self) { in ThrowTransactionAbortError() argument
2502 GetTransaction()->ThrowAbortError(self, nullptr); in ThrowTransactionAbortError()
2954 void Run(Thread* self) override { in Run() argument
2975 gc::ScopedInterruptibleGCCriticalSection sigcs(self, in Run()