C++ User's Guide

-xpg

Compiles for profiling with the gprof profiler.

The -xpg option compiles self-profiling code to collect data for profiling with gprof. This option invokes a runtime recording mechanism that produces a gmon.out file when the program normally terminates.

Warnings

If you compile and link separately, and you compile with -xpg, be sure to link with -xpg.

See also

-xprofile=p, analyzer(1) man page