Home
last modified time | relevance | path

Searched refs:SharedMemoryABI (Results 1 – 21 of 21) 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 …]
Dshared_memory_arbiter_impl.h72 SharedMemoryABI::Chunk GetNewChunk(const SharedMemoryABI::ChunkHeader&,
83 void ReturnCompletedChunk(SharedMemoryABI::Chunk,
98 SharedMemoryABI* shmem_abi_for_testing() { return &shmem_abi_; } in shmem_abi_for_testing()
100 static void set_default_layout_for_testing(SharedMemoryABI::PageLayout l) { in set_default_layout_for_testing()
118 static SharedMemoryABI::PageLayout default_page_layout;
123 void UpdateCommitDataRequest(SharedMemoryABI::Chunk chunk,
136 SharedMemoryABI shmem_abi_;
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()
Dstartup_trace_writer.cc29 using ChunkHeader = perfetto::SharedMemoryABI::ChunkHeader;
35 SharedMemoryABI::Chunk NewChunk(SharedMemoryArbiterImpl* arbiter, in NewChunk()
61 size_t ReadBytes(SharedMemoryABI::Chunk* target_chunk, in ReadBytes()
320 SharedMemoryABI::Chunk cur_chunk = in CommitLocalBufferChunks()
336 SharedMemoryABI::kPacketHeaderSize)); in CommitLocalBufferChunks()
340 cur_payload_size += SharedMemoryABI::kPacketHeaderSize; in CommitLocalBufferChunks()
357 max_payload_size - SharedMemoryABI::kPacketHeaderSize || in CommitLocalBufferChunks()
Dstartup_trace_writer_unittest.cc41 SharedMemoryABI::PageLayout::kPageDiv4); in SetUp()
73 SharedMemoryABI* abi = arbiter_->shmem_abi_for_testing(); in VerifyPackets()
80 size_t num_chunks = SharedMemoryABI::GetNumChunksForLayout(page_layout); in VerifyPackets()
83 ASSERT_TRUE(chunk_state == SharedMemoryABI::kChunkFree || in VerifyPackets()
84 chunk_state == SharedMemoryABI::kChunkComplete); in VerifyPackets()
100 SharedMemoryABI::ChunkHeader::kFirstPacketContinuesFromPrevChunk) { in VerifyPackets()
Dshared_memory_arbiter_impl.cc33 using Chunk = SharedMemoryABI::Chunk;
36 SharedMemoryABI::PageLayout SharedMemoryArbiterImpl::default_page_layout =
37 SharedMemoryABI::PageLayout::kPageDiv1;
63 const SharedMemoryABI::ChunkHeader& header, in GetNewChunk()
92 free_chunks = (1 << SharedMemoryABI::kNumChunksForLayout[layout]) - 1; in GetNewChunk()
Dtrace_writer_impl.h48 void ResetChunkForTesting() { cur_chunk_ = SharedMemoryABI::Chunk(); } in ResetChunkForTesting()
73 SharedMemoryABI::Chunk cur_chunk_;
Dtrace_buffer.cc54 SharedMemoryABI::ChunkHeader::kFirstPacketContinuesFromPrevChunk;
56 SharedMemoryABI::ChunkHeader::kLastPacketContinuesOnNextChunk;
58 SharedMemoryABI::ChunkHeader::kChunkNeedsPatching;
75 static_assert(sizeof(ChunkRecord) == sizeof(SharedMemoryABI::PageHeader) + in TraceBuffer()
76 sizeof(SharedMemoryABI::ChunkHeader), in TraceBuffer()
428 static_assert(Patch::kSize == SharedMemoryABI::kPacketHeaderSize, in TryPatchChunkContents()
Dshared_memory_arbiter_impl_unittest.cc89 SharedMemoryABI::PageLayout::kPageDiv14); in TEST_P()
91 SharedMemoryABI::Chunk chunks[kTotChunks]; in TEST_P()
Dtrace_writer_impl.cc33 using ChunkHeader = perfetto::SharedMemoryABI::ChunkHeader;
38 constexpr size_t kPacketHeaderSize = SharedMemoryABI::kPacketHeaderSize;
Dpatch_list.h37 using PatchContent = std::array<uint8_t, SharedMemoryABI::kPacketHeaderSize>;
Dtracing_service_impl.cc1208 SharedMemoryABI* abi = &producer->shmem_abi_; in ScrapeSharedMemoryBuffers()
1225 SharedMemoryABI::ChunkState state = in ScrapeSharedMemoryBuffers()
1226 SharedMemoryABI::GetChunkStateFromLayout(layout, chunk_idx); in ScrapeSharedMemoryBuffers()
1227 PERFETTO_DCHECK(state == SharedMemoryABI::kChunkBeingWritten || in ScrapeSharedMemoryBuffers()
1228 state == SharedMemoryABI::kChunkComplete); in ScrapeSharedMemoryBuffers()
1229 bool chunk_complete = state == SharedMemoryABI::kChunkComplete; in ScrapeSharedMemoryBuffers()
1231 SharedMemoryABI::Chunk chunk = in ScrapeSharedMemoryBuffers()
1837 SharedMemoryABI::kMaxPageSize); in SetupDataSource()
2563 SharedMemoryABI::Chunk chunk = in CommitData()
2577 const SharedMemoryABI::ChunkHeader& chunk_header = *chunk.header(); in CommitData()
Dstartup_trace_writer_registry.cc26 using ChunkHeader = perfetto::SharedMemoryABI::ChunkHeader;
Dtrace_buffer_unittest.cc47 SharedMemoryABI::ChunkHeader::kFirstPacketContinuesFromPrevChunk;
49 SharedMemoryABI::ChunkHeader::kLastPacketContinuesOnNextChunk;
51 SharedMemoryABI::ChunkHeader::kChunkNeedsPatching;
Dtracing_service_impl.h133 SharedMemoryABI shmem_abi_;
/external/perfetto/include/perfetto/tracing/core/
Dshared_memory_abi.h143 class SharedMemoryABI {
418 friend class SharedMemoryABI;
428 SharedMemoryABI(uint8_t* start, size_t size, size_t page_size);
429 SharedMemoryABI();
563 SharedMemoryABI(const SharedMemoryABI&) = delete;
564 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.cc241 static_assert(ipc::kIPCBufferSize >= SharedMemoryABI::kMaxPageSize * 2, in OnTraceData()
/external/perfetto/protos/perfetto/common/
Dtrace_stats.proto109 // Num. of violations of the SharedMemoryABI found while writing or reading
/external/perfetto/protos/perfetto/trace/
Dperfetto_trace.proto271 // Num. of violations of the SharedMemoryABI found while writing or reading