Struct linux_perf_data::AttributeDescription
source · [−]pub struct AttributeDescription {
pub attr: PerfEventAttr,
pub name: Option<String>,
pub event_ids: Vec<u64>,
}Expand description
A single event attr with name and corresponding event IDs.
Fields
attr: PerfEventAttrname: Option<String>event_ids: Vec<u64>Implementations
sourceimpl AttributeDescription
impl AttributeDescription
sourcepub fn parse_event_desc_section<R: Read, T: ByteOrder>(
reader: R
) -> Result<Vec<Self>, Error>
pub fn parse_event_desc_section<R: Read, T: ByteOrder>(
reader: R
) -> Result<Vec<Self>, Error>
Parse the HEADER_EVENT_DESC section into a Vec of AttributeDescription structs.
sourcepub fn parse_event_types_section<C: Read + Seek, T: ByteOrder>(
cursor: C,
event_types_section: &PerfFileSection,
attr_size: u64
) -> Result<Vec<Self>, Error>
pub fn parse_event_types_section<C: Read + Seek, T: ByteOrder>(
cursor: C,
event_types_section: &PerfFileSection,
attr_size: u64
) -> Result<Vec<Self>, Error>
Parse the event_types section into a Vec of AttributeDescription structs. This section was used in the past but is no longer used. Only call this function if event_types_section.size is non-zero.
sourcepub fn parse_attr_section<C: Read + Seek, T: ByteOrder>(
cursor: C,
attr_section: &PerfFileSection,
attr_size: u64
) -> Result<Vec<Self>, Error>
pub fn parse_attr_section<C: Read + Seek, T: ByteOrder>(
cursor: C,
attr_section: &PerfFileSection,
attr_size: u64
) -> Result<Vec<Self>, Error>
Parse the attr section into a Vec of AttributeDescription structs. This section is used as a last resort because it does not have any information about event IDs. If multiple events are observed, we will not be able to know which event record belongs to which attr.
Trait Implementations
sourceimpl Clone for AttributeDescription
impl Clone for AttributeDescription
sourcefn clone(&self) -> AttributeDescription
fn clone(&self) -> AttributeDescription
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more
Auto Trait Implementations
impl RefUnwindSafe for AttributeDescription
impl Send for AttributeDescription
impl Sync for AttributeDescription
impl Unpin for AttributeDescription
impl UnwindSafe for AttributeDescription
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. Read more