Lines Matching refs:art

69 bool JvmtiMethodInspectionCallback::IsMethodBeingInspected(art::ArtMethod* method) {  in IsMethodBeingInspected()
74 return !art::Runtime::Current()->IsJavaDebuggable() || in IsMethodBeingInspected()
79 bool JvmtiMethodInspectionCallback::IsMethodSafeToJit(art::ArtMethod* method) { in IsMethodSafeToJit()
84 art::ArtMethod* method ATTRIBUTE_UNUSED) { in MethodNeedsDebugVersion()
90 static_cast<art::LockLevel>( in DeoptManager()
91 art::LockLevel::kClassLinkerClassesLock + 1)), in DeoptManager()
97 static_cast<art::LockLevel>(art::LockLevel::kAbortLock + 1)), in DeoptManager()
102 art::ScopedThreadStateChange stsc(art::Thread::Current(), in Setup()
103 art::ThreadState::kWaitingForDebuggerToAttach); in Setup()
104 art::ScopedSuspendAll ssa("Add method Inspection Callback"); in Setup()
105 art::RuntimeCallbacks* callbacks = art::Runtime::Current()->GetRuntimeCallbacks(); in Setup()
110 art::ScopedThreadStateChange stsc(art::Thread::Current(), in Shutdown()
111 art::ThreadState::kWaitingForDebuggerToAttach); in Shutdown()
112 art::ScopedSuspendAll ssa("remove method Inspection Callback"); in Shutdown()
113 art::RuntimeCallbacks* callbacks = art::Runtime::Current()->GetRuntimeCallbacks(); in Shutdown()
117 void DeoptManager::DumpDeoptInfo(art::Thread* self, std::ostream& stream) { in DumpDeoptInfo()
118 art::ScopedObjectAccess soa(self); in DumpDeoptInfo()
119 art::MutexLock mutll(self, *art::Locks::thread_list_lock_); in DumpDeoptInfo()
120 art::MutexLock mudsl(self, deoptimization_status_lock_); in DumpDeoptInfo()
121 art::MutexLock mubsl(self, breakpoint_status_lock_); in DumpDeoptInfo()
128 struct DumpThreadDeoptCount : public art::Closure { in DumpDeoptInfo()
132 void Run(art::Thread* self) override { in DumpDeoptInfo()
158 auto func = [](art::Thread* thread, void* ctx) { in DumpDeoptInfo()
161 art::Runtime::Current()->GetThreadList()->ForEach(func, &dtdc); in DumpDeoptInfo()
165 art::Thread* self = art::Thread::Current(); in FinishSetup()
166 art::MutexLock mu(self, deoptimization_status_lock_); in FinishSetup()
168 art::Runtime* runtime = art::Runtime::Current(); in FinishSetup()
210 bool DeoptManager::MethodHasBreakpoints(art::ArtMethod* method) { in MethodHasBreakpoints()
211 art::MutexLock lk(art::Thread::Current(), breakpoint_status_lock_); in MethodHasBreakpoints()
215 bool DeoptManager::MethodHasBreakpointsLocked(art::ArtMethod* method) { in MethodHasBreakpointsLocked()
221 art::Thread* self = art::Thread::Current(); in RemoveDeoptimizeAllMethods()
222 art::ScopedThreadSuspension sts(self, art::kSuspended); in RemoveDeoptimizeAllMethods()
228 art::Thread* self = art::Thread::Current(); in AddDeoptimizeAllMethods()
229 art::ScopedThreadSuspension sts(self, art::kSuspended); in AddDeoptimizeAllMethods()
234 void DeoptManager::AddMethodBreakpoint(art::ArtMethod* method) { in AddMethodBreakpoint()
239 art::Thread* self = art::Thread::Current(); in AddMethodBreakpoint()
243 art::ScopedThreadSuspension sts(self, art::kSuspended); in AddMethodBreakpoint()
262 auto instrumentation = art::Runtime::Current()->GetInstrumentation(); in AddMethodBreakpoint()
274 void DeoptManager::RemoveMethodBreakpoint(art::ArtMethod* method) { in RemoveMethodBreakpoint()
279 art::Thread* self = art::Thread::Current(); in RemoveMethodBreakpoint()
283 art::ScopedThreadSuspension sts(self, art::kSuspended); in RemoveMethodBreakpoint()
290 art::MutexLock mu(self, breakpoint_status_lock_); in RemoveMethodBreakpoint()
298 auto instrumentation = art::Runtime::Current()->GetInstrumentation(); in RemoveMethodBreakpoint()
316 void DeoptManager::WaitForDeoptimizationToFinishLocked(art::Thread* self) { in WaitForDeoptimizationToFinishLocked()
322 void DeoptManager::WaitForDeoptimizationToFinish(art::Thread* self) { in WaitForDeoptimizationToFinish()
329 class ScopedDeoptimizationContext : public art::ValueObject {
331 ScopedDeoptimizationContext(art::Thread* self, DeoptManager* deopt) in ScopedDeoptimizationContext()
333 ACQUIRE(art::Locks::mutator_lock_) in ScopedDeoptimizationContext()
334 ACQUIRE(art::Roles::uninterruptible_) in ScopedDeoptimizationContext()
345 uninterruptible_cause_ = critical_section_.Enter(art::gc::kGcCauseInstrumentation, in ScopedDeoptimizationContext()
346 art::gc::kCollectorTypeCriticalSection); in ScopedDeoptimizationContext()
347 art::Runtime::Current()->GetThreadList()->SuspendAll("JMVTI Deoptimizing methods", in ScopedDeoptimizationContext()
352 RELEASE(art::Locks::mutator_lock_) in RELEASE()
353 RELEASE(art::Roles::uninterruptible_) { in RELEASE()
357 art::Runtime::Current()->GetThreadList()->ResumeAll(); in RELEASE()
359 art::MutexLock lk(self_, deopt_->deoptimization_status_lock_); in RELEASE()
365 art::Thread* self_;
367 art::gc::GCCriticalSection critical_section_;
371 void DeoptManager::AddDeoptimizeAllMethodsLocked(art::Thread* self) { in AddDeoptimizeAllMethodsLocked()
380 void DeoptManager::RemoveDeoptimizeAllMethodsLocked(art::Thread* self) { in RemoveDeoptimizeAllMethodsLocked()
390 void DeoptManager::PerformLimitedDeoptimization(art::Thread* self, art::ArtMethod* method) { in PerformLimitedDeoptimization()
392 art::Runtime::Current()->GetInstrumentation()->Deoptimize(method); in PerformLimitedDeoptimization()
395 void DeoptManager::PerformLimitedUndeoptimization(art::Thread* self, art::ArtMethod* method) { in PerformLimitedUndeoptimization()
397 art::Runtime::Current()->GetInstrumentation()->Undeoptimize(method); in PerformLimitedUndeoptimization()
400 void DeoptManager::PerformGlobalDeoptimization(art::Thread* self) { in PerformGlobalDeoptimization()
402 art::Runtime::Current()->GetInstrumentation()->DeoptimizeEverything( in PerformGlobalDeoptimization()
406 void DeoptManager::PerformGlobalUndeoptimization(art::Thread* self) { in PerformGlobalUndeoptimization()
408 art::Runtime::Current()->GetInstrumentation()->UndeoptimizeEverything( in PerformGlobalUndeoptimization()
412 jvmtiError DeoptManager::AddDeoptimizeThreadMethods(art::ScopedObjectAccessUnchecked& soa, jthread … in AddDeoptimizeThreadMethods()
413 art::Locks::thread_list_lock_->ExclusiveLock(soa.Self()); in AddDeoptimizeThreadMethods()
414 art::Thread* target = nullptr; in AddDeoptimizeThreadMethods()
417 art::Locks::thread_list_lock_->ExclusiveUnlock(soa.Self()); in AddDeoptimizeThreadMethods()
422 struct DeoptClosure : public art::Closure { in AddDeoptimizeThreadMethods()
425 void Run(art::Thread* self) override REQUIRES_SHARED(art::Locks::mutator_lock_) { in AddDeoptimizeThreadMethods()
435 art::Locks::thread_list_lock_->ExclusiveUnlock(soa.Self()); in AddDeoptimizeThreadMethods()
440 jvmtiError DeoptManager::RemoveDeoptimizeThreadMethods(art::ScopedObjectAccessUnchecked& soa, jthre… in RemoveDeoptimizeThreadMethods()
441 art::MutexLock mu(soa.Self(), *art::Locks::thread_list_lock_); in RemoveDeoptimizeThreadMethods()
442 art::Thread* target = nullptr; in RemoveDeoptimizeThreadMethods()
454 art::Thread* self = art::Thread::Current(); in RemoveDeoptimizationRequester()
455 art::ScopedThreadStateChange sts(self, art::kSuspended); in RemoveDeoptimizationRequester()
462 art::Runtime::Current()->GetInstrumentation()->DisableDeoptimization(""); in RemoveDeoptimizationRequester()
470 art::Thread* self = art::Thread::Current(); in AddDeoptimizationRequester()
471 art::ScopedThreadStateChange stsc(self, art::kSuspended); in AddDeoptimizationRequester()
476 art::instrumentation::Instrumentation* instrumentation = in AddDeoptimizationRequester()
477 art::Runtime::Current()->GetInstrumentation(); in AddDeoptimizationRequester()
487 void DeoptManager::DeoptimizeThread(art::Thread* target) { in DeoptimizeThread()
490 art::gc::ScopedGCCriticalSection sgccs(art::Thread::Current(), in DeoptimizeThread()
491 art::gc::GcCause::kGcCauseDebugger, in DeoptimizeThread()
492 art::gc::CollectorType::kCollectorTypeDebugger); in DeoptimizeThread()
493 art::Runtime::Current()->GetInstrumentation()->InstrumentThreadStack(target); in DeoptimizeThread()