gprof output is empty
Using gprof 2.28 and gcc 6.3.0 in Ubuntu 17.04 on a variety of sample programs I get empty output for every category. If I run gprof -i on one example program I get:
1 histogram record
2 call-graph records
0 basic-block count records
My compilation looks something like this:
cc -g -c sem_test.c -pg
cc -o sem_test sem_test.o -lpthread -pg
Or this:
gcc -g3 -O0 -Wall -std=gnu99 -pg -fprofile-arcs -fno-inline -fno-reorder-functions sem_test.c -o sem_test -lpthread -pg
Both have the same results.
I notice that my gmon.out file is only 687 bytes which seems low.
链接地址: http://www.djcxy.com/p/43870.html上一篇: 什么是未定义的引用/未解析的外部符号错误,我该如何解决它?
下一篇: gprof输出为空