ReactOS 0.4.16-dev-303-g11d5cb8
vfprivum.hpp File Reference
#include "fxmin.hpp"
Include dependency graph for vfprivum.hpp:

Go to the source code of this file.

Functions

FORCEINLINE VOID PerformanceAnalysisIOProcess (__in PFX_DRIVER_GLOBALS pFxDriverGlobals, __in WDFREQUEST Handle, __inout FxRequest **ppReq, __inout GUID *pActivityId)
 
FORCEINLINE BOOLEAN PerfIoStart (__in WDFREQUEST Handle)
 
FORCEINLINE BOOLEAN PerfIoComplete (__in WDFREQUEST Handle)
 
__inline BOOLEAN PerformanceAnalysisPowerProcess (__in PCEVENT_DESCRIPTOR EventDescriptor, __in GUID *pActivityId, __in WDFDEVICE 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)
 
__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)
 

Function Documentation

◆ PerfEvtDeviceD0EntryStart()

__inline BOOLEAN PerfEvtDeviceD0EntryStart ( __in WDFDEVICE  Handle,
__inout GUID pActivityId 
)

Definition at line 156 of file vfprivum.hpp.

160{
162 return PerformanceAnalysisPowerProcess(&FX_POWER_D0_ENTRY_START, pActivityId, Handle);
163}
#define EVENT_ACTIVITY_CTRL_CREATE_ID
Definition: evntprov.h:44
ULONG EVNTAPI EventActivityIdControl(_In_ ULONG ControlCode, _Inout_ LPGUID ActivityId)
ULONG Handle
Definition: gdb_input.c:15
__inline BOOLEAN PerformanceAnalysisPowerProcess(__in PCEVENT_DESCRIPTOR EventDescriptor, __in GUID *pActivityId, __in WDFDEVICE Handle)
Definition: vfprivum.hpp:125

◆ PerfEvtDeviceD0EntryStop()

__inline VOID PerfEvtDeviceD0EntryStop ( __in WDFDEVICE  Handle,
__in GUID pActivityId 
)

Definition at line 167 of file vfprivum.hpp.

171{
172 PerformanceAnalysisPowerProcess(&FX_POWER_D0_ENTRY_STOP, pActivityId, Handle);
173}

◆ PerfEvtDeviceD0ExitStart()

__inline BOOLEAN PerfEvtDeviceD0ExitStart ( __in WDFDEVICE  Handle,
__inout GUID pActivityId 
)

Definition at line 177 of file vfprivum.hpp.

181{
183 return PerformanceAnalysisPowerProcess(&FX_POWER_D0_EXIT_START, pActivityId, Handle);
184}

◆ PerfEvtDeviceD0ExitStop()

__inline VOID PerfEvtDeviceD0ExitStop ( __in WDFDEVICE  Handle,
__in GUID pActivityId 
)

Definition at line 188 of file vfprivum.hpp.

192{
193 PerformanceAnalysisPowerProcess(&FX_POWER_D0_EXIT_STOP, pActivityId, Handle);
194}

◆ PerfEvtDevicePrepareHardwareStart()

__inline BOOLEAN PerfEvtDevicePrepareHardwareStart ( __in WDFDEVICE  Handle,
__inout GUID pActivityId 
)

Definition at line 198 of file vfprivum.hpp.

202{
204 return PerformanceAnalysisPowerProcess(&FX_POWER_HW_PREPARE_START, pActivityId, Handle);
205}

◆ PerfEvtDevicePrepareHardwareStop()

__inline VOID PerfEvtDevicePrepareHardwareStop ( __in WDFDEVICE  Handle,
__in GUID pActivityId 
)

Definition at line 209 of file vfprivum.hpp.

213{
214 PerformanceAnalysisPowerProcess(&FX_POWER_HW_PREPARE_STOP, pActivityId, Handle);
215}

◆ PerfEvtDeviceReleaseHardwareStart()

__inline BOOLEAN PerfEvtDeviceReleaseHardwareStart ( __in WDFDEVICE  Handle,
__inout GUID pActivityId 
)

Definition at line 219 of file vfprivum.hpp.

223{
225 return PerformanceAnalysisPowerProcess(&FX_POWER_HW_RELEASE_START, pActivityId, Handle);
226}

◆ PerfEvtDeviceReleaseHardwareStop()

__inline VOID PerfEvtDeviceReleaseHardwareStop ( __in WDFDEVICE  Handle,
__in GUID pActivityId 
)

Definition at line 230 of file vfprivum.hpp.

234{
235 PerformanceAnalysisPowerProcess(&FX_POWER_HW_RELEASE_STOP, pActivityId, Handle);
236}

◆ PerfEvtIoStopStart()

__inline BOOLEAN PerfEvtIoStopStart ( __in WDFQUEUE  Queue,
__inout GUID pActivityId 
)

