pub fn get_record_identifier<T: ByteOrder>(
record_type: RecordType,
data: RawData<'_>,
sample_id_all: bool,
) -> Option<u64>
Expand description
Get the ID from an event record, if the sample format includes SampleFormat::IDENTIFIER.
This can be used if it is not known which perf_event_attr
describes this record,
but only if all potential attrs include PERF_SAMPLE_IDENTIFIER
.
Once the record’s ID is known, this ID can be mapped to the right attr,
and then the information from the attr can be used to parse the rest of this record.