Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why would a generated gmon.out file contain no data?

Tags:

gprof

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.

like image 767
NeomerArcana Avatar asked Oct 30 '22 19:10

NeomerArcana


1 Answers

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
like image 86
Daniel Avatar answered Dec 05 '22 06:12

Daniel