diff options
author | Matteo Martincigh <matteo.martincigh@arm.com> | 2019-10-15 09:35:29 +0100 |
---|---|---|
committer | Matteo Martincigh <matteo.martincigh@arm.com> | 2019-10-15 15:20:31 +0000 |
commit | 8d9590e5510b8ebdc4e0b2b31ce4b653b46fc02a (patch) | |
tree | 0521297dae9ebbf4b012df52313abe44d66d4c42 /src/profiling/ProfilingService.cpp | |
parent | 672d06eac5b0842c22f9f219e9b65efcd5883d33 (diff) | |
download | armnn-8d9590e5510b8ebdc4e0b2b31ce4b653b46fc02a.tar.gz |
IVGCVSW-3939 Code refactoring and minor fixes
* Fixed value masking in SendPeriodicCounterCapturePacket and updated
the pertinent unit tests
* Code refactoring and cleanup
* Added extra comments to the ProfilingService stop/reset procedure
Signed-off-by: Matteo Martincigh <matteo.martincigh@arm.com>
Change-Id: Ibaf2fede76e06d5b8ce7258a4820a60e5993559f
Diffstat (limited to 'src/profiling/ProfilingService.cpp')
-rw-r--r-- | src/profiling/ProfilingService.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/profiling/ProfilingService.cpp b/src/profiling/ProfilingService.cpp index b87773fc86..1cc9262420 100644 --- a/src/profiling/ProfilingService.cpp +++ b/src/profiling/ProfilingService.cpp @@ -313,8 +313,9 @@ void ProfilingService::InitializeCounterValue(uint16_t counterUid) void ProfilingService::Reset() { - // Reset the profiling service + // Stop the profiling service... Stop(); + // ...then delete all the counter data and configuration... m_CounterIndex.clear(); m_CounterValues.clear(); @@ -333,13 +334,14 @@ void ProfilingService::Stop() m_SendCounterPacket.Stop(false); m_PeriodicCounterCapture.Stop(); - // ...then destroy the profiling connection... + // ...then close and destroy the profiling connection... if (m_ProfilingConnection != nullptr && m_ProfilingConnection->IsOpen()) { m_ProfilingConnection->Close(); } m_ProfilingConnection.reset(); + // ...then move to the "NotConnected" state m_StateMachine.TransitionToState(ProfilingState::NotConnected); } |