pub struct AuditTracer { /* private fields */ }Expand description
Writes one driver-lab instance’s audit records as trace events.
Implementations§
Source§impl AuditTracer
impl AuditTracer
Sourcepub fn new(node: &str, resources: &BTreeMap<ResourceId, MmioResource>) -> Self
pub fn new(node: &str, resources: &BTreeMap<ResourceId, MmioResource>) -> Self
Creates a tracer for the instance serving node that labels events
with the names of resources.
Sourcepub fn observer(self: &Arc<Self>) -> AuditObserver
pub fn observer(self: &Arc<Self>) -> AuditObserver
Returns an observer for
AuditRing::set_observer
that passes each appended record to Self::record.
Sourcepub fn record(&self, seq: Option<u64>, record: &AuditRecord)
pub fn record(&self, seq: Option<u64>, record: &AuditRecord)
Writes record as an instant event, followed by a counter sample if
it is a successful write. seq is the audit sequence number, or
None for events that were not appended to an audit ring.
Sourcepub fn interrupt(&self, resource: ResourceId, sequence: u64, timestamp_ns: i64)
pub fn interrupt(&self, resource: ResourceId, sequence: u64, timestamp_ns: i64)
Writes an interrupt_tap event for an interrupt observed outside
the audit ring, such as by the standalone proxy’s interrupt threads.
sequence is the per-resource interrupt sequence number.
Sourcepub fn counter(&self, resource: ResourceId, offset: u64, value: u32)
pub fn counter(&self, resource: ResourceId, offset: u64, value: u32)
Samples the counter series for offset on resource.
Successful host writes are sampled automatically. Drivers call this when they change a register or knob themselves, so driver and host changes share one counter track.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for AuditTracer
impl RefUnwindSafe for AuditTracer
impl Send for AuditTracer
impl Sync for AuditTracer
impl Unpin for AuditTracer
impl UnsafeUnpin for AuditTracer
impl UnwindSafe for AuditTracer
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
Source§impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
§impl<F, N> FidlIntoNative<Box<N>> for Fwhere
F: FidlIntoNative<N>,
impl<F, N> FidlIntoNative<Box<N>> for Fwhere
F: FidlIntoNative<N>,
fn fidl_into_native(self) -> Box<N>
§impl<T> InstanceFromServiceTransport<T> for T
impl<T> InstanceFromServiceTransport<T> for T
§fn from_service_transport(handle: T) -> T
fn from_service_transport(handle: T) -> T
T to [Self]§impl<T> IntoAny for T
impl<T> IntoAny for T
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more