Home
last modified time | relevance | path

Searched refs:SharedMemoryABI (Results 1 – 18 of 18) sorted by relevance

/external/perfetto/src/tracing/core/
Dshared_memory_abi.cc45 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()
73 constexpr uint32_t SharedMemoryABI::kNumChunksForLayout[];
74 constexpr const char* SharedMemoryABI::kChunkStateStr[];
[all …]
Dshared_memory_abi_unittest.cc28 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 …]
Dtrace_writer_impl_unittest.cc40 SharedMemoryABI::PageLayout::kPageDiv4); in SetUp()
79 SharedMemoryABI* abi = arbiter_->shmem_abi_for_testing(); in TEST_P()
83 size_t num_chunks = SharedMemoryABI::GetNumChunksForLayout(page_layout); in TEST_P()
86 ASSERT_TRUE(chunk_state == SharedMemoryABI::kChunkFree || in TEST_P()
87 chunk_state == SharedMemoryABI::kChunkComplete); in TEST_P()
120 SharedMemoryABI* abi = arbiter_->shmem_abi_for_testing(); in TEST_P()
125 ASSERT_EQ(SharedMemoryABI::kChunkComplete, abi->GetChunkState(0u, 0u)); in TEST_P()
130 SharedMemoryABI::ChunkHeader::kChunkNeedsPatching); in TEST_P()
132 SharedMemoryABI::ChunkHeader::kLastPacketContinuesOnNextChunk); in TEST_P()
199 SharedMemoryABI* abi = arbiter_->shmem_abi_for_testing(); in TEST_P()
[all …]
Dshared_memory_arbiter_impl.h106 SharedMemoryABI::Chunk GetNewChunk(const SharedMemoryABI::ChunkHeader&,
118 void ReturnCompletedChunk(SharedMemoryABI::Chunk,
133 SharedMemoryABI* shmem_abi_for_testing() { return &shmem_abi_; } in shmem_abi_for_testing()
135 static void set_default_layout_for_testing(SharedMemoryABI::PageLayout l) { in set_default_layout_for_testing()
176 static SharedMemoryABI::PageLayout default_page_layout;
181 void UpdateCommitDataRequest(SharedMemoryABI::Chunk chunk,
220 SharedMemoryABI shmem_abi_;
Dtrace_writer_impl.cc34 using ChunkHeader = perfetto::SharedMemoryABI::ChunkHeader;
39 constexpr size_t kPacketHeaderSize = SharedMemoryABI::kPacketHeaderSize;
191 SharedMemoryABI::Chunk new_chunk = in GetNewBuffer()
208 WriteRedundantVarInt(SharedMemoryABI::kPacketSizeDropPacket, in GetNewBuffer()
251 WriteRedundantVarInt(SharedMemoryABI::kPacketSizeDropPacket, in GetNewBuffer()
261 cur_chunk_ = SharedMemoryABI::Chunk(); // Reset to an invalid chunk. in GetNewBuffer()
Dshared_memory_arbiter_impl_unittest.cc99 SharedMemoryABI::PageLayout::kPageDiv14); in TEST_P()
101 SharedMemoryABI::Chunk chunks[kTotChunks]; in TEST_P()
219 SharedMemoryABI::PageLayout::kPageDiv1); in TEST_P()
221 SharedMemoryABI::Chunk chunks[kTotChunks]; in TEST_P()
229 SharedMemoryABI::Chunk invalid_chunk = in TEST_P()
413 SharedMemoryABI* shmem_abi = arbiter_->shmem_abi_for_testing(); in TEST_P()
450 SharedMemoryABI::Chunk chunk = shmem_abi->TryAcquireChunkForReading( in TEST_P()
475 SharedMemoryABI::Chunk chunk = shmem_abi->TryAcquireChunkForReading( in TEST_P()
502 SharedMemoryABI::Chunk chunk = shmem_abi->TryAcquireChunkForReading( in TEST_P()
551 SharedMemoryABI::Chunk chunk = shmem_abi->TryAcquireChunkForReading( in TEST_P()
Dtrace_writer_impl.h54 void ResetChunkForTesting() { cur_chunk_ = SharedMemoryABI::Chunk(); } in ResetChunkForTesting()
86 SharedMemoryABI::Chunk cur_chunk_;
Dtrace_buffer.cc57 SharedMemoryABI::ChunkHeader::kFirstPacketContinuesFromPrevChunk;
59 SharedMemoryABI::ChunkHeader::kLastPacketContinuesOnNextChunk;
61 SharedMemoryABI::ChunkHeader::kChunkNeedsPatching;
78 static_assert(sizeof(ChunkRecord) == sizeof(SharedMemoryABI::PageHeader) + in TraceBuffer()
79 sizeof(SharedMemoryABI::ChunkHeader), in TraceBuffer()
435 static_assert(Patch::kSize == SharedMemoryABI::kPacketHeaderSize, in TryPatchChunkContents()
857 if (packet_size != SharedMemoryABI::kPacketSizeDropPacket) { in ReadNextPacketInChunk()
Dshared_memory_arbiter_impl.cc33 using Chunk = SharedMemoryABI::Chunk;
52 SharedMemoryABI::PageLayout SharedMemoryArbiterImpl::default_page_layout =
53 SharedMemoryABI::PageLayout::kPageDiv1;
93 const SharedMemoryABI::ChunkHeader& header, in GetNewChunk()
151 free_chunks = (1 << SharedMemoryABI::kNumChunksForLayout[layout]) - 1; in GetNewChunk()
Dpatch_list.h37 using PatchContent = std::array<uint8_t, SharedMemoryABI::kPacketHeaderSize>;
Dtracing_service_impl.cc176 static_assert(kMaxPageSize <= SharedMemoryABI::kMaxPageSize, ""); in EnsureValidShmSizes()
1476 SharedMemoryABI* abi = &producer->shmem_abi_; in ScrapeSharedMemoryBuffers()
1493 SharedMemoryABI::ChunkState state = in ScrapeSharedMemoryBuffers()
1494 SharedMemoryABI::GetChunkStateFromLayout(layout, chunk_idx); in ScrapeSharedMemoryBuffers()
1495 PERFETTO_DCHECK(state == SharedMemoryABI::kChunkBeingWritten || in ScrapeSharedMemoryBuffers()
1496 state == SharedMemoryABI::kChunkComplete); in ScrapeSharedMemoryBuffers()
1497 bool chunk_complete = state == SharedMemoryABI::kChunkComplete; in ScrapeSharedMemoryBuffers()
1499 SharedMemoryABI::Chunk chunk = in ScrapeSharedMemoryBuffers()
3045 SharedMemoryABI::Chunk chunk = in CommitData()
3059 const SharedMemoryABI::ChunkHeader& chunk_header = *chunk.header(); in CommitData()
Dtrace_buffer_unittest.cc46 SharedMemoryABI::ChunkHeader::kFirstPacketContinuesFromPrevChunk;
48 SharedMemoryABI::ChunkHeader::kLastPacketContinuesOnNextChunk;
50 SharedMemoryABI::ChunkHeader::kChunkNeedsPatching;
Dtracing_service_impl.h143 SharedMemoryABI shmem_abi_;
/external/perfetto/include/perfetto/ext/tracing/core/
Dshared_memory_abi.h144 class SharedMemoryABI {
425 friend class SharedMemoryABI;
435 SharedMemoryABI(uint8_t* start, size_t size, size_t page_size);
436 SharedMemoryABI();
570 SharedMemoryABI(const SharedMemoryABI&) = delete;
571 SharedMemoryABI& operator=(const SharedMemoryABI&) = delete;
/external/perfetto/src/tracing/test/
Dfake_packet.cc113 SharedMemoryABI::ChunkHeader::kFirstPacketContinuesFromPrevChunk) || in AddPacket()
116 !(flags & SharedMemoryABI::ChunkHeader::kLastPacketContinuesOnNextChunk)); in AddPacket()
/external/perfetto/src/tracing/ipc/service/
Dconsumer_ipc_service.cc350 static_assert(ipc::kIPCBufferSize >= SharedMemoryABI::kMaxPageSize * 2, in OnTraceData()
/external/perfetto/protos/perfetto/common/
Dtrace_stats.proto108 // Num. of violations of the SharedMemoryABI found while writing or reading
/external/perfetto/protos/perfetto/trace/
Dperfetto_trace.proto1504 // Num. of violations of the SharedMemoryABI found while writing or reading