| 1 |
#[cfg(feature = "Win32_Foundation")] |
| 2 |
::windows_targets::link!("kernel32.dll" "system" #[doc = "Required features: `\"Win32_Foundation\"`"] fn DisableThreadProfiling(performancedatahandle : super::super::super::Foundation:: HANDLE) -> u32); |
| 3 |
#[cfg(feature = "Win32_Foundation")] |
| 4 |
::windows_targets::link!("kernel32.dll" "system" #[doc = "Required features: `\"Win32_Foundation\"`"] fn EnableThreadProfiling(threadhandle : super::super::super::Foundation:: HANDLE, flags : u32, hardwarecounters : u64, performancedatahandle : *mut super::super::super::Foundation:: HANDLE) -> u32); |
| 5 |
#[cfg(feature = "Win32_Foundation")] |
| 6 |
::windows_targets::link!("kernel32.dll" "system" #[doc = "Required features: `\"Win32_Foundation\"`"] fn QueryThreadProfiling(threadhandle : super::super::super::Foundation:: HANDLE, enabled : *mut super::super::super::Foundation:: BOOLEAN) -> u32); |
| 7 |
#[cfg(feature = "Win32_Foundation")] |
| 8 |
::windows_targets::link!("kernel32.dll" "system" #[doc = "Required features: `\"Win32_Foundation\"`"] fn ReadThreadProfilingData(performancedatahandle : super::super::super::Foundation:: HANDLE, flags : u32, performancedata : *mut PERFORMANCE_DATA) -> u32); |
| 9 |
pub const MaxHardwareCounterType: HARDWARE_COUNTER_TYPE = 1i32; |
| 10 |
pub const PMCCounter: HARDWARE_COUNTER_TYPE = 0i32; |
| 11 |
pub type HARDWARE_COUNTER_TYPE = i32; |
| 12 |
#[repr(C)] |
| 13 |
pub struct HARDWARE_COUNTER_DATA { |
| 14 |
pub Type: HARDWARE_COUNTER_TYPE, |
| 15 |
pub Reserved: u32, |
| 16 |
pub Value: u64, |
| 17 |
} |
| 18 |
impl ::core::marker::Copy for HARDWARE_COUNTER_DATA {} |
| 19 |
impl ::core::clone::Clone for HARDWARE_COUNTER_DATA { |
| 20 |
fn clone(&self) -> Self { |
| 21 |
*self |
| 22 |
} |
| 23 |
} |
| 24 |
#[repr(C)] |
| 25 |
pub struct PERFORMANCE_DATA { |
| 26 |
pub Size: u16, |
| 27 |
pub Version: u8, |
| 28 |
pub HwCountersCount: u8, |
| 29 |
pub ContextSwitchCount: u32, |
| 30 |
pub WaitReasonBitMap: u64, |
| 31 |
pub CycleTime: u64, |
| 32 |
pub RetryCount: u32, |
| 33 |
pub Reserved: u32, |
| 34 |
pub HwCounters: [HARDWARE_COUNTER_DATA; 16], |
| 35 |
} |
| 36 |
impl ::core::marker::Copy for PERFORMANCE_DATA {} |
| 37 |
impl ::core::clone::Clone for PERFORMANCE_DATA { |
| 38 |
fn clone(&self) -> Self { |
| 39 |
*self |
| 40 |
} |
| 41 |
} |