aboutsummaryrefslogtreecommitdiff
path: root/src/profiling/ProfilingService.cpp
diff options
context:
space:
mode:
authorFinn Williams <Finn.Williams@arm.com>2019-12-19 17:05:18 +0000
committerFinn Williams <Finn.Williams@arm.com>2020-01-14 12:39:05 +0000
commit09ad6f909f25aef02b7f53bba320b534b9260786 (patch)
treee69f6d9d4b15b0c7e106c5f6749dd77586247a75 /src/profiling/ProfilingService.cpp
parentf90c56d72de4848a2dc5844a97458aaf09df07c2 (diff)
downloadarmnn-09ad6f909f25aef02b7f53bba320b534b9260786.tar.gz
IVGCVSW-4229 Fix Intermittent failures in ExternalProfiling
* Added a BufferManager.Reset() method to prevent packets being retained after a test * Fixed a bug causing the send thread to wait needlessly before moving to active state * Refactored SendCoundPacketTests and ProfilingTests test helper classes * Fixed issue where WaitForPacketSent could miss a notification and timeout Signed-off-by: Finn Williams <Finn.Williams@arm.com> Change-Id: I353a652260c2f7dd465baa9e979e22f50f3ca6a7
Diffstat (limited to 'src/profiling/ProfilingService.cpp')
-rw-r--r--src/profiling/ProfilingService.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/profiling/ProfilingService.cpp b/src/profiling/ProfilingService.cpp
index 9119597ceb..cc41fb2d69 100644
--- a/src/profiling/ProfilingService.cpp
+++ b/src/profiling/ProfilingService.cpp
@@ -371,6 +371,7 @@ void ProfilingService::Reset()
m_CounterIndex.clear();
m_CounterValues.clear();
m_CounterDirectory.Clear();
+ m_BufferManager.Reset();
// ...finally reset the profiling state machine
m_StateMachine.Reset();
@@ -379,11 +380,12 @@ void ProfilingService::Reset()
void ProfilingService::Stop()
{
// The order in which we reset/stop the components is not trivial!
-
- // First stop the threads (Command Handler first)...
+ // First stop the producing threads
+ // Command Handler first as it is responsible for launching then Periodic Counter capture thread
m_CommandHandler.Stop();
- m_SendCounterPacket.Stop(false);
m_PeriodicCounterCapture.Stop();
+ // The the consuming thread
+ m_SendCounterPacket.Stop(false);
// ...then close and destroy the profiling connection...
if (m_ProfilingConnection != nullptr && m_ProfilingConnection->IsOpen())