#[non_exhaustive]pub enum Record<'a> {
Show 22 variants
Mmap(Mmap<'a>),
Lost(Lost),
Comm(Comm<'a>),
Exit(Exit),
Throttle(Throttle),
Unthrottle(Throttle),
Fork(Fork),
Read(Read),
Sample(Box<Sample<'a>>),
Mmap2(Mmap2<'a>),
Aux(Aux),
ITraceStart(ITraceStart),
LostSamples(LostSamples),
Switch,
SwitchCpuWide(SwitchCpuWide),
Namespaces(Namespaces<'a>),
KSymbol(KSymbol<'a>),
BpfEvent(BpfEvent),
CGroup(CGroup<'a>),
TextPoke(TextPoke<'a>),
AuxOutputHwId(AuxOutputHwId),
Unknown {
ty: u32,
data: Cow<'a, [u8]>,
},
}
Expand description
A record emitted by the linux kernel.
This enum contains every supported record type emitted by the kernel. Depending on how the perf event counter was configured only a few of these will be emitted by any one counter.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Mmap(Mmap<'a>)
Lost(Lost)
Comm(Comm<'a>)
Exit(Exit)
Throttle(Throttle)
Unthrottle(Throttle)
Fork(Fork)
Read(Read)
Sample(Box<Sample<'a>>)
Mmap2(Mmap2<'a>)
Aux(Aux)
ITraceStart(ITraceStart)
LostSamples(LostSamples)
Switch
SwitchCpuWide(SwitchCpuWide)
Namespaces(Namespaces<'a>)
KSymbol(KSymbol<'a>)
BpfEvent(BpfEvent)
CGroup(CGroup<'a>)
TextPoke(TextPoke<'a>)
AuxOutputHwId(AuxOutputHwId)
Unknown
A record type that is unknown to this crate.
Note that just because a record is parsed as unknown in one release of this crate does not mean it will continue to be parsed in future releases. Adding a new variant to this enum is not considered to be a breaking change.
If you find yourself using the unknown variant to parse valid records emitted by the kernel please file an issue or create a PR to add support for them.
Implementations§
Source§impl<'p> Record<'p>
impl<'p> Record<'p>
Sourcepub fn parse_with_header<B, E>(
p: &mut Parser<B, E>,
header: perf_event_header,
) -> ParseResult<Self>
pub fn parse_with_header<B, E>( p: &mut Parser<B, E>, header: perf_event_header, ) -> ParseResult<Self>
Parse a Record
using a perf_event_header
that has already been
parsed.
Trait Implementations§
Source§impl<'a> From<AuxOutputHwId> for Record<'a>
impl<'a> From<AuxOutputHwId> for Record<'a>
Source§fn from(value: AuxOutputHwId) -> Self
fn from(value: AuxOutputHwId) -> Self
Converts to this type from the input type.
Source§impl<'a> From<ITraceStart> for Record<'a>
impl<'a> From<ITraceStart> for Record<'a>
Source§fn from(value: ITraceStart) -> Self
fn from(value: ITraceStart) -> Self
Converts to this type from the input type.
Source§impl<'a> From<LostSamples> for Record<'a>
impl<'a> From<LostSamples> for Record<'a>
Source§fn from(value: LostSamples) -> Self
fn from(value: LostSamples) -> Self
Converts to this type from the input type.
Source§impl<'a> From<Namespaces<'a>> for Record<'a>
impl<'a> From<Namespaces<'a>> for Record<'a>
Source§fn from(value: Namespaces<'a>) -> Self
fn from(value: Namespaces<'a>) -> Self
Converts to this type from the input type.
Source§impl<'a> From<SwitchCpuWide> for Record<'a>
impl<'a> From<SwitchCpuWide> for Record<'a>
Source§fn from(value: SwitchCpuWide) -> Self
fn from(value: SwitchCpuWide) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl<'a> Freeze for Record<'a>
impl<'a> RefUnwindSafe for Record<'a>
impl<'a> Send for Record<'a>
impl<'a> Sync for Record<'a>
impl<'a> Unpin for Record<'a>
impl<'a> UnwindSafe for Record<'a>
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
Mutably borrows from an owned value. Read more