aboutsummaryrefslogtreecommitdiff
path: root/src/timelineDecoder/TimelineCaptureCommandHandler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/timelineDecoder/TimelineCaptureCommandHandler.cpp')
-rw-r--r--src/timelineDecoder/TimelineCaptureCommandHandler.cpp17
1 files changed, 15 insertions, 2 deletions
diff --git a/src/timelineDecoder/TimelineCaptureCommandHandler.cpp b/src/timelineDecoder/TimelineCaptureCommandHandler.cpp
index fb6935e247..58edd9fc43 100644
--- a/src/timelineDecoder/TimelineCaptureCommandHandler.cpp
+++ b/src/timelineDecoder/TimelineCaptureCommandHandler.cpp
@@ -6,7 +6,7 @@
#include "TimelineCaptureCommandHandler.hpp"
#include <string>
-
+#include <armnn/Logging.hpp>
namespace armnn
{
@@ -28,7 +28,15 @@ void TimelineCaptureCommandHandler::ParseData(const armnn::profiling::Packet& pa
uint32_t offset = 0;
m_PacketLength = packet.GetLength();
- if ( m_PacketLength < 8 )
+ // We are expecting TimelineDirectoryCaptureCommandHandler to set the thread id size
+ // if it not set in the constructor
+ if (m_ThreadIdSize == 0)
+ {
+ ARMNN_LOG(error) << "TimelineCaptureCommandHandler: m_ThreadIdSize has not been set";
+ return;
+ }
+
+ if (packet.GetLength() < 8)
{
return;
}
@@ -125,6 +133,11 @@ void TimelineCaptureCommandHandler::ReadEvent(const unsigned char* data, uint32_
m_TimelineDecoder.CreateEvent(event);
}
+void TimelineCaptureCommandHandler::SetThreadIdSize(uint32_t size)
+{
+ m_ThreadIdSize = size;
+}
+
void TimelineCaptureCommandHandler::operator()(const profiling::Packet& packet)
{
ParseData(packet);