Compartilhar via


ProfilerControl (Compact 2013)

3/28/2014

This structure is used by the ProfileStartEx function.

Syntax

typedef struct ProfilerControl {
  DWORD dwVersion;
  DWORD dwOptions;
  DWORD dwReserved;
  union {
    struct {
      DWORD dwUSecInterval;
    } Kernel;
    struct {
      DWORD dwProcessorType;
      DWORD dwControlSize;
      BYTE bHardwareSpecificSettings[0];
    } OEM;
  };
} ProfilerControl;

Members

  • dwVersion
    Version of the structure. Set to 1.
  • dwOptions
    Profile flags. The following table shows possible values for this member.

    Value

    Description

    PROFILE_BUFFER

    Records samples to a buffer.

    Use with PROFILE_OBJCALL for object call profiling, or by itself for Monte Carlo profiling.

    PROFILE_CELOG

    Writes each profiler hit to CeLogData() as an event with ID CELID_MONTECARLO_HIT and data CEL_MONTECARLO_HIT.

    You can use this flag with both Monte Carlo (sampled) style profiling and system call profiling (PROFILE_OBJCALL), but not with kernel call profiling (PROFILE_KCALL).

    To use this flag, you must separately start CeLog data collection.

    When you call ProfileStart with PROFILE_CELOG to collect profiler hits in the CeLog data stream, the profiler automatically changes the CeLog zones to enable profiling-related events and disables all events not related to profiling.

    When the profiler stops, the profiler returns the CeLog zones to their original settings. This guarantees collection of the profiling data and removes non profiling-related events from the log. Thus, the performance impact of CeLog on the system is minimized, and the chance of losing data due to collecting data faster than it can be flushed is reduced.

    For more information, see CeLogData.

    PROFILE_CONTINUE

    Starts the profiler timer (starts/resumes the profiler sampling).

    Before using this flag, call the ProfileStartEx function with the PROFILE_STARTPAUSED flag set.

    This is valid only if the profiler is paused; for example, if ProfileStartEx was previously called with PROFILE_PAUSE or PROFILE_STARTPAUSED set.

    PROFILE_KCALL

    KCALL profiling records kernel calls.

    PROFILE_OBJCALL

    Records object calls.

    PROFILE_PAUSE

    Stops the profiler timer (pauses the profiler sampling).

    Call ProfileStartEx with the PROFILE_STARTPAUSED flag before using this flag.

    This is valid only if the profiler is running; for example, if ProfileStartEx was previously called without PROFILE_PAUSE or PROFILE_STARTPAUSED set.

    PROFILE_STARTPAUSED

    Begins profiling with the profiler timer off.

    Profiler control variables are initialized, but the timer is not activated, so no profiling samples are made.

    Use this flag simultaneously with PROFILE_BUFFER or PROFILE_OBJCALL.

    Sampling does not begin until ProfileStartEx is called again with the PROFILE_RESUME flag set.

    PROFILE_TICK

    Causes the profiler to record a sample on every tick interrupt (SYSINTR_NOP or SYSINTR_RESCHEDULE) when collecting Monte Carlo data.

    If the OAL does not support profiling, the kernel will automatically select this option.

    If the OAL supports profiling, you can use this flag to force Monte Carlo profiling to ignore the OAL profiling implementation and use the tick interrupt to record profiler samples.

  • dwReserved
    Reserved; set to 0 (zero).
  • dwUSecInterval
    Interval, in microseconds, for each profile interrupt or sample. This can be changed, depending on the device implementation.

    This value is valid when not using PROFILE_OEMDEFINED.

  • dwProcessorType
    Type of processor expected. Values for this field have not yet been defined so this field should be set to zero.

    This value is valid only when using PROFILE_OEMDEFINED.

  • dwControlSize
    OEM-defined data. See the documentation for your board support package (BSP) to determine the value of this field.

    This value is valid only when using PROFILE_OEMDEFINED.

  • bHardwareSpecifcSettings
    OEM-defined data. See the documentation for your BSP to determine the value of this field.

    This value is valid only when using PROFILE_OEMDEFINED.

Remarks

You can use ProfilerControl to expose control over custom profiling for a BSP.

Requirements

Header

profiler.h

See Also

Reference

Kernel Structures
ProfileStartEx

Other Resources

IOCTL_HAL_OEM_PROFILER