aboutsummaryrefslogtreecommitdiff
path: root/src/profiling/PeriodicCounterCapture.hpp
diff options
context:
space:
mode:
authorFinn Williams <Finn.Williams@arm.com>2019-10-14 15:55:18 +0100
committerJim Flynn Arm <jim.flynn@arm.com>2019-10-15 09:22:03 +0000
commitf4d59a678d8ef8420f52d341bb60f1a583269e24 (patch)
tree5a36aec70269d0194440aa3224b2187c86bf8c5b /src/profiling/PeriodicCounterCapture.hpp
parent91e1de786ddeee7fcd702a756ef47a475ff1bd46 (diff)
downloadarmnn-f4d59a678d8ef8420f52d341bb60f1a583269e24.tar.gz
IVGCVSW-3984 Fix CheckPeriodicCounterCaptureThread
* PerodicCounterCapture now sleeps instead of terminating when reading empty counter data * m_IsRunning is now set to false after the thread is joined and is no longer atomic * removed usages of find() (not thread safe) Signed-off-by: Finn Williams <Finn.Williams@arm.com> Change-Id: Ie65d5a9a7e42a31653ec8eed064849355661ef56
Diffstat (limited to 'src/profiling/PeriodicCounterCapture.hpp')
-rw-r--r--src/profiling/PeriodicCounterCapture.hpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/profiling/PeriodicCounterCapture.hpp b/src/profiling/PeriodicCounterCapture.hpp
index 2e9ac364f1..4a28711d6b 100644
--- a/src/profiling/PeriodicCounterCapture.hpp
+++ b/src/profiling/PeriodicCounterCapture.hpp
@@ -38,14 +38,14 @@ public:
void Start() override;
void Stop() override;
- bool IsRunning() const { return m_IsRunning.load(); }
+ bool IsRunning() const { return m_IsRunning; }
private:
CaptureData ReadCaptureData();
void Capture(const IReadCounterValues& readCounterValues);
const Holder& m_CaptureDataHolder;
- std::atomic<bool> m_IsRunning;
+ bool m_IsRunning;
std::atomic<bool> m_KeepRunning;
std::thread m_PeriodCaptureThread;
const IReadCounterValues& m_ReadCounterValues;