ProfileStart (Compact 2013)
This function starts the Windows Embedded Compact instrumented kernel, or Monte Carlo profiling.
VOID ProfileStart( DWORD dwUSecInterval, DWORD dwOptions );
[in] Interval, in microseconds, for each profile interrupt (sample). This can be changed, depending on the target device implementation.
[in] Profile flags. The following table shows the possible values.
Monte Carlo profiling records samples to a buffer.
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.
Starts the profiler timer (starts/resumes the profiler sampling). Call ProfileStart with the PROFILE_STARTPAUSED flag before using this flag.
KCALL profiling records kernel calls.
Records object calls.
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.
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.
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.