Searched defs:thread (Results 1 - 25 of 26) sorted by relevance

12

/art/runtime/
H A Dnth_caller_visitor.h29 NthCallerVisitor(Thread* thread, size_t n_in, bool include_runtime_and_upcalls = false) argument
30 : StackVisitor(thread, nullptr, StackVisitor::StackWalkKind::kIncludeInlinedFrames),
H A Dexception_test.cc32 #include "thread.h"
160 Thread* thread = Thread::Current(); local
161 thread->TransitionFromSuspendedToRunnable();
164 JNIEnv* env = thread->GetJniEnv();
211 // Set up thread to appear as if we called out of method_g_ at pc dex 3
212 thread->SetTopOfStack(reinterpret_cast<ArtMethod**>(&fake_stack[0]));
214 jobject internal = thread->CreateInternalStackTrace<false>(soa);
237 thread->SetTopOfStack(nullptr); // Disarm the assertion that no code is running when we detach.
H A Dthread-inl.h20 #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);
92 // We expect no locks except the mutator_lock_ or thread list suspend thread lock.
97 << "\" at point where thread suspension is expected";
240 // Note: self is not necessarily equal to this thread since thread ma
[all...]
H A Dfault_handler.cc27 #include "thread-inl.h"
47 // thread running the signal handler.
49 // 4. save the thread's state to the TLS of the current thread using 'setjmp'
59 // thread. This results in a return with a non-zero value from 'setjmp'. We detect this
179 // If ART is not running, or the thread is not attached to ART pass the
301 // We can only be running Java code in the current thread if it
304 Thread* thread = Thread::Current(); local
305 if (thread == nullptr) {
306 VLOG(signals) << "no current thread";
[all...]
H A Dthread_list.cc40 #include "thread.h"
60 // Detach the current thread if necessary. If we failed to start, there might not be any threads.
61 // We need to detach the current thread here in case there's another thread waiting to join with
73 // TODO: there's an unaddressed race here where a thread may attach during shutdown, see
78 bool ThreadList::Contains(Thread* thread) { argument
79 return find(list_.begin(), list_.end(), thread) != list_.end();
83 for (const auto& thread : list_) {
84 if (thread->GetTid() == tid) {
97 for (const auto& thread
574 Resume(Thread* thread, bool for_debugger) argument
632 Thread* thread; local
744 Thread* thread = nullptr; local
[all...]
H A Dinstrumentation.cc39 #include "thread.h"
166 static void InstrumentationInstallStack(Thread* thread, void* arg)
274 thread->GetThreadName(thread_name);
281 InstallStackVisitor visitor(thread, context.get(), instrumentation_exit_pc);
283 CHECK_EQ(visitor.dex_pcs_.size(), thread->GetInstrumentationStack()->size());
286 // Create method enter events for all methods currently on the thread's stack. We only do this
289 for (auto isi = thread->GetInstrumentationStack()->rbegin(),
290 end = thread->GetInstrumentationStack()->rend(); isi != end; ++isi) {
292 instrumentation->MethodEnterEvent(thread, (*ssi).this_object_, (*ssi).method_, 0);
298 instrumentation->MethodEnterEvent(thread, (*is
601 ResetQuickAllocEntryPointsForThread(Thread* thread, void* arg ATTRIBUTE_UNUSED) argument
860 MethodEnterEventImpl(Thread* thread, mirror::Object* this_object, ArtMethod* method, uint32_t dex_pc) const argument
874 MethodExitEventImpl(Thread* thread, mirror::Object* this_object, ArtMethod* method, uint32_t dex_pc, const JValue& return_value) const argument
888 MethodUnwindEvent(Thread* thread, mirror::Object* this_object, ArtMethod* method, uint32_t dex_pc) const argument
898 DexPcMovedEventImpl(Thread* thread, mirror::Object* this_object, ArtMethod* method, uint32_t dex_pc) const argument
907 BackwardBranchImpl(Thread* thread, ArtMethod* method, int32_t offset) const argument
914 FieldReadEventImpl(Thread* thread, mirror::Object* this_object, ArtMethod* method, uint32_t dex_pc, ArtField* field) const argument
923 FieldWriteEventImpl(Thread* thread, mirror::Object* this_object, ArtMethod* method, uint32_t dex_pc, ArtField* field, const JValue& field_value) const argument
932 ExceptionCaughtEvent(Thread* thread, mirror::Throwable* exception_object) const argument
[all...]
H A Djava_vm_ext.cc40 #include "thread-inl.h"
87 * If the call has not yet finished in another thread, wait for it.
169 // Wait for JNI_OnLoad in other thread.
297 Thread* thread = Thread::Current(); local
298 if (thread == nullptr) {
302 *env = thread->GetJniEnv();
323 LOG(ERROR) << "Attempt to attach a thread in the zygote";
398 // TODO: is this useful given that we're about to dump the calling thread's stack?
408 // Ensure that we get a native stack trace for this thread.
505 static void ThreadEnableCheckJni(Thread* thread, voi argument
[all...]
H A Dmonitor.cc36 #include "thread.h"
67 * Only one thread can own the monitor at any time. There may be several threads waiting on it
157 // The owner_ is suspended but another thread beat us to install a monitor.
185 void Monitor::AppendToWaitSet(Thread* thread) { argument
187 DCHECK(thread != nullptr);
188 DCHECK(thread->GetWaitNext() == nullptr) << thread->GetWaitNext();
190 wait_set_ = thread;
199 t->SetWaitNext(thread);
202 void Monitor::RemoveFromWaitSet(Thread *thread) { argument
315 ThreadToString(Thread* thread) argument
321 oss << *thread; local
558 Thread* thread = wait_set_; local
581 Thread* thread = wait_set_; local
930 DescribeWait(std::ostream& os, const Thread* thread) argument
980 GetContendedMonitor(Thread* thread) argument
[all...]
H A Dstack.cc32 #include "thread.h"
92 StackVisitor::StackVisitor(Thread* thread, Context* context, StackWalkKind walk_kind) argument
93 : StackVisitor(thread, context, walk_kind, 0) {}
95 StackVisitor::StackVisitor(Thread* thread, argument
99 : thread_(thread),
107 DCHECK(thread == Thread::Current() || thread->IsSuspended()) << *thread;
576 size_t StackVisitor::ComputeNumFrames(Thread* thread, StackWalkKind walk_kind) { argument
588 NumFramesVisitor visitor(thread, walk_kin
595 HasMoreFramesVisitor(Thread* thread, StackWalkKind walk_kind, size_t num_frames, size_t frame_height) argument
635 DescribeStack(Thread* thread) argument
663 GetInstrumentationStackFrame(Thread* thread, uint32_t depth) argument
[all...]
H A Dtrace.cc42 #include "thread.h"
56 explicit BuildStackTraceVisitor(Thread* thread) argument
57 : StackVisitor(thread, nullptr, StackVisitor::StackWalkKind::kIncludeInlinedFrames),
221 static void GetSample(Thread* thread, void* arg) SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) {
222 BuildStackTraceVisitor build_trace_visitor(thread);
226 the_trace->CompareAndUpdateStackTrace(thread, stack_trace);
229 static void ClearThreadStackTraceAndClockBase(Thread* thread, void* arg ATTRIBUTE_UNUSED) { argument
230 thread->SetTraceClockBase(0);
231 std::vector<ArtMethod*>* stack_trace = thread->GetStackTraceSample();
232 thread
236 CompareAndUpdateStackTrace(Thread* thread, std::vector<ArtMethod*>* stack_trace) argument
743 DexPcMoved(Thread* thread, mirror::Object* this_object, ArtMethod* method, uint32_t new_dex_pc) argument
767 MethodEntered(Thread* thread, mirror::Object* this_object ATTRIBUTE_UNUSED, ArtMethod* method, uint32_t dex_pc ATTRIBUTE_UNUSED) argument
776 MethodExited(Thread* thread, mirror::Object* this_object ATTRIBUTE_UNUSED, ArtMethod* method, uint32_t dex_pc ATTRIBUTE_UNUSED, const JValue& return_value ATTRIBUTE_UNUSED) argument
786 MethodUnwind(Thread* thread, mirror::Object* this_object ATTRIBUTE_UNUSED, ArtMethod* method, uint32_t dex_pc ATTRIBUTE_UNUSED) argument
807 ReadClocks(Thread* thread, uint32_t* thread_clock_diff, uint32_t* wall_clock_diff) argument
842 RegisterThread(Thread* thread) argument
888 LogMethodTraceEvent(Thread* thread, ArtMethod* method, instrumentation::Instrumentation::InstrumentationEvent event, uint32_t thread_clock_diff, uint32_t wall_clock_diff) argument
1011 StoreExitingThreadInfo(Thread* thread) argument
[all...]
H A Dutils.cc81 void GetThreadStack(pthread_t thread, void** stack_base, size_t* stack_size, size_t* guard_size) { argument
83 *stack_size = pthread_get_stacksize_np(thread);
84 void* stack_addr = pthread_get_stackaddr_np(thread);
102 CHECK_PTHREAD_CALL(pthread_getattr_np, (thread, &attributes), __FUNCTION__);
108 // If we're the main thread, check whether we were run with an unlimited stack. In that case,
976 PLOG(WARNING) << "Unable to set the name of current thread to '" << buf << "'";
1103 os << prefix << "(backtrace::Unwind failed for thread " << tid << ")\n";
1106 os << prefix << "(no native stack frames for thread " << tid << ")\n";
H A Dthread.cc19 #include "thread.h"
69 #include "thread-inl.h"
84 static const char* kThreadNameDuringStartup = "<native thread without managed peer>";
233 // One thread (us) survived the fork, but we have a new tid so we need to
252 // Note: given that the JNIEnv is created in the parent thread, the only failure point here is
393 // Atomically start the birth of the thread ensuring the runtime isn't shutting down.
410 // Use global JNI ref to hold peer live while child thread starts.
419 // Try to allocate a JNIEnvExt for the thread. We do this here as we might be out of memory and
429 CHECK_PTHREAD_CALL(pthread_attr_init, (&attr), "new thread");
437 CHECK_PTHREAD_CALL(pthread_attr_destroy, (&attr), "new thread");
904 DumpState(std::ostream& os, const Thread* thread, pid_t tid) argument
1131 const Thread* thread; member in struct:art::StackDumpVisitor
1678 BuildInternalStackTraceVisitor(Thread* self, Thread* thread, int skip_depth) argument
2550 operator <<(std::ostream& os, const Thread& thread) argument
[all...]
H A Ddebugger.cc239 void MethodEntered(Thread* thread, mirror::Object* this_object, ArtMethod* method,
252 thread->SetDebugMethodEntry();
259 thread->SetDebugMethodEntry();
261 Dbg::UpdateDebugger(thread, this_object, method, 0, Dbg::kMethodEntry, nullptr);
265 void MethodExited(Thread* thread, mirror::Object* this_object, ArtMethod* method,
273 if (thread->IsDebugMethodEntry()) {
277 thread->ClearDebugMethodEntry();
279 Dbg::UpdateDebugger(thread, this_object, method, dex_pc, events, &return_value);
282 void MethodUnwind(Thread* thread ATTRIBUTE_UNUSED, mirror::Object* this_object ATTRIBUTE_UNUSED,
290 void DexPcMoved(Thread* thread, mirro
492 Thread* thread = Thread::FromManagedThread(soa, thread_peer); local
919 Thread* thread = DecodeThread(soa, thread_id, &error); local
937 Thread* thread = DecodeThread(soa, thread_id, &error); local
2021 Thread* thread = DecodeThread(soa, thread_id, &error); local
2049 Thread* thread = DecodeThread(soa, thread_id, &error); local
2240 Thread* thread = DecodeThread(soa, thread_id, &error); local
2260 Thread* thread = DecodeThread(soa, thread_id, &error); local
2272 Thread* thread = DecodeThread(soa, thread_id, &error); local
2352 Thread* thread = DecodeThread(soa, thread_id, &error); local
2406 Thread* thread = DecodeThread(soa, thread_id, &error); local
2422 GetThreadId(Thread* thread) argument
2449 Thread* thread = thread_list->SuspendThreadByPeer(peer.get(), request_suspension, true, local
2465 Thread* thread; local
2514 Thread* thread = DecodeThread(soa, thread_id, &error); local
2569 Thread* thread = DecodeThread(soa, thread_id, &error); local
2740 Thread* thread = DecodeThread(soa, thread_id, &error); local
3043 UpdateDebugger(Thread* thread, mirror::Object* this_object, ArtMethod* m, uint32_t dex_pc, int event_flags, const JValue* return_value) argument
3498 IsForcedInterpreterNeededForCallingImpl(Thread* thread, ArtMethod* m) argument
3518 IsForcedInterpreterNeededForResolutionImpl(Thread* thread, ArtMethod* m) argument
3552 IsForcedInstrumentationNeededForResolutionImpl(Thread* thread, ArtMethod* m) argument
3589 IsForcedInterpreterNeededForUpcallImpl(Thread* thread, ArtMethod* m) argument
3713 Thread* const thread = sts.GetThread(); local
3804 Thread* thread = DecodeThread(soa, thread_id, &error); local
[all...]
/art/runtime/gc/
H A Dtask_processor_test.cc21 #include "thread-inl.h"
74 // Add a task which will wait until interrupted to the thread pool.
108 virtual void Run(Thread* thread) OVERRIDE {
109 UNUSED(thread); // Fix cppling bug. variable
139 // Add a task which will wait until interrupted to the thread pool.
H A Dreference_processor.cc67 // If the referent became cleared, return it. Don't need barrier since thread roots can't get
226 virtual void Run(Thread* thread) { argument
227 ScopedObjectAccess soa(thread);
/art/runtime/native/
H A Ddalvik_system_VMStack.cc37 // Suspend thread to build stack trace.
41 Thread* thread = thread_list->SuspendThreadByPeer(peer, true, false, &timed_out); local
42 if (thread != nullptr) {
45 trace = thread->CreateInternalStackTrace<false>(soa);
47 // Restart suspended thread.
48 thread_list->Resume(thread, false);
51 LOG(ERROR) << "Trying to get thread's stack failed as the thread failed to suspend within a "
78 // The caller is an attached native thread.
86 explicit ClosestUserClassLoaderVisitor(Thread* thread) argument
[all...]
H A Ddalvik_system_ZygoteHooks.cc31 #include "thread-inl.h"
77 // There's only one thread running at this point, so only one JNIEnv to fix up.
140 // Grab thread before fork potentially makes Thread::pthread_key_self_ unusable.
146 Thread* thread = reinterpret_cast<Thread*>(token); local
147 // Our system thread ID, etc, has changed so reset Thread state.
148 thread->InitAfterFork();
185 if (thread->IsExceptionPending()) {
187 thread->ClearException();
H A Djava_lang_Thread.cc27 #include "thread.h"
45 Thread* thread = Thread::FromManagedThread(soa, java_thread); local
46 return (thread != nullptr) ? thread->IsInterrupted() : JNI_FALSE;
66 Thread* thread = Thread::FromManagedThread(soa, java_thread); local
67 if (thread != nullptr) {
68 internal_thread_state = thread->GetState();
96 LOG(ERROR) << "Unexpected thread state: " << internal_thread_state;
108 Thread* thread = Thread::FromManagedThread(soa, java_thread); local
109 return thread
115 Thread* thread = Thread::FromManagedThread(soa, java_thread); local
136 Thread* thread = thread_list->SuspendThreadByPeer(peer, true, false, &timed_out); local
157 Thread* thread = Thread::FromManagedThread(soa, java_thread); local
[all...]
H A Dorg_apache_harmony_dalvik_ddmc_DdmVmInternal.cc60 // Check for valid thread
65 // Suspend thread to build stack trace.
66 Thread* thread = thread_list->SuspendThreadByThreadId(thin_lock_id, false, &timed_out); local
67 if (thread != nullptr) {
70 jobject internal_trace = thread->CreateInternalStackTrace<false>(soa);
73 // Restart suspended thread.
74 thread_list->Resume(thread, false);
77 LOG(ERROR) << "Trying to get thread's stack by id failed as the thread failed to suspend "
101 * (2b) thread coun
[all...]
/art/runtime/gc/space/
H A Dbump_pointer_space.cc96 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...]
H A Dregion_space.cc359 size_t RegionSpace::RevokeThreadLocalBuffers(Thread* thread) { argument
361 RevokeThreadLocalBuffersLocked(thread);
365 void RegionSpace::RevokeThreadLocalBuffersLocked(Thread* thread) { argument
366 uint8_t* tlab_start = thread->GetTlabStart();
367 DCHECK_EQ(thread->HasTlab(), tlab_start != nullptr);
372 DCHECK_EQ(thread->GetThreadLocalBytesAllocated(), kRegionSize);
373 r->RecordThreadLocalAllocations(thread->GetThreadLocalObjectsAllocated(),
374 thread->GetThreadLocalBytesAllocated());
378 thread->SetTlab(nullptr, nullptr);
386 for (Thread* thread
392 AssertThreadLocalBuffersAreRevoked(Thread* thread) argument
[all...]
H A Drosalloc_space.cc30 #include "thread.h"
344 size_t RosAllocSpace::RevokeThreadLocalBuffers(Thread* thread) { argument
345 return rosalloc_->RevokeThreadLocalRuns(thread);
352 void RosAllocSpace::AssertThreadLocalBuffersAreRevoked(Thread* thread) { argument
354 rosalloc_->AssertThreadLocalRunsAreRevoked(thread);
/art/runtime/jdwp/
H A Djdwp_event.cc34 #include "thread-inl.h"
41 The event add/remove stuff usually happens from the debugger thread,
43 result of an event in an arbitrary thread (e.g. an event with a "count"
47 Event posting can happen from any thread. The JDWP thread will not usually
49 to be loaded, the ClassPrepare event will come from the JDWP thread.
53 For example, a thread could send an "I hit a breakpoint and am suspending
55 debugger's response ("not interested, resume thread") arrives and is
56 processed. We try to resume a thread that hasn't yet suspended.
59 for the event thread t
125 Thread* const thread; /* ThreadOnly */ member in struct:art::JDWP::ModBasket
1018 PostThreadChange(Thread* thread, bool start) argument
[all...]
/art/runtime/gc/allocator/
H A Drosalloc.cc25 #include "thread-inl.h"
560 // Take ownership of the cache lines if we are likely to be thread local run.
673 // Use a thread-local run.
704 // No slots got freed. Try to refill the thread-local run.
734 // Account for all the free slots in the new or refreshed thread local run.
745 LOG(INFO) << "RosAlloc::AllocFromRun() thread-local : 0x" << std::hex
787 // It's a thread-local run. Just mark the thread-local free bit map and return.
793 LOG(INFO) << "RosAlloc::FreeFromRun() : Freed a slot in a thread local run 0x" << std::hex
796 // A thread loca
1657 RevokeThreadLocalRuns(Thread* thread) argument
1741 AssertThreadLocalRunsAreRevoked(Thread* thread) argument
2043 Thread* thread = *it; local
[all...]
/art/runtime/gc/collector/
H A Dmark_sweep.cc47 #include "thread-inl.h"
83 // If true, revoke the rosalloc thread-local buffers at the
199 // Need to revoke all the thread local allocation stacks since we just swapped the allocation
683 // No thread safety analysis since multiple threads will use this visitor.
713 // Mark stack overflow, give 1/2 the stack to the thread pool as a new work task.
810 // The parallel version with only one thread is faster for card scanning, TODO: fix.
858 // Add the new task to the thread pool.
1067 virtual void Run(Thread* thread) OVERRIDE NO_THREAD_SAFETY_ANALYSIS {
1068 ATRACE_BEGIN("Marking thread roots");
1069 // Note: self is not necessarily equal to thread sinc
1077 mark_sweep_->GetHeap()->RevokeRosAllocThreadLocalBuffers(thread); variable
[all...]

Completed in 1054 milliseconds

12