Поделиться через


Building a Run-Time Image That Supports Standalone Profiling (Compact 2013)

3/26/2014

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

We recommend that you build a run-time image that includes support for standalone profiling from the Release configuration of your OS design. While a run-time image built from a Release configuration is not required, other builds run more slowly and should not be used to analyze performance.

To build a run-time image that supports standalone profiling

  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 (.bib) File.

  2. On the Project menu, click Properties for the current BSP.

  3. In the Property Pages dialog box, expand the Configuration Properties node, and then click Build Options.

  4. In the Build Options expanded list, click Enable Profiling, choose Yes(IMGPROFILER=1), and then click 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 File 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 do this, enter set <environment variable>=1 in a command-prompt build window.
  5. For each module in the MODULES section of ROM, verify 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.

After completing these steps, you can choose to add code to the OEM adaptation layer (OAL) to implement the profiler interrupt for increased timing accuracy when you run the profiler in Monte Carlo mode. For more information, see Implementing Profiler Timer Interrupts in the OAL.

Note:   Do not ship run-time images that have IMGPROFILER set to 1. IMGPROFILER is useful for debugging purposes, but might impact performance and ROM size.

See Also

Concepts

Setting up the Kernel Profiler

Other Resources

Make Binary Image Tool (Makeimg.exe)