blob: 34157b819a1cb0d903d60aad699b4c1e86212eb1 [file] [log] [blame]
Sadik Armagan7bbdf9d2019-10-24 10:26:05 +01001//
2// Copyright © 2019 Arm Ltd. All rights reserved.
3// SPDX-License-Identifier: MIT
4//
5
6#pragma once
7
8#include "ProfilingUtils.hpp"
9
10#include <algorithm>
11#include <string>
12#include <vector>
13
14namespace armnn
15{
16
17namespace profiling
18{
19
20class ISendTimelinePacket
21{
22public:
23 virtual ~ISendTimelinePacket() {}
24
25 /// Commits the current buffer and reset the member variables
26 virtual void Commit() = 0;
27
28 /// Create and write a TimelineEntityBinaryPacket from the parameters to the buffer.
29 virtual void SendTimelineEntityBinaryPacket(uint64_t profilingGuid) = 0;
30
31 /// Create and write a TimelineEventBinaryPacket from the parameters to the buffer.
32 virtual void SendTimelineEventBinaryPacket(uint64_t timestamp, uint32_t threadId, uint64_t profilingGuid) = 0;
33
34 /// Create and write a TimelineEventClassBinaryPacket from the parameters to the buffer.
35 virtual void SendTimelineEventClassBinaryPacket(uint64_t profilingGuid) = 0;
36
37 /// Create and write a TimelineLabelBinaryPacket from the parameters to the buffer.
38 virtual void SendTimelineLabelBinaryPacket(uint64_t profilingGuid, const std::string& label) = 0;
39
40 /// Create and write a TimelineMessageDirectoryPackage in the buffer
41 virtual void SendTimelineMessageDirectoryPackage() = 0;
42
43 /// Create and write a TimelineRelationshipBinaryPacket from the parameters to the buffer.
44 virtual void SendTimelineRelationshipBinaryPacket(ProfilingRelationshipType relationshipType,
45 uint64_t relationshipGuid,
46 uint64_t headGuid,
47 uint64_t tailGuid) = 0;
48};
49
50} // namespace profiling
51
52} // namespace armnn
53