-pg

Description

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.

Syntax

Read syntax diagramSkip visual syntax diagram>>- -pg--------------------------------------------------------><

Example

To compile myprogram.c for use with your operating system's 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

Related information