Quantcast
Channel: Active questions tagged gcc - Stack Overflow
Viewing all articles
Browse latest Browse all 22031

How does GCC's '-pg' flag work in relation to profilers?

$
0
0

I'm trying to understand how the -pg (or -p) flag works when compiling C code with GCC.

The official GCC documentation only states:

-pgGenerate extra code to write profile information suitable for the analysis program gprof. You must use this option when compiling the source files you want data about, and you must also use it when linking.

This really interests me, as I'm doing a small research on profilers. I'm trying to pick the best tool for the job.


Viewing all articles
Browse latest Browse all 22031

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>