相关疑难解决方法(0)

gprof产生空输出

我正在运行Ubuntu 16.10并尝试使用gprof配置程序.我用标志编译,-pg程序是单线程的.实际的编译命令是:

g++ -I. -std=c++11 -Wall -Wextra -O3 -pg -fPIC -Wno-unused-parameter -c -o build/obj/performance/stencil_application.o test/performance/stencil_application.cpp
g++ -I. -std=c++11 -Wall -Wextra -O3 -pg -Wno-unused-parameter build/obj/performance/stencil_application.o -o build/test/performance/stencil_application
Run Code Online (Sandbox Code Playgroud)

运行时程序需要几秒钟才能完成,并生成一个名为gmon.out的文件.但是,当我运行时gprof ./build/test/performance/stencil_application,我得到的输出不包含数字.我只得到表格标题和不同字段的解释,如下所示:

Flat profile:

Each sample counts as 0.01 seconds.
  %   cumulative   self              self     total           
 time   seconds   seconds    calls  Ts/call  Ts/call  name    

 %         the percentage of the total running time of the
time       program used by this function.

cumulative a running sum of the number of seconds accounted
 seconds   for …
Run Code Online (Sandbox Code Playgroud)

ubuntu profiling gprof

22
推荐指数
1
解决办法
5017
查看次数

标签 统计

gprof ×1

profiling ×1

ubuntu ×1