blob: 3bae941a4742556a64bc20745011825c99171880 [file] [log] [blame]
Jim Flynnaf947722022-03-02 11:04:47 +00001//
2// Copyright © 2022 Arm Ltd and Contributors. All rights reserved.
3// SPDX-License-Identifier: MIT
4//
5
6#include "IProfilingService.hpp"
7#include "ProfilingService.hpp"
8
9namespace arm
10{
11
12namespace pipe
13{
14
15std::unique_ptr<IProfilingService> IProfilingService::CreateProfilingService(
Jim Flynn34430252022-03-04 15:03:58 +000016 uint16_t maxGlobalCounterId,
17 IInitialiseProfilingService& initialiser,
Jim Flynndecd08b2022-03-13 22:35:46 +000018 arm::pipe::Optional<IReportStructure&> reportStructure)
Jim Flynnaf947722022-03-02 11:04:47 +000019{
Jim Flynn34430252022-03-04 15:03:58 +000020 return std::make_unique<ProfilingService>(maxGlobalCounterId, initialiser, reportStructure);
Jim Flynnaf947722022-03-02 11:04:47 +000021}
22
23ProfilingGuidGenerator IProfilingService::m_GuidGenerator;
24
25ProfilingDynamicGuid IProfilingService::GetNextGuid()
26{
27 return m_GuidGenerator.NextGuid();
28}
29
30ProfilingStaticGuid IProfilingService::GetStaticId(const std::string& str)
31{
32 return m_GuidGenerator.GenerateStaticId(str);
33}
34
35void IProfilingService::ResetGuidGenerator()
36{
37 m_GuidGenerator.Reset();
38}
39
40ProfilingDynamicGuid IProfilingService::NextGuid()
41{
42 return IProfilingService::GetNextGuid();
43}
44
45ProfilingStaticGuid IProfilingService::GenerateStaticId(const std::string& str)
46{
47 return IProfilingService::GetStaticId(str);
48}
49
50} // namespace pipe
51} // namespace arm