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. |
|
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
|
|
3. Enable Monte Carlo profiling for your 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. |
|
6. Build a release configuration for your run-time image. From the Build OS menu, choose Sysgen. |
|
7. When the build is complete, configure your download and debugging connections. |
|
8. Download the run-time image to your device. |
|
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. |
|
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. |
|
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. |
|
15. Choose a download service appropriate for the connection hardware. The download service will download a run-time image to the target device. |
|
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. |
|
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. |
|
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. |
|
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. |
|
21. Evaluate the results of the optimization. |
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