pub struct PerfRecordIter<R: Read> { /* private fields */ }Expand description
An iterator which incrementally reads and sorts the records from a perf.data file.
Implementations§
Source§impl<R: Read> PerfRecordIter<R>
impl<R: Read> PerfRecordIter<R>
Sourcepub fn next_record(
&mut self,
_perf_file: &mut PerfFile,
) -> Result<Option<PerfFileRecord<'_>>, Error>
pub fn next_record( &mut self, _perf_file: &mut PerfFile, ) -> Result<Option<PerfFileRecord<'_>>, Error>
Iterates the records in this file. The records are mostly emitted in the correct order, i.e. sorted by time.
next_record does some internal buffering so that the sort order can
be guaranteed. This buffering takes advantage of FINISHED_ROUND
records so that we don’t buffer more records than necessary.
However, FINISHED_ROUND records are only emitted by Linux perf, not
by Android simpleperf. When reading simpleperf files, the following
caveats apply:
MMAP/MMAP2records can appear out-of-order and with non-sensical timestamps.- Other records can, in very rare cases, appear out-of-order if they were originally emitted by different CPUs.
Auto Trait Implementations§
impl<R> Freeze for PerfRecordIter<R>where
R: Freeze,
impl<R> RefUnwindSafe for PerfRecordIter<R>where
R: RefUnwindSafe,
impl<R> Send for PerfRecordIter<R>where
R: Send,
impl<R> Sync for PerfRecordIter<R>where
R: Sync,
impl<R> Unpin for PerfRecordIter<R>where
R: Unpin,
impl<R> UnsafeUnpin for PerfRecordIter<R>where
R: UnsafeUnpin,
impl<R> UnwindSafe for PerfRecordIter<R>where
R: UnwindSafe,
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