Controlling Profiling when Running the Profile-Enabled OS Image from an Application
Within an application, call the ProfileStart and ProfileStop functions to include sections of code that you want to profile.
With ProfileStart, you can set the time slice for each profile sample. Use the parameter dwOp to select the type of profiling. These options correspond to the function key actions that are implemented in the code for the target device.
The following table shows flags that the ProfileStart function supports.
Value | Description |
---|---|
PROFILE_BUFFER | Monte Carlo profiling; record samples to a buffer. |
PROFILE_CONTINUE | Use this flag to start the profiler timer (starts/resumes the profiler sampling). You must call ProfileStart with the PROFILE_STARTPAUSED flag before using this flag. |
PROFILE_KCALL | KCALL profiling; record kernel calls. |
PROFILE_OBJCALL | Record object calls. |
PROFILE_PAUSE | Use this flag to stop the profiler timer (pauses the profiler sampling). You must call ProfileStart with the PROFILE_STARTPAUSED flag before using this flag. The first parameter to ProfileStart is ignored when using PROFILE_PAUSE. |
PROFILE_STARTPAUSED | Use this flag to begin profiling with the profiler timer off. Profiler control variables are initialized but the timer is not started (no profiling samples are made). Use this flag simultaneously with PROFILE_BUFFER or PROFILE_OBJCALL according to the following code example.
You must call ProfileStart with this flag before using PROFILE_PAUSE. |
See Also
Event Tracking | Process Profiling | Controlling Profiling Using the Device Keyboard when Running the Profile-Enabled OS Image | Target Control Debugging Commands
Last updated on Friday, October 08, 2004
© 1992-2003 Microsoft Corporation. All rights reserved.