aboutsummaryrefslogtreecommitdiff
path: root/src/profiling/BufferManager.hpp
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/BufferManager.hpp
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/BufferManager.hpp')
-rw-r--r--src/profiling/BufferManager.hpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/profiling/BufferManager.hpp b/src/profiling/BufferManager.hpp
index afa4240f14..495b113867 100644
--- a/src/profiling/BufferManager.hpp
+++ b/src/profiling/BufferManager.hpp
@@ -26,6 +26,8 @@ public:
IPacketBufferPtr Reserve(unsigned int requestedSize, unsigned int& reservedSize) override;
+ void Reset();
+
void Commit(IPacketBufferPtr& packetBuffer, unsigned int size) override;
void Release(IPacketBufferPtr& packetBuffer) override;
@@ -35,8 +37,12 @@ public:
void MarkRead(IPacketBufferPtr& packetBuffer) override;
private:
+ void Initialize();
+
// Maximum buffer size
unsigned int m_MaxBufferSize;
+ // Number of buffers
+ unsigned int m_NumberOfBuffers;
// List of available packet buffers
std::vector<IPacketBufferPtr> m_AvailableList;
@@ -49,9 +55,6 @@ private:
// Mutex for readable packet buffer list
std::mutex m_ReadableMutex;
-
- // Condition to notify when data is availabe to be read
- std::condition_variable m_ReadDataAvailable;
};
} // namespace profiling