报告显示“没有时间累积".使用Eclipse CDT的gprof [英] Report shows "no time accumulated" for gprof using Eclipse CDT

查看:122
本文介绍了报告显示“没有时间累积".使用Eclipse CDT的gprof的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用以下标志进行编译后:GCC上的-O0 -p -pg -Wall -c和MinGW链接器上的-p -pg,eclipse插件gprof显示没有结果.之后,我使用gprof my.exe gmon.out > prof.txt进行了cmd调用,结果报告仅包含对函数的调用次数.

After compiling with flags: -O0 -p -pg -Wall -c on GCC and -p -pg on the MinGW linker, the eclipse plugin gprof for shows no results. After that I did a cmd call using gprof my.exe gmon.out > prof.txt, which resulted in a report witth only the number of calls to functions.

Flat profile: 
Each sample counts as 0.01 seconds.
no time accumulated

  %   cumulative   self              self     total           
 time   seconds   seconds    calls  Ts/call  Ts/call  name    
  0.00      0.00     0.00    16000     0.00     0.00  vector_norm
  0.00      0.00     0.00       16     0.00     0.00  rbf_kernel
  0.00      0.00     0.00        8     0.00     0.00  lubksb

我遇到了以下主题: gprof报告没有累积任何时间.但是我的程序正在以一种清晰的方式结束.另外, gprof视图在MingW/Windows上不显示数据,但是我正在使用32位GCC.我以前曾尝试使用Cygwin,结果相同.

I've came across this topic: gprof reports no time accumulated. But my program is terminating in a clear maner. Also, gprof view show no data on MingW/Windows, but I am using 32 bits GCC. I have previously tried to use Cygwin, same result.

我正在将Eclipse Kepler与CDT版本8.3.0.201402142303和MinGW与GCC 5.4.0一起使用.

I am using eclipse Kepler with CDT version 8.3.0.201402142303 and MinGW with GCC 5.4.0.

感谢您的帮助,在此先感谢您.

Any help is appreciated, thank you in advance.

推荐答案

很抱歉,该代码似乎比gprof可以测量的速度还要快.

Sorry for the question, seems that the code is faster than gprof can measure.

由于我的应用程序涉及经过多次迭代的神经网络训练以及对内核的进一步测试,因此我不怀疑快速的代码可能会引起问题.我在主体中插入了一个长循环,并打印了gprof时间.

As my application involves a neural network train with several iterations and further testing of kernels, I didn't suspected that a fast code could be causing the problem. I inserted a long loop in the main body and the gprof time was printed.

这篇关于报告显示“没有时间累积".使用Eclipse CDT的gprof的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