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/RegisterBackendCounters.hpp | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'src/profiling/RegisterBackendCounters.hpp') diff --git a/src/profiling/RegisterBackendCounters.hpp b/src/profiling/RegisterBackendCounters.hpp index 8f1fa049b6..f81f487472 100644 --- a/src/profiling/RegisterBackendCounters.hpp +++ b/src/profiling/RegisterBackendCounters.hpp @@ -20,10 +20,12 @@ class RegisterBackendCounters : public IRegisterBackendCounters { public: - RegisterBackendCounters(uint16_t currentMaxGlobalCounterID, const BackendId& backendId) - : m_CurrentMaxGlobalCounterID(currentMaxGlobalCounterID), - m_CounterDirectory(ProfilingService::Instance().GetCounterRegistry()), - m_BackendId(backendId) {} + RegisterBackendCounters( + uint16_t currentMaxGlobalCounterID, const BackendId& backendId, ProfilingService& profilingService) + : m_CurrentMaxGlobalCounterID(currentMaxGlobalCounterID), + m_BackendId(backendId), + m_ProfilingService(profilingService), + m_CounterDirectory(m_ProfilingService.GetCounterRegistry()) {} ~RegisterBackendCounters() = default; @@ -51,8 +53,9 @@ public: private: uint16_t m_CurrentMaxGlobalCounterID; - ICounterRegistry& m_CounterDirectory; const BackendId& m_BackendId; + ProfilingService& m_ProfilingService; + ICounterRegistry& m_CounterDirectory; }; } // namespace profiling -- cgit v1.2.1