I've compiled a program using -pg switch and linked using the -pg switch. When my program is executed a file "gmon.out" is produced. However after running gprof on the file, there is no data other than the standard information explaining the data provided.
Why would there be nothing in the gmon.out file? The program is obviously compiled and linked correctly as the new "gmon.out" file is generated; it just has no data.
It's a bug that happens with the recent gnu c compiler. You can use the -no-pie option as a workaround
gcc -no-pie
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With