Code Profiling Utilities Manual
HP Code Profiling Utilities Manual—542684-003
4-1
4 Running the Application
Task Overview
In this step, you run the application with test data or a representative workload. A
program or DLL containing instrumented code generates a distinct raw data file each
time it completes execution. This raw data file is the record of what functions and basic
blocks were executed during the test run.
If an application is built by linking many source files and DLLs, the run generates one
raw data file that contains code coverage data from all instrumented components.
Prepare the Application for Testing
Preparing Test Cases
Select a set of test cases or a sample workload to use for your optimizations or code
coverage study.
Because instrumented code runs more slowly than uninstrumented code, you should
use instrumented code only when performing code coverage analysis or profile-guided
optimization; you should not release it for use in a production environment, as users
could experience degradation in throughput or response time.
When you prepare your test cases, consider that code coverage analysis and profile-
guided optimization have different usage scenarios. With code coverage, you are
usually trying to determine what portions of your code are being executed during
testing; the goal is to execute as much of the application as possible. With profile-
guided optimization, your objective should be to limit the execution of your application
to only those portions that are most likely to execute under a typical workload.
Figure 4-1. Producing the Raw Data for Code Coverage Analysis
vst004.vsd
Test Cases
or
Sample Workload
Instrumented
Application
Raw Data Files
(ZZPFnnnn, .dyn)










