Searched refs:write_head (Results 1 – 3 of 3) sorted by relevance
38 size_t write_head = write_head_.load(std::memory_order_relaxed); in GetFreeSize() local41 if (write_head <= write_tail) { in GetFreeSize()42 return write_tail - write_head; in GetFreeSize()44 return buffer_size_ - write_head + write_tail; in GetFreeSize()48 size_t write_head = write_head_.load(std::memory_order_relaxed); in AllocWriteSpace() local52 if (write_head < write_tail) { in AllocWriteSpace()53 if (write_head + record_size > write_tail) { in AllocWriteSpace()56 } else if (write_head + record_size > buffer_size_) { in AllocWriteSpace()61 if (buffer_size_ - write_head >= sizeof(perf_event_header)) { in AllocWriteSpace()64 memset(buffer_.get() + write_head, 0, sizeof(perf_event_header)); in AllocWriteSpace()[all …]
69 uint32_t write_head = (read_head_ + valid_bytes_) % data_.size(); in StoreMessage() local70 if (message.len <= data_.size() - write_head) { in StoreMessage()71 memcpy(data_.data() + write_head, &message, message.len); in StoreMessage()73 uint32_t len1 = data_.size() - write_head; in StoreMessage()74 memcpy(data_.data() + write_head, &message, len1); in StoreMessage()
236 uint64_t write_head = mmap_metadata_page_->data_head; in GetAvailableMmapDataSize() local238 if (write_head == read_head) { in GetAvailableMmapDataSize()245 return write_head - read_head; in GetAvailableMmapDataSize()