class Delegate

Defined at line 49 of file ../../third_party/perfetto/include/perfetto/protozero/scattered_stream_writer.h

Public Members

static const size_t kPatchSize

Public Methods

void ~Delegate ()
ContiguousMemoryRange GetNewBuffer ()

Returns a new chunk for writing.

uint8_t * AnnotatePatch (uint8_t * patch_addr)

Signals the delegate that the location pointed by `to_patch` (which must

be in the last chunk returned by GetNewBuffer()), kPatchSize long, needs

to be updated later (after potentially multiple GetNewBuffer calls).

The caller must write to the returned location later. If the returned

pointer is nullptr, the caller should not write anything.

The implementation considers the patch ready to apply when the caller

writes the first byte a value that's different than 0 (the

implementation periodically checks for this).