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_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_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()
72 SharedMemoryABI::SharedMemoryABI() = default;
74 SharedMemoryABI::SharedMemoryABI(uint8_t* start, in SharedMemoryABI() function in perfetto::SharedMemoryABI
[all …]
Dshared_memory_arbiter_impl.h121 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_;
Dtrace_writer_impl_unittest.cc44 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 …]
Dshared_memory_arbiter_impl_unittest.cc69 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 …]
Dshared_memory_arbiter_impl.cc33 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 …]
Dtrace_writer_impl.cc37 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()
Dtrace_writer_impl.h69 void ResetChunkForTesting() { cur_chunk_ = SharedMemoryABI::Chunk(); } in ResetChunkForTesting()
102 SharedMemoryABI::Chunk cur_chunk_;
Dtrace_buffer.cc38 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()
Dpatch_list.h37 using PatchContent = std::array<uint8_t, SharedMemoryABI::kPacketHeaderSize>;
Dtracing_service_impl.cc187 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 …]
Dtrace_buffer_unittest.cc46 SharedMemoryABI::ChunkHeader::kFirstPacketContinuesFromPrevChunk;
48 SharedMemoryABI::ChunkHeader::kLastPacketContinuesOnNextChunk;
50 SharedMemoryABI::ChunkHeader::kChunkNeedsPatching;
Dtracing_service_impl.h172 SharedMemoryABI shmem_abi_;
/external/perfetto/include/perfetto/ext/tracing/core/
Dshared_memory_abi.h144 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/
Dfake_packet.cc113 SharedMemoryABI::ChunkHeader::kFirstPacketContinuesFromPrevChunk) || in AddPacket()
116 !(flags & SharedMemoryABI::ChunkHeader::kLastPacketContinuesOnNextChunk)); in AddPacket()
/external/perfetto/src/tracing/ipc/service/
Dconsumer_ipc_service.cc391 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.proto3421 // Num. of violations of the SharedMemoryABI found while writing or reading