/art/compiler/llvm/ |
H A D | runtime_support_builder_x86.cc | 21 #include "thread.h" 48 CallInst* thread = irb_.CreateCall(func); local 49 thread->setDoesNotAccessMemory(); 50 irb_.SetTBAA(thread, kTBAAConstJObject); 51 return thread;
|
H A D | runtime_support_builder_arm.cc | 20 #include "thread.h" 65 CallInst* thread = irb_.CreateCall(func); local 66 thread->setDoesNotAccessMemory(); 67 irb_.SetTBAA(thread, kTBAAConstJObject); 68 return thread; 98 Value* RuntimeSupportBuilderARM::EmitSetCurrentThread(Value* thread) { argument 100 // sets the current thread. 115 irb_.CreateCall(func, thread);
|
H A D | runtime_support_builder.cc | 24 #include "thread.h" 67 Value* thread = EmitGetCurrentThread(); local 68 return irb_.LoadFromObjectOffset(thread, offset, type, s_ty); 73 Value* thread = EmitGetCurrentThread(); local 74 irb_.StoreToObjectOffset(thread, offset, value, s_ty); 77 ::llvm::Value* RuntimeSupportBuilder::EmitSetCurrentThread(::llvm::Value* thread) { argument 79 return irb_.CreateCall(func, thread);
|
/art/runtime/ |
H A D | nth_caller_visitor.h | 29 NthCallerVisitor(Thread* thread, size_t n, bool include_runtime_and_upcalls = false) argument 30 : StackVisitor(thread, NULL), n(n), include_runtime_and_upcalls_(include_runtime_and_upcalls),
|
H A D | exception_test.cc | 31 #include "thread.h" 158 Thread* thread = Thread::Current(); local 159 thread->TransitionFromSuspendedToRunnable(); 162 JNIEnv* env = thread->GetJniEnv(); 194 // Set up thread to appear as if we called out of method_g_ at pc dex 3 195 thread->SetTopOfStack( 213 thread->PushShadowFrame(reinterpret_cast<ShadowFrame*>(&fake_stack[5])); 214 thread->PushShadowFrame(reinterpret_cast<ShadowFrame*>(&fake_stack[0])); 217 jobject internal = thread->CreateInternalStackTrace<false>(soa); 240 thread [all...] |
H A D | thread-inl.h | 20 #include "thread.h" 31 // Quickly access the current thread from a JNIEnv. 38 // We rely on Thread::Current returning NULL for a detached thread, so it's not obvious 43 void* thread = pthread_getspecific(Thread::pthread_key_self_); local 44 return reinterpret_cast<Thread*>(thread); 65 // We expect no locks except the mutator_lock_ or thread list suspend thread lock. 70 << "\" at point where thread suspension is expected"; 205 // Note: self is not necessarily equal to this thread since thread ma [all...] |
H A D | fault_handler.cc | 25 #include "thread-inl.h" 45 // thread running the signal handler. 47 // 4. save the thread's state to the TLS of the current thread using 'setjmp' 57 // thread. This results in a return with a non-zero value from 'setjmp'. We detect this 204 // We can only be running Java code in the current thread if it 207 Thread* thread = Thread::Current(); local 208 if (thread == nullptr) { 209 VLOG(signals) << "no current thread"; 213 ThreadState state = thread [all...] |
H A D | debugger.h | 57 receiver(NULL), thread(NULL), klass(NULL), method(NULL), 67 /* boolean; set if the JDWP thread wants this thread to do work */ 72 mirror::Object* thread; member in struct:art::DebugInvokeReq 113 // A single-step is initiated in a suspended thread. We save here the current method and the 216 // Return the DebugInvokeReq for the current thread. 442 // Fills 'thread_ids' with the threads in the given thread group. If thread_group_id == 0, 456 static JDWP::ObjectId GetThreadId(Thread* thread) SHARED_LOCKS_REQUIRED(Locks::mutator_lock_); 516 static void UpdateDebugger(Thread* thread, mirror::Object* this_object,
|
H A D | stack.cc | 28 #include "thread.h" 91 StackVisitor::StackVisitor(Thread* thread, Context* context) argument 92 : thread_(thread), cur_shadow_frame_(NULL), 95 DCHECK(thread == Thread::Current() || thread->IsSuspended()) << *thread; 98 StackVisitor::StackVisitor(Thread* thread, Context* context, size_t num_frames) argument 99 : thread_(thread), cur_shadow_frame_(NULL), 102 DCHECK(thread == Thread::Current() || thread 404 ComputeNumFrames(Thread* thread) argument 406 NumFramesVisitor(Thread* thread) argument 423 HasMoreFramesVisitor(Thread* thread, size_t num_frames, size_t frame_height) argument 456 DescribeStack(Thread* thread) argument 458 DescribeStackVisitor(Thread* thread) argument 484 GetInstrumentationStackFrame(Thread* thread, uint32_t depth) argument [all...] |
H A D | thread_list.cc | 36 #include "thread.h" 46 thread_exit_cond_("thread exit condition variable", *Locks::thread_list_lock_) { 51 // Detach the current thread if necessary. If we failed to start, there might not be any threads. 52 // We need to detach the current thread here in case there's another thread waiting to join with 65 // TODO: there's an unaddressed race here where a thread may attach during shutdown, see 70 bool ThreadList::Contains(Thread* thread) { argument 71 return find(list_.begin(), list_.end(), thread) != list_.end(); 75 for (const auto& thread : list_) { 76 if (thread 412 Resume(Thread* thread, bool for_debugger) argument 467 Thread* thread; local 548 Thread* thread = nullptr; local [all...] |
H A D | trace.cc | 36 #include "thread.h" 59 // u1 thread ID 64 // u2 thread ID 69 // u2 thread ID 88 explicit BuildStackTraceVisitor(Thread* thread) : StackVisitor(thread, NULL), argument 236 static void GetSample(Thread* thread, void* arg) SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) { 237 BuildStackTraceVisitor build_trace_visitor(thread); 241 the_trace->CompareAndUpdateStackTrace(thread, stack_trace); 244 static void ClearThreadStackTraceAndClockBase(Thread* thread, voi argument 251 CompareAndUpdateStackTrace(Thread* thread, std::vector<mirror::ArtMethod*>* stack_trace) argument 559 DexPcMoved(Thread* thread, mirror::Object* this_object, mirror::ArtMethod* method, uint32_t new_dex_pc) argument 580 MethodEntered(Thread* thread, mirror::Object* this_object, mirror::ArtMethod* method, uint32_t dex_pc) argument 589 MethodExited(Thread* thread, mirror::Object* this_object, mirror::ArtMethod* method, uint32_t dex_pc, const JValue& return_value) argument 600 MethodUnwind(Thread* thread, mirror::Object* this_object, mirror::ArtMethod* method, uint32_t dex_pc) argument 616 ReadClocks(Thread* thread, uint32_t* thread_clock_diff, uint32_t* wall_clock_diff) argument 632 LogMethodTraceEvent(Thread* thread, mirror::ArtMethod* method, instrumentation::Instrumentation::InstrumentationEvent event, uint32_t thread_clock_diff, uint32_t wall_clock_diff) argument [all...] |
H A D | instrumentation.cc | 41 #include "thread.h" 200 static void InstrumentationInstallStack(Thread* thread, void* arg) 203 InstallStackVisitor(Thread* thread, Context* context, uintptr_t instrumentation_exit_pc) argument 204 : StackVisitor(thread, context), instrumentation_stack_(thread->GetInstrumentationStack()), 307 thread->GetThreadName(thread_name); 314 InstallStackVisitor visitor(thread, context.get(), instrumentation_exit_pc); 316 CHECK_EQ(visitor.dex_pcs_.size(), thread->GetInstrumentationStack()->size()); 319 // Create method enter events for all methods currently on the thread's stack. We only do this 322 for (auto isi = thread 342 RestoreStackVisitor(Thread* thread, uintptr_t instrumentation_exit_pc, Instrumentation* instrumentation) argument 619 ResetQuickAllocEntryPointsForThread(Thread* thread, void* arg) argument 936 MethodEnterEventImpl(Thread* thread, mirror::Object* this_object, mirror::ArtMethod* method, uint32_t dex_pc) const argument 950 MethodExitEventImpl(Thread* thread, mirror::Object* this_object, mirror::ArtMethod* method, uint32_t dex_pc, const JValue& return_value) const argument 964 MethodUnwindEvent(Thread* thread, mirror::Object* this_object, mirror::ArtMethod* method, uint32_t dex_pc) const argument 974 DexPcMovedEventImpl(Thread* thread, mirror::Object* this_object, mirror::ArtMethod* method, uint32_t dex_pc) const argument 985 FieldReadEventImpl(Thread* thread, mirror::Object* this_object, mirror::ArtMethod* method, uint32_t dex_pc, mirror::ArtField* field) const argument 996 FieldWriteEventImpl(Thread* thread, mirror::Object* this_object, mirror::ArtMethod* method, uint32_t dex_pc, mirror::ArtField* field, const JValue& field_value) const argument 1007 ExceptionCaughtEvent(Thread* thread, const ThrowLocation& throw_location, mirror::ArtMethod* catch_method, uint32_t catch_dex_pc, mirror::Throwable* exception_object) const argument [all...] |
H A D | monitor.cc | 32 #include "thread.h" 63 * Only one thread can own the monitor at any time. There may be several threads waiting on it 153 // The owner_ is suspended but another thread beat us to install a monitor. 182 * Links a thread into a monitor's wait set. The monitor lock must be 185 void Monitor::AppendToWaitSet(Thread* thread) { argument 187 DCHECK(thread != NULL); 188 DCHECK(thread->GetWaitNext() == nullptr) << thread->GetWaitNext(); 190 wait_set_ = thread; 199 t->SetWaitNext(thread); 206 RemoveFromWaitSet(Thread *thread) argument 313 ThreadToString(Thread* thread) argument 319 oss << *thread; local 581 Thread* thread = wait_set_; local 604 Thread* thread = wait_set_; local 928 DescribeWait(std::ostream& os, const Thread* thread) argument 975 GetContendedMonitor(Thread* thread) argument [all...] |
H A D | utils.cc | 85 void GetThreadStack(pthread_t thread, void** stack_base, size_t* stack_size, size_t* guard_size) { argument 87 *stack_size = pthread_get_stacksize_np(thread); 88 void* stack_addr = pthread_get_stackaddr_np(thread); 106 CHECK_PTHREAD_CALL(pthread_getattr_np, (thread, &attributes), __FUNCTION__); 1012 PLOG(WARNING) << "Unable to set the name of current thread to '" << buf << "'"; 1074 os << prefix << "(backtrace::Unwind failed for thread " << tid << ")\n"; 1077 os << prefix << "(no native stack frames for thread " << tid << ")\n";
|
/art/runtime/entrypoints/portable/ |
H A D | portable_thread_entrypoints.cc | 85 extern "C" ShadowFrame* art_portable_push_shadow_frame_from_code(Thread* thread, argument 89 ShadowFrame* old_frame = thread->PushShadowFrame(new_shadow_frame);
|
/art/runtime/native/ |
H A D | dalvik_system_VMStack.cc | 35 // Suspend thread to build stack trace. 39 Thread* thread; local 41 // Take suspend thread lock to avoid races with threads trying to suspend this one. 43 thread = thread_list->SuspendThreadByPeer(peer, true, false, &timed_out); 45 if (thread != nullptr) { 48 trace = thread->CreateInternalStackTrace<false>(soa); 50 // Restart suspended thread. 51 thread_list->Resume(thread, false); 54 LOG(ERROR) << "Trying to get thread's stack failed as the thread faile 90 ClosestUserClassLoaderVisitor(Thread* thread, mirror::Object* bootstrap, mirror::Object* system) argument [all...] |
H A D | dalvik_system_ZygoteHooks.cc | 24 #include "thread-inl.h" 67 // There's only one thread running at this point, so only one JNIEnv to fix up. 101 // Grab thread before fork potentially makes Thread::pthread_key_self_ unusable. 108 Thread* thread = reinterpret_cast<Thread*>(token); local 109 // Our system thread ID, etc, has changed so reset Thread state. 110 thread->InitAfterFork();
|
H A D | org_apache_harmony_dalvik_ddmc_DdmVmInternal.cc | 58 // Check for valid thread 63 // Suspend thread to build stack trace. 64 Thread* thread; local 66 // Take suspend thread lock to avoid races with threads trying to suspend this one. 68 thread = thread_list->SuspendThreadByThreadId(thin_lock_id, false, &timed_out); 70 if (thread != nullptr) { 73 jobject internal_trace = thread->CreateInternalStackTrace<false>(soa); 76 // Restart suspended thread. 77 thread_list->Resume(thread, false); 80 LOG(ERROR) << "Trying to get thread' [all...] |
H A D | java_lang_Thread.cc | 25 #include "thread.h" 43 Thread* thread = Thread::FromManagedThread(soa, java_thread); local 44 return (thread != NULL) ? thread->IsInterrupted() : JNI_FALSE; 64 Thread* thread = Thread::FromManagedThread(soa, java_thread); local 65 if (thread != NULL) { 66 internal_thread_state = thread->GetState(); 92 LOG(ERROR) << "Unexpected thread state: " << internal_thread_state; 104 Thread* thread = Thread::FromManagedThread(soa, java_thread); local 105 return thread 111 Thread* thread = Thread::FromManagedThread(soa, java_thread); local 134 Thread* thread; local 159 Thread* thread = Thread::FromManagedThread(soa, java_thread); local [all...] |
/art/runtime/gc/space/ |
H A D | bump_pointer_space.cc | 95 void BumpPointerSpace::RevokeThreadLocalBuffers(Thread* thread) { argument 97 RevokeThreadLocalBuffersLocked(thread); 104 // TODO: Not do a copy of the thread list? 106 for (Thread* thread : thread_list) { 107 RevokeThreadLocalBuffers(thread); 111 void BumpPointerSpace::AssertThreadLocalBuffersAreRevoked(Thread* thread) { argument 114 DCHECK(!thread->HasTlab()); 123 // TODO: Not do a copy of the thread list? 125 for (Thread* thread : thread_list) { 126 AssertThreadLocalBuffersAreRevoked(thread); 244 RevokeThreadLocalBuffersLocked(Thread* thread) argument [all...] |
H A D | rosalloc_space.cc | 26 #include "thread.h" 333 void RosAllocSpace::RevokeThreadLocalBuffers(Thread* thread) { argument 334 rosalloc_->RevokeThreadLocalRuns(thread);
|
/art/runtime/entrypoints/ |
H A D | entrypoint_utils-inl.h | 34 #include "thread.h" 38 // TODO: Fix no thread safety analysis when GCC can handle template specialization. 73 // may cause us to suspend meaning that another thread may try to 92 // TODO: Fix no thread safety analysis when annotalysis is smarter. 100 // may cause us to suspend meaning that another thread may try to 174 // TODO: Fix no thread safety analysis when GCC can handle template specialization. 210 // TODO: Fix no thread safety analysis when GCC can handle template specialization. 251 // No need to retry a slow-path allocation as the above code won't cause a GC or thread 635 static inline void CheckSuspend(Thread* thread) { argument 637 if (thread [all...] |
/art/runtime/jdwp/ |
H A D | jdwp_event.cc | 33 #include "thread-inl.h" 38 The event add/remove stuff usually happens from the debugger thread, 40 result of an event in an arbitrary thread (e.g. an event with a "count" 44 Event posting can happen from any thread. The JDWP thread will not usually 46 to be loaded, the ClassPrepare event will come from the JDWP thread. 50 For example, a thread could send an "I hit a breakpoint and am suspending 52 debugger's response ("not interested, resume thread") arrives and is 53 processed. We try to resume a thread that hasn't yet suspended. 56 for the event thread t 118 Thread* thread; /* ThreadOnly */ member in struct:art::JDWP::ModBasket 1029 PostThreadChange(Thread* thread, bool start) argument [all...] |
/art/runtime/gc/allocator/ |
H A D | rosalloc.cc | 21 #include "thread-inl.h" 551 // Take ownership of the cache lines if we are likely to be thread local run. 654 // Use a thread-local run. 685 // No slots got freed. Try to refill the thread-local run. 721 LOG(INFO) << "RosAlloc::AllocFromRun() thread-local : 0x" << std::hex << reinterpret_cast<intptr_t>(slot_addr) 756 // It's a thread-local run. Just mark the thread-local free bit map and return. 762 LOG(INFO) << "RosAlloc::FreeFromRun() : Freed a slot in a thread local run 0x" << std::hex 765 // A thread local run will be kept as a thread loca 1649 RevokeThreadLocalRuns(Thread* thread) argument 1726 AssertThreadLocalRunsAreRevoked(Thread* thread) argument 2020 Thread* thread = *it; local [all...] |
/art/runtime/gc/collector/ |
H A D | mark_sweep.cc | 43 #include "thread-inl.h" 79 // If true, revoke the rosalloc thread-local buffers at the 195 // Need to revoke all the thread local allocation stacks since we just swapped the allocation 609 // No thread safety analysis since multiple threads will use this visitor. 639 // Mark stack overflow, give 1/2 the stack to the thread pool as a new work task. 736 // The parallel version with only one thread is faster for card scanning, TODO: fix. 779 // Add the new task to the thread pool. 965 virtual void Run(Thread* thread) OVERRIDE NO_THREAD_SAFETY_ANALYSIS { 966 ATRACE_BEGIN("Marking thread roots"); 967 // Note: self is not necessarily equal to thread sinc 975 mark_sweep_->GetHeap()->RevokeRosAllocThreadLocalBuffers(thread); variable [all...] |