IVGCVSW-5101 Add a SOL/EOL and a process ID label to Network
Change-Id: I6261f46404a3aab5c069bca40586994d31d26fe8
Signed-off-by: Jim Flynn <jim.flynn@arm.com>
diff --git a/src/armnn/Runtime.cpp b/src/armnn/Runtime.cpp
index 28e2df2..63f39c6 100644
--- a/src/armnn/Runtime.cpp
+++ b/src/armnn/Runtime.cpp
@@ -6,6 +6,7 @@
#include <armnn/Version.hpp>
#include <armnn/BackendRegistry.hpp>
+#include <LabelsAndEventClasses.hpp>
#include <armnn/Logging.hpp>
#include <armnn/utility/Timer.hpp>
@@ -117,9 +118,22 @@
return Status::Failure;
}
+ std::unique_ptr<profiling::TimelineUtilityMethods> timelineUtils =
+ profiling::TimelineUtilityMethods::GetTimelineUtils(m_ProfilingService);
{
std::lock_guard<std::mutex> lockGuard(m_Mutex);
+ // If timeline recording is on mark the Network end of life
+ if (timelineUtils)
+ {
+ auto search = m_LoadedNetworks.find(networkId);
+ if (search != m_LoadedNetworks.end())
+ {
+ profiling::ProfilingGuid networkGuid = search->second->GetNetworkGuid();
+ timelineUtils->RecordEvent(networkGuid,
+ profiling::LabelsAndEventClasses::ARMNN_PROFILING_EOL_EVENT_CLASS);
+ }
+ }
if (m_LoadedNetworks.erase(networkId) == 0)
{
ARMNN_LOG(warning) << "WARNING: Runtime::UnloadNetwork(): " << networkId << " not found!";