Partager via


Implementing Profiling

  1. Implement OEMProfileTimerDisable and OEMProfileTimerEnable for a target device.

    The following table shows the OEMProfile* functions that the kernel calls to support the ProfileStart and ProfileStop functions.

    Function Description
    OEMProfileTimerDisable Clears and disables the profiler timer
    OEMProfileTimerEnable Enables and starts the profiler timer

    For information about these functions, see the sample code in the %_WINCEROOT%\Platform\%TGTPLAT%\Kernel\Profiler\%TGTCPU%\Mdprof.c file.

  2. Implement the Monte Carlo profiler ISR.

    The profiler ISR calls the ProfilerHit kernel function to record a profile hit.

    The following table shows functions that support the OEMProfileTimer* functions.

    Function Description
    ProfileStart Starts instrumented kernel profiling and Monte Carlo profiling
    ProfileStop Stops instrumented kernel profiling and Monte Carlo profiling, and displays a profile report on a debug terminal

    For information about the profiler ISR, see the sample code in the %_WINCEROOT%\Platform\Cepc\Kernel\Profiler\%TGTCPU%\Profisr.s file.

  3. Optionally, implement a type of user input control for the profiling.

    For example, the function key control used to control profiling discussed earlier is implemented in the sample CEPC platform keyboard driver code in the %_WINCEROOT%\Platform\Cepc\Drivers\KbdMouse\ScvkEngUs1\ ScvkEngUs1.cpp file. This code implements calls to ProfileStart and ProfileStop.

See Also

Event Tracking

 Last updated on Friday, October 08, 2004

© 1992-2003 Microsoft Corporation. All rights reserved.