From 3184c907b2420e6c66485529f336251b2b62aecf Mon Sep 17 00:00:00 2001 From: Sadik Armagan Date: Wed, 18 Mar 2020 10:57:30 +0000 Subject: IVGCVSW-4463 Change ProfilingService to a member of runtime from a singleton Signed-off-by: Sadik Armagan Change-Id: I345c39a10a4693a500aa1687d9a5cee76da791c3 --- src/profiling/backends/BackendProfiling.cpp | 5 +++-- src/profiling/backends/BackendProfiling.hpp | 6 +++--- 2 files changed, 6 insertions(+), 5 deletions(-) (limited to 'src/profiling/backends') diff --git a/src/profiling/backends/BackendProfiling.cpp b/src/profiling/backends/BackendProfiling.cpp index 0926879f67..4e6de93062 100644 --- a/src/profiling/backends/BackendProfiling.cpp +++ b/src/profiling/backends/BackendProfiling.cpp @@ -15,7 +15,8 @@ namespace profiling std::unique_ptr BackendProfiling::GetCounterRegistrationInterface(uint16_t currentMaxGlobalCounterID) { - return std::make_unique(RegisterBackendCounters(currentMaxGlobalCounterID, m_BackendId)); + return std::make_unique( + RegisterBackendCounters(currentMaxGlobalCounterID, m_BackendId, m_ProfilingService)); } std::unique_ptr BackendProfiling::GetSendTimelinePacket() @@ -73,7 +74,7 @@ std::vector BackendProfiling::GetActiveCounters() for (auto globalCounterId : globalCounterIds) { // Get pair of local counterId and backendId using globalCounterId const std::pair& backendCounterIdPair = - ProfilingService::Instance().GetCounterMappings().GetBackendId(globalCounterId); + m_ProfilingService.GetCounterMappings().GetBackendId(globalCounterId); if (backendCounterIdPair.second == m_BackendId) { activeCounterIds.emplace_back(backendCounterIdPair.first, diff --git a/src/profiling/backends/BackendProfiling.hpp b/src/profiling/backends/BackendProfiling.hpp index c0f3eea978..71d0af16ff 100644 --- a/src/profiling/backends/BackendProfiling.hpp +++ b/src/profiling/backends/BackendProfiling.hpp @@ -5,7 +5,7 @@ #pragma once -#include "IProfilingService.hpp" +#include "ProfilingService.hpp" #include namespace armnn @@ -18,7 +18,7 @@ class BackendProfiling : public IBackendProfiling { public: BackendProfiling(const IRuntime::CreationOptions& options, - IProfilingService& profilingService, + ProfilingService& profilingService, const BackendId& backendId) : m_Options(options), m_ProfilingService(profilingService), @@ -44,7 +44,7 @@ public: private: IRuntime::CreationOptions m_Options; - IProfilingService& m_ProfilingService; + ProfilingService& m_ProfilingService; BackendId m_BackendId; }; } // namespace profiling -- cgit v1.2.1