pub struct PacketCounter { /* private fields */ }Expand description
A HandlePacket instance for counting Intel PT packets
Implementations§
Source§impl PacketCounter
impl PacketCounter
Sourcepub fn new() -> Self
pub fn new() -> Self
Create a new PacketCounter
Sourcepub fn packet_count(&self) -> usize
pub fn packet_count(&self) -> usize
Get the total packet count
Trait Implementations§
Source§impl Default for PacketCounter
impl Default for PacketCounter
Source§fn default() -> PacketCounter
fn default() -> PacketCounter
Returns the “default value” for a type. Read more
Source§impl HandlePacket for PacketCounter
impl HandlePacket for PacketCounter
Source§type Error = Infallible
type Error = Infallible
Custom error type
Source§fn at_decode_begin(&mut self) -> Result<(), Self::Error>
fn at_decode_begin(&mut self) -> Result<(), Self::Error>
Callback at begin of decoding. Read more
Source§fn on_short_tnt_packet(
&mut self,
_context: &DecoderContext,
_packet_byte: NonZero<u8>,
_highest_bit: u32,
) -> Result<(), Self::Error>
fn on_short_tnt_packet( &mut self, _context: &DecoderContext, _packet_byte: NonZero<u8>, _highest_bit: u32, ) -> Result<(), Self::Error>
Handle short TNT packet Read more
Source§fn on_long_tnt_packet(
&mut self,
_context: &DecoderContext,
_packet_bytes: NonZero<u64>,
_highest_bit: u32,
) -> Result<(), Self::Error>
fn on_long_tnt_packet( &mut self, _context: &DecoderContext, _packet_bytes: NonZero<u64>, _highest_bit: u32, ) -> Result<(), Self::Error>
Handle short TNT packet Read more
Source§fn on_tip_packet(
&mut self,
_context: &DecoderContext,
_ip_reconstruction_pattern: IpReconstructionPattern,
) -> Result<(), Self::Error>
fn on_tip_packet( &mut self, _context: &DecoderContext, _ip_reconstruction_pattern: IpReconstructionPattern, ) -> Result<(), Self::Error>
Handle TIP packet
Source§fn on_tip_pgd_packet(
&mut self,
_context: &DecoderContext,
_ip_reconstruction_pattern: IpReconstructionPattern,
) -> Result<(), Self::Error>
fn on_tip_pgd_packet( &mut self, _context: &DecoderContext, _ip_reconstruction_pattern: IpReconstructionPattern, ) -> Result<(), Self::Error>
Handle TIP.PGD packet
Source§fn on_tip_pge_packet(
&mut self,
_context: &DecoderContext,
_ip_reconstruction_pattern: IpReconstructionPattern,
) -> Result<(), Self::Error>
fn on_tip_pge_packet( &mut self, _context: &DecoderContext, _ip_reconstruction_pattern: IpReconstructionPattern, ) -> Result<(), Self::Error>
Handle TIP.PGE packet
Source§fn on_fup_packet(
&mut self,
_context: &DecoderContext,
_ip_reconstruction_pattern: IpReconstructionPattern,
) -> Result<(), Self::Error>
fn on_fup_packet( &mut self, _context: &DecoderContext, _ip_reconstruction_pattern: IpReconstructionPattern, ) -> Result<(), Self::Error>
Handle FUP packet
Source§fn on_pad_packet(
&mut self,
_context: &DecoderContext,
) -> Result<(), Self::Error>
fn on_pad_packet( &mut self, _context: &DecoderContext, ) -> Result<(), Self::Error>
Handle PAD packet
Source§fn on_cyc_packet(
&mut self,
_context: &DecoderContext,
_cyc_packet: &[u8],
) -> Result<(), Self::Error>
fn on_cyc_packet( &mut self, _context: &DecoderContext, _cyc_packet: &[u8], ) -> Result<(), Self::Error>
Handle CYC packet Read more
Source§fn on_mode_packet(
&mut self,
_context: &DecoderContext,
_leaf_id: u8,
_mode: u8,
) -> Result<(), Self::Error>
fn on_mode_packet( &mut self, _context: &DecoderContext, _leaf_id: u8, _mode: u8, ) -> Result<(), Self::Error>
Handle MODE packet Read more
Source§fn on_mtc_packet(
&mut self,
_context: &DecoderContext,
_ctc_payload: u8,
) -> Result<(), Self::Error>
fn on_mtc_packet( &mut self, _context: &DecoderContext, _ctc_payload: u8, ) -> Result<(), Self::Error>
Handle MTC packet Read more
Source§fn on_tsc_packet(
&mut self,
_context: &DecoderContext,
_tsc_value: u64,
) -> Result<(), Self::Error>
fn on_tsc_packet( &mut self, _context: &DecoderContext, _tsc_value: u64, ) -> Result<(), Self::Error>
Handle TSC packet Read more
Source§fn on_cbr_packet(
&mut self,
_context: &DecoderContext,
_core_bus_ratio: u8,
) -> Result<(), Self::Error>
fn on_cbr_packet( &mut self, _context: &DecoderContext, _core_bus_ratio: u8, ) -> Result<(), Self::Error>
Handle CBR packet Read more
Source§fn on_tma_packet(
&mut self,
_context: &DecoderContext,
_ctc: u16,
_fast_counter: u8,
_fc8: bool,
) -> Result<(), Self::Error>
fn on_tma_packet( &mut self, _context: &DecoderContext, _ctc: u16, _fast_counter: u8, _fc8: bool, ) -> Result<(), Self::Error>
Handle TMA packet Read more
Source§fn on_vmcs_packet(
&mut self,
_context: &DecoderContext,
_vmcs_pointer: u64,
) -> Result<(), Self::Error>
fn on_vmcs_packet( &mut self, _context: &DecoderContext, _vmcs_pointer: u64, ) -> Result<(), Self::Error>
Handle VMCS packet Read more
Source§fn on_ovf_packet(
&mut self,
_context: &DecoderContext,
) -> Result<(), Self::Error>
fn on_ovf_packet( &mut self, _context: &DecoderContext, ) -> Result<(), Self::Error>
Handle OVF packet
Source§fn on_psb_packet(
&mut self,
_context: &DecoderContext,
) -> Result<(), Self::Error>
fn on_psb_packet( &mut self, _context: &DecoderContext, ) -> Result<(), Self::Error>
Handle PSB packet
Source§fn on_psbend_packet(
&mut self,
_context: &DecoderContext,
) -> Result<(), Self::Error>
fn on_psbend_packet( &mut self, _context: &DecoderContext, ) -> Result<(), Self::Error>
Handle PSBEND packet
Source§fn on_trace_stop_packet(
&mut self,
_context: &DecoderContext,
) -> Result<(), Self::Error>
fn on_trace_stop_packet( &mut self, _context: &DecoderContext, ) -> Result<(), Self::Error>
Handle TraceStop packet
Source§fn on_pip_packet(
&mut self,
_context: &DecoderContext,
_cr3: u64,
_rsvd_nr: bool,
) -> Result<(), Self::Error>
fn on_pip_packet( &mut self, _context: &DecoderContext, _cr3: u64, _rsvd_nr: bool, ) -> Result<(), Self::Error>
Handle PIP packet Read more
Source§fn on_mnt_packet(
&mut self,
_context: &DecoderContext,
_payload: u64,
) -> Result<(), Self::Error>
fn on_mnt_packet( &mut self, _context: &DecoderContext, _payload: u64, ) -> Result<(), Self::Error>
Handle MNT packet Read more
Source§fn on_ptw_packet(
&mut self,
_context: &DecoderContext,
_ip_bit: bool,
_payload: PtwPayload,
) -> Result<(), Self::Error>
fn on_ptw_packet( &mut self, _context: &DecoderContext, _ip_bit: bool, _payload: PtwPayload, ) -> Result<(), Self::Error>
Handle PTW packet Read more
Source§fn on_exstop_packet(
&mut self,
_context: &DecoderContext,
_ip_bit: bool,
) -> Result<(), Self::Error>
fn on_exstop_packet( &mut self, _context: &DecoderContext, _ip_bit: bool, ) -> Result<(), Self::Error>
Handle EXSTOP packet Read more
Source§fn on_mwait_packet(
&mut self,
_context: &DecoderContext,
_mwait_hints: u8,
_ext: u8,
) -> Result<(), Self::Error>
fn on_mwait_packet( &mut self, _context: &DecoderContext, _mwait_hints: u8, _ext: u8, ) -> Result<(), Self::Error>
Handle MWAIT packet Read more
Source§fn on_pwre_packet(
&mut self,
_context: &DecoderContext,
_hw: bool,
_resolved_thread_c_state: u8,
_resolved_thread_sub_c_state: u8,
) -> Result<(), Self::Error>
fn on_pwre_packet( &mut self, _context: &DecoderContext, _hw: bool, _resolved_thread_c_state: u8, _resolved_thread_sub_c_state: u8, ) -> Result<(), Self::Error>
Handle PWRE packet Read more
Source§fn on_pwrx_packet(
&mut self,
_context: &DecoderContext,
_last_core_c_state: u8,
_deepest_core_c_state: u8,
_wake_reason: u8,
) -> Result<(), Self::Error>
fn on_pwrx_packet( &mut self, _context: &DecoderContext, _last_core_c_state: u8, _deepest_core_c_state: u8, _wake_reason: u8, ) -> Result<(), Self::Error>
Handle PWRX packet Read more
Source§fn on_evd_packet(
&mut self,
_context: &DecoderContext,
_type: u8,
_payload: u64,
) -> Result<(), Self::Error>
fn on_evd_packet( &mut self, _context: &DecoderContext, _type: u8, _payload: u64, ) -> Result<(), Self::Error>
Handle EVD packet Read more
Source§fn on_cfe_packet(
&mut self,
_context: &DecoderContext,
_ip_bit: bool,
_type: u8,
_vector: u8,
) -> Result<(), Self::Error>
fn on_cfe_packet( &mut self, _context: &DecoderContext, _ip_bit: bool, _type: u8, _vector: u8, ) -> Result<(), Self::Error>
Handle CFE packet Read more
Source§fn on_bbp_packet(
&mut self,
_context: &DecoderContext,
_sz_bit: bool,
_type: u8,
) -> Result<(), Self::Error>
fn on_bbp_packet( &mut self, _context: &DecoderContext, _sz_bit: bool, _type: u8, ) -> Result<(), Self::Error>
Handle BBP packet Read more
Source§fn on_bep_packet(
&mut self,
_context: &DecoderContext,
_ip_bit: bool,
) -> Result<(), Self::Error>
fn on_bep_packet( &mut self, _context: &DecoderContext, _ip_bit: bool, ) -> Result<(), Self::Error>
Handle BEP packet Read more
Auto Trait Implementations§
impl Freeze for PacketCounter
impl RefUnwindSafe for PacketCounter
impl Send for PacketCounter
impl Sync for PacketCounter
impl Unpin for PacketCounter
impl UnwindSafe for PacketCounter
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