pg

Applies to C Applies to C++

Purpose

Sets up the object files for profiling.

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

Syntax


Syntax Diagram

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 References

Compiler Command Line Options
tbtable IBM Copyright 2003