aboutsummaryrefslogtreecommitdiff
path: root/src/profiling/ProfilingService.hpp
diff options
context:
space:
mode:
authorSadik Armagan <sadik.armagan@arm.com>2020-02-10 12:24:15 +0000
committerSadik Armagan <sadik.armagan@arm.com>2020-02-10 14:08:54 +0000
commit3896b47a3532aadcde43a3e7fed760a0f4a29e6b (patch)
treea22d1b6d5b2df7518c9116dd48a7ca1990b3ae66 /src/profiling/ProfilingService.hpp
parent03181ff73f4b37d2132f15c4bd229a148840cc15 (diff)
downloadarmnn-3896b47a3532aadcde43a3e7fed760a0f4a29e6b.tar.gz
IVGCVSW-4328 BufferManager running out of buffers crashes application
* Refactored SendCounterPacket classes, separated SendCounterPacket from Send thread * Created ISendThread.hpp, IConsumer, SendThread.hpp and SendThread.cpp * Injected IConsumer to BufferManager to notify SendThread when packet is ready to read Signed-off-by: Sadik Armagan <sadik.armagan@arm.com> Change-Id: I80f0bb8b8401c6bfd1611f7760217c6fe35d7ad8
Diffstat (limited to 'src/profiling/ProfilingService.hpp')
-rw-r--r--src/profiling/ProfilingService.hpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/profiling/ProfilingService.hpp b/src/profiling/ProfilingService.hpp
index 17099b1247..27166b362e 100644
--- a/src/profiling/ProfilingService.hpp
+++ b/src/profiling/ProfilingService.hpp
@@ -20,6 +20,7 @@
#include "ProfilingStateMachine.hpp"
#include "RequestCounterDirectoryCommandHandler.hpp"
#include "SendCounterPacket.hpp"
+#include "SendThread.hpp"
#include "SendTimelinePacket.hpp"
#include "TimelinePacketWriterFactory.hpp"
#include <armnn/backends/profiling/IBackendProfilingContext.hpp>
@@ -134,6 +135,7 @@ private:
CommandHandler m_CommandHandler;
BufferManager m_BufferManager;
SendCounterPacket m_SendCounterPacket;
+ SendThread m_SendThread;
SendTimelinePacket m_SendTimelinePacket;
Holder m_Holder;
PeriodicCounterCapture m_PeriodicCounterCapture;
@@ -163,7 +165,8 @@ protected:
m_CommandHandlerRegistry,
m_PacketVersionResolver)
, m_BufferManager()
- , m_SendCounterPacket(m_StateMachine, m_BufferManager)
+ , m_SendCounterPacket(m_BufferManager)
+ , m_SendThread(m_StateMachine, m_BufferManager, m_SendCounterPacket)
, m_SendTimelinePacket(m_BufferManager)
, m_PeriodicCounterCapture(m_Holder, m_SendCounterPacket, *this)
, m_ConnectionAcknowledgedCommandHandler(0,
@@ -229,7 +232,7 @@ protected:
}
bool WaitForPacketSent(ProfilingService& instance, uint32_t timeout = 1000)
{
- return instance.m_SendCounterPacket.WaitForPacketSent(timeout);
+ return instance.m_SendThread.WaitForPacketSent(timeout);
}
BufferManager& GetBufferManager(ProfilingService& instance)