From bbfe603e5ae42317a2b67d713d00882bea341c88 Mon Sep 17 00:00:00 2001 From: Jim Flynn Date: Mon, 20 Jul 2020 16:57:44 +0100 Subject: IVGCVSW-5166 Pull out the common and server side code into standalone libraries Change-Id: I180f84c493a9b2be4b93b25d312ebdd9e71b1735 Signed-off-by: Jim Flynn --- src/profiling/CounterDirectory.cpp | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) (limited to 'src/profiling/CounterDirectory.cpp') diff --git a/src/profiling/CounterDirectory.cpp b/src/profiling/CounterDirectory.cpp index ae1c49796c..e6356b82bd 100644 --- a/src/profiling/CounterDirectory.cpp +++ b/src/profiling/CounterDirectory.cpp @@ -1,5 +1,5 @@ // -// Copyright © 2017 Arm Ltd. All rights reserved. +// Copyright © 2017 Arm Ltd and Contributors. All rights reserved. // SPDX-License-Identifier: MIT // @@ -7,10 +7,11 @@ #include "ProfilingUtils.hpp" #include -#include #include #include +#include + #include namespace armnn @@ -23,7 +24,7 @@ const Category* CounterDirectory::RegisterCategory(const std::string& categoryNa { // Check that the given category name is valid if (categoryName.empty() || - !IsValidSwTraceString(categoryName)) + !arm::pipe::IsValidSwTraceString(categoryName)) { throw InvalidArgumentException("Trying to register a category with an invalid name"); } @@ -56,7 +57,7 @@ const Device* CounterDirectory::RegisterDevice(const std::string& deviceName, { // Check that the given device name is valid if (deviceName.empty() || - !IsValidSwTraceString(deviceName)) + !arm::pipe::IsValidSwTraceString(deviceName)) { throw InvalidArgumentException("Trying to register a device with an invalid name"); } @@ -118,7 +119,7 @@ const CounterSet* CounterDirectory::RegisterCounterSet(const std::string& counte { // Check that the given counter set name is valid if (counterSetName.empty() || - !IsValidSwTraceString(counterSetName)) + !arm::pipe::IsValidSwTraceString(counterSetName)) { throw InvalidArgumentException("Trying to register a counter set with an invalid name"); } @@ -196,7 +197,7 @@ const Counter* CounterDirectory::RegisterCounter(const BackendId& backendId, // Check that the given parent category name is valid if (parentCategoryName.empty() || - !IsValidSwTraceString(parentCategoryName)) + !arm::pipe::IsValidSwTraceString(parentCategoryName)) { throw InvalidArgumentException("Trying to register a counter with an invalid parent category name"); } @@ -221,21 +222,21 @@ const Counter* CounterDirectory::RegisterCounter(const BackendId& backendId, // Check that the given name is valid if (name.empty() || - !IsValidSwTraceString(name)) + !arm::pipe::IsValidSwTraceString(name)) { throw InvalidArgumentException("Trying to register a counter with an invalid name"); } // Check that the given description is valid if (description.empty() || - !IsValidSwTraceString(description)) + !arm::pipe::IsValidSwTraceString(description)) { throw InvalidArgumentException("Trying to register a counter with an invalid description"); } // Check that the given units are valid if (units.has_value() - && !IsValidSwTraceString(units.value())) + && !arm::pipe::IsValidSwTraceString(units.value())) { throw InvalidArgumentException("Trying to register a counter with a invalid units"); } -- cgit v1.2.1