Finn Williams | e63a026 | 2019-10-22 10:30:49 +0100 | [diff] [blame] | 1 | // |
| 2 | // Copyright © 2019 Arm Ltd. All rights reserved. |
| 3 | // SPDX-License-Identifier: MIT |
| 4 | // |
| 5 | |
| 6 | #pragma once |
| 7 | |
| 8 | |
| 9 | #include <CommandHandlerFunctor.hpp> |
| 10 | #include <Packet.hpp> |
| 11 | #include <PacketBuffer.hpp> |
| 12 | #include <ProfilingUtils.hpp> |
| 13 | |
| 14 | namespace armnn |
| 15 | { |
| 16 | |
| 17 | namespace gatordmock |
| 18 | { |
| 19 | |
| 20 | class TimelineDirectoryCaptureCommandHandler : public profiling::CommandHandlerFunctor |
| 21 | { |
| 22 | // Utils |
Matteo Martincigh | 34a407d | 2019-11-06 15:30:54 +0000 | [diff] [blame] | 23 | uint32_t uint8_t_size = sizeof(uint8_t); |
Finn Williams | e63a026 | 2019-10-22 10:30:49 +0100 | [diff] [blame] | 24 | uint32_t uint32_t_size = sizeof(uint32_t); |
| 25 | |
| 26 | public: |
| 27 | TimelineDirectoryCaptureCommandHandler(uint32_t familyId, |
| 28 | uint32_t packetId, |
| 29 | uint32_t version, |
| 30 | bool quietOperation = false) |
Matteo Martincigh | 34a407d | 2019-11-06 15:30:54 +0000 | [diff] [blame] | 31 | : CommandHandlerFunctor(familyId, packetId, version) |
| 32 | , m_QuietOperation(quietOperation) |
Finn Williams | e63a026 | 2019-10-22 10:30:49 +0100 | [diff] [blame] | 33 | {} |
| 34 | |
| 35 | void operator()(const armnn::profiling::Packet& packet) override; |
| 36 | |
Matteo Martincigh | 34a407d | 2019-11-06 15:30:54 +0000 | [diff] [blame] | 37 | profiling::SwTraceHeader m_SwTraceHeader; |
Finn Williams | e63a026 | 2019-10-22 10:30:49 +0100 | [diff] [blame] | 38 | std::vector<profiling::SwTraceMessage> m_SwTraceMessages; |
| 39 | |
| 40 | private: |
| 41 | void ParseData(const armnn::profiling::Packet& packet); |
| 42 | void Print(); |
| 43 | |
| 44 | bool m_QuietOperation; |
| 45 | }; |
| 46 | |
| 47 | } //namespace gatordmock |
| 48 | |
Matteo Martincigh | 34a407d | 2019-11-06 15:30:54 +0000 | [diff] [blame] | 49 | } //namespace armnn |