7.8.2 Debugging
-pg
Generate extra code to write profile information suitable for the analysis program gprof. Use this option when compiling the source files you want data about, and you must also use it when linking.
-p
Generate extra code to write profile information suitable for the analysis program, prof. Use this option when compiling the source files you want data about, and you must also use it when linking.