IOCTL_HAL_OEM_PROFILER (Compact 2013)
10/16/2014
This I/O control message is called by the kernel profiler to control the OEM-specified profiler. The kernel calls this I/O control during calls to the ProfileStartEx and the ProfileStop functions to start and stop OEM-specified profiling. The kernel also calls this IOCTL during calls to the ProfileCaptureStatus function to cause the OEM-specified profiler to record current performance counters. Send this message with OEMIoControl.
Syntax
BOOL OEMIoControl(
DWORD dwIoControlCode, // use IOCTL_HAL_OEM_PROFILER
LPVOID lpInBuffer, // pointer to input buffer
DWORD nInBufferSize, // input buffer size
LPVOID lpOutBuffer, // pointer to output buffer
DWORD nOutBufferSize, // output buffer size
LPDWORD lpBytesReturned // number of bytes returned
);
Parameters
- dwIoControlCode
[in] Control code for the operation. Use IOCTL_HAL_OEM_PROFILER for this operation.
- lpInBuffer
[in] Input buffer, which is a ProfilerControl structure.
- nInBufferSize
[in] Size of lpInBuffer, in bytes. This issizeof(ProfilerControl)
plus the OEM.dwControlSize value from the ProfilerControl structure.
- lpOutBuffer
[out] Set to NULL unless PROFILE_OEM_QUERY is passed by ProfileCaptureStatus. In this case, this parameter is a pointer to an OEMProfilerData structure for the I/O control to fill with OEM-defined data.
- nOutBufferSize
[out] Size of the output buffer.
- lpBytesReturned
[in] Number of bytes returned in lpOutBuffer.If this pointer is not NULL, the I/O control sets the value to the number of bytes written in lpOutBuf.
Return Values
Returns TRUE if successful; otherwise, returns FALSE.
Remarks
The kernel can call this I/O control with any of the following profile flags.
Value |
Description |
---|---|
PROFILE_BUFFER |
The kernel records samples to a buffer. This flag is used with Monte Carlo or object-call profiling. Used by ProfileStartEx.
Note:
Although this flag can be passed to IOCTL_HAL_OEM_PROFILER, the I/O control does not need to do anything. The calls to ProfilerHit do the data recording.
|
PROFILE_PAUSE |
The OEM-specified profiler should pause profiler sampling. This flag is only valid if the OEM-specified profiler is running because the kernel called this I/O control with the PROFILE_START flag. Used by ProfileStartEx. Optional. If this functionality is not implemented, this I/O control returns FALSE. |
PROFILE_CONTINUE |
The OEM-specified profiler should start or resume profiler sampling. This flag is valid if the OEM-specified profiler is paused because the kernel called IOCTL_HAL_OEM_PROFILER with PROFILE_PAUSE or PROFILE_STARTPAUSED. Used by ProfileStartEx. Optional. If this functionality is not implemented, this I/O control returns FALSE. |
PROFILE_STARTPAUSED |
The OEM-specified profiler should begin profiling with sampling turned off. Profiler control variables are initialized but no profiling samples are made. Sampling is resumed later when the kernel calls IOCTL_HAL_OEM_PROFILER again with the PROFILE_RESUME flag. Used by ProfileStartEx. Optional. If this functionality is not implemented, This I/O control returns FALSE. |
PROFILE_CELOG |
The kernel is recording hits through CeLog. Used by ProfileStartEx.
Note:
Although this flag can be passed to IOCTL_HAL_OEM_PROFILER, the I/O control does not need to do anything. The calls to ProfilerHit do the data recording.
|
PROFILE_OEMDEFINED |
This flag is passed to ProfileStartEx to inform the kernel to call this I/O control. The I/O control does not need to do anything for this flag. Used by ProfileStartEx, ProfileStop, and ProfileCaptureStatus. |
PROFILE_START |
Starts recording. Always used by ProfileStartEx. |
PROFILE_STOP |
Stops recording. Always used by ProfileStop. |
PROFILE_OEM_QUERY |
Queries current OEM counters. Always used by ProfileCaptureStatus. |
Requirements
Header |
pkfuncs.h |