Colm Donelan | e49755b | 2020-01-29 15:22:43 +0000 | [diff] [blame] | 1 | // |
| 2 | // Copyright © 2020 Arm Ltd. All rights reserved. |
| 3 | // SPDX-License-Identifier: MIT |
| 4 | // |
| 5 | #pragma once |
| 6 | |
Colm Donelan | 1aff393 | 2020-02-05 17:48:59 +0000 | [diff] [blame] | 7 | #include "IBackendProfiling.hpp" |
Jim Flynn | 3e9bc19 | 2022-03-23 23:01:26 +0000 | [diff] [blame] | 8 | |
| 9 | #include <common/include/Optional.hpp> |
| 10 | |
Colm Donelan | e49755b | 2020-01-29 15:22:43 +0000 | [diff] [blame] | 11 | #include <vector> |
| 12 | |
Cathal Corbett | 5aa9fd7 | 2022-02-25 15:33:28 +0000 | [diff] [blame] | 13 | namespace arm |
Colm Donelan | e49755b | 2020-01-29 15:22:43 +0000 | [diff] [blame] | 14 | { |
Cathal Corbett | 5aa9fd7 | 2022-02-25 15:33:28 +0000 | [diff] [blame] | 15 | namespace pipe |
Colm Donelan | e49755b | 2020-01-29 15:22:43 +0000 | [diff] [blame] | 16 | { |
| 17 | |
| 18 | class IBackendProfilingContext |
| 19 | { |
Colm Donelan | e49755b | 2020-01-29 15:22:43 +0000 | [diff] [blame] | 20 | public: |
| 21 | virtual ~IBackendProfilingContext() |
| 22 | {} |
David Monahan | c1536d6 | 2020-02-12 15:52:35 +0000 | [diff] [blame] | 23 | virtual uint16_t RegisterCounters(uint16_t currentMaxGlobalCounterID) = 0; |
Jim Flynn | decd08b | 2022-03-13 22:35:46 +0000 | [diff] [blame] | 24 | virtual arm::pipe::Optional<std::string> ActivateCounters( |
| 25 | uint32_t capturePeriod, const std::vector<uint16_t>& counterIds) = 0; |
Jim Flynn | 3e9bc19 | 2022-03-23 23:01:26 +0000 | [diff] [blame] | 26 | virtual std::vector<arm::pipe::Timestamp> ReportCounterValues() = 0; |
David Monahan | b015e5d | 2020-02-26 10:24:03 +0000 | [diff] [blame] | 27 | virtual bool EnableProfiling(bool flag) = 0; |
Keith Davis | 33ed221 | 2020-03-30 10:43:41 +0100 | [diff] [blame] | 28 | virtual bool EnableTimelineReporting(bool flag) = 0; |
Colm Donelan | e49755b | 2020-01-29 15:22:43 +0000 | [diff] [blame] | 29 | }; |
| 30 | |
| 31 | using IBackendProfilingContextUniquePtr = std::unique_ptr<IBackendProfilingContext>; |
Cathal Corbett | 5aa9fd7 | 2022-02-25 15:33:28 +0000 | [diff] [blame] | 32 | } // namespace pipe |
Jim Flynn | 8de9d44 | 2022-03-07 14:14:28 +0000 | [diff] [blame] | 33 | } // namespace arm |