Share via


How to Profile and Optimize a Display Driver (Windows Embedded CE 6.0)

1/6/2010

Windows Embedded CE and Platform Builder ship with a number of tools that can help you improve the performance of your display driver.

  • Profiling tools, such as Monte Carlo profiling, help you understand which functions in your run-time image are most heavily used.
  • Performance tools, such as DispPerf.exe, provide you with time-oriented measurements of your run-time image's operations.

For more information, see Monte Carlo Profiling and Display Driver Performance Profiling.

You can use these tools to determine which functions in your system are most frequently called during a usage scenario, and to provide metrics for the specific raster operations in your display driver.

The following table shows the steps to profile a graphics application and optimize a specific color conversion in the FLAT display driver.

These steps work on any display-based device and they assume that you are already familiar with the process of building a run-time image and downloading it to a target device.

Steps

Step Topic

1. Create an empty display-based operating OS.

Creating an Empty Display-Based OS

2. Clone the FLAT display driver.

The FLAT display driver is included in your OS design by default. By cloning it, you can make private modifications to the driver without affecting the performance or stability of other OS designs that might be using the public driver code for the FLAT driver.

To clone the FLAT display driver

  • In OSDesignView, clone the Catalog item <OS design> Catalog Items\Device Drivers\Display\VGA Linear (Flat) Framebuffer.
  • In the Clone Catalog Item - ddi_flat dialog box, select ddi_flat_lib and choose OK.
  • In the Clone Catalog Item - gpe dialog box, select gpe_lib, emulrotate, and genblt. Clear the checkboxes for the other cloneable libraries, then choose OK.

Cloning a Catalog Item

3. Enable Monte Carlo profiling for your configuration.

Enabling Monte Carlo Profiling of a Configuration

4. Create an application that uses your OS design's graphics routines, providing a target for profiling your display driver.

Creating a Target Application for Profiling the FLAT Display Driver

5. Within your OS design, create a project for the application that gathers the profiling data for the display driver, DispPerf.exe.

Building DispPerf.exe

6. Build a release configuration for your run-time image. From the Build OS menu, choose Sysgen.

Building a Run-Time Image

7. When the build is complete, configure your download and debugging connections.

Configuring a Connection for Downloading and Debugging

8. Download the run-time image to your device.

Downloading a Run-Time Image

9. After your run-time image is loaded, begin profiling ProfApp.exe to obtain a set of performance data.

Not applicable.

10. Analyze the profiling and performance data to find heavily used functions that can be optimized.

Display Device Performance Profile Analysis

11. From the Target menu in Platform Builder, choose Detach Device to return to the Platform Builder IDE.

Not applicable.

12. Add a function to the BitBlt emulation library to improve the performance of the FLAT display driver when running ProfApp.exe on your run-time image.

For more information see BitBlT Emulation Library Functions.

Optimizing a GPE Emulation Function

13. Build the OS design into a run-time image.

From the Build OS menu, choose Sysgen.

Not applicable.

14. In the Output window, on the Output tab, verify that the build contains no errors.

Build Error Debugging Process

15. Choose a download service appropriate for the connection hardware. The download service will download a run-time image to the target device.

Download Service Selection

16. Set up and configure the connection hardware required for the download service. That hardware connects the target device to the development workstation, on which Platform Builder is installed. Examples of connection hardware include cables, a hub, or Ethernet network adapters.

Hardware Configuration

17. If you selected Serial Download Service in step 15, configure the HyperTerminal terminal emulation application to display the serial debug output from the serial port on the target device.

This configuration requires a null-modem cable connected to a serial port, such as COM1.

Configuring HyperTerminal for BSPs

18. Turn on the target device so that it becomes active on the Ethernet network or over the serial connection, and Platform Builder can discover it.

Not applicable

19. Configure the connection to the target device.

Choose the appropriate topic based on whether the development workstation and the target device are connected by an Ethernet network or a serial port connection.

Configuring an Ethernet Remote Connection

Configuring a Serial Remote Connection

20. Download the run-time image to the target device through the configured connection and rerun the profiling steps to obtain a set of post-optimization profiling and performance data.

Downloading a Run-Time Image

21. Evaluate the results of the optimization.

Optimized GPE Emulation Function Analysis

Note

If your project and run-time images build but exhibit unexpected behavior, verify that the settings you made for your projects and platform run-time images were all made for the release configuration of your run-time image.

See Also

Concepts

Display Driver Performance
Display Driver Samples

Other Resources

Display Driver How-to Topics
Developing a Device Driver