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.
If you compile and link separately, and you compile with -xpg, be sure to link with -xpg.
-xprofile=p, analyzer(1) man page