Fortran User's Guide

-a

Profile by basic block using tcov, old style.

    SPARC: 77/90 x86:77

This is the old style of basic block profiling for tcov. See -xprofile=tcov for information on the new style of profiling and the tcov(1) man page for more details. Also see the manual, Analyzing Program Performance with Sun WorkShop.

Insert code to count the times each basic block of statements is executed. This invokes a runtime recording mechanism that creates one .d file for every .f file at normal program termination. The .d file accumulates execution data for the corresponding source file. The tcov(1) utility can then be run on the source file(s) to generate statistics about the program. The summary output produced by tcov is written to file.tcov for each source file. -pg and gprof are complementary to -a and tcov.

If set at compile-time, the TCOVDIR environment variable specifies the directory where the .d and .tcov files are located. If this variable is not set, then the .d files remain in the same directory as the .f files.

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

If you compile and link in separate steps, and you compile with -a, then be sure to link with -a. You can mix -a with -On; in some earlier versions -a overrode -On.

For details, see the chapter Performance Profiling in the Fortran Programming Guide.