diff options
author | Finn Williams <Finn.Williams@arm.com> | 2020-02-27 16:21:41 +0000 |
---|---|---|
committer | Jim Flynn <jim.flynn@arm.com> | 2020-03-18 12:59:19 +0000 |
commit | e6a2ccd09060ba93203ddc5a7f79260cedf2c147 (patch) | |
tree | c542464311f16acde42fbe01df9f4d8a78feff64 /src/timelineDecoder/TimelineCaptureCommandHandler.cpp | |
parent | eba482e691bb314e1379d29f267ec3b46a082d01 (diff) | |
download | armnn-e6a2ccd09060ba93203ddc5a7f79260cedf2c147.tar.gz |
IVGCVSW-4161 Provide for per model call back registration
!armnn:2810
Signed-off-by: Finn Williams <Finn.Williams@arm.com>
Change-Id: Idf56d42bd767baa5df0059a2f489f75281f8ac71
Diffstat (limited to 'src/timelineDecoder/TimelineCaptureCommandHandler.cpp')
-rw-r--r-- | src/timelineDecoder/TimelineCaptureCommandHandler.cpp | 17 |
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); |