Skip to main content

Crate percpu_writer_bindings

Crate percpu_writer_bindings 

Source
Expand description

Rust bindings and methods for percpu_writer dropped-record tracking structures.

Structsยง

DroppedRecordDurationEvent
This is the structure of the FXT duration event that will store dropped record metadata in the trace buffer. Normally, we would use the FXT serialization functions to build this record dynamically, but we cannot do this in the PerCpuBuffer because those functions invoke writer->Reserve, which would lead to recursion. To avoid this, we serialize the record manually using this struct, which in turn is set up to match the structure outlined in the FXT spec: https://fuchsia.dev/fuchsia-src/reference/tracing/trace-format#event-record
DroppedRecordStats
This struct keeps track of the duration, number, and size of trace records dropped when the buffer is full. These statistics are emitted to the trace buffer as a duration as soon as space is available to do so, at which point the values are reset to 0, or false in the case of has_dropped.