pg

Option Type Default Value #pragma options C C++
-flag - - x x

Syntax

    -pg 

Purpose
Sets up the object files for profiling, but provides more information than is provided by the -p option.

If the -qtbtable option is not set, the -pg option will generate full traceback tables.

Example
To compile myprogram.c for use with the AIX gprof command, enter:

xlC myprogram.c -pg

Remember to compile and link with the -pg option. For example:

xlC myprogram.c -pg -c
xlC myprogram.o -pg -o program


List of Batch Compiler Options and Their Defaults
Options that Specify Debugging Features
Equivalent Batch Compile-Link and Incremental Build Options
gprof command in the AIX Version 4 Commands Reference, for details on profiling.