p must be one of the following:
Value of p |
Meaning |
---|---|
collect[:name]
|
Collects and saves execution frequency for later use by the optimizer with -xprofile=use. The compiler generates code to measure statement execution frequency. The name is the name of the program that is being analyzed. This name is optional. If not specified, a.out is assumed to be the name of the executable.
At runtime, a program compiled with -xprofile=collect:name creates the subdirectory name.profile to hold the runtime feedback information. Data is written to the file feedback in this subdirectory. If you run the program several times, the execution frequency data accumulates in the feedback file; that is, output from prior runs is not lost. |
use[:name] |
Uses execution frequency data to optimize strategically. The name is the name of the executable that is being analyzed. The name is optional and, if not specified, is assumed to be a.out.
The program is optimized by using the execution frequency data previously generated and saved in feedback files that were written by a previous execution of the program compiled with -xprofile=collect.
The source files and other compiler options must be exactly the same as those used for the compilation that created the compiled program that generated the feedback file. If compiled with -xprofile=collect:name, the same program name, name, must appear in the optimizing compilation: -xprofile=use:name.
|
tcov
|
Basic block coverage analysis using the new style tcov.
This option is the new style of basic block profiling for tcov. It has similar functionality to the -xa option, but correctly collects data for programs that have source code in header files or make use of C++ templates. Code instrumentation is similar to that of the -xa option, but .d files are no longer generated. Instead, a single file is generated, the name of which is based on the final executable. For example, if the program is run out of /foo/bar/myprog.profile, then the data file is stored in /foo/bar/myprog.profile/myprog.tcovd.
When running tcov, you must pass it the -x option to force it to use the new style of data. If you don't, tcov uses the old .d files by default, and produces unexpected output.
Unlike the -xa option, the TCOVDIR environment variable has no effect at compile time. However, its value is used at program runtime.
|