/art/test/121-simple-suspend-check/src/ |
H A D | Main.java | 19 SpinThread thread = new SpinThread(); 20 thread.setDaemon(true); 21 thread.start();
|
/art/runtime/openjdkjvmti/ |
H A D | ti_thread.h | 58 static jvmtiError GetThreadInfo(jvmtiEnv* env, jthread thread, jvmtiThreadInfo* info_ptr); 60 static jvmtiError GetThreadState(jvmtiEnv* env, jthread thread, jint* thread_state_ptr); 62 static jvmtiError SetThreadLocalStorage(jvmtiEnv* env, jthread thread, const void* data); 63 static jvmtiError GetThreadLocalStorage(jvmtiEnv* env, jthread thread, void** data_ptr); 66 jthread thread,
|
H A D | ti_stack.h | 50 static jvmtiError GetFrameCount(jvmtiEnv* env, jthread thread, jint* count_ptr); 53 jthread thread, 59 jthread thread,
|
H A D | events.cc | 47 #include "thread-inl.h" 55 EventMask& EventMasks::GetEventMask(art::Thread* thread) { argument 56 if (thread == nullptr) { 62 if (unique_thread.first == thread && 63 unique_thread.second == static_cast<uint32_t>(thread->GetTid())) { 70 thread_event_masks.emplace_back(UniqueThread(thread, thread->GetTid()), EventMask()); 74 EventMask* EventMasks::GetEventMaskOrNull(art::Thread* thread) { argument 75 if (thread == nullptr) { 81 if (unique_thread.first == thread 91 EnableEvent(art::Thread* thread, ArtJvmtiEvent event) argument 99 DisableEvent(art::Thread* thread, ArtJvmtiEvent event) argument 372 SetEvent(ArtJvmTiEnv* env, art::Thread* thread, ArtJvmtiEvent event, jvmtiEventMode mode) argument [all...] |
H A D | ti_thread.cc | 52 #include "thread-inl.h" 70 ScopedLocalRef<jthread> thread(self->GetJniEnv(), GetThreadObject(self)); 74 thread.get()); 86 !android::base::StartsWith(name, "Jit thread pool")) { 87 LOG(FATAL) << "Unexpected thread before start: " << name; 101 // We moved to VMInit. Report the main thread as started (it was attached early, and must 122 art::ScopedSuspendAll ssa("Add thread callback"); 140 art::ScopedSuspendAll ssa("Remove thread callback"); 162 // Get the native thread. The spec says a null object denotes the current thread 174 GetThreadInfo(jvmtiEnv* env, jthread thread, jvmtiThreadInfo* info_ptr) argument 400 GetThreadState(jvmtiEnv* env ATTRIBUTE_UNUSED, jthread thread, jint* thread_state_ptr) argument 495 SetThreadLocalStorage(jvmtiEnv* env ATTRIBUTE_UNUSED, jthread thread, const void* data) argument 512 GetThreadLocalStorage(jvmtiEnv* env ATTRIBUTE_UNUSED, jthread thread, void** data_ptr) argument 535 jthread thread; member in struct:openjdkjvmti::AgentData 570 RunAgentThread(jvmtiEnv* jvmti_env, jthread thread, jvmtiStartFunction proc, const void* arg, jint priority) argument [all...] |
H A D | ti_dump.cc | 42 #include "thread-inl.h" 49 art::Thread* thread = art::Thread::Current(); local 50 art::ScopedThreadSuspension sts(thread, art::ThreadState::kNative);
|
H A D | events-inl.h | 117 inline void EventHandler::DispatchClassFileLoadHookEvent(art::Thread* thread, argument 137 if (ShouldDispatch<kEvent>(env, thread)) { 175 inline void EventHandler::DispatchEvent(art::Thread* thread, Args... args) const { argument 178 DispatchEvent<kEvent, Args...>(env, thread, args...); 184 inline void EventHandler::DispatchEvent(ArtJvmTiEnv* env, art::Thread* thread, Args... args) const { argument 186 if (ShouldDispatch<kEvent>(env, thread)) { 197 inline void EventHandler::DispatchEvent<ArtJvmtiEvent::kNativeMethodBind>(art::Thread* thread, argument 205 if (env != nullptr && ShouldDispatch<ArtJvmtiEvent::kNativeMethodBind>(env, thread)) { 220 art::Thread* thread, 231 thread, 219 DispatchEvent( art::Thread* thread, JNIEnv* jnienv, jclass class_being_redefined, jobject loader, const char* name, jobject protection_domain, jint class_data_len, const unsigned char* class_data, jint* new_class_data_len, unsigned char** new_class_data) const argument 243 DispatchEvent( art::Thread* thread, JNIEnv* jnienv, jclass class_being_redefined, jobject loader, const char* name, jobject protection_domain, jint class_data_len, const unsigned char* class_data, jint* new_class_data_len, unsigned char** new_class_data) const argument 268 ShouldDispatch(ArtJvmTiEnv* env, art::Thread* thread) argument [all...] |
H A D | ti_stack.cc | 55 #include "thread-inl.h" 166 static jvmtiError GetThread(JNIEnv* env, jthread java_thread, art::Thread** thread) { argument 168 *thread = art::Thread::Current(); 169 if (*thread == nullptr) { 170 // GetStackTrace can only be run during the live phase, so the current thread should be 183 *thread = art::Thread::FromManagedThread(soa, java_thread); 184 if (*thread == nullptr) { 197 art::Thread* thread; local 198 jvmtiError thread_error = GetThread(art::Thread::Current()->GetJniEnv(), java_thread, &thread); 202 DCHECK(thread ! 591 GetFrameCountVisitor(art::Thread* thread) argument 624 art::Thread* thread; local 644 GetLocationVisitor(art::Thread* thread, size_t n_in) argument 694 art::Thread* thread; local [all...] |
/art/test/129-ThreadGetId/src/ |
H A D | Main.java | 48 for (Thread thread : array) { 49 if (thread.getName().equals("HeapTaskDaemon") && 50 thread.getState() != Thread.State.NEW) { 51 return thread; 67 Thread thread = pair.getKey(); 68 // Expect empty stack trace since we do not support suspending the GC thread for 70 if (thread == heapDaemon) { 71 System.out.println(thread.getName() + " depth " + pair.getValue().length); 78 System.out.println("current thread's ID is not positive"); 82 for (Thread thread [all...] |
/art/runtime/ |
H A D | thread_list.cc | 43 #include "thread.h" 83 // Detach the current thread if necessary. If we failed to start, there might not be any threads. 84 // We need to detach the current thread here in case there's another thread waiting to join with 102 // TODO: there's an unaddressed race here where a thread may attach during shutdown, see 107 bool ThreadList::Contains(Thread* thread) { argument 108 return find(list_.begin(), list_.end(), thread) != list_.end(); 112 for (const auto& thread : list_) { 113 if (thread->GetTid() == tid) { 127 for (const auto& thread 815 Resume(Thread* thread, bool for_debugger) argument 878 Thread* thread; local 1007 Thread* thread = nullptr; local [all...] |
H A D | instrumentation.h | 58 // the events they are listening for. The call backs supply the thread, method and dex_pc the event 59 // occurred upon. The thread may or may not be Thread::Current(). 65 virtual void MethodEntered(Thread* thread, mirror::Object* this_object, 70 virtual void MethodExited(Thread* thread, mirror::Object* this_object, 77 virtual void MethodUnwind(Thread* thread, mirror::Object* this_object, 82 virtual void DexPcMoved(Thread* thread, mirror::Object* this_object, 87 virtual void FieldRead(Thread* thread, mirror::Object* this_object, ArtMethod* method, 91 virtual void FieldWritten(Thread* thread, mirror::Object* this_object, ArtMethod* method, 95 virtual void ExceptionCaught(Thread* thread, mirror::Throwable* exception_object) 99 virtual void Branch(Thread* thread, [all...] |
H A D | nth_caller_visitor.h | 29 NthCallerVisitor(Thread* thread, size_t n_in, bool include_runtime_and_upcalls = false) argument 30 : StackVisitor(thread, nullptr, StackVisitor::StackWalkKind::kIncludeInlinedFrames),
|
H A D | trace.h | 69 // u1 thread ID 74 // u2 thread ID 79 // u2 thread ID 139 void CompareAndUpdateStackTrace(Thread* thread, std::vector<ArtMethod*>* stack_trace) 143 void MethodEntered(Thread* thread, mirror::Object* this_object, 147 void MethodExited(Thread* thread, mirror::Object* this_object, 152 void MethodUnwind(Thread* thread, mirror::Object* this_object, 156 void DexPcMoved(Thread* thread, mirror::Object* this_object, 160 void FieldRead(Thread* thread, mirror::Object* this_object, 163 void FieldWritten(Thread* thread, mirro [all...] |
H A D | instrumentation.cc | 40 #include "thread.h" 172 static void InstrumentationInstallStack(Thread* thread, void* arg) 282 thread->GetThreadName(thread_name); 289 InstallStackVisitor visitor(thread, context.get(), instrumentation_exit_pc); 291 CHECK_EQ(visitor.dex_pcs_.size(), thread->GetInstrumentationStack()->size()); 294 // Create method enter events for all methods currently on the thread's stack. We only do this 297 for (auto isi = thread->GetInstrumentationStack()->rbegin(), 298 end = thread->GetInstrumentationStack()->rend(); isi != end; ++isi) { 300 instrumentation->MethodEnterEvent(thread, (*ssi).this_object_, (*ssi).method_, 0); 306 instrumentation->MethodEnterEvent(thread, (*is 313 InstrumentThreadStack(Thread* thread) argument 637 ResetQuickAllocEntryPointsForThread(Thread* thread, void* arg ATTRIBUTE_UNUSED) argument 919 MethodEnterEventImpl(Thread* thread, mirror::Object* this_object, ArtMethod* method, uint32_t dex_pc) const argument 931 MethodExitEventImpl(Thread* thread, mirror::Object* this_object, ArtMethod* method, uint32_t dex_pc, const JValue& return_value) const argument 943 MethodUnwindEvent(Thread* thread, mirror::Object* this_object, ArtMethod* method, uint32_t dex_pc) const argument 955 DexPcMovedEventImpl(Thread* thread, mirror::Object* this_object, ArtMethod* method, uint32_t dex_pc) const argument 965 BranchImpl(Thread* thread, ArtMethod* method, uint32_t dex_pc, int32_t offset) const argument 976 InvokeVirtualOrInterfaceImpl(Thread* thread, mirror::Object* this_object, ArtMethod* caller, uint32_t dex_pc, ArtMethod* callee) const argument 991 FieldReadEventImpl(Thread* thread, mirror::Object* this_object, ArtMethod* method, uint32_t dex_pc, ArtField* field) const argument 1001 FieldWriteEventImpl(Thread* thread, mirror::Object* this_object, ArtMethod* method, uint32_t dex_pc, ArtField* field, const JValue& field_value) const argument 1011 ExceptionCaughtEvent(Thread* thread, mirror::Throwable* exception_object) const argument [all...] |
/art/test/051-thread/src/ |
H A D | Main.java | 23 * Test some basic thread stuff. 28 System.out.println("thread test starting"); 36 System.out.println("thread test done"); 40 * Simple thread capacity test. 48 for (TestCapacityThread thread : threads) { 49 thread.start(); 51 for (TestCapacityThread thread : threads) { 52 thread.join(); 55 System.out.println("testThreadCapacity thread count: " + TestCapacityThread.mCount); 76 System.out.print("testThreadDaemons starting thread '" [all...] |
/art/runtime/interpreter/mterp/mips64/ |
H A D | op_throw.S | 2 * Throw an exception object in the current thread. 9 sd a0, THREAD_EXCEPTION_OFFSET(rSELF) # thread->exception <- obj
|
/art/runtime/native/ |
H A D | java_lang_Thread.cc | 26 #include "thread.h" 44 Thread* thread = Thread::FromManagedThread(soa, java_thread); local 45 return (thread != nullptr) ? thread->IsInterrupted() : JNI_FALSE; 50 // There are sections in the zygote that forbid thread creation. 74 Thread* thread = Thread::FromManagedThread(soa, java_thread); local 75 if (thread != nullptr) { 76 internal_thread_state = thread->GetState(); 106 LOG(ERROR) << "Unexpected thread state: " << internal_thread_state; 118 Thread* thread local 125 Thread* thread = Thread::FromManagedThread(soa, java_thread); local 146 Thread* thread = thread_list->SuspendThreadByPeer(peer, true, false, &timed_out); local 167 Thread* thread = Thread::FromManagedThread(soa, java_thread); local [all...] |
H A D | dalvik_system_VMStack.cc | 39 // Never allow suspending the heap task thread since it may deadlock if allocations are 47 // Suspend thread to build stack trace. 51 Thread* thread = thread_list->SuspendThreadByPeer(peer, true, false, &timed_out); local 52 if (thread != nullptr) { 56 trace = thread->CreateInternalStackTrace<false>(soa); 58 // Restart suspended thread. 59 thread_list->Resume(thread, false); 61 LOG(ERROR) << "Trying to get thread's stack failed as the thread failed to suspend within a " 86 // The caller is an attached native thread 94 ClosestUserClassLoaderVisitor(Thread* thread) argument [all...] |
/art/test/924-threads/ |
H A D | threads.cc | 43 jthread thread = nullptr; local 44 jvmtiError result = jvmti_env->GetCurrentThread(&thread); 48 return thread; 52 JNIEnv* env, jclass Main_klass ATTRIBUTE_UNUSED, jthread thread) { 56 jvmtiError result = jvmti_env->GetThreadInfo(thread, &info); 75 // The thread group; 100 JNIEnv* env, jclass Main_klass ATTRIBUTE_UNUSED, jthread thread) { 102 jvmtiError result = jvmti_env->GetThreadState(thread, &state); 130 JNIEnv* env, jclass Main_klass ATTRIBUTE_UNUSED, jthread thread) { 132 jvmtiError result = jvmti_env->GetThreadLocalStorage(thread, 51 Java_art_Test924_getThreadInfo( JNIEnv* env, jclass Main_klass ATTRIBUTE_UNUSED, jthread thread) argument 99 Java_art_Test924_getThreadState( JNIEnv* env, jclass Main_klass ATTRIBUTE_UNUSED, jthread thread) argument 129 Java_art_Test924_getTLS( JNIEnv* env, jclass Main_klass ATTRIBUTE_UNUSED, jthread thread) argument 139 Java_art_Test924_setTLS( JNIEnv* env, jclass Main_klass ATTRIBUTE_UNUSED, jthread thread, jlong val) argument 149 ThreadEvent(jvmtiEnv* jvmti_env, JNIEnv* jni_env, jthread thread, bool is_start) argument 173 ThreadStart(jvmtiEnv* jvmti_env, JNIEnv* jni_env, jthread thread) argument 179 ThreadEnd(jvmtiEnv* jvmti_env, JNIEnv* jni_env, jthread thread) argument [all...] |
/art/runtime/interpreter/mterp/arm/ |
H A D | op_throw.S | 2 * Throw an exception object in the current thread. 10 str r1, [rSELF, #THREAD_EXCEPTION_OFFSET] @ thread->exception<- obj
|
/art/runtime/interpreter/mterp/mips/ |
H A D | op_throw.S | 2 * Throw an exception object in the current thread. 10 sw a1, THREAD_EXCEPTION_OFFSET(rSELF) # thread->exception <- obj
|
/art/runtime/openjdkjvmti/include/ |
H A D | jvmti.h | 540 jthread thread; member in struct:_jvmtiStackInfo 723 jthread thread, 742 jthread thread, 748 jthread thread, 777 jthread thread, 787 jthread thread, 795 jthread thread, 805 jthread thread, 817 jthread thread, 830 jthread thread, 1800 GetThreadState(jthread thread, jint* thread_state_ptr) argument 1814 SuspendThread(jthread thread) argument 1824 ResumeThread(jthread thread) argument 1834 StopThread(jthread thread, jobject exception) argument 1839 InterruptThread(jthread thread) argument 1843 GetThreadInfo(jthread thread, jvmtiThreadInfo* info_ptr) argument 1848 GetOwnedMonitorInfo(jthread thread, jint* owned_monitor_count_ptr, jobject** owned_monitors_ptr) argument 1854 GetOwnedMonitorStackDepthInfo(jthread thread, jint* monitor_info_count_ptr, jvmtiMonitorStackDepthInfo** monitor_info_ptr) argument 1860 GetCurrentContendedMonitor(jthread thread, jobject* monitor_ptr) argument 1865 RunAgentThread(jthread thread, jvmtiStartFunction proc, const void* arg, jint priority) argument 1872 SetThreadLocalStorage(jthread thread, const void* data) argument 1877 GetThreadLocalStorage(jthread thread, void** data_ptr) argument 1900 GetStackTrace(jthread thread, jint start_depth, jint max_frame_count, jvmtiFrameInfo* frame_buffer, jint* count_ptr) argument 1921 GetFrameCount(jthread thread, jint* count_ptr) argument 1926 PopFrame(jthread thread) argument 1930 GetFrameLocation(jthread thread, jint depth, jmethodID* method_ptr, jlocation* location_ptr) argument 1937 NotifyFramePop(jthread thread, jint depth) argument 1942 ForceEarlyReturnObject(jthread thread, jobject value) argument 1947 ForceEarlyReturnInt(jthread thread, jint value) argument 1952 ForceEarlyReturnLong(jthread thread, jlong value) argument 1957 ForceEarlyReturnFloat(jthread thread, jfloat value) argument 1962 ForceEarlyReturnDouble(jthread thread, jdouble value) argument 1967 ForceEarlyReturnVoid(jthread thread) argument 2034 GetLocalObject(jthread thread, jint depth, jint slot, jobject* value_ptr) argument 2041 GetLocalInstance(jthread thread, jint depth, jobject* value_ptr) argument 2047 GetLocalInt(jthread thread, jint depth, jint slot, jint* value_ptr) argument 2054 GetLocalLong(jthread thread, jint depth, jint slot, jlong* value_ptr) argument 2061 GetLocalFloat(jthread thread, jint depth, jint slot, jfloat* value_ptr) argument 2068 GetLocalDouble(jthread thread, jint depth, jint slot, jdouble* value_ptr) argument 2075 SetLocalObject(jthread thread, jint depth, jint slot, jobject value) argument 2082 SetLocalInt(jthread thread, jint depth, jint slot, jint value) argument 2089 SetLocalLong(jthread thread, jint depth, jint slot, jlong value) argument 2096 SetLocalFloat(jthread thread, jint depth, jint slot, jfloat value) argument 2103 SetLocalDouble(jthread thread, jint depth, jint slot, jdouble value) argument 2451 GetThreadCpuTime(jthread thread, jlong* nanos_ptr) argument [all...] |
/art/runtime/gc/space/ |
H A D | bump_pointer_space.cc | 96 size_t BumpPointerSpace::RevokeThreadLocalBuffers(Thread* thread) { argument 98 RevokeThreadLocalBuffersLocked(thread); 106 // TODO: Not do a copy of the thread list? 108 for (Thread* thread : thread_list) { 109 RevokeThreadLocalBuffers(thread); 114 void BumpPointerSpace::AssertThreadLocalBuffersAreRevoked(Thread* thread) { argument 117 DCHECK(!thread->HasTlab()); 126 // TODO: Not do a copy of the thread list? 128 for (Thread* thread : thread_list) { 129 AssertThreadLocalBuffersAreRevoked(thread); 249 RevokeThreadLocalBuffersLocked(Thread* thread) argument [all...] |
/art/test/151-OpenFileLimit/src/ |
H A D | Main.java | 45 // Now try to create a new thread. 47 Thread thread = new Thread() { 49 System.out.println("thread run."); 52 thread.start(); 53 thread.join();
|
/art/test/570-checker-osr/ |
H A D | osr.cc | 30 explicit OsrVisitor(Thread* thread, const char* method_name) 32 : StackVisitor(thread, nullptr, StackVisitor::StackWalkKind::kIncludeInlinedFrames), 92 explicit ProfilingInfoVisitor(Thread* thread, const char* method_name) 94 : StackVisitor(thread, nullptr, StackVisitor::StackWalkKind::kIncludeInlinedFrames), 126 OsrCheckVisitor(Thread* thread, const char* method_name) 128 : StackVisitor(thread, nullptr, StackVisitor::StackWalkKind::kIncludeInlinedFrames), 138 // Sleep to yield to the compiler thread.
|