pub struct CSwitchEtwEvent {
pub new_thread_id: Option<u32>,
pub old_thread_id: Option<u32>,
pub new_thread_priority: Option<i32>,
pub old_thread_priority: Option<i32>,
pub previous_c_state: Option<u32>,
pub old_thread_wait_reason: Option<i32>,
pub old_thread_wait_mode: Option<i32>,
pub old_thread_state: Option<i32>,
pub old_thread_wait_ideal_processor: Option<i32>,
pub new_thread_wait_time: Option<u32>,
}
Expand description
Proto definition based on the Thread_v2 CSwitch class definition See: https://learn.microsoft.com/en-us/windows/win32/etw/cswitch
Fields§
§new_thread_id: Option<u32>
New thread ID after the switch.
old_thread_id: Option<u32>
Previous thread ID.
new_thread_priority: Option<i32>
Thread priority of the new thread.
old_thread_priority: Option<i32>
Thread priority of the previous thread.
previous_c_state: Option<u32>
The index of the C-state that was last used by the processor. A value of 0 represents the lightest idle state with higher values representing deeper C-states.
old_thread_wait_reason: Option<i32>
§old_thread_wait_mode: Option<i32>
§old_thread_state: Option<i32>
§old_thread_wait_ideal_processor: Option<i32>
Ideal wait time of the previous thread.
new_thread_wait_time: Option<u32>
Wait time for the new thread.
Implementations§
Source§impl CSwitchEtwEvent
impl CSwitchEtwEvent
Sourcepub fn new_thread_id(&self) -> u32
pub fn new_thread_id(&self) -> u32
Returns the value of new_thread_id
, or the default value if new_thread_id
is unset.
Sourcepub fn old_thread_id(&self) -> u32
pub fn old_thread_id(&self) -> u32
Returns the value of old_thread_id
, or the default value if old_thread_id
is unset.
Sourcepub fn new_thread_priority(&self) -> i32
pub fn new_thread_priority(&self) -> i32
Returns the value of new_thread_priority
, or the default value if new_thread_priority
is unset.
Sourcepub fn old_thread_priority(&self) -> i32
pub fn old_thread_priority(&self) -> i32
Returns the value of old_thread_priority
, or the default value if old_thread_priority
is unset.
Sourcepub fn previous_c_state(&self) -> u32
pub fn previous_c_state(&self) -> u32
Returns the value of previous_c_state
, or the default value if previous_c_state
is unset.
Sourcepub fn old_thread_wait_reason(&self) -> OldThreadWaitReason
pub fn old_thread_wait_reason(&self) -> OldThreadWaitReason
Returns the enum value of old_thread_wait_reason
, or the default if the field is unset or set to an invalid enum value.
Sourcepub fn set_old_thread_wait_reason(&mut self, value: OldThreadWaitReason)
pub fn set_old_thread_wait_reason(&mut self, value: OldThreadWaitReason)
Sets old_thread_wait_reason
to the provided enum value.
Sourcepub fn old_thread_wait_mode(&self) -> OldThreadWaitMode
pub fn old_thread_wait_mode(&self) -> OldThreadWaitMode
Returns the enum value of old_thread_wait_mode
, or the default if the field is unset or set to an invalid enum value.
Sourcepub fn set_old_thread_wait_mode(&mut self, value: OldThreadWaitMode)
pub fn set_old_thread_wait_mode(&mut self, value: OldThreadWaitMode)
Sets old_thread_wait_mode
to the provided enum value.
Sourcepub fn old_thread_state(&self) -> OldThreadState
pub fn old_thread_state(&self) -> OldThreadState
Returns the enum value of old_thread_state
, or the default if the field is unset or set to an invalid enum value.
Sourcepub fn set_old_thread_state(&mut self, value: OldThreadState)
pub fn set_old_thread_state(&mut self, value: OldThreadState)
Sets old_thread_state
to the provided enum value.
Sourcepub fn old_thread_wait_ideal_processor(&self) -> i32
pub fn old_thread_wait_ideal_processor(&self) -> i32
Returns the value of old_thread_wait_ideal_processor
, or the default value if old_thread_wait_ideal_processor
is unset.
Sourcepub fn new_thread_wait_time(&self) -> u32
pub fn new_thread_wait_time(&self) -> u32
Returns the value of new_thread_wait_time
, or the default value if new_thread_wait_time
is unset.
Trait Implementations§
Source§impl Clone for CSwitchEtwEvent
impl Clone for CSwitchEtwEvent
Source§fn clone(&self) -> CSwitchEtwEvent
fn clone(&self) -> CSwitchEtwEvent
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for CSwitchEtwEvent
impl Debug for CSwitchEtwEvent
Source§impl Default for CSwitchEtwEvent
impl Default for CSwitchEtwEvent
Source§impl Message for CSwitchEtwEvent
impl Message for CSwitchEtwEvent
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Source§fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>
fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>
Source§fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
Source§fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>
fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
Source§fn decode<B>(buf: B) -> Result<Self, DecodeError>
fn decode<B>(buf: B) -> Result<Self, DecodeError>
Source§fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>
fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>
Source§fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>
fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>
self
. Read moreSource§fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>
fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>
self
.