aboutsummaryrefslogtreecommitdiff
path: root/src/profiling
diff options
context:
space:
mode:
authorMatthew Bentham <matthew.bentham@arm.com>2022-01-10 15:41:26 +0000
committerMatthew Bentham <matthew.bentham@arm.com>2022-01-10 18:04:59 +0000
commit2048bcf8ed671b593ac9af2974e10319b9058b20 (patch)
treed71bc03917c2a2c8b40e4d3f62825160a6e0a391 /src/profiling
parent3aa29850b69ec2913cf89fc46b70957a14e8cfb8 (diff)
downloadarmnn-2048bcf8ed671b593ac9af2974e10319b9058b20.tar.gz
Fix some Thread Sanitizer warnings
In ConnectionAcknowledgedCommandHandler use std::atomic to manage access to 'enabled' flag. In StridedSliceAsyncEndToEndTest use separate output buffers for each inference. Neither of these fixes were likely to be causing real bugs in practice but it's helpful for Thread Sanitizer to run cleanly so that they don't hide other real bugs. Signed-off-by: Matthew Bentham <matthew.bentham@arm.com> Change-Id: I2fcc19bd0afcea3494d9081226754b906bd2bd44
Diffstat (limited to 'src/profiling')
-rw-r--r--src/profiling/ConnectionAcknowledgedCommandHandler.hpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/profiling/ConnectionAcknowledgedCommandHandler.hpp b/src/profiling/ConnectionAcknowledgedCommandHandler.hpp
index 0906f7f9f3..bad61b485f 100644
--- a/src/profiling/ConnectionAcknowledgedCommandHandler.hpp
+++ b/src/profiling/ConnectionAcknowledgedCommandHandler.hpp
@@ -43,6 +43,7 @@ public:
, m_StateMachine(profilingStateMachine)
, m_ProfilingServiceStatus(profilingServiceStatus)
, m_BackendProfilingContext(backendProfilingContexts)
+ , m_TimelineEnabled(false)
{}
void operator()(const arm::pipe::Packet& packet) override;
@@ -59,7 +60,7 @@ private:
ProfilingStateMachine& m_StateMachine;
IProfilingServiceStatus& m_ProfilingServiceStatus;
Optional<BackendProfilingContexts> m_BackendProfilingContext;
- bool m_TimelineEnabled = false;
+ std::atomic<bool> m_TimelineEnabled;
};
} // namespace profiling