ArmNN
 20.02
TimelineCaptureCommandHandler.hpp
Go to the documentation of this file.
1 //
2 // Copyright © 2019 Arm Ltd. All rights reserved.
3 // SPDX-License-Identifier: MIT
4 //
5 
6 #pragma once
7 
10 
11 #include <Packet.hpp>
12 #include <ProfilingUtils.hpp>
13 
14 namespace armnn
15 {
16 
17 namespace timelinedecoder
18 {
19 
22 {
23  // Utils
24  uint32_t uint32_t_size = sizeof(uint32_t);
25  uint32_t uint64_t_size = sizeof(uint64_t);
26 
27  using ReadFunction = void (TimelineCaptureCommandHandler::*)(const unsigned char*, uint32_t&);
28 
29 public:
30  TimelineCaptureCommandHandler(uint32_t familyId,
31  uint32_t packetId,
32  uint32_t version,
33  ITimelineDecoder& timelineDecoder,
34  uint32_t threadId_size)
35  : CommandHandlerFunctor(familyId, packetId, version),
36  m_TimelineDecoder(timelineDecoder),
37  m_ThreadIdSize(threadId_size),
38  m_PacketLength(0)
39  {}
40 
41  void operator()(const armnn::profiling::Packet& packet) override;
42 
43  void ReadLabel(const unsigned char* data, uint32_t& offset);
44  void ReadEntity(const unsigned char* data, uint32_t& offset);
45  void ReadEventClass(const unsigned char* data, uint32_t& offset);
46  void ReadRelationship(const unsigned char* data, uint32_t& offset);
47  void ReadEvent(const unsigned char* data, uint32_t& offset);
48 
49 private:
50  void ParseData(const armnn::profiling::Packet& packet);
51 
52  ITimelineDecoder& m_TimelineDecoder;
53 
54  const uint32_t m_ThreadIdSize;
55  unsigned int m_PacketLength;
56  static const ReadFunction m_ReadFunctions[];
57 
58 };
59 
60 } //namespace gatordmock
61 
62 } //namespace armnn
Copyright (c) 2020 ARM Limited.
void ReadEventClass(const unsigned char *data, uint32_t &offset)
void ReadRelationship(const unsigned char *data, uint32_t &offset)
TimelineCaptureCommandHandler(uint32_t familyId, uint32_t packetId, uint32_t version, ITimelineDecoder &timelineDecoder, uint32_t threadId_size)
void operator()(const armnn::profiling::Packet &packet) override
void ReadLabel(const unsigned char *data, uint32_t &offset)
void ReadEntity(const unsigned char *data, uint32_t &offset)
void ReadEvent(const unsigned char *data, uint32_t &offset)