From aa2eb74ff6b8387f045da8f0be39598b45c850a7 Mon Sep 17 00:00:00 2001 From: Jim Flynn Date: Fri, 26 Jun 2020 13:52:38 +0100 Subject: IVGCVSW-5049 Terminate Timeline Packet Processing on Error Change-Id: I2a339da913f18f91734967de2b4a0baa9e2df19b Signed-off-by: Jim Flynn --- src/timelineDecoder/TimelineCaptureCommandHandler.hpp | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'src/timelineDecoder/TimelineCaptureCommandHandler.hpp') diff --git a/src/timelineDecoder/TimelineCaptureCommandHandler.hpp b/src/timelineDecoder/TimelineCaptureCommandHandler.hpp index 6c0c57ae69..0431e9ca49 100644 --- a/src/timelineDecoder/TimelineCaptureCommandHandler.hpp +++ b/src/timelineDecoder/TimelineCaptureCommandHandler.hpp @@ -1,5 +1,5 @@ // -// Copyright © 2019 Arm Ltd. All rights reserved. +// Copyright © 2019 Arm Ltd and Contributors. All rights reserved. // SPDX-License-Identifier: MIT // @@ -24,7 +24,8 @@ class TimelineCaptureCommandHandler : uint32_t uint32_t_size = sizeof(uint32_t); uint32_t uint64_t_size = sizeof(uint64_t); - using ReadFunction = void (TimelineCaptureCommandHandler::*)(const unsigned char*, uint32_t&); + using ReadFunction = ITimelineDecoder::TimelineStatus (TimelineCaptureCommandHandler::*)( + const unsigned char*, uint32_t&); public: TimelineCaptureCommandHandler(uint32_t familyId, @@ -40,17 +41,18 @@ public: void operator()(const armnn::profiling::Packet& packet) override; - void ReadLabel(const unsigned char* data, uint32_t& offset); - void ReadEntity(const unsigned char* data, uint32_t& offset); - void ReadEventClass(const unsigned char* data, uint32_t& offset); - void ReadRelationship(const unsigned char* data, uint32_t& offset); - void ReadEvent(const unsigned char* data, uint32_t& offset); void SetThreadIdSize(uint32_t size); private: void ParseData(const armnn::profiling::Packet& packet); + ITimelineDecoder::TimelineStatus ReadLabel(const unsigned char* data, uint32_t& offset); + ITimelineDecoder::TimelineStatus ReadEntity(const unsigned char* data, uint32_t& offset); + ITimelineDecoder::TimelineStatus ReadEventClass(const unsigned char* data, uint32_t& offset); + ITimelineDecoder::TimelineStatus ReadRelationship(const unsigned char* data, uint32_t& offset); + ITimelineDecoder::TimelineStatus ReadEvent(const unsigned char* data, uint32_t& offset); + ITimelineDecoder& m_TimelineDecoder; uint32_t m_ThreadIdSize; unsigned int m_PacketLength; -- cgit v1.2.1