Compartilhar via


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

1/5/2010

To use the kernel profiler, you must first build a run-time image that supports the kernel profiler.

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

Kernel version Description

Kern.dll

Does not support the kernel profiler.

Kernprof.dll

Supports the kernel profiler.

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 Project menu, choose Properties for the current BSP.

  3. In the Property Pages window, choose Configuration Properties and then choose Build Options.

  4. In the Build Options box, select the Enable Profiling (IMGPROFILER=1) 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.
  5. 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.

  6. Build a run-time image.

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

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.

Note:   Do not add the profiler to shipping devices. The goal is to avoid performance and memory loss due to the profiler.

For more information, see Setting Up Monte Carlo Profiling.

See Also

Concepts

Setting Up the Kernel Profiler

Other Resources

Environment Variables
Make Binary Image Tool