Monte Carlo Profiling

Monte Carlo profiling is a statistical software diagnostic tool in which the operating system is interrupted at a high rate and the interrupted address is recorded. From this information is derived the number of hits per routine. This type of profiling does not measure or record execution time.

Monte Carlo profiling provides two approaches. The first, called process profiling, periodically tracks the current running routine. This is Monte Carlo profiling in the strict sense. A second profiling technique, called object call profiling, is akin to Monte Carlo profiling, and is discussed here also.

Monte Carlo profiling relies on the Windows CE profile-enabled kernel. For more information, see Platform Profiling. This version of the kernel contains the process and function identification routines, as well as the result-gathering and display routines. The process profiling approach also relies on a periodic interrupt from the OAL.

The profiler collects data as soon as it is launched. When stopped, it analyzes the data and sends the results over the debug port.

Windows CE does not automatically start or stop the profiler. You must start and stop the profiler. You can start and stop the profiler by having an application make calls to the ProfileStart and ProfileStop functions. For more information, see Controlling Profiling when Running the Profile-Enabled OS Image from an Application.

You can also start and stop the profiler with the default keyboard driver, which supports keys for controlling the profiler. For more information, see Controlling Profiling Using the Device Keyboard when Running the Profile-Enabled OS Image.

Finally, you can use the prof command in the Target Control window to control the profiler. For more information, see Target Control Debugging Commands.

See Also

Process Profiling | Object Call Profiling

 Last updated on Friday, October 08, 2004

© 1992-2003 Microsoft Corporation. All rights reserved.