| 75 | } |
| 76 | |
| 77 | void VerifyTimelineHeaderBinary(const unsigned char* readableData, |
| 78 | unsigned int& offset, |
| 79 | uint32_t packetDataLength) |
| 80 | { |
| 81 | ARM_PIPE_ASSERT(readableData); |
| 82 | |
| 83 | // Utils |
| 84 | unsigned int uint32_t_size = sizeof(uint32_t); |
| 85 | |
| 86 | // Check the TimelineEventClassBinaryPacket header |
| 87 | uint32_t timelineBinaryPacketHeaderWord0 = ReadUint32(readableData, offset); |
| 88 | uint32_t timelineBinaryPacketFamily = (timelineBinaryPacketHeaderWord0 >> 26) & 0x0000003F; |
| 89 | uint32_t timelineBinaryPacketClass = (timelineBinaryPacketHeaderWord0 >> 19) & 0x0000007F; |
| 90 | uint32_t timelineBinaryPacketType = (timelineBinaryPacketHeaderWord0 >> 16) & 0x00000007; |
| 91 | uint32_t timelineBinaryPacketStreamId = (timelineBinaryPacketHeaderWord0 >> 0) & 0x00000007; |
| 92 | CHECK(timelineBinaryPacketFamily == 1); |
| 93 | CHECK(timelineBinaryPacketClass == 0); |
| 94 | CHECK(timelineBinaryPacketType == 1); |
| 95 | CHECK(timelineBinaryPacketStreamId == 0); |
| 96 | offset += uint32_t_size; |
| 97 | uint32_t timelineBinaryPacketHeaderWord1 = ReadUint32(readableData, offset); |
| 98 | uint32_t timelineBinaryPacketSequenceNumber = (timelineBinaryPacketHeaderWord1 >> 24) & 0x00000001; |
| 99 | uint32_t timelineBinaryPacketDataLength = (timelineBinaryPacketHeaderWord1 >> 0) & 0x00FFFFFF; |
| 100 | CHECK(timelineBinaryPacketSequenceNumber == 0); |
| 101 | CHECK(timelineBinaryPacketDataLength == packetDataLength); |
| 102 | offset += uint32_t_size; |
| 103 | } |
| 104 | |
| 105 | ProfilingGuid VerifyTimelineLabelBinaryPacketData(arm::pipe::Optional<ProfilingGuid> guid, |
| 106 | const std::string& label, |
no test coverage detected