diff options
author | Jim Flynn <jim.flynn@arm.com> | 2022-03-02 11:04:47 +0000 |
---|---|---|
committer | Jim Flynn <jim.flynn@arm.com> | 2022-03-03 14:55:15 +0000 |
commit | af947729dc2aa7cdb6d4a716e2edf307710a8155 (patch) | |
tree | 87945dbee99d430032b27d2f6ee7a9975cb870ba /src/profiling/IProfilingService.hpp | |
parent | 2b679db94a0f95861b47df6bb02d2992cf6d5af6 (diff) | |
download | armnn-af947729dc2aa7cdb6d4a716e2edf307710a8155.tar.gz |
IVGCVSW-6811 replace ProfilingService includes with IProfilingService
Change-Id: I00521756c8a19d10bfdc98c6ef4204c7f84901c6
Signed-off-by: Jim Flynn <jim.flynn@arm.com>
Diffstat (limited to 'src/profiling/IProfilingService.hpp')
-rw-r--r-- | src/profiling/IProfilingService.hpp | 37 |
1 files changed, 35 insertions, 2 deletions
diff --git a/src/profiling/IProfilingService.hpp b/src/profiling/IProfilingService.hpp index c2e824e6f5..31d9b8d1e3 100644 --- a/src/profiling/IProfilingService.hpp +++ b/src/profiling/IProfilingService.hpp @@ -7,9 +7,16 @@ #include "CounterIdMap.hpp" #include "Holder.hpp" +#include "ICounterValues.hpp" +#include "ICounterRegistry.hpp" #include "IProfilingServiceStatus.hpp" #include "ISendCounterPacket.hpp" +#include "IReportStructure.hpp" +#include "ProfilingState.hpp" +#include <armnn/backends/profiling/IBackendProfilingContext.hpp> +#include <armnn/profiling/ProfilingOptions.hpp> +#include <armnn/Optional.hpp> #include <common/include/ProfilingGuidGenerator.hpp> namespace arm @@ -18,18 +25,44 @@ namespace arm namespace pipe { -class IProfilingService : public IProfilingGuidGenerator, public IProfilingServiceStatus +class IProfilingService : public IProfilingGuidGenerator, + public IProfilingServiceStatus, + public IReadWriteCounterValues { public: + static std::unique_ptr<IProfilingService> CreateProfilingService( + armnn::Optional<IReportStructure&> reportStructure = armnn::EmptyOptional()); virtual ~IProfilingService() {}; virtual std::unique_ptr<ISendTimelinePacket> GetSendTimelinePacket() const = 0; virtual const ICounterMappings& GetCounterMappings() const = 0; virtual ISendCounterPacket& GetSendCounterPacket() = 0; virtual bool IsProfilingEnabled() const = 0; + virtual bool IsTimelineReportingEnabled() const = 0; virtual CaptureData GetCaptureData() = 0; + virtual ProfilingState GetCurrentState() const = 0; + // Resets the profiling options, optionally clears the profiling service entirely + virtual void ResetExternalProfilingOptions(const ProfilingOptions& options, + bool resetProfilingService = false) = 0; + virtual ProfilingState ConfigureProfilingService(const ProfilingOptions& options, + bool resetProfilingService = false) = 0; + // Store a profiling context returned from a backend that support profiling. + virtual void AddBackendProfilingContext(const armnn::BackendId backendId, + std::shared_ptr<IBackendProfilingContext> profilingContext) = 0; + virtual ICounterRegistry& GetCounterRegistry() = 0; + virtual IRegisterCounterMapping& GetCounterMappingRegistry() = 0; + // IProfilingGuidGenerator functions + /// Return the next random Guid in the sequence + ProfilingDynamicGuid NextGuid() override; + /// Create a ProfilingStaticGuid based on a hash of the string + ProfilingStaticGuid GenerateStaticId(const std::string& str) override; + static ProfilingDynamicGuid GetNextGuid(); + static ProfilingStaticGuid GetStaticId(const std::string& str); + void ResetGuidGenerator(); + +private: + static ProfilingGuidGenerator m_GuidGenerator; }; } // namespace pipe } // namespace arm - |