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/PeriodicCounterCapture.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/PeriodicCounterCapture.cpp')
-rw-r--r-- | src/profiling/PeriodicCounterCapture.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/profiling/PeriodicCounterCapture.cpp b/src/profiling/PeriodicCounterCapture.cpp index 5ba1318a77..f888bc045e 100644 --- a/src/profiling/PeriodicCounterCapture.cpp +++ b/src/profiling/PeriodicCounterCapture.cpp @@ -30,9 +30,7 @@ void PeriodicCounterCapture::Start() m_KeepRunning.store(true); // Start the new capture thread. - m_PeriodCaptureThread = std::thread(&PeriodicCounterCapture::Capture, - this, - std::ref(m_ReadCounterValues)); + m_PeriodCaptureThread = std::thread(&PeriodicCounterCapture::Capture, this, std::ref(m_ReadCounterValues)); } void PeriodicCounterCapture::Stop() @@ -47,6 +45,7 @@ void PeriodicCounterCapture::Stop() m_PeriodCaptureThread.join(); } + // Mark the capture thread as not running m_IsRunning = false; } @@ -114,7 +113,6 @@ void PeriodicCounterCapture::Capture(const IReadCounterValues& readCounterValues } while (m_KeepRunning.load()); - } } // namespace profiling |