1 // 2 // Copyright © 2020,2022 Arm Ltd and Contributors. All rights reserved. 3 // SPDX-License-Identifier: MIT 4 // 5 6 #pragma once 7 8 #include <common/include/Optional.hpp> 9 10 namespace arm 11 { 12 13 namespace pipe 14 { 15 16 class Category; 17 class Device; 18 class CounterSet; 19 class Counter; 20 21 class ICounterRegistry 22 { 23 public: ~ICounterRegistry()24 virtual ~ICounterRegistry() {} 25 26 // Register profiling objects 27 virtual const Category* RegisterCategory (const std::string& categoryName) = 0; 28 29 virtual const Device* RegisterDevice (const std::string& deviceName, 30 uint16_t cores, 31 const arm::pipe::Optional<std::string>& parentCategoryName) = 0; 32 33 virtual const CounterSet* RegisterCounterSet(const std::string& counterSetName, 34 uint16_t count, 35 const arm::pipe::Optional<std::string>& parentCategoryName) = 0; 36 37 virtual const Counter* RegisterCounter(const std::string& backendId, 38 const uint16_t uid, 39 const std::string& parentCategoryName, 40 uint16_t counterClass, 41 uint16_t interpolation, 42 double multiplier, 43 const std::string& name, 44 const std::string& description, 45 const arm::pipe::Optional<std::string>& units = arm::pipe::EmptyOptional(), 46 const arm::pipe::Optional<uint16_t>& numberOfCores = arm::pipe::EmptyOptional(), 47 const arm::pipe::Optional<uint16_t>& deviceUid = arm::pipe::EmptyOptional(), 48 const arm::pipe::Optional<uint16_t>& counterSetUid = arm::pipe::EmptyOptional()) = 0; 49 50 }; 51 52 } // namespace pipe 53 54 } // namespace arm 55