Definition at line 241 of file vfprivum.hpp.

245{
248 WDFDEVICE device;
249
252
254 Queue,
256 (PVOID*) &pQueue);
257 device = (WDFDEVICE) pQueue->GetDevice()->GetHandle();
258
260 return PerformanceAnalysisPowerProcess(&FX_EVTIOSTOP_START, pActivityId, device);
261}
WDFDEVICE __inline GetHandle(VOID)
Definition: fxdevice.hpp:237
__inline CfxDevice * GetDevice(VOID)
Definition: fxioqueue.hpp:773
static FxObject * _GetObjectFromHandle(__in WDFOBJECT Handle, __inout PWDFOBJECT_OFFSET ObjectOffset)
Definition: fxobject.hpp:613
__inline PFX_DRIVER_GLOBALS GetDriverGlobals(VOID)
Definition: fxobject.hpp:734
PFX_DRIVER_GLOBALS pFxDriverGlobals
FxIoQueue * pQueue
FxObjectHandleGetPtr(GetFxDriverGlobals(DriverGlobals), Fdo, FX_TYPE_DEVICE,(PVOID *)&pFdo)
USHORT WDFOBJECT_OFFSET
Definition: fxobject.hpp:80
FxObject * pObject
@ FX_TYPE_QUEUE
Definition: fxtypes.h:48
GLintptr offset
Definition: glext.h:5920
Definition: devices.h:37
_Must_inspect_result_ _In_ WDFDEVICE _In_ PIRP _In_ WDFQUEUE Queue
Definition: wdfdevice.h:2225

◆ PerfEvtIoStopStop()

__inline VOID PerfEvtIoStopStop ( __in WDFQUEUE  Queue,
__in GUID pActivityId 
)

Definition at line 266 of file vfprivum.hpp.

◆ PerfIoComplete()

FORCEINLINE BOOLEAN PerfIoComplete ( __in WDFREQUEST  Handle)

Definition at line 89 of file vfprivum.hpp.

92{
93 FxRequest* pReq;
94 GUID activityId = { 0 };
96
100
101 if(status) {
104 &activityId);
105
106 UCHAR Type = pReq->GetFxIrp()->GetMajorFunction();
107 WDFDEVICE Device = pReq->GetCurrentQueue()->GetDevice()->GetHandle();
108 EVENT_DATA_DESCRIPTOR EventData[3];
109 EventDataDescCreate(&EventData[0], &Type, sizeof(const UCHAR));
110 EventDataDescCreate(&EventData[1], &pDriverDeviceAdd, sizeof(PVOID));
111 EventDataDescCreate(&EventData[2], &Device, sizeof(PVOID));
112
113 EventWriteTransfer(Microsoft_Windows_DriverFrameworks_UserMode_PerformanceHandle,
114 &FX_REQUEST_COMPLETE,
115 &activityId,
116 NULL,
117 3,
118 &EventData[0]);
119 }
120 return status;
121}
unsigned char BOOLEAN
Type
Definition: Type.h:7
__inline PFN_WDF_DRIVER_DEVICE_ADD GetDriverDeviceAddMethod()
Definition: fxdriver.hpp:362
UCHAR GetMajorFunction(VOID)
Definition: fxirpum.cpp:217
_Must_inspect_result_ FxIoQueue * GetCurrentQueue(VOID)
Definition: fxrequest.hpp:728
FxIrp * GetFxIrp(VOID)
Definition: fxrequest.hpp:957
#define NULL
Definition: types.h:112
FORCEINLINE VOID EventDataDescCreate(_Out_ PEVENT_DATA_DESCRIPTOR EventDataDescriptor, _In_reads_bytes_(DataSize) const VOID *DataPtr, _In_ ULONG DataSize)
Definition: evntprov.h:180
ULONG EVNTAPI EventWriteTransfer(_In_ REGHANDLE RegHandle, _In_ PCEVENT_DESCRIPTOR EventDescriptor, _In_opt_ LPCGUID ActivityId, _In_opt_ LPCGUID RelatedActivityId, _In_ ULONG UserDataCount, _In_reads_opt_(UserDataCount) PEVENT_DATA_DESCRIPTOR UserData)
__inline BOOLEAN IsFxPerformanceAnalysis(__in PFX_DRIVER_GLOBALS FxDriverGlobals)
Definition: fxverifier.h:250
FxDriver * Driver
Definition: fxglobals.h:374
Definition: ps.c:97
FORCEINLINE VOID PerformanceAnalysisIOProcess(__in PFX_DRIVER_GLOBALS pFxDriverGlobals, __in WDFREQUEST Handle, __inout FxRequest **ppReq, __inout GUID *pActivityId)
Definition: vfprivum.hpp:30
_Must_inspect_result_ _In_ WDFDEVICE Device
Definition: wdfchildlist.h:474
EVT_WDF_DRIVER_DEVICE_ADD * PFN_WDF_DRIVER_DEVICE_ADD
Definition: wdfdriver.h:78
unsigned char UCHAR
Definition: xmlstorage.h:181

