Home
last modified time | relevance | path

Searched refs:write_head (Results 1 – 2 of 2) sorted by relevance

/system/extras/simpleperf/
DRecordReadThread.cpp39 size_t write_head = write_head_.load(std::memory_order_relaxed); in GetFreeSize() local
42 if (write_head <= write_tail) { in GetFreeSize()
43 return write_tail - write_head; in GetFreeSize()
45 return buffer_size_ - write_head + write_tail; in GetFreeSize()
49 size_t write_head = write_head_.load(std::memory_order_relaxed); in AllocWriteSpace() local
53 if (write_head < write_tail) { in AllocWriteSpace()
54 if (write_head + record_size > write_tail) { in AllocWriteSpace()
57 } else if (write_head + record_size > buffer_size_) { in AllocWriteSpace()
62 if (buffer_size_ - write_head >= sizeof(perf_event_header)) { in AllocWriteSpace()
65 memset(buffer_.get() + write_head, 0, sizeof(perf_event_header)); in AllocWriteSpace()
[all …]
Devent_fd.cpp235 uint64_t write_head = mmap_metadata_page_->data_head; in GetAvailableMmapDataSize() local
239 if (write_head <= read_head) { in GetAvailableMmapDataSize()
246 return write_head - read_head; in GetAvailableMmapDataSize()
287 uint64_t write_head = mmap_metadata_page_->aux_head; in GetAvailableAuxData() local
289 if (write_head <= read_head) { in GetAvailableAuxData()
296 size_t data_size = write_head - read_head; in GetAvailableAuxData()