Lines Matching full:instrumentation

17 #include "instrumentation.h"
60 namespace instrumentation { namespace
90 // Instrumentation works on non-inlined frames by updating returned PCs
97 explicit InstallStubsClassVisitor(Instrumentation* instrumentation) in InstallStubsClassVisitor() argument
98 : instrumentation_(instrumentation) {} in InstallStubsClassVisitor()
106 Instrumentation* const instrumentation_;
109 Instrumentation::Instrumentation() in Instrumentation() function in art::instrumentation::Instrumentation
126 bool Instrumentation::ProcessMethodUnwindCallbacks(Thread* self, in ProcessMethodUnwindCallbacks()
136 // The instrumentation events expect the exception to be set. in ProcessMethodUnwindCallbacks()
170 void Instrumentation::InstallStubsForClass(ObjPtr<mirror::Class> klass) { in InstallStubsForClass()
232 // When jiting code for debuggable runtimes / instrumentation is active we generate the code to in CodeSupportsEntryExitHooks()
236 // If JITed code was compiled with instrumentation support we support entry / exit hooks. in CodeSupportsEntryExitHooks()
246 // The remaining cases are nterp / oat code / JIT code that isn't compiled with instrumentation in CodeSupportsEntryExitHooks()
273 const Instrumentation* instr = Runtime::Current()->GetInstrumentation(); in UpdateEntryPoints()
307 bool Instrumentation::NeedsDexPcEvents(ArtMethod* method, Thread* thread) { in NeedsDexPcEvents()
311 bool Instrumentation::InterpretOnly(ArtMethod* method) REQUIRES_SHARED(Locks::mutator_lock_) { in InterpretOnly()
381 void Instrumentation::InitializeMethodsCode(ArtMethod* method, const void* aot_code) in InitializeMethodsCode()
391 // Use instrumentation entrypoints if instrumentation is installed. in InitializeMethodsCode()
440 void Instrumentation::InstallStubsForMethod(ArtMethod* method) { in InstallStubsForMethod()
452 // If the instrumentation needs to go through the interpreter, just update the in InstallStubsForMethod()
469 // We're being asked to restore the entrypoints after instrumentation. in InstallStubsForMethod()
479 void Instrumentation::UpdateEntrypointsForDebuggable() { in UpdateEntrypointsForDebuggable()
487 bool Instrumentation::MethodSupportsExitEvents(ArtMethod* method, in MethodSupportsExitEvents()
511 // Updates on stack frames to support any changes related to instrumentation.
544 // Since we are updating the instrumentation related information we have to recalculate in InstrumentationInstallStack()
668 void Instrumentation::InstrumentThreadStack(Thread* thread, bool force_deopt) { in InstrumentThreadStack()
673 void Instrumentation::InstrumentAllThreadStacks(bool force_deopt) { in InstrumentAllThreadStacks()
745 // only check when we no longer need instrumentation support. So it is possible that the bit is in HasFramesNeedingForceDeopt()
752 void Instrumentation::DeoptimizeAllThreadFrames() { in DeoptimizeAllThreadFrames()
756 static bool HasEvent(Instrumentation::InstrumentationEvent expected, uint32_t events) { in HasEvent()
760 static bool PotentiallyAddListenerTo(Instrumentation::InstrumentationEvent event, in PotentiallyAddListenerTo()
780 static void PotentiallyAddListenerTo(Instrumentation::InstrumentationEvent event, in PotentiallyAddListenerTo()
791 static void PotentiallyAddListenerTo(Instrumentation::InstrumentationEvent event, in PotentiallyAddListenerTo()
803 void Instrumentation::AddListener(InstrumentationListener* listener, in AddListener()
885 static bool PotentiallyRemoveListenerFrom(Instrumentation::InstrumentationEvent event, in PotentiallyRemoveListenerFrom()
911 static void PotentiallyRemoveListenerFrom(Instrumentation::InstrumentationEvent event, in PotentiallyRemoveListenerFrom()
922 static void PotentiallyRemoveListenerFrom(Instrumentation::InstrumentationEvent event, in PotentiallyRemoveListenerFrom()
934 void Instrumentation::RemoveListener(InstrumentationListener* listener, in RemoveListener()
1016 Instrumentation::InstrumentationLevel Instrumentation::GetCurrentInstrumentationLevel() const { in GetCurrentInstrumentationLevel()
1020 void Instrumentation::ConfigureStubs(const char* key, in ConfigureStubs()
1023 // Store the instrumentation level for this key or remove it. in ConfigureStubs()
1025 // The client no longer needs instrumentation. in ConfigureStubs()
1028 // The client needs instrumentation. in ConfigureStubs()
1035 void Instrumentation::UpdateInstrumentationLevel(InstrumentationLevel requested_level) { in UpdateInstrumentationLevel()
1039 void Instrumentation::EnableEntryExitHooks(const char* key) { in EnableEntryExitHooks()
1046 void Instrumentation::MaybeRestoreInstrumentationStack() { in MaybeRestoreInstrumentationStack()
1080 void Instrumentation::UpdateStubs(bool try_switch_to_non_debuggable) { in UpdateStubs()
1081 // Look for the highest required instrumentation level. in UpdateStubs()
1097 // 1. Update the instrumentation level in UpdateStubs()
1099 // the instrumentation level is set to kInstrumentNothing. So this needs to happen only after in UpdateStubs()
1100 // updating the instrumentation level. in UpdateStubs()
1102 // entrypoints after switching the instrumentation level. in UpdateStubs()
1120 void Instrumentation::SetEntrypointsInstrumented(bool instrumented) { in SetEntrypointsInstrumented()
1137 // Note: self may be null. One of those paths is setting instrumentation in the Heap in SetEntrypointsInstrumented()
1147 void Instrumentation::InstrumentQuickAllocEntryPoints() { in InstrumentQuickAllocEntryPoints()
1152 void Instrumentation::UninstrumentQuickAllocEntryPoints() { in UninstrumentQuickAllocEntryPoints()
1157 void Instrumentation::InstrumentQuickAllocEntryPointsLocked() { in InstrumentQuickAllocEntryPointsLocked()
1165 void Instrumentation::UninstrumentQuickAllocEntryPointsLocked() { in UninstrumentQuickAllocEntryPointsLocked()
1174 void Instrumentation::ResetQuickAllocEntryPoints() { in ResetQuickAllocEntryPoints()
1182 std::string Instrumentation::EntryPointString(const void* code) { in EntryPointString()
1207 void Instrumentation::UpdateMethodsCodeImpl(ArtMethod* method, const void* new_code) { in UpdateMethodsCodeImpl()
1209 // Fast path: no instrumentation. in UpdateMethodsCodeImpl()
1241 void Instrumentation::UpdateNativeMethodsCodeToJitCode(ArtMethod* method, const void* new_code) { in UpdateNativeMethodsCodeToJitCode()
1253 void Instrumentation::UpdateMethodsCode(ArtMethod* method, const void* new_code) { in UpdateMethodsCode()
1258 bool Instrumentation::AddDeoptimizedMethod(ArtMethod* method) { in AddDeoptimizedMethod()
1268 bool Instrumentation::IsDeoptimizedMethod(ArtMethod* method) { in IsDeoptimizedMethod()
1272 bool Instrumentation::RemoveDeoptimizedMethod(ArtMethod* method) { in RemoveDeoptimizedMethod()
1281 void Instrumentation::Deoptimize(ArtMethod* method) { in Deoptimize()
1311 void Instrumentation::Undeoptimize(ArtMethod* method) { in Undeoptimize()
1352 bool Instrumentation::IsDeoptimizedMethodsEmpty() const { in IsDeoptimizedMethodsEmpty()
1356 bool Instrumentation::IsDeoptimized(ArtMethod* method) { in IsDeoptimized()
1361 void Instrumentation::DisableDeoptimization(const char* key, bool try_switch_to_non_debuggable) { in DisableDeoptimization()
1362 // Remove any instrumentation support added for deoptimization. in DisableDeoptimization()
1379 void Instrumentation::MaybeSwitchRuntimeDebugState(Thread* self) { in MaybeSwitchRuntimeDebugState()
1400 void Instrumentation::DeoptimizeEverything(const char* key) { in DeoptimizeEverything()
1409 void Instrumentation::UndeoptimizeEverything(const char* key) { in UndeoptimizeEverything()
1419 void Instrumentation::EnableMethodTracing(const char* key, in EnableMethodTracing()
1437 void Instrumentation::DisableMethodTracing(const char* key) { in DisableMethodTracing()
1445 const void* Instrumentation::GetCodeForInvoke(ArtMethod* method) { in GetCodeForInvoke()
1446 // This is called by instrumentation and resolution trampolines in GetCodeForInvoke()
1451 // If we don't have the instrumentation, the resolution stub, or the in GetCodeForInvoke()
1467 const void* Instrumentation::GetMaybeInstrumentedCodeForInvoke(ArtMethod* method) { in GetMaybeInstrumentedCodeForInvoke()
1477 void Instrumentation::MethodEnterEventImpl(Thread* thread, ArtMethod* method) const { in MethodEnterEventImpl()
1494 void Instrumentation::MethodExitEventImpl(Thread* thread, in MethodExitEventImpl()
1512 template<> void Instrumentation::MethodExitEventImpl(Thread* thread, in MethodExitEventImpl()
1539 void Instrumentation::MethodUnwindEvent(Thread* thread, in MethodUnwindEvent()
1551 void Instrumentation::DexPcMovedEventImpl(Thread* thread, in DexPcMovedEventImpl()
1565 void Instrumentation::BranchImpl(Thread* thread, in BranchImpl()
1576 void Instrumentation::WatchedFramePopImpl(Thread* thread, const ShadowFrame& frame) const { in WatchedFramePopImpl()
1584 void Instrumentation::FieldReadEventImpl(Thread* thread, in FieldReadEventImpl()
1599 void Instrumentation::FieldWriteEventImpl(Thread* thread, in FieldWriteEventImpl()
1624 void Instrumentation::ExceptionThrownEvent(Thread* thread, in ExceptionThrownEvent()
1643 void Instrumentation::ExceptionHandledEvent(Thread* thread, in ExceptionHandledEvent()
1659 DeoptimizationMethodType Instrumentation::GetDeoptimizationMethodType(ArtMethod* method) { in GetDeoptimizationMethodType()
1675 JValue Instrumentation::GetReturnValue(ArtMethod* method, in GetReturnValue()
1700 bool Instrumentation::PushDeoptContextIfNeeded(Thread* self, in PushDeoptContextIfNeeded()
1716 // alloc instruction so we don't need the return value. For instrumentation in PushDeoptContextIfNeeded()
1726 std::unique_ptr<Context> Instrumentation::DeoptimizeIfNeeded(Thread* self, in DeoptimizeIfNeeded()
1747 bool Instrumentation::NeedsSlowInterpreterForMethod(Thread* self, ArtMethod* method) { in NeedsSlowInterpreterForMethod()
1759 bool Instrumentation::ShouldDeoptimizeCaller(Thread* self, ArtMethod** sp) { in ShouldDeoptimizeCaller()
1760 // When exit stubs aren't called we don't need to check for any instrumentation related in ShouldDeoptimizeCaller()
1772 bool Instrumentation::ShouldDeoptimizeCaller(Thread* self, ArtMethod** sp, size_t frame_size) { in ShouldDeoptimizeCaller()
1821 } // namespace instrumentation