C++ User's Guide

-xa

Generates code for profiling.

If set at compile time, the TCOVDIR environment variable specifies the directory where the coverage (.d) files are located. If this variable is not set, then the coverage (.d) files remain in the same directory as the source files.

Use this option only for backward compatibility with old coverage files.

Interactions

The -xprofile=tcov and the -xa options are compatible in a single executable. That is, you can link a program that contains some files that have been compiled with -xprofile=tcov, and others that have been compiled with -xa. You cannot compile a single file with both options.

-xa is incompatible with -g.

Warnings

If you compile and link in separate steps and you compile with -xa, be sure to link with -xa, or you might get unexpected results.

See also

-xprofile=tcov, tcov(1) man page, Analyzing Program Performance With Sun WorkShop