aboutsummaryrefslogtreecommitdiff
path: root/src/profiling/CounterDirectory.cpp
diff options
context:
space:
mode:
authorJim Flynn <jim.flynn@arm.com>2020-07-20 16:57:44 +0100
committerJim Flynn <jim.flynn@arm.com>2020-07-29 15:35:15 +0100
commitbbfe603e5ae42317a2b67d713d00882bea341c88 (patch)
tree8d8a78d6836384fb92fb9741c865443624dfec68 /src/profiling/CounterDirectory.cpp
parenta9c2ce123a6a5a68728d040a0323c482bbe46903 (diff)
downloadarmnn-bbfe603e5ae42317a2b67d713d00882bea341c88.tar.gz
IVGCVSW-5166 Pull out the common and server side code into standalone libraries
Change-Id: I180f84c493a9b2be4b93b25d312ebdd9e71b1735 Signed-off-by: Jim Flynn <jim.flynn@arm.com>
Diffstat (limited to 'src/profiling/CounterDirectory.cpp')
-rw-r--r--src/profiling/CounterDirectory.cpp19
1 files changed, 10 insertions, 9 deletions
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 <armnn/Exceptions.hpp>
-#include <armnn/Conversion.hpp>
#include <armnn/utility/Assert.hpp>
#include <armnn/utility/IgnoreUnused.hpp>
+#include <common/include/SwTrace.hpp>
+
#include <boost/format.hpp>
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<SwTraceNameCharPolicy>(categoryName))
+ !arm::pipe::IsValidSwTraceString<arm::pipe::SwTraceNameCharPolicy>(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<SwTraceCharPolicy>(deviceName))
+ !arm::pipe::IsValidSwTraceString<arm::pipe::SwTraceCharPolicy>(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<SwTraceNameCharPolicy>(counterSetName))
+ !arm::pipe::IsValidSwTraceString<arm::pipe::SwTraceNameCharPolicy>(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<SwTraceNameCharPolicy>(parentCategoryName))
+ !arm::pipe::IsValidSwTraceString<arm::pipe::SwTraceNameCharPolicy>(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<SwTraceCharPolicy>(name))
+ !arm::pipe::IsValidSwTraceString<arm::pipe::SwTraceCharPolicy>(name))
{
throw InvalidArgumentException("Trying to register a counter with an invalid name");
}
// Check that the given description is valid
if (description.empty() ||
- !IsValidSwTraceString<SwTraceCharPolicy>(description))
+ !arm::pipe::IsValidSwTraceString<arm::pipe::SwTraceCharPolicy>(description))
{
throw InvalidArgumentException("Trying to register a counter with an invalid description");
}
// Check that the given units are valid
if (units.has_value()
- && !IsValidSwTraceString<SwTraceNameCharPolicy>(units.value()))
+ && !arm::pipe::IsValidSwTraceString<arm::pipe::SwTraceNameCharPolicy>(units.value()))
{
throw InvalidArgumentException("Trying to register a counter with a invalid units");
}