다음을 통해 공유


Building a Run-Time Image That Supports the Kernel Profiler (Windows CE 5.0)

Send Feedback

To use the kernel profiler, you must first build a run-time image that supports the kernel profiler. By default, a run-time image that supports the kernel profiler includes KITL, regardless of the build options that you choose.

For each BSP, versions of the kernel are specified in sources files in the KernXXX directories at %_WINCEROOT%\Platform\<Hardware platform name>\Src\Kernel. In a typical BSP, the version of the kernel that supports the kernel profiler by default also includes KITL.

The following table shows the versions of the kernel that you can build by default with a typical BSP.

Kernel version Description
Kern.exe Does not support the kernel profiler and does not include KITL
Kernkitl.exe Does not support the kernel profiler and includes KITL
Kernkitlprof.exe Supports the kernel profiler and includes KITL

Note   If you use a custom BSP, there may not be a Kernkitlprof version of the kernel in the BSP, particularly if you migrated the BSP from a previous version of Windows CE. For information about building a Kernkitlprof version of the kernel, see Creating a Kernkitlprof Version of the Kernel. For information about building without KITL a run-time image that supports the kernel profiler, see Creating a Kernprof Version of the Kernel.

Microsoft recommends that you build a run-time image to support the kernel profiler from the Release configuration of your OS design. While a run-time image built from a Release configuration is not required, other builds run slower and should not be used to analyze performance.

To build a run-time image that supports the kernel profiler

  1. In the Platform.bib or Project.bib file, in the MODULES section of ROM, add modules for which you want the kernel profiler to look up symbols.

    For more information about .bib files, see Binary Image Builder File.

  2. From the Platform menu, choose Settings, and then choose the Build Options tab.

  3. Select the Enable Profiling check box, and then choose OK.

    When you select the Enable Profiling check box and then choose OK, the following environment variables are set:

    • IMGPROFILER

      The run-time image supports the kernel profiler when the IMGPROFILER variable is set because the Config.bib and Common.bib files specify an appropriate response to the value of this variable. For more information about the conditional logic in the Config.bib and Common.bib files, see Configuring the Config.bib and Common.bib Files for IMGPROFILER.

    • WINCEMAP

      This environment variable is set by default.

      All applications and modules you want to profile should be in the MODULES section of ROM too, so you need .map files for those.

      You can, alternatively, set these environment variables from the command line. To set an environment variable from the command line, in a command prompt build window, type set <environment variable>=1.

  4. Verify for each module in the MODULES section of ROM that the appropriate .map file for the module exists in the release directory.

    With the appropriate .map file in the release directory, the symbols for the module are available to the kernel.

  5. Build a run-time image.

    For information about building the run-time image in the IDE, see Building a Run-Time Image.

    To build the run-time image from the command line, run Blddemo.bat. For more information about Blddemo.bat, see Build Demo Tool.

After completing these steps, if you use one of the sample BSPs provided with Platform Builder or if you use a BSP created from a copy of a sample BSP, you should be able to run the kernel profiler. If you use a custom BSP, you may need to add code to the OAL to implement the profiler interrupt. For more information, see Setting Up Monte Carlo Profiling.

See Also

Setting Up the Kernel Profiler | Build Demo Tool | Build Tool | Environment Variables | Make Binary Image Tool

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.