diff options
author | Sadik Armagan <sadik.armagan@arm.com> | 2020-03-20 11:11:01 +0000 |
---|---|---|
committer | Sadik Armagan <sadik.armagan@arm.com> | 2020-03-20 11:11:01 +0000 |
commit | 0a35667e683105021834a28ac13d1d35af3a4a4e (patch) | |
tree | d790767a68c8f5fee6878850ab8d7f57f4eff602 /src | |
parent | ea41b57721b644b9350e14754d3ecdcfba87667f (diff) | |
download | armnn-0a35667e683105021834a28ac13d1d35af3a4a4e.tar.gz |
IVGCVSW-4587 ArmNN failing to build in the Internal OOB
* ProfilingService reference field not required in TimelineUtilityMethods
Signed-off-by: Sadik Armagan <sadik.armagan@arm.com>
Change-Id: I83ca13e577d35fb9497d7df1535607ec66c201bf
Diffstat (limited to 'src')
-rw-r--r-- | src/profiling/TimelineUtilityMethods.cpp | 32 | ||||
-rw-r--r-- | src/profiling/TimelineUtilityMethods.hpp | 7 | ||||
-rw-r--r-- | src/profiling/test/TimelineUtilityMethodsTests.cpp | 15 |
3 files changed, 26 insertions, 28 deletions
diff --git a/src/profiling/TimelineUtilityMethods.cpp b/src/profiling/TimelineUtilityMethods.cpp index 7310b759d2..ad93f4b80a 100644 --- a/src/profiling/TimelineUtilityMethods.cpp +++ b/src/profiling/TimelineUtilityMethods.cpp @@ -17,7 +17,7 @@ std::unique_ptr<TimelineUtilityMethods> TimelineUtilityMethods::GetTimelineUtils if (profilingService.IsProfilingEnabled()) { std::unique_ptr<ISendTimelinePacket> sendTimelinepacket = profilingService.GetSendTimelinePacket(); - return std::make_unique<TimelineUtilityMethods>(sendTimelinepacket, profilingService); + return std::make_unique<TimelineUtilityMethods>(sendTimelinepacket); } else { @@ -91,7 +91,7 @@ ProfilingDynamicGuid TimelineUtilityMethods::CreateNamedTypedEntity(const std::s } // Generate dynamic GUID of the entity - ProfilingDynamicGuid entityGuid = m_ProfilingService.GetNextGuid(); + ProfilingDynamicGuid entityGuid = profiling::ProfilingService::GetNextGuid(); CreateNamedTypedEntity(entityGuid, name, type); @@ -154,7 +154,7 @@ ProfilingStaticGuid TimelineUtilityMethods::DeclareLabel(const std::string& labe } // Generate a static GUID for the given label name - ProfilingStaticGuid labelGuid = m_ProfilingService.GetStaticId(labelName); + ProfilingStaticGuid labelGuid = profiling::ProfilingService::GetStaticId(labelName); // Send the new label to the external profiling service, this call throws in case of error m_SendTimelinePacket->SendTimelineLabelBinaryPacket(labelGuid, labelName); @@ -177,7 +177,7 @@ void TimelineUtilityMethods::MarkEntityWithLabel(ProfilingGuid entityGuid, ProfilingStaticGuid labelGuid = DeclareLabel(labelName); // Generate a GUID for the label relationship - ProfilingDynamicGuid relationshipGuid = m_ProfilingService.GetNextGuid(); + ProfilingDynamicGuid relationshipGuid = profiling::ProfilingService::GetNextGuid(); // Send the new label link to the external profiling service, this call throws in case of error m_SendTimelinePacket->SendTimelineRelationshipBinaryPacket(ProfilingRelationshipType::LabelLink, @@ -186,7 +186,7 @@ void TimelineUtilityMethods::MarkEntityWithLabel(ProfilingGuid entityGuid, labelGuid); // Generate a GUID for the label relationship - ProfilingDynamicGuid relationshipLabelGuid = m_ProfilingService.GetNextGuid(); + ProfilingDynamicGuid relationshipLabelGuid = profiling::ProfilingService::GetNextGuid(); // Send the new label link to the external profiling service, this call throws in case of error m_SendTimelinePacket->SendTimelineRelationshipBinaryPacket(ProfilingRelationshipType::LabelLink, @@ -199,7 +199,7 @@ void TimelineUtilityMethods::MarkEntityWithType(ProfilingGuid entityGuid, ProfilingStaticGuid typeNameGuid) { // Generate a GUID for the label relationship - ProfilingDynamicGuid relationshipGuid = m_ProfilingService.GetNextGuid(); + ProfilingDynamicGuid relationshipGuid = profiling::ProfilingService::GetNextGuid(); // Send the new label link to the external profiling service, this call throws in case of error m_SendTimelinePacket->SendTimelineRelationshipBinaryPacket(ProfilingRelationshipType::LabelLink, @@ -208,7 +208,7 @@ void TimelineUtilityMethods::MarkEntityWithType(ProfilingGuid entityGuid, typeNameGuid); // Generate a GUID for the label relationship - ProfilingDynamicGuid relationshipLabelGuid = m_ProfilingService.GetNextGuid(); + ProfilingDynamicGuid relationshipLabelGuid = profiling::ProfilingService::GetNextGuid(); // Send the new label link to the external profiling service, this call throws in case of error m_SendTimelinePacket->SendTimelineRelationshipBinaryPacket(ProfilingRelationshipType::LabelLink, @@ -249,7 +249,7 @@ ProfilingDynamicGuid TimelineUtilityMethods::CreateNamedTypedChildEntity(Profili ProfilingDynamicGuid childEntityGuid = CreateNamedTypedEntity(entityName, entityType); // Generate a GUID for the retention link relationship - ProfilingDynamicGuid retentionLinkGuid = m_ProfilingService.GetNextGuid(); + ProfilingDynamicGuid retentionLinkGuid = profiling::ProfilingService::GetNextGuid(); // Send the new retention link to the external profiling service, this call throws in case of error m_SendTimelinePacket->SendTimelineRelationshipBinaryPacket(ProfilingRelationshipType::RetentionLink, @@ -283,7 +283,7 @@ void TimelineUtilityMethods::CreateNamedTypedChildEntity(ProfilingGuid childEnti CreateNamedTypedEntity(childEntityGuid, entityName, entityType); // Generate a GUID for the retention link relationship - ProfilingDynamicGuid retentionLinkGuid = m_ProfilingService.GetNextGuid(); + ProfilingDynamicGuid retentionLinkGuid = profiling::ProfilingService::GetNextGuid(); // Send the new retention link to the external profiling service, this call throws in case of error m_SendTimelinePacket->SendTimelineRelationshipBinaryPacket(ProfilingRelationshipType::RetentionLink, @@ -308,7 +308,7 @@ void TimelineUtilityMethods::CreateNamedTypedChildEntity(ProfilingGuid childEnti CreateNamedTypedEntity(childEntityGuid, entityName, typeGuid); // Generate a GUID for the retention link relationship - ProfilingDynamicGuid retentionLinkGuid = m_ProfilingService.GetNextGuid(); + ProfilingDynamicGuid retentionLinkGuid = profiling::ProfilingService::GetNextGuid(); // Send the new retention link to the external profiling service, this call throws in case of error m_SendTimelinePacket->SendTimelineRelationshipBinaryPacket(ProfilingRelationshipType::RetentionLink, @@ -322,7 +322,7 @@ ProfilingDynamicGuid TimelineUtilityMethods::CreateRelationship(ProfilingRelatio ProfilingGuid tailGuid) { // Generate a GUID for the relationship - ProfilingDynamicGuid relationshipGuid = m_ProfilingService.GetNextGuid(); + ProfilingDynamicGuid relationshipGuid = profiling::ProfilingService::GetNextGuid(); // Send the new retention link to the external profiling service, this call throws in case of error m_SendTimelinePacket->SendTimelineRelationshipBinaryPacket(relationshipType, @@ -337,7 +337,7 @@ ProfilingDynamicGuid TimelineUtilityMethods::CreateConnectionRelationship(Profil ProfilingGuid tailGuid) { // Generate a GUID for the relationship - ProfilingDynamicGuid relationshipGuid = m_ProfilingService.GetNextGuid(); + ProfilingDynamicGuid relationshipGuid = profiling::ProfilingService::GetNextGuid(); // Send the new retention link to the external profiling service, this call throws in case of error m_SendTimelinePacket->SendTimelineRelationshipBinaryPacket(relationshipType, @@ -367,13 +367,13 @@ ProfilingDynamicGuid TimelineUtilityMethods::RecordEvent(ProfilingGuid entityGui std::thread::id threadId = std::this_thread::get_id(); // Generate a GUID for the event - ProfilingDynamicGuid eventGuid = m_ProfilingService.GetNextGuid(); + ProfilingDynamicGuid eventGuid = profiling::ProfilingService::GetNextGuid(); // Send the new timeline event to the external profiling service, this call throws in case of error m_SendTimelinePacket->SendTimelineEventBinaryPacket(timestamp, threadId, eventGuid); // Generate a GUID for the execution link - ProfilingDynamicGuid executionLinkId = m_ProfilingService.GetNextGuid(); + ProfilingDynamicGuid executionLinkId = profiling::ProfilingService::GetNextGuid(); // Send the new execution link to the external profiling service, this call throws in case of error m_SendTimelinePacket->SendTimelineRelationshipBinaryPacket(ProfilingRelationshipType::ExecutionLink, @@ -382,7 +382,7 @@ ProfilingDynamicGuid TimelineUtilityMethods::RecordEvent(ProfilingGuid entityGui eventGuid); // Generate a GUID for the data relationship link - ProfilingDynamicGuid eventClassLinkId = m_ProfilingService.GetNextGuid(); + ProfilingDynamicGuid eventClassLinkId = profiling::ProfilingService::GetNextGuid(); // Send the new data relationship link to the external profiling service, this call throws in case of error m_SendTimelinePacket->SendTimelineRelationshipBinaryPacket(ProfilingRelationshipType::DataLink, @@ -396,7 +396,7 @@ ProfilingDynamicGuid TimelineUtilityMethods::RecordEvent(ProfilingGuid entityGui ProfilingDynamicGuid TimelineUtilityMethods::RecordWorkloadInferenceAndStartOfLifeEvent(ProfilingGuid workloadGuid, ProfilingGuid inferenceGuid) { - ProfilingDynamicGuid workloadInferenceGuid = m_ProfilingService.GetNextGuid(); + ProfilingDynamicGuid workloadInferenceGuid = profiling::ProfilingService::GetNextGuid(); CreateTypedEntity(workloadInferenceGuid, LabelsAndEventClasses::WORKLOAD_EXECUTION_GUID); CreateRelationship(ProfilingRelationshipType::RetentionLink, inferenceGuid, workloadInferenceGuid); CreateRelationship(ProfilingRelationshipType::RetentionLink, workloadGuid, workloadInferenceGuid); diff --git a/src/profiling/TimelineUtilityMethods.hpp b/src/profiling/TimelineUtilityMethods.hpp index df56cd6f42..17d2aac57b 100644 --- a/src/profiling/TimelineUtilityMethods.hpp +++ b/src/profiling/TimelineUtilityMethods.hpp @@ -25,11 +25,11 @@ public: static std::unique_ptr<TimelineUtilityMethods> GetTimelineUtils(ProfilingService& profilingService); TimelineUtilityMethods( - std::unique_ptr<ISendTimelinePacket>& sendTimelinePacket, ProfilingService& profilingService) - : m_SendTimelinePacket(std::move(sendTimelinePacket)), m_ProfilingService(profilingService) {} + std::unique_ptr<ISendTimelinePacket>& sendTimelinePacket) + : m_SendTimelinePacket(std::move(sendTimelinePacket)) {} TimelineUtilityMethods(TimelineUtilityMethods&& other) - : m_SendTimelinePacket(std::move(other.m_SendTimelinePacket)), m_ProfilingService(other.m_ProfilingService) {} + : m_SendTimelinePacket(std::move(other.m_SendTimelinePacket)) {} TimelineUtilityMethods(const TimelineUtilityMethods& other) = delete; @@ -92,7 +92,6 @@ public: private: std::unique_ptr<ISendTimelinePacket> m_SendTimelinePacket; - profiling::ProfilingService& m_ProfilingService; }; } // namespace profiling diff --git a/src/profiling/test/TimelineUtilityMethodsTests.cpp b/src/profiling/test/TimelineUtilityMethodsTests.cpp index f83a9622ca..5c738b670f 100644 --- a/src/profiling/test/TimelineUtilityMethodsTests.cpp +++ b/src/profiling/test/TimelineUtilityMethodsTests.cpp @@ -26,7 +26,7 @@ BOOST_AUTO_TEST_CASE(CreateTypedLabelTest) ProfilingService profilingService; std::unique_ptr<ISendTimelinePacket> sendTimelinePacket = std::make_unique<SendTimelinePacket>(mockBufferManager); - TimelineUtilityMethods timelineUtilityMethods(sendTimelinePacket, profilingService); + TimelineUtilityMethods timelineUtilityMethods(sendTimelinePacket); // Generate first guid to ensure that the named typed entity guid is not 0 on local single test. profilingService.NextGuid(); @@ -80,9 +80,8 @@ BOOST_AUTO_TEST_CASE(CreateTypedLabelTest) BOOST_AUTO_TEST_CASE(SendWellKnownLabelsAndEventClassesTest) { MockBufferManager mockBufferManager(1024); - ProfilingService profilingService; std::unique_ptr<ISendTimelinePacket> sendTimelinePacket = std::make_unique<SendTimelinePacket>(mockBufferManager); - TimelineUtilityMethods timelineUtilityMethods(sendTimelinePacket, profilingService); + TimelineUtilityMethods timelineUtilityMethods(sendTimelinePacket); BOOST_CHECK_NO_THROW(timelineUtilityMethods.SendWellKnownLabelsAndEventClasses()); @@ -183,7 +182,7 @@ BOOST_AUTO_TEST_CASE(CreateNamedTypedChildEntityTest) MockBufferManager mockBufferManager(1024); ProfilingService profilingService; std::unique_ptr<ISendTimelinePacket> sendTimelinePacket = std::make_unique<SendTimelinePacket>(mockBufferManager); - TimelineUtilityMethods timelineUtilityMethods(sendTimelinePacket, profilingService); + TimelineUtilityMethods timelineUtilityMethods(sendTimelinePacket); ProfilingDynamicGuid childEntityGuid(0); ProfilingGuid parentEntityGuid(123); @@ -282,7 +281,7 @@ BOOST_AUTO_TEST_CASE(DeclareLabelTest) MockBufferManager mockBufferManager(1024); ProfilingService profilingService; std::unique_ptr<ISendTimelinePacket> sendTimelinePacket = std::make_unique<SendTimelinePacket>(mockBufferManager); - TimelineUtilityMethods timelineUtilityMethods(sendTimelinePacket, profilingService); + TimelineUtilityMethods timelineUtilityMethods(sendTimelinePacket); // Generate first guid to ensure that the named typed entity guid is not 0 on local single test. profilingService.NextGuid(); @@ -311,7 +310,7 @@ BOOST_AUTO_TEST_CASE(CreateNameTypeEntityInvalidTest) MockBufferManager mockBufferManager(1024); ProfilingService profilingService; std::unique_ptr<ISendTimelinePacket> sendTimelinePacket = std::make_unique<SendTimelinePacket>(mockBufferManager); - TimelineUtilityMethods timelineUtilityMethods(sendTimelinePacket, profilingService); + TimelineUtilityMethods timelineUtilityMethods(sendTimelinePacket); // Invalid name BOOST_CHECK_THROW(timelineUtilityMethods.CreateNamedTypedEntity("", "Type"), InvalidArgumentException); @@ -336,7 +335,7 @@ BOOST_AUTO_TEST_CASE(CreateNameTypeEntityTest) MockBufferManager mockBufferManager(1024); ProfilingService profilingService; std::unique_ptr<ISendTimelinePacket> sendTimelinePacket = std::make_unique<SendTimelinePacket>(mockBufferManager); - TimelineUtilityMethods timelineUtilityMethods(sendTimelinePacket, profilingService); + TimelineUtilityMethods timelineUtilityMethods(sendTimelinePacket); const std::string entityName = "Entity0"; const std::string entityType = "Type0"; @@ -416,7 +415,7 @@ BOOST_AUTO_TEST_CASE(RecordEventTest) MockBufferManager mockBufferManager(1024); ProfilingService profilingService; std::unique_ptr<ISendTimelinePacket> sendTimelinePacket = std::make_unique<SendTimelinePacket>(mockBufferManager); - TimelineUtilityMethods timelineUtilityMethods(sendTimelinePacket, profilingService); + TimelineUtilityMethods timelineUtilityMethods(sendTimelinePacket); // Generate first guid to ensure that the named typed entity guid is not 0 on local single test. profilingService.NextGuid(); |