Compartilhar via


IOCTL_HAL_OEM_PROFILER (Windows CE 5.0)

Send Feedback

This IOCTL is called by the kernel profiler to control the OEM-specified profiler. The kernel calls this IOCTL during ProfileStartEx and ProfileStop to start and stop OEM-specified profiling. The kernel also calls this IOCTL during ProfileCaptureStatus to cause the OEM-specified profiler to record current performance counters.

Parameters

  • dwIoControlCode
    [in] Set to IOCTL_HAL_OEM_PROFILER.

  • lpInBuf
    [in] Input buffer, which is a ProfilerControl structure.

  • nInBufSize
    [in] Size of lpInBuf, in bytes.

    This is sizeof(ProfilerControl) plus the OEM.dwControlSize value from the ProfilerControl structure.

  • lpOutBuf
    [out] Output buffer.

    This is NULL unless PROFILE_OEM_QUERY is passed by ProfileCaptureStatus. In this case, lpOutBuf is a pointer to an OEMProfilerData structure for the IOCTL to fill with OEM-defined data.

  • nOutBufSize
    [out] Size of the output buffer.

  • lpBytesReturned
    [in] Number of bytes returned in lpOutBuf.

    If this pointer is not NULL, the IOCTL sets the value to the number of bytes written in lpOutBuf.

Return Values

TRUE indicates success. FALSE indicates failure.

Remarks

The kernel can call IOCTL_HAL_OEM_PROFILER 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 IOCTL 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 IOCTL_HAL_OEM_PROFILER with the PROFILE_START flag.

Used by ProfileStartEx.

Support for this flag is optional. If this functionality is not implemented, IOCTL_HAL_OEM_PROFILER should return FALSE to indicate a failure.

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.

Support for this flag is optional. If this functionality is not implemented, IOCTL_HAL_OEM_PROFILER should return FALSE to indicate a failure.

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.

Support for this flag is optional. If this functionality is not implemented, IOCTL_HAL_OEM_PROFILER should return FALSE to indicate a failure.

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 IOCTL 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 IOCTL_HAL_OEM_PROFILER. The IOCTL 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

OS Versions: Windows CE 5.0 and later.
Header: Pkfuncs.h.

See Also

ProfileStartEx | ProfileStop | ProfileCaptureStatus | ProfilerHit | ProfilerHitEx | ProfilerControl | OEMProfilerData

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.