Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(287)

Unified Diff: components/tracing/core/trace_ring_buffer.h

Issue 2228593004: Revert of tracing v2: Introduce TraceBufferWriter (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@proto_refactor
Patch Set: Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: components/tracing/core/trace_ring_buffer.h
diff --git a/components/tracing/core/trace_ring_buffer.h b/components/tracing/core/trace_ring_buffer.h
index 88ac3503b148d6481fbb977cabb22efe8c8c33c3..534d3aafc8f30087d7a8a2c814edc204b4be6c26 100644
--- a/components/tracing/core/trace_ring_buffer.h
+++ b/components/tracing/core/trace_ring_buffer.h
@@ -16,13 +16,13 @@
namespace v2 {
static const uint32_t kNoChunkOwner = 0;
-static const size_t kChunkSize = 32 * 1024;
class TRACING_EXPORT TraceRingBuffer {
public:
class Chunk {
public:
using Header = base::subtle::Atomic32;
+ static constexpr size_t kSize = 32 * 1024;
Chunk();
~Chunk();
@@ -33,7 +33,7 @@
uint8_t* begin() const { return begin_; }
Header* header() const { return reinterpret_cast<Header*>(begin_); }
uint8_t* payload() const { return begin_ + sizeof(Header); }
- uint8_t* end() const { return begin_ + kChunkSize; }
+ uint8_t* end() const { return begin_ + kSize; }
void set_used_size(uint32_t size) {
base::subtle::NoBarrier_Store(header(), size);
« no previous file with comments | « components/tracing/core/trace_buffer_writer_unittest.cc ('k') | components/tracing/core/trace_ring_buffer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698