aboutsummaryrefslogtreecommitdiff
path: root/src/profiling/test/TestTimelinePacketHandler.cpp
diff options
context:
space:
mode:
authorJim Flynn <jim.flynn@arm.com>2020-05-27 17:05:21 +0100
committerfinn.williams <finn.williams@arm.com>2020-06-17 12:16:36 +0000
commit6398a98ac273931cc0b3ab33222d255d1edf48b0 (patch)
tree39998f4ed9af5d4fcdb3aa7ed11ca101b917f07d /src/profiling/test/TestTimelinePacketHandler.cpp
parent96becb7e4f5f510344c3850278a706d63a564fc4 (diff)
downloadarmnn-6398a98ac273931cc0b3ab33222d255d1edf48b0.tar.gz
IVGCVSW-4900 Update Timeline Directory Message with new fields
Change-Id: I68097e176f7471a18498492b50339e68004dddd5 Signed-off-by: Jim Flynn <jim.flynn@arm.com>
Diffstat (limited to 'src/profiling/test/TestTimelinePacketHandler.cpp')
-rw-r--r--src/profiling/test/TestTimelinePacketHandler.cpp27
1 files changed, 18 insertions, 9 deletions
diff --git a/src/profiling/test/TestTimelinePacketHandler.cpp b/src/profiling/test/TestTimelinePacketHandler.cpp
index 93fb4b433c..ccb806b238 100644
--- a/src/profiling/test/TestTimelinePacketHandler.cpp
+++ b/src/profiling/test/TestTimelinePacketHandler.cpp
@@ -1,10 +1,11 @@
//
-// Copyright © 2020 Arm Ltd. All rights reserved.
+// Copyright © 2020 Arm Ltd and Contributors. All rights reserved.
// SPDX-License-Identifier: MIT
//
#include "TestTimelinePacketHandler.hpp"
#include "IProfilingConnection.hpp"
+#include <LabelsAndEventClasses.hpp>
#include <armnn/utility/IgnoreUnused.hpp>
@@ -98,19 +99,13 @@ ITimelineDecoder::TimelineStatus TimelineMessageDecoder::CreateEntity(const Enti
ITimelineDecoder::TimelineStatus TimelineMessageDecoder::CreateEventClass(
const ITimelineDecoder::EventClass& eventClass)
{
- // for the moment terminate the run here so we can get this code
- // onto master prior to a major re-organisation
- if (m_PacketHandler != nullptr)
- {
- m_PacketHandler->SetInferenceComplete();
- }
- IgnoreUnused(eventClass);
+ m_TimelineModel.AddEventClass(eventClass);
return ITimelineDecoder::TimelineStatus::TimelineStatus_Success;
}
ITimelineDecoder::TimelineStatus TimelineMessageDecoder::CreateEvent(const ITimelineDecoder::Event& event)
{
- IgnoreUnused(event);
+ m_TimelineModel.AddEvent(event);
return ITimelineDecoder::TimelineStatus::TimelineStatus_Success;
}
@@ -124,6 +119,20 @@ ITimelineDecoder::TimelineStatus TimelineMessageDecoder::CreateRelationship(
const ITimelineDecoder::Relationship& relationship)
{
m_TimelineModel.AddRelationship(relationship);
+ // check to see if this is an execution link to an inference of event class end of life
+ // if so the inference has completed so send out a notification...
+ if (relationship.m_RelationshipType == RelationshipType::ExecutionLink &&
+ m_TimelineModel.IsInferenceGuid(relationship.m_HeadGuid))
+ {
+ ProfilingStaticGuid attributeGuid(relationship.m_AttributeGuid);
+ if (attributeGuid == armnn::profiling::LabelsAndEventClasses::ARMNN_PROFILING_EOL_EVENT_CLASS)
+ {
+ if (m_PacketHandler != nullptr)
+ {
+ m_PacketHandler->SetInferenceComplete();
+ }
+ }
+ }
return ITimelineDecoder::TimelineStatus::TimelineStatus_Success;
}