12 #include <boost/assert.hpp> 26 : m_BufferManager(bufferManager)
27 , m_WriteBuffer(nullptr)
29 , m_RemainingBufferSize(0u)
52 uint64_t relationshipGuid,
54 uint64_t tailGuid)
override;
59 template <
typename Func,
typename ... Params>
60 void ForwardWriteBinaryFunction(Func& func, Params&& ... params);
64 unsigned int m_Offset;
65 unsigned int m_RemainingBufferSize;
67 const unsigned int m_uint32_t_size =
sizeof(uint32_t);
69 std::pair<uint32_t, uint32_t> m_PacketHeader;
70 uint32_t m_PacketDataLength;
72 bool m_DirectoryPackage =
false;
75 template<
typename Func,
typename ... Params>
76 void SendTimelinePacket::ForwardWriteBinaryFunction(Func& func, Params&& ... params)
81 BOOST_ASSERT(m_WriteBuffer);
82 unsigned int numberOfBytesWritten = 0;
87 &m_WriteBuffer->GetWritableData()[m_Offset],
88 m_RemainingBufferSize,
89 numberOfBytesWritten);
98 throw RuntimeException(
"Error processing while sending TimelineBinaryPacket",
102 m_Offset += numberOfBytesWritten;
103 m_RemainingBufferSize -= numberOfBytesWritten;
void SendTimelineMessageDirectoryPackage() override
Create and write a TimelineMessageDirectoryPackage in the buffer.
void SendTimelineLabelBinaryPacket(uint64_t profilingGuid, const std::string &label) override
Create and write a TimelineLabelBinaryPacket from the parameters to the buffer.
void SendTimelineEntityBinaryPacket(uint64_t profilingGuid) override
Create and write a TimelineEntityBinaryPacket from the parameters to the buffer.
void SendTimelineEventClassBinaryPacket(uint64_t profilingGuid) override
Create and write a TimelineEventClassBinaryPacket from the parameters to the buffer.
Copyright (c) 2020 ARM Limited.
void Commit() override
Commits the current buffer and reset the member variables.
ProfilingRelationshipType
void SendTimelineEventBinaryPacket(uint64_t timestamp, std::thread::id threadId, uint64_t profilingGuid) override
Create and write a TimelineEventBinaryPacket from the parameters to the buffer.
SendTimelinePacket(IBufferManager &bufferManager)
virtual void SendTimelineRelationshipBinaryPacket(ProfilingRelationshipType relationshipType, uint64_t relationshipGuid, uint64_t headGuid, uint64_t tailGuid) override
Create and write a TimelineRelationshipBinaryPacket from the parameters to the buffer.
std::unique_ptr< IPacketBuffer > IPacketBufferPtr