Export (0) Print
Expand All
Expand Minimize

ProfileStart (Compact 2013)

3/28/2014

This function starts the Windows Embedded Compact instrumented kernel, or Monte Carlo profiling.


VOID ProfileStart(
  DWORD dwUSecInterval,
  DWORD dwOptions
);

dwUSecInterval

[in] Interval, in microseconds, for each profile interrupt (sample). This can be changed, depending on the target device implementation.

dwOptions

[in] Profile flags. The following table shows the possible values.

Value

Description

PROFILE_BUFFER

Monte Carlo profiling records samples to a buffer.

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). Call ProfileStart with the PROFILE_STARTPAUSED flag before using this flag.

PROFILE_KCALL

KCALL profiling records kernel calls.

PROFILE_OBJCALL

Records object calls.

PROFILE_PAUSE

Stops the profiler timer (pauses the profiler sampling). Call ProfileStart with the PROFILE_STARTPAUSED flag before using this flag. The first parameter to ProfileStart is ignored when using PROFILE_PAUSE.

PROFILE_STARTPAUSED

Begins profiling with the profiler timer off. Profiler control variables are initialized, but the timer is not activated (no profiling samples are made). Use this flag simultaneously with PROFILE_BUFFER or PROFILE_OBJCALL as shown in the following code example:

ProfileStart( 500, PROFILE_BUFFER | PROFILE_STARTPAUSED );

Call ProfileStart with this flag before using PROFILE_PAUSE.

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.

Header

profiler.h

Library

coredll.lib

Show:
© 2014 Microsoft