From 3e9bc19ad523361e6b18057849e30c0c48183915 Mon Sep 17 00:00:00 2001 From: Jim Flynn Date: Wed, 23 Mar 2022 23:01:26 +0000 Subject: IVGCVSW-6706 Create the libpipeClient library Change-Id: I2368aade38ad3808fab55d8a86cd659d4e95d91e Signed-off-by: Jim Flynn --- src/profiling/CounterIdMap.cpp | 58 ------------------------------------------ 1 file changed, 58 deletions(-) delete mode 100644 src/profiling/CounterIdMap.cpp (limited to 'src/profiling/CounterIdMap.cpp') diff --git a/src/profiling/CounterIdMap.cpp b/src/profiling/CounterIdMap.cpp deleted file mode 100644 index cb637c3974..0000000000 --- a/src/profiling/CounterIdMap.cpp +++ /dev/null @@ -1,58 +0,0 @@ -// -// Copyright © 2020 Arm Ltd. All rights reserved. -// SPDX-License-Identifier: MIT -// - -#include - -#include - -#include - -namespace arm -{ -namespace pipe -{ - -void CounterIdMap::RegisterMapping(uint16_t globalCounterId, - uint16_t backendCounterId, - const std::string& backendId) -{ - std::pair backendIdPair(backendCounterId, backendId); - m_GlobalCounterIdMap[globalCounterId] = backendIdPair; - m_BackendCounterIdMap[backendIdPair] = globalCounterId; -} - -void CounterIdMap::Reset() -{ - m_GlobalCounterIdMap.clear(); - m_BackendCounterIdMap.clear(); -} - -uint16_t CounterIdMap::GetGlobalId(uint16_t backendCounterId, const std::string& backendId) const -{ - std::pair backendIdPair(backendCounterId, backendId); - auto it = m_BackendCounterIdMap.find(backendIdPair); - if (it == m_BackendCounterIdMap.end()) - { - std::stringstream ss; - ss << "No Backend Counter [" << backendIdPair.second << ":" << backendIdPair.first << "] registered"; - throw arm::pipe::ProfilingException(ss.str()); - } - return it->second; -} - -const std::pair& CounterIdMap::GetBackendId(uint16_t globalCounterId) const -{ - auto it = m_GlobalCounterIdMap.find(globalCounterId); - if (it == m_GlobalCounterIdMap.end()) - { - std::stringstream ss; - ss << "No Global Counter ID [" << globalCounterId << "] registered"; - throw arm::pipe::ProfilingException(ss.str()); - } - return it->second; -} - -} // namespace pipe -} // namespace arm -- cgit v1.2.1