Home
last modified time | relevance | path

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

/external/perfetto/src/tracing/core/
Dshared_memory_abi_unittest.cc27 using Chunk = SharedMemoryABI::Chunk;
28 using ChunkHeader = SharedMemoryABI::ChunkHeader;
36 SharedMemoryABI abi(buf(), buf_size(), page_size()); in TEST_P()
51 ASSERT_TRUE(abi.TryPartitionPage(0, SharedMemoryABI::kPageDiv1)); in TEST_P()
54 ASSERT_TRUE(abi.TryPartitionPage(1, SharedMemoryABI::kPageDiv2)); in TEST_P()
57 ASSERT_TRUE(abi.TryPartitionPage(2, SharedMemoryABI::kPageDiv4)); in TEST_P()
60 ASSERT_TRUE(abi.TryPartitionPage(3, SharedMemoryABI::kPageDiv7)); in TEST_P()
63 ASSERT_TRUE(abi.TryPartitionPage(4, SharedMemoryABI::kPageDiv14)); in TEST_P()
67 ASSERT_FALSE(abi.TryPartitionPage(0, SharedMemoryABI::kPageDiv1)); in TEST_P()
68 ASSERT_FALSE(abi.TryPartitionPage(4, SharedMemoryABI::kPageDiv14)); in TEST_P()
[all …]
Dshared_memory_abi.cc40 return ((page_size - sizeof(SharedMemoryABI::PageHeader)) / divider) & ~3UL; in GetChunkSize()
44 std::array<uint16_t, SharedMemoryABI::kNumPageLayouts> InitChunkSizes( in InitChunkSizes()
46 static_assert(SharedMemoryABI::kNumPageLayouts == in InitChunkSizes()
47 base::ArraySize(SharedMemoryABI::kNumChunksForLayout), in InitChunkSizes()
49 std::array<uint16_t, SharedMemoryABI::kNumPageLayouts> res = {}; in InitChunkSizes()
50 for (size_t i = 0; i < SharedMemoryABI::kNumPageLayouts; i++) { in InitChunkSizes()
51 size_t num_chunks = SharedMemoryABI::kNumChunksForLayout[i]; in InitChunkSizes()
62 constexpr uint32_t SharedMemoryABI::kNumChunksForLayout[];
63 constexpr const char* SharedMemoryABI::kChunkStateStr[];
64 constexpr const size_t SharedMemoryABI::kInvalidPageIdx;
[all …]
Dshared_memory_arbiter_impl.h69 SharedMemoryABI::Chunk GetNewChunk(const SharedMemoryABI::ChunkHeader&,
80 void ReturnCompletedChunk(SharedMemoryABI::Chunk,
88 SharedMemoryABI* shmem_abi_for_testing() { return &shmem_abi_; } in shmem_abi_for_testing()
90 static void set_default_layout_for_testing(SharedMemoryABI::PageLayout l) { in set_default_layout_for_testing()
104 static SharedMemoryABI::PageLayout default_page_layout;
118 SharedMemoryABI shmem_abi_;
Dtrace_writer_impl_unittest.cc50 SharedMemoryABI::PageLayout::kPageDiv4); in SetUp()
89 SharedMemoryABI* abi = arbiter_->shmem_abi_for_testing(); in TEST_P()
93 size_t num_chunks = SharedMemoryABI::GetNumChunksForLayout(page_layout); in TEST_P()
96 ASSERT_TRUE(chunk_state == SharedMemoryABI::kChunkFree || in TEST_P()
97 chunk_state == SharedMemoryABI::kChunkComplete); in TEST_P()
Dshared_memory_arbiter_impl.cc31 using Chunk = SharedMemoryABI::Chunk;
34 SharedMemoryABI::PageLayout SharedMemoryArbiterImpl::default_page_layout =
35 SharedMemoryABI::PageLayout::kPageDiv1;
61 const SharedMemoryABI::ChunkHeader& header, in GetNewChunk()
89 free_chunks = (1 << SharedMemoryABI::kNumChunksForLayout[layout]) - 1; in GetNewChunk()
Dtrace_buffer.cc55 SharedMemoryABI::ChunkHeader::kFirstPacketContinuesFromPrevChunk;
57 SharedMemoryABI::ChunkHeader::kLastPacketContinuesOnNextChunk;
59 SharedMemoryABI::ChunkHeader::kChunkNeedsPatching;
75 static_assert(sizeof(ChunkRecord) == sizeof(SharedMemoryABI::PageHeader) + in TraceBuffer()
76 sizeof(SharedMemoryABI::ChunkHeader), in TraceBuffer()
294 static_assert(Patch::kSize == SharedMemoryABI::kPacketHeaderSize, in TryPatchChunkContents()
Dshared_memory_arbiter_impl_unittest.cc82 SharedMemoryABI::PageLayout::kPageDiv14); in TEST_P()
84 SharedMemoryABI::Chunk chunks[kTotChunks]; in TEST_P()
Dtrace_writer_impl.cc33 using ChunkHeader = perfetto::SharedMemoryABI::ChunkHeader;
38 constexpr size_t kPacketHeaderSize = SharedMemoryABI::kPacketHeaderSize;
Dtrace_writer_impl.h67 SharedMemoryABI::Chunk cur_chunk_;
Dpatch_list.h35 using PatchContent = std::array<uint8_t, SharedMemoryABI::kPacketHeaderSize>;
Dtrace_buffer_unittest.cc47 SharedMemoryABI::ChunkHeader::kFirstPacketContinuesFromPrevChunk;
49 SharedMemoryABI::ChunkHeader::kLastPacketContinuesOnNextChunk;
51 SharedMemoryABI::ChunkHeader::kChunkNeedsPatching;
Dservice_impl.h100 SharedMemoryABI shmem_abi_;
Dservice_impl.cc847 SharedMemoryABI::kMaxPageSize); in CreateDataSourceInstance()
1255 SharedMemoryABI::Chunk chunk = in CommitData()
1269 const SharedMemoryABI::ChunkHeader& chunk_header = *chunk.header(); in CommitData()
/external/perfetto/include/perfetto/tracing/core/
Dshared_memory_abi.h143 class SharedMemoryABI {
400 friend class SharedMemoryABI;
410 SharedMemoryABI(uint8_t* start, size_t size, size_t page_size);
411 SharedMemoryABI();
526 SharedMemoryABI(const SharedMemoryABI&) = delete;
527 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.cc158 static_assert(ipc::kIPCBufferSize >= SharedMemoryABI::kMaxPageSize * 2, in OnTraceData()
/external/perfetto/protos/perfetto/trace/
Dtrace_stats.proto55 // Num. of violations of the SharedMemoryABI found while writing or reading