blob: 522dc7c7cbb97acae154cfab62df150debd4b941 [file] [log] [blame]
Ferran Balagueraf5c46b2019-08-30 15:49:15 +01001//
2// Copyright © 2017 Arm Ltd. All rights reserved.
3// SPDX-License-Identifier: MIT
4//
5
6#pragma once
7
Finn Williams032bc742020-02-12 11:02:34 +00008#include <armnn/backends/profiling/IBackendProfiling.hpp>
Jim Flynnc454ac92022-03-16 18:43:18 +00009#include <common/include/ICounterDirectory.hpp>
Ferran Balagueraf5c46b2019-08-30 15:49:15 +010010
Cathal Corbett5aa9fd72022-02-25 15:33:28 +000011namespace arm
Ferran Balagueraf5c46b2019-08-30 15:49:15 +010012{
13
Cathal Corbett5aa9fd72022-02-25 15:33:28 +000014namespace pipe
Ferran Balagueraf5c46b2019-08-30 15:49:15 +010015{
16
17class ISendCounterPacket
18{
19public:
Finn Williams032bc742020-02-12 11:02:34 +000020 using IndexValuePairsVector = std::vector<CounterValue>;
Francis Murtagh3a161982019-09-04 15:25:02 +010021
Matteo Martincigh2e7c8852019-09-09 09:23:53 +010022 virtual ~ISendCounterPacket() {}
23
Ferran Balagueraf5c46b2019-08-30 15:49:15 +010024 /// Create and write a StreamMetaDataPacket in the buffer
25 virtual void SendStreamMetaDataPacket() = 0;
26
27 /// Create and write a CounterDirectoryPacket from the parameters to the buffer.
Matteo Martincigh42f9d9e2019-09-05 12:02:04 +010028 virtual void SendCounterDirectoryPacket(const ICounterDirectory& counterDirectory) = 0;
Ferran Balagueraf5c46b2019-08-30 15:49:15 +010029
30 /// Create and write a PeriodicCounterCapturePacket from the parameters to the buffer.
Francis Murtagh3a161982019-09-04 15:25:02 +010031 virtual void SendPeriodicCounterCapturePacket(uint64_t timestamp, const IndexValuePairsVector& values) = 0;
Ferran Balagueraf5c46b2019-08-30 15:49:15 +010032
33 /// Create and write a PeriodicCounterSelectionPacket from the parameters to the buffer.
34 virtual void SendPeriodicCounterSelectionPacket(uint32_t capturePeriod,
35 const std::vector<uint16_t>& selectedCounterIds) = 0;
Ferran Balagueraf5c46b2019-08-30 15:49:15 +010036};
37
Cathal Corbett5aa9fd72022-02-25 15:33:28 +000038} // namespace pipe
Ferran Balagueraf5c46b2019-08-30 15:49:15 +010039
Cathal Corbett5aa9fd72022-02-25 15:33:28 +000040} // namespace arm