Jim Flynn | 9789702 | 2020-02-02 12:52:59 +0000 | [diff] [blame] | 1 | // |
Colm Donelan | a98e79a | 2022-12-06 21:32:29 +0000 | [diff] [blame] | 2 | // Copyright © 2020,2022 Arm Ltd and Contributors. All rights reserved. |
Jim Flynn | 9789702 | 2020-02-02 12:52:59 +0000 | [diff] [blame] | 3 | // SPDX-License-Identifier: MIT |
| 4 | // |
| 5 | |
| 6 | #pragma once |
| 7 | |
Jim Flynn | decd08b | 2022-03-13 22:35:46 +0000 | [diff] [blame] | 8 | #include <common/include/Optional.hpp> |
Jim Flynn | 9789702 | 2020-02-02 12:52:59 +0000 | [diff] [blame] | 9 | |
Cathal Corbett | 5aa9fd7 | 2022-02-25 15:33:28 +0000 | [diff] [blame] | 10 | namespace arm |
Jim Flynn | 9789702 | 2020-02-02 12:52:59 +0000 | [diff] [blame] | 11 | { |
| 12 | |
Cathal Corbett | 5aa9fd7 | 2022-02-25 15:33:28 +0000 | [diff] [blame] | 13 | namespace pipe |
Jim Flynn | 9789702 | 2020-02-02 12:52:59 +0000 | [diff] [blame] | 14 | { |
| 15 | |
Colm Donelan | a98e79a | 2022-12-06 21:32:29 +0000 | [diff] [blame] | 16 | class Category; |
| 17 | class Device; |
| 18 | class CounterSet; |
| 19 | class Counter; |
| 20 | |
Jim Flynn | 9789702 | 2020-02-02 12:52:59 +0000 | [diff] [blame] | 21 | class ICounterRegistry |
| 22 | { |
| 23 | public: |
| 24 | virtual ~ICounterRegistry() {} |
| 25 | |
| 26 | // Register profiling objects |
Sadik Armagan | 4c99899 | 2020-02-25 12:44:44 +0000 | [diff] [blame] | 27 | virtual const Category* RegisterCategory (const std::string& categoryName) = 0; |
Jim Flynn | 9789702 | 2020-02-02 12:52:59 +0000 | [diff] [blame] | 28 | |
| 29 | virtual const Device* RegisterDevice (const std::string& deviceName, |
| 30 | uint16_t cores, |
Jim Flynn | decd08b | 2022-03-13 22:35:46 +0000 | [diff] [blame] | 31 | const arm::pipe::Optional<std::string>& parentCategoryName) = 0; |
Jim Flynn | 9789702 | 2020-02-02 12:52:59 +0000 | [diff] [blame] | 32 | |
| 33 | virtual const CounterSet* RegisterCounterSet(const std::string& counterSetName, |
| 34 | uint16_t count, |
Jim Flynn | decd08b | 2022-03-13 22:35:46 +0000 | [diff] [blame] | 35 | const arm::pipe::Optional<std::string>& parentCategoryName) = 0; |
Jim Flynn | 9789702 | 2020-02-02 12:52:59 +0000 | [diff] [blame] | 36 | |
Cathal Corbett | 6f07372 | 2022-03-04 12:11:09 +0000 | [diff] [blame] | 37 | virtual const Counter* RegisterCounter(const std::string& backendId, |
Jim Flynn | decd08b | 2022-03-13 22:35:46 +0000 | [diff] [blame] | 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; |
Jim Flynn | 9789702 | 2020-02-02 12:52:59 +0000 | [diff] [blame] | 49 | |
| 50 | }; |
| 51 | |
Cathal Corbett | 5aa9fd7 | 2022-02-25 15:33:28 +0000 | [diff] [blame] | 52 | } // namespace pipe |
Jim Flynn | 9789702 | 2020-02-02 12:52:59 +0000 | [diff] [blame] | 53 | |
Cathal Corbett | 5aa9fd7 | 2022-02-25 15:33:28 +0000 | [diff] [blame] | 54 | } // namespace arm |