Descriptiontracing v2: Introduce TraceBufferWriter
TraceBufferWriter is the main building block that allows writing
events into the trace ring buffer. TBW is responsible of exchanging
chunks with the ring buffer and carving out events out of them.
The expected design is 1 TraceBufferWriter per thread (% very special
cases like worker pools which don't have a message loop).
The major challenge is represented by the fact that events can spread
over several chunks. TBW is responsible of owning chunks for the
all lifetime of the event, and returning them as soon as the event
is finalized.
In the next CLs:
- This code will be properly integrated with the stubs generated by
the protozero protoc compiler plugin.
- The actual event.proto will be introduced, and TBW::AddEvent will
return a more structured object other than just a ProtoZeroMessage.
BUG=608719
TEST=TraceBufferWriterTest.*
Committed: https://crrev.com/9cc78e4aea540c6eba8655d8557b068bde423152
Cr-Commit-Position: refs/heads/master@{#410669}
Patch Set 1 #Patch Set 2 : . #
Total comments: 18
Patch Set 3 : alph review #Patch Set 4 : Add TRACING_EXPORT also to nested class #
Total comments: 12
Patch Set 5 : oysteine review + rebase #Patch Set 6 : Fix linking errors moving kChunkSize outside of exported class #Messages
Total messages: 38 (24 generated)
|