#include <ntddk.h>
#include "fx.hpp"
Go to the source code of this file.
|
__inline VOID | VerifyIrqlEntry (__out KIRQL *Irql) |
|
__inline VOID | VerifyIrqlExit (__in PWDF_DRIVER_GLOBALS DriverGlobals, __in KIRQL PrevIrql) |
|
__inline VOID | VerifyCriticalRegionEntry (__out BOOLEAN *CritRegion) |
|
__inline VOID | VerifyCriticalRegionExit (__in PWDF_DRIVER_GLOBALS DriverGlobals, __in BOOLEAN OldCritRegion, __in PVOID Pfn) |
|
FORCEINLINE VOID | PerformanceAnalysisIOProcess (__in PFX_DRIVER_GLOBALS pFxDriverGlobals, __in WDFREQUEST Handle, __out FxRequest **ppReq, __inout GUID *pActivityId) |
|
FORCEINLINE BOOLEAN | PerfIoStart (__in WDFREQUEST Handle) |
|
FORCEINLINE BOOLEAN | PerfIoComplete (__in WDFREQUEST Handle) |
|
FORCEINLINE PFN_WDF_DRIVER_DEVICE_ADD | PerformanceGetDriverDeviceAdd (__in WDFOBJECT Handle) |
|
__inline BOOLEAN | PerfEvtDeviceD0EntryStart (__in WDFDEVICE Handle, __inout GUID *pActivityId) |
|
__inline VOID | PerfEvtDeviceD0EntryStop (__in WDFDEVICE Handle, __in GUID *pActivityId) |
|
__inline BOOLEAN | PerfEvtDeviceD0ExitStart (__in WDFDEVICE Handle, __inout GUID *pActivityId) |
|
__inline VOID | PerfEvtDeviceD0ExitStop (__in WDFDEVICE Handle, __in GUID *pActivityId) |
|
__inline BOOLEAN | PerfEvtDevicePrepareHardwareStart (__in WDFDEVICE Handle, __inout GUID *pActivityId) |
|
__inline VOID | PerfEvtDevicePrepareHardwareStop (__in WDFDEVICE Handle, __in GUID *pActivityId) |
|
__inline BOOLEAN | PerfEvtDeviceReleaseHardwareStart (__in WDFDEVICE Handle, __inout GUID *pActivityId) |
|
__inline VOID | PerfEvtDeviceReleaseHardwareStop (__in WDFDEVICE Handle, __in GUID *pActivityId) |
|
__inline BOOLEAN | PerfEvtIoStopStart (__in WDFQUEUE Queue, __inout GUID *pActivityId) |
|
__inline VOID | PerfEvtIoStopStop (__in WDFQUEUE Queue, __in GUID *pActivityId) |
|
◆ PerfEvtDeviceD0EntryStart()
Definition at line 184 of file vfprivkm.hpp.
197 EventWriteFX_POWER_D0_ENTRY_START(pActivityId, pDriverDeviceAdd,
Handle);
EVT_WDF_DRIVER_DEVICE_ADD * PFN_WDF_DRIVER_DEVICE_ADD
#define EVENT_ACTIVITY_CTRL_CREATE_ID
PFX_DRIVER_GLOBALS pFxDriverGlobals
__inline PFX_DRIVER_GLOBALS GetDriverGlobals(VOID)
static FxObject * _GetObjectFromHandle(__in WDFOBJECT Handle, __inout PWDFOBJECT_OFFSET ObjectOffset)
__inline PFN_WDF_DRIVER_DEVICE_ADD GetDriverDeviceAddMethod()
static SERVICE_STATUS status
__inline BOOLEAN IsFxPerformanceAnalysis(__in PFX_DRIVER_GLOBALS FxDriverGlobals)
Referenced by VfEvtDeviceD0Entry().
◆ PerfEvtDeviceD0EntryStop()
__inline VOID PerfEvtDeviceD0EntryStop |
( |
__in WDFDEVICE |
Handle, |
|
|
__in GUID * |
pActivityId |
|
) |
| |
◆ PerfEvtDeviceD0ExitStart()
Definition at line 215 of file vfprivkm.hpp.
228 EventWriteFX_POWER_D0_EXIT_START(pActivityId, pDriverDeviceAdd,
Handle);
EVT_WDF_DRIVER_DEVICE_ADD * PFN_WDF_DRIVER_DEVICE_ADD
#define EVENT_ACTIVITY_CTRL_CREATE_ID
PFX_DRIVER_GLOBALS pFxDriverGlobals
__inline PFX_DRIVER_GLOBALS GetDriverGlobals(VOID)
static FxObject * _GetObjectFromHandle(__in WDFOBJECT Handle, __inout PWDFOBJECT_OFFSET ObjectOffset)
__inline PFN_WDF_DRIVER_DEVICE_ADD GetDriverDeviceAddMethod()
static SERVICE_STATUS status
__inline BOOLEAN IsFxPerformanceAnalysis(__in PFX_DRIVER_GLOBALS FxDriverGlobals)
Referenced by VfEvtDeviceD0Exit().
◆ PerfEvtDeviceD0ExitStop()
__inline VOID PerfEvtDeviceD0ExitStop |
( |
__in WDFDEVICE |
Handle, |
|
|
__in GUID * |
pActivityId |
|
) |
| |
Definition at line 235 of file vfprivkm.hpp.
FORCEINLINE PFN_WDF_DRIVER_DEVICE_ADD PerformanceGetDriverDeviceAdd(__in WDFOBJECT Handle)
Referenced by VfEvtDeviceD0Exit().
◆ PerfEvtDevicePrepareHardwareStart()
Definition at line 245 of file vfprivkm.hpp.
259 EventWriteFX_POWER_HW_PREPARE_START(pActivityId, pDriverDeviceAdd,
Handle);
EVT_WDF_DRIVER_DEVICE_ADD * PFN_WDF_DRIVER_DEVICE_ADD
#define EVENT_ACTIVITY_CTRL_CREATE_ID
PFX_DRIVER_GLOBALS pFxDriverGlobals
__inline PFX_DRIVER_GLOBALS GetDriverGlobals(VOID)
static FxObject * _GetObjectFromHandle(__in WDFOBJECT Handle, __inout PWDFOBJECT_OFFSET ObjectOffset)
__inline PFN_WDF_DRIVER_DEVICE_ADD GetDriverDeviceAddMethod()
static SERVICE_STATUS status
__inline BOOLEAN IsFxPerformanceAnalysis(__in PFX_DRIVER_GLOBALS FxDriverGlobals)
Referenced by VfEvtDevicePrepareHardware().
◆ PerfEvtDevicePrepareHardwareStop()
__inline VOID PerfEvtDevicePrepareHardwareStop |
( |
__in WDFDEVICE |
Handle, |
|
|
__in GUID * |
pActivityId |
|
) |
| |
◆ PerfEvtDeviceReleaseHardwareStart()
Definition at line 276 of file vfprivkm.hpp.
289 EventWriteFX_POWER_HW_RELEASE_START(pActivityId, pDriverDeviceAdd,
Handle);
EVT_WDF_DRIVER_DEVICE_ADD * PFN_WDF_DRIVER_DEVICE_ADD
#define EVENT_ACTIVITY_CTRL_CREATE_ID
PFX_DRIVER_GLOBALS pFxDriverGlobals
__inline PFX_DRIVER_GLOBALS GetDriverGlobals(VOID)
static FxObject * _GetObjectFromHandle(__in WDFOBJECT Handle, __inout PWDFOBJECT_OFFSET ObjectOffset)
__inline PFN_WDF_DRIVER_DEVICE_ADD GetDriverDeviceAddMethod()
static SERVICE_STATUS status
__inline BOOLEAN IsFxPerformanceAnalysis(__in PFX_DRIVER_GLOBALS FxDriverGlobals)
Referenced by VfEvtDeviceReleaseHardware().
◆ PerfEvtDeviceReleaseHardwareStop()
__inline VOID PerfEvtDeviceReleaseHardwareStop |
( |
__in WDFDEVICE |
Handle, |
|
|
__in GUID * |
pActivityId |
|
) |
| |
◆ PerfEvtIoStopStart()
Definition at line 307 of file vfprivkm.hpp.
329 EventWriteFX_EVTIOSTOP_START(pActivityId, pDriverDeviceAdd,
device);
WDFDEVICE __inline GetHandle(VOID)
_Must_inspect_result_ _In_ WDFDEVICE _In_ PIRP _In_ WDFQUEUE Queue
EVT_WDF_DRIVER_DEVICE_ADD * PFN_WDF_DRIVER_DEVICE_ADD
FxObjectHandleGetPtr(GetFxDriverGlobals(DriverGlobals), Fdo, FX_TYPE_DEVICE,(PVOID *)&pFdo)
#define EVENT_ACTIVITY_CTRL_CREATE_ID
PFX_DRIVER_GLOBALS pFxDriverGlobals
__inline PFX_DRIVER_GLOBALS GetDriverGlobals(VOID)
static FxObject * _GetObjectFromHandle(__in WDFOBJECT Handle, __inout PWDFOBJECT_OFFSET ObjectOffset)
__inline CfxDevice * GetDevice(VOID)
__inline PFN_WDF_DRIVER_DEVICE_ADD GetDriverDeviceAddMethod()
static SERVICE_STATUS status
__inline BOOLEAN IsFxPerformanceAnalysis(__in PFX_DRIVER_GLOBALS FxDriverGlobals)
Referenced by VfEvtIoStop().
◆ PerfEvtIoStopStop()
__inline VOID PerfEvtIoStopStop |
( |
__in WDFQUEUE |
Queue, |
|
|
__in GUID * |
pActivityId |
|
) |
| |
Definition at line 337 of file vfprivkm.hpp.
356 EventWriteFX_EVTIOSTOP_STOP(pActivityId, pDriverDeviceAdd,
device);
WDFDEVICE __inline GetHandle(VOID)
_Must_inspect_result_ _In_ WDFDEVICE _In_ PIRP _In_ WDFQUEUE Queue
EVT_WDF_DRIVER_DEVICE_ADD * PFN_WDF_DRIVER_DEVICE_ADD
FxObjectHandleGetPtr(GetFxDriverGlobals(DriverGlobals), Fdo, FX_TYPE_DEVICE,(PVOID *)&pFdo)
PFX_DRIVER_GLOBALS pFxDriverGlobals
__inline PFX_DRIVER_GLOBALS GetDriverGlobals(VOID)
static FxObject * _GetObjectFromHandle(__in WDFOBJECT Handle, __inout PWDFOBJECT_OFFSET ObjectOffset)
__inline CfxDevice * GetDevice(VOID)
__inline PFN_WDF_DRIVER_DEVICE_ADD GetDriverDeviceAddMethod()
Referenced by VfEvtIoStop().
◆ PerfIoComplete()
Definition at line 145 of file vfprivkm.hpp.
150 GUID activityId = { 0 };
WDFDEVICE __inline GetHandle(VOID)
EVT_WDF_DRIVER_DEVICE_ADD * PFN_WDF_DRIVER_DEVICE_ADD
_Must_inspect_result_ FxIoQueue * GetCurrentQueue(VOID)
FORCEINLINE VOID PerformanceAnalysisIOProcess(__in PFX_DRIVER_GLOBALS pFxDriverGlobals, __in WDFREQUEST Handle, __out FxRequest **ppReq, __inout GUID *pActivityId)
PFX_DRIVER_GLOBALS pFxDriverGlobals
__inline PFX_DRIVER_GLOBALS GetDriverGlobals(VOID)
static FxObject * _GetObjectFromHandle(__in WDFOBJECT Handle, __inout PWDFOBJECT_OFFSET ObjectOffset)
__inline CfxDevice * GetDevice(VOID)
UCHAR GetMajorFunction(VOID)
__inline PFN_WDF_DRIVER_DEVICE_ADD GetDriverDeviceAddMethod()
static SERVICE_STATUS status
__inline BOOLEAN IsFxPerformanceAnalysis(__in PFX_DRIVER_GLOBALS FxDriverGlobals)
◆ PerfIoStart()
Definition at line 119 of file vfprivkm.hpp.
124 GUID activityId = { 0 };
WDFDEVICE __inline GetHandle(VOID)
EVT_WDF_DRIVER_DEVICE_ADD * PFN_WDF_DRIVER_DEVICE_ADD
_Must_inspect_result_ FxIoQueue * GetCurrentQueue(VOID)
FORCEINLINE VOID PerformanceAnalysisIOProcess(__in PFX_DRIVER_GLOBALS pFxDriverGlobals, __in WDFREQUEST Handle, __out FxRequest **ppReq, __inout GUID *pActivityId)
PFX_DRIVER_GLOBALS pFxDriverGlobals
__inline PFX_DRIVER_GLOBALS GetDriverGlobals(VOID)
static FxObject * _GetObjectFromHandle(__in WDFOBJECT Handle, __inout PWDFOBJECT_OFFSET ObjectOffset)
__inline CfxDevice * GetDevice(VOID)
UCHAR GetMajorFunction(VOID)
__inline PFN_WDF_DRIVER_DEVICE_ADD GetDriverDeviceAddMethod()
static SERVICE_STATUS status
__inline BOOLEAN IsFxPerformanceAnalysis(__in PFX_DRIVER_GLOBALS FxDriverGlobals)
Referenced by if(), VfEvtIoDefault(), VfEvtIoDeviceControl(), VfEvtIoInternalDeviceControl(), VfEvtIoRead(), and VfEvtIoWrite().
◆ PerformanceAnalysisIOProcess()
Definition at line 97 of file vfprivkm.hpp.
110 if (IoGetActivityIdIrp((*ppReq)->GetFxIrp()->GetIrp(), pActivityId) ==
STATUS_NOT_FOUND)
113 IoSetActivityIdIrp((*ppReq)->GetFxIrp()->GetIrp(), pActivityId);
FxObjectHandleGetPtr(GetFxDriverGlobals(DriverGlobals), Fdo, FX_TYPE_DEVICE,(PVOID *)&pFdo)
#define EVENT_ACTIVITY_CTRL_CREATE_ID
PFX_DRIVER_GLOBALS pFxDriverGlobals
Referenced by PerfIoComplete(), and PerfIoStart().
◆ PerformanceGetDriverDeviceAdd()
◆ VerifyCriticalRegionEntry()
Definition at line 65 of file vfprivkm.hpp.
#define KeGetCurrentIrql()
BOOLEAN NTAPI KeAreApcsDisabled(VOID)
Referenced by VfEvtDeviceD0Entry(), VfEvtDeviceD0EntryPostInterruptsEnabled(), VfEvtDeviceD0Exit(), VfEvtDeviceD0ExitPreInterruptsDisabled(), VfEvtDevicePrepareHardware(), VfEvtDeviceQueryRemove(), VfEvtDeviceQueryStop(), VfEvtDeviceRelationsQuery(), VfEvtDeviceReleaseHardware(), VfEvtDeviceSelfManagedIoCleanup(), VfEvtDeviceSelfManagedIoFlush(), VfEvtDeviceSelfManagedIoInit(), VfEvtDeviceSelfManagedIoRestart(), VfEvtDeviceSelfManagedIoSuspend(), VfEvtDeviceSurpriseRemoval(), VfEvtDeviceUsageNotification(), VfEvtDeviceUsageNotificationEx(), VfEvtIoCanceledOnQueue(), VfEvtIoDefault(), VfEvtIoDeviceControl(), VfEvtIoInternalDeviceControl(), VfEvtIoRead(), VfEvtIoResume(), VfEvtIoStop(), and VfEvtIoWrite().
◆ VerifyCriticalRegionExit()
Definition at line 76 of file vfprivkm.hpp.
84 KdPrint((
"WDF VERIFIER: Critical section entry and exit around event callback incorrect\n"));
#define KeGetCurrentIrql()
#define FxVerifierBugCheck(FxDriverGlobals, Error,...)
BOOLEAN NTAPI KeAreApcsDisabled(VOID)
__inline PFX_DRIVER_GLOBALS GetFxDriverGlobals(__in PWDF_DRIVER_GLOBALS DriverGlobals)
Referenced by VfEvtDeviceD0Entry(), VfEvtDeviceD0EntryPostInterruptsEnabled(), VfEvtDeviceD0Exit(), VfEvtDeviceD0ExitPreInterruptsDisabled(), VfEvtDevicePrepareHardware(), VfEvtDeviceQueryRemove(), VfEvtDeviceQueryStop(), VfEvtDeviceRelationsQuery(), VfEvtDeviceReleaseHardware(), VfEvtDeviceSelfManagedIoCleanup(), VfEvtDeviceSelfManagedIoFlush(), VfEvtDeviceSelfManagedIoInit(), VfEvtDeviceSelfManagedIoRestart(), VfEvtDeviceSelfManagedIoSuspend(), VfEvtDeviceSurpriseRemoval(), VfEvtDeviceUsageNotification(), VfEvtDeviceUsageNotificationEx(), VfEvtIoCanceledOnQueue(), VfEvtIoDefault(), VfEvtIoDeviceControl(), VfEvtIoInternalDeviceControl(), VfEvtIoRead(), VfEvtIoResume(), VfEvtIoStop(), and VfEvtIoWrite().
◆ VerifyIrqlEntry()
Definition at line 36 of file vfprivkm.hpp.
#define KeGetCurrentIrql()
Referenced by VfEvtDeviceD0Entry(), VfEvtDeviceD0EntryPostInterruptsEnabled(), VfEvtDeviceD0Exit(), VfEvtDeviceD0ExitPreInterruptsDisabled(), VfEvtDevicePrepareHardware(), VfEvtDeviceQueryRemove(), VfEvtDeviceQueryStop(), VfEvtDeviceRelationsQuery(), VfEvtDeviceReleaseHardware(), VfEvtDeviceSelfManagedIoCleanup(), VfEvtDeviceSelfManagedIoFlush(), VfEvtDeviceSelfManagedIoInit(), VfEvtDeviceSelfManagedIoRestart(), VfEvtDeviceSelfManagedIoSuspend(), VfEvtDeviceSurpriseRemoval(), VfEvtDeviceUsageNotification(), VfEvtDeviceUsageNotificationEx(), VfEvtIoCanceledOnQueue(), VfEvtIoDefault(), VfEvtIoDeviceControl(), VfEvtIoInternalDeviceControl(), VfEvtIoRead(), VfEvtIoResume(), VfEvtIoStop(), and VfEvtIoWrite().
◆ VerifyIrqlExit()
Definition at line 45 of file vfprivkm.hpp.
53 if (PrevIrql != currIrql) {
54 KdPrint((
"WDF VERIFIER: Irql at entry of event is not same as at exit.\n"));
#define KeGetCurrentIrql()
#define FxVerifierBugCheck(FxDriverGlobals, Error,...)
__inline PFX_DRIVER_GLOBALS GetFxDriverGlobals(__in PWDF_DRIVER_GLOBALS DriverGlobals)
Referenced by VfEvtDeviceD0Entry(), VfEvtDeviceD0EntryPostInterruptsEnabled(), VfEvtDeviceD0Exit(), VfEvtDeviceD0ExitPreInterruptsDisabled(), VfEvtDevicePrepareHardware(), VfEvtDeviceQueryRemove(), VfEvtDeviceQueryStop(), VfEvtDeviceRelationsQuery(), VfEvtDeviceReleaseHardware(), VfEvtDeviceSelfManagedIoCleanup(), VfEvtDeviceSelfManagedIoFlush(), VfEvtDeviceSelfManagedIoInit(), VfEvtDeviceSelfManagedIoRestart(), VfEvtDeviceSelfManagedIoSuspend(), VfEvtDeviceSurpriseRemoval(), VfEvtDeviceUsageNotification(), VfEvtDeviceUsageNotificationEx(), VfEvtIoCanceledOnQueue(), VfEvtIoDefault(), VfEvtIoDeviceControl(), VfEvtIoInternalDeviceControl(), VfEvtIoRead(), VfEvtIoResume(), VfEvtIoStop(), and VfEvtIoWrite().