/external/perfetto/src/tracing/core/ |
D | shared_memory_abi_unittest.cc | 28 using Chunk = SharedMemoryABI::Chunk; 29 using ChunkHeader = SharedMemoryABI::ChunkHeader; 37 SharedMemoryABI abi(buf(), buf_size(), page_size()); in TEST_P() 52 ASSERT_TRUE(abi.TryPartitionPage(0, SharedMemoryABI::kPageDiv1)); in TEST_P() 55 ASSERT_TRUE(abi.TryPartitionPage(1, SharedMemoryABI::kPageDiv2)); in TEST_P() 58 ASSERT_TRUE(abi.TryPartitionPage(2, SharedMemoryABI::kPageDiv4)); in TEST_P() 61 ASSERT_TRUE(abi.TryPartitionPage(3, SharedMemoryABI::kPageDiv7)); in TEST_P() 64 ASSERT_TRUE(abi.TryPartitionPage(4, SharedMemoryABI::kPageDiv14)); in TEST_P() 68 ASSERT_FALSE(abi.TryPartitionPage(0, SharedMemoryABI::kPageDiv1)); in TEST_P() 69 ASSERT_FALSE(abi.TryPartitionPage(4, SharedMemoryABI::kPageDiv14)); in TEST_P() [all …]
|
D | shared_memory_abi.cc | 45 return ((page_size - sizeof(SharedMemoryABI::PageHeader)) / divider) & ~3UL; in GetChunkSize() 49 std::array<uint16_t, SharedMemoryABI::kNumPageLayouts> InitChunkSizes( in InitChunkSizes() 51 static_assert(SharedMemoryABI::kNumPageLayouts == in InitChunkSizes() 52 base::ArraySize(SharedMemoryABI::kNumChunksForLayout), in InitChunkSizes() 54 std::array<uint16_t, SharedMemoryABI::kNumPageLayouts> res = {}; in InitChunkSizes() 55 for (size_t i = 0; i < SharedMemoryABI::kNumPageLayouts; i++) { in InitChunkSizes() 56 size_t num_chunks = SharedMemoryABI::kNumChunksForLayout[i]; in InitChunkSizes() 64 inline void ClearChunkHeader(SharedMemoryABI::ChunkHeader* header) { in ClearChunkHeader() 72 SharedMemoryABI::SharedMemoryABI() = default; 74 SharedMemoryABI::SharedMemoryABI(uint8_t* start, in SharedMemoryABI() function in perfetto::SharedMemoryABI [all …]
|
D | shared_memory_arbiter_impl.h | 121 SharedMemoryABI::Chunk GetNewChunk(const SharedMemoryABI::ChunkHeader&, 133 void ReturnCompletedChunk(SharedMemoryABI::Chunk, 144 SharedMemoryABI* shmem_abi_for_testing() { return &shmem_abi_; } in shmem_abi_for_testing() 146 static void set_default_layout_for_testing(SharedMemoryABI::PageLayout l) { in set_default_layout_for_testing() 150 static SharedMemoryABI::PageLayout default_page_layout_for_testing() { in default_page_layout_for_testing() 201 static SharedMemoryABI::PageLayout default_page_layout; 206 void UpdateCommitDataRequest(SharedMemoryABI::Chunk chunk, 256 SharedMemoryABI shmem_abi_;
|
D | trace_writer_impl_unittest.cc | 44 using ChunkHeader = SharedMemoryABI::ChunkHeader; 70 SharedMemoryABI::PageLayout::kPageDiv4); in SetUp() 95 SharedMemoryABI::Chunk& chunk) const { in CopyPayloadAndApplyPatches() 126 SharedMemoryABI* abi = arbiter_->shmem_abi_for_testing(); in GetPacketsFromShmemAndPatches() 130 size_t num_chunks = SharedMemoryABI::GetNumChunksForLayout(page_layout); in GetPacketsFromShmemAndPatches() 132 SharedMemoryABI::ChunkState chunk_state = in GetPacketsFromShmemAndPatches() 134 if (chunk_state != SharedMemoryABI::kChunkFree && in GetPacketsFromShmemAndPatches() 135 chunk_state != SharedMemoryABI::kChunkComplete) { in GetPacketsFromShmemAndPatches() 140 SharedMemoryABI::Chunk chunk = in GetPacketsFromShmemAndPatches() 181 SharedMemoryABI::PageLayout default_layout_; [all …]
|
D | shared_memory_arbiter_impl_unittest.cc | 69 SharedMemoryABI::PageLayout default_layout_; 83 SharedMemoryABI::PageLayout::kPageDiv14); in TEST_P() 85 SharedMemoryABI::Chunk chunks[kTotChunks]; in TEST_P() 135 SharedMemoryABI::PageLayout::kPageDiv1); in TEST_P() 139 SharedMemoryABI::Chunk chunk = in TEST_P() 165 chunk.SetFlag(SharedMemoryABI::ChunkHeader::kChunkNeedsPatching); in TEST_P() 169 ASSERT_EQ(SharedMemoryABI::kChunkBeingWritten, in TEST_P() 183 ASSERT_EQ(SharedMemoryABI::kChunkComplete, in TEST_P() 273 SharedMemoryABI::PageLayout::kPageDiv1); in TEST_P() 275 SharedMemoryABI::Chunk chunks[kTotChunks]; in TEST_P() [all …]
|
D | shared_memory_arbiter_impl.cc | 33 using Chunk = SharedMemoryABI::Chunk; 52 SharedMemoryABI::PageLayout SharedMemoryArbiterImpl::default_page_layout = 53 SharedMemoryABI::PageLayout::kPageDiv1; 90 const SharedMemoryABI::ChunkHeader& header, in GetNewChunk() 150 free_chunks = (1 << SharedMemoryABI::kNumChunksForLayout[layout]) - 1; in GetNewChunk() 290 SharedMemoryABI::ChunkHeader::kChunkNeedsPatching)) { in UpdateCommitDataRequest() 397 SharedMemoryABI::Chunk chunk; in TryDirectPatchLocked() 409 if (chunk_state != SharedMemoryABI::kChunkBeingWritten) in TryDirectPatchLocked() 433 SharedMemoryABI::ChunkState::kChunkBeingWritten); in TryDirectPatchLocked() 436 PERFETTO_CHECK(ptr <= chunk.end() - SharedMemoryABI::kPacketHeaderSize); in TryDirectPatchLocked() [all …]
|
D | trace_writer_impl.cc | 37 using ChunkHeader = perfetto::SharedMemoryABI::ChunkHeader; 42 constexpr size_t kPacketHeaderSize = SharedMemoryABI::kPacketHeaderSize; 208 SharedMemoryABI::Chunk new_chunk = in GetNewBuffer() 225 WriteRedundantVarInt(SharedMemoryABI::kPacketSizeDropPacket, in GetNewBuffer() 268 WriteRedundantVarInt(SharedMemoryABI::kPacketSizeDropPacket, in GetNewBuffer() 278 cur_chunk_ = SharedMemoryABI::Chunk(); // Reset to an invalid chunk. in GetNewBuffer()
|
D | trace_writer_impl.h | 69 void ResetChunkForTesting() { cur_chunk_ = SharedMemoryABI::Chunk(); } in ResetChunkForTesting() 102 SharedMemoryABI::Chunk cur_chunk_;
|
D | trace_buffer.cc | 38 SharedMemoryABI::ChunkHeader::kFirstPacketContinuesFromPrevChunk; 40 SharedMemoryABI::ChunkHeader::kLastPacketContinuesOnNextChunk; 42 SharedMemoryABI::ChunkHeader::kChunkNeedsPatching; 58 static_assert(sizeof(ChunkRecord) == sizeof(SharedMemoryABI::PageHeader) + in TraceBuffer() 59 sizeof(SharedMemoryABI::ChunkHeader), in TraceBuffer() 67 SharedMemoryABI::kMinPageSize % sizeof(ChunkRecord) == 0, in Initialize() 424 static_assert(Patch::kSize == SharedMemoryABI::kPacketHeaderSize, in TryPatchChunkContents() 848 if (packet_size != SharedMemoryABI::kPacketSizeDropPacket) { in ReadNextPacketInChunk()
|
D | patch_list.h | 37 using PatchContent = std::array<uint8_t, SharedMemoryABI::kPacketHeaderSize>;
|
D | tracing_service_impl.cc | 187 static_assert(kMaxPageSize <= SharedMemoryABI::kMaxPageSize, ""); in EnsureValidShmSizes() 203 bool page_size_is_valid = page_size >= SharedMemoryABI::kMinPageSize; in EnsureValidShmSizes() 204 page_size_is_valid &= page_size % SharedMemoryABI::kMinPageSize == 0; in EnsureValidShmSizes() 207 size_t num_pages = page_size / SharedMemoryABI::kMinPageSize; in EnsureValidShmSizes() 1932 SharedMemoryABI* abi = &producer->shmem_abi_; in ScrapeSharedMemoryBuffers() 1949 SharedMemoryABI::ChunkState state = in ScrapeSharedMemoryBuffers() 1950 SharedMemoryABI::GetChunkStateFromLayout(layout, chunk_idx); in ScrapeSharedMemoryBuffers() 1951 PERFETTO_DCHECK(state == SharedMemoryABI::kChunkBeingWritten || in ScrapeSharedMemoryBuffers() 1952 state == SharedMemoryABI::kChunkComplete); in ScrapeSharedMemoryBuffers() 1953 bool chunk_complete = state == SharedMemoryABI::kChunkComplete; in ScrapeSharedMemoryBuffers() [all …]
|
D | trace_buffer_unittest.cc | 46 SharedMemoryABI::ChunkHeader::kFirstPacketContinuesFromPrevChunk; 48 SharedMemoryABI::ChunkHeader::kLastPacketContinuesOnNextChunk; 50 SharedMemoryABI::ChunkHeader::kChunkNeedsPatching;
|
D | tracing_service_impl.h | 172 SharedMemoryABI shmem_abi_;
|
/external/perfetto/include/perfetto/ext/tracing/core/ |
D | shared_memory_abi.h | 144 class SharedMemoryABI { 439 friend class SharedMemoryABI; 449 SharedMemoryABI(uint8_t* start, size_t size, size_t page_size); 450 SharedMemoryABI(); 586 SharedMemoryABI(const SharedMemoryABI&) = delete; 587 SharedMemoryABI& operator=(const SharedMemoryABI&) = delete;
|
/external/perfetto/src/tracing/test/ |
D | fake_packet.cc | 113 SharedMemoryABI::ChunkHeader::kFirstPacketContinuesFromPrevChunk) || in AddPacket() 116 !(flags & SharedMemoryABI::ChunkHeader::kLastPacketContinuesOnNextChunk)); in AddPacket()
|
/external/perfetto/src/tracing/ipc/service/ |
D | consumer_ipc_service.cc | 391 static_assert(ipc::kIPCBufferSize >= SharedMemoryABI::kMaxPageSize * 2, in OnTraceData()
|
/external/perfetto/protos/perfetto/common/ |
D | trace_stats.proto | 108 // Num. of violations of the SharedMemoryABI found while writing or reading
|
/external/perfetto/protos/perfetto/trace/ |
D | perfetto_trace.proto | 3421 // Num. of violations of the SharedMemoryABI found while writing or reading
|