1 // 2 // Copyright © 2020 Arm Ltd. All rights reserved. 3 // SPDX-License-Identifier: MIT 4 // 5 6 #pragma once 7 8 #include <client/include/backends/IBackendProfiling.hpp> 9 #include <client/include/IProfilingService.hpp> 10 11 namespace arm 12 { 13 14 namespace pipe 15 { 16 17 class BackendProfiling : public IBackendProfiling 18 { 19 public: BackendProfiling(const ProfilingOptions & options,IProfilingService & profilingService,const std::string & backendId)20 BackendProfiling(const ProfilingOptions& options, 21 IProfilingService& profilingService, 22 const std::string& backendId) 23 : m_Options(options), 24 m_ProfilingService(profilingService), 25 m_BackendId(backendId) {} 26 ~BackendProfiling()27 ~BackendProfiling() 28 {} 29 30 std::unique_ptr<IRegisterBackendCounters> 31 GetCounterRegistrationInterface(uint16_t currentMaxGlobalCounterID) override; 32 33 std::unique_ptr<ISendTimelinePacket> GetSendTimelinePacket() override; 34 35 IProfilingGuidGenerator& GetProfilingGuidGenerator() override; 36 37 void ReportCounters(const std::vector<Timestamp>&) override; 38 39 CounterStatus GetCounterStatus(uint16_t backendCounterId) override; 40 41 std::vector<CounterStatus> GetActiveCounters() override; 42 43 bool IsProfilingEnabled() const override; 44 45 private: 46 ProfilingOptions m_Options; 47 IProfilingService& m_ProfilingService; 48 std::string m_BackendId; 49 }; 50 51 } // namespace pipe 52 53 } // namespace arm 54