Sun WorkShop Compiler C 5.0 User's Guide

-xpg

Prepares the object code to collect data for profiling with gprof(1). It invokes a runtime recording mechanism that produces a gmon.out file at normal termination.