aboutsummaryrefslogtreecommitdiff
path: root/profiling/client/src/IProfilingService.cpp
diff options
context:
space:
mode:
authorJim Flynn <jim.flynn@arm.com>2022-03-23 23:01:26 +0000
committerJim Flynn <jim.flynn@arm.com>2022-03-23 23:43:35 +0000
commit3e9bc19ad523361e6b18057849e30c0c48183915 (patch)
treeb7b012a9734ce39d054fc5d92302780fd838e5c8 /profiling/client/src/IProfilingService.cpp
parent277618302d0f131eac0b6ac2015dd3eb09aa6ff9 (diff)
downloadarmnn-3e9bc19ad523361e6b18057849e30c0c48183915.tar.gz
IVGCVSW-6706 Create the libpipeClient library
Change-Id: I2368aade38ad3808fab55d8a86cd659d4e95d91e Signed-off-by: Jim Flynn <jim.flynn@arm.com>
Diffstat (limited to 'profiling/client/src/IProfilingService.cpp')
-rw-r--r--profiling/client/src/IProfilingService.cpp60
1 files changed, 60 insertions, 0 deletions
diff --git a/profiling/client/src/IProfilingService.cpp b/profiling/client/src/IProfilingService.cpp
new file mode 100644
index 0000000000..d147871e47
--- /dev/null
+++ b/profiling/client/src/IProfilingService.cpp
@@ -0,0 +1,60 @@
+//
+// Copyright © 2022 Arm Ltd and Contributors. All rights reserved.
+// SPDX-License-Identifier: MIT
+//
+
+#include "ProfilingService.hpp"
+
+#include <client/include/IProfilingService.hpp>
+
+namespace arm
+{
+
+namespace pipe
+{
+
+std::unique_ptr<IProfilingService> IProfilingService::CreateProfilingService(
+ uint16_t maxGlobalCounterId,
+ IInitialiseProfilingService& initialiser,
+ const std::string& softwareInfo,
+ const std::string& softwareVersion,
+ const std::string& hardwareVersion,
+ arm::pipe::Optional<IReportStructure&> reportStructure)
+{
+ return std::make_unique<ProfilingService>(maxGlobalCounterId,
+ initialiser,
+ softwareInfo,
+ softwareVersion,
+ hardwareVersion,
+ reportStructure);
+}
+
+ProfilingGuidGenerator IProfilingService::m_GuidGenerator;
+
+ProfilingDynamicGuid IProfilingService::GetNextGuid()
+{
+ return m_GuidGenerator.NextGuid();
+}
+
+ProfilingStaticGuid IProfilingService::GetStaticId(const std::string& str)
+{
+ return m_GuidGenerator.GenerateStaticId(str);
+}
+
+void IProfilingService::ResetGuidGenerator()
+{
+ m_GuidGenerator.Reset();
+}
+
+ProfilingDynamicGuid IProfilingService::NextGuid()
+{
+ return IProfilingService::GetNextGuid();
+}
+
+ProfilingStaticGuid IProfilingService::GenerateStaticId(const std::string& str)
+{
+ return IProfilingService::GetStaticId(str);
+}
+
+} // namespace pipe
+} // namespace arm