◆ PerfIoStart()

FORCEINLINE BOOLEAN PerfIoStart ( __in WDFREQUEST  Handle)

Definition at line 53 of file vfprivum.hpp.

56{
57 FxRequest* pReq;
58 GUID activityId = { 0 };
60
64
65 if(status) {
68 &activityId);
69
71 WDFDEVICE Device = pReq->GetCurrentQueue()->GetDevice()->GetHandle();
72 EVENT_DATA_DESCRIPTOR EventData[3];
73 EventDataDescCreate(&EventData[0], &Type, sizeof(const UCHAR));
74 EventDataDescCreate(&EventData[1], &pDriverDeviceAdd, sizeof(PVOID));
75 EventDataDescCreate(&EventData[2], &Device, sizeof(PVOID));
76
77 EventWriteTransfer(Microsoft_Windows_DriverFrameworks_UserMode_PerformanceHandle,
78 &FX_REQUEST_START,
79 &activityId,
80 NULL,
81 3,
82 &EventData[0]);
83 }
84 return status;
85}

◆ PerformanceAnalysisIOProcess()

FORCEINLINE VOID PerformanceAnalysisIOProcess ( __in PFX_DRIVER_GLOBALS  pFxDriverGlobals,
__in WDFREQUEST  Handle,
__inout FxRequest **  ppReq,
__inout GUID pActivityId 
)

Definition at line 30 of file vfprivum.hpp.

36{
38 Handle,
40 (PVOID *) ppReq);
41
42 if ((*ppReq)->GetFxIrp()->GetIoIrp()->IsActivityIdSet() == FALSE) {
44 (*ppReq)->GetFxIrp()->GetIoIrp()->SetActivityId(pActivityId);
45 }
46 else {
47 *pActivityId = *(*ppReq)->GetFxIrp()->GetIoIrp()->GetActivityId();
48 }
49}
#define FALSE
Definition: types.h:117
@ FX_TYPE_REQUEST
Definition: fxtypes.h:53

Referenced by PerfIoComplete(), and PerfIoStart().

◆ PerformanceAnalysisPowerProcess()

__inline BOOLEAN PerformanceAnalysisPowerProcess ( __in PCEVENT_DESCRIPTOR  EventDescriptor,
__in GUID pActivityId,
__in WDFDEVICE  Handle 
)

Definition at line 125 of file vfprivum.hpp.

130{
135
136 if(status) {
138
139 EVENT_DATA_DESCRIPTOR EventData[2];
140 EventDataDescCreate(&EventData[0], &pDriverDeviceAdd, sizeof(PVOID));
141 EventDataDescCreate(&EventData[1], &Handle, sizeof(PVOID));
142
143 EventWriteTransfer(Microsoft_Windows_DriverFrameworks_UserMode_PerformanceHandle,
145 pActivityId,
146 NULL,
147 2,
148 &EventData[0]);
149 }
150
151 return status;
152}
_In_ PCEVENT_DESCRIPTOR EventDescriptor
Definition: wmifuncs.h:93

Referenced by PerfEvtDeviceD0EntryStart(), PerfEvtDeviceD0EntryStop(), PerfEvtDeviceD0ExitStart(), PerfEvtDeviceD0ExitStop(), PerfEvtDevicePrepareHardwareStart(), PerfEvtDevicePrepareHardwareStop(), PerfEvtDeviceReleaseHardwareStart(), PerfEvtDeviceReleaseHardwareStop(), PerfEvtIoStopStart(), and PerfEvtIoStopStop().

◆ VerifyCriticalRegionEntry()

__inline VOID VerifyCriticalRegionEntry ( __out BOOLEAN CritRegion)

Definition at line 308 of file vfprivum.hpp.

311{
312 DO_NOTHING();
313}
#define DO_NOTHING()
Definition: mxgeneral.h:32

◆ VerifyCriticalRegionExit()

__inline VOID VerifyCriticalRegionExit ( __in PWDF_DRIVER_GLOBALS  DriverGlobals,
__in BOOLEAN  OldCritRegion,
__in PVOID  Pfn 
)

Definition at line 317 of file vfprivum.hpp.

322{
323 DO_NOTHING();
324}

◆ VerifyIrqlEntry()

__inline VOID VerifyIrqlEntry ( __out KIRQL Irql)

Definition at line 289 of file vfprivum.hpp.

292{
293 DO_NOTHING();
294}

◆ VerifyIrqlExit()

__inline VOID VerifyIrqlExit ( __in PWDF_DRIVER_GLOBALS  DriverGlobals,
__in KIRQL  PrevIrql 
)

Definition at line 298 of file vfprivum.hpp.

302{
303 DO_NOTHING();
304}