MCPcopy Create free account
hub / github.com/ARM-software/armnn / Stop

Method Stop

profiling/client/src/ProfilingService.cpp:390–415  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

388}
389
390void ProfilingService::Stop()
391{
392#if !defined(ARMNN_STUB_PROFILING)
393 { // only lock when we are updating the inference completed variable
394 std::unique_lock<std::mutex> lck(m_ServiceActiveMutex);
395 m_ServiceActive = false;
396 }
397 // The order in which we reset/stop the components is not trivial!
398 // First stop the producing threads
399 // Command Handler first as it is responsible for launching then Periodic Counter capture thread
400 m_CommandHandler.Stop();
401 m_PeriodicCounterCapture.Stop();
402 // The the consuming thread
403 m_SendThread.Stop(false);
404
405 // ...then close and destroy the profiling connection...
406 if (m_ProfilingConnection != nullptr && m_ProfilingConnection->IsOpen())
407 {
408 m_ProfilingConnection->Close();
409 }
410 m_ProfilingConnection.reset();
411
412 // ...then move to the "NotConnected" state
413 m_StateMachine.TransitionToState(ProfilingState::NotConnected);
414#endif // ARMNN_STUB_PROFILING
415}
416
417inline void ProfilingService::CheckCounterUid(uint16_t counterUid) const
418{

Callers 1

UpdateMethod · 0.45

Calls 4

IsOpenMethod · 0.45
CloseMethod · 0.45
resetMethod · 0.45
TransitionToStateMethod · 0.45

Tested by

no test coverage detected