gprof
- 网络戈达德分析;性能分析工具
-
Another important thread command used in programming is gprof .
编程中使用的另一个重要线程命令是gprof。
-
It is usually a good idea to run your application under time first to determine if gprof is likely to yield useful information .
首先使用time来运行程序从而判断gprof是否能产生有用信息是个好主意。
-
Display of GProf profiling data
GProf预配置数据显示
-
You can see that approximately no time is spent executing code in user space , so gprof will not really be useful here .
我们可以看出几乎没有多少时间被花费在执行用户空间的代码上,因此gprof在此处不会非常有用。
-
However , you might have noticed by now one of gprof 's biggest limitations : it only profiles user time while the application is running .
不过现在您可能已经注意到了gprof的最大缺陷:它只能分析应用程序在运行过程中所消耗掉的用户时间。
-
In general , a good benchmark for seeing how useful gprof will be in helping you optimize your application is to run it under the time command .
通常,有一个很好的基准测试可以用来查看gprof对于帮助对应用程序进行优化是多么有用,方法是在DE>timeDE>命令下面执行它。
-
The reason for this is that gprof works by instrumenting the program such that measurements are taken at fixed intervals of the program 's run time .
其原因是gprof仅仅是通过以固定的周期对程序运行时间进行采样测量来工作的。
-
Gprof reports on your flow control through all the subroutines of your program and provides you with the amount of CPU time consumed by each subroutine .
gprof可以报告您的程序中所有子例程的流程控制,并为您提供每个子例程所使用的CPU时间。
-
The gprof command produces an execution profile of your compiled programs , either in C , Pascal , FORTRAN , or even COBOL .
gprof命令为您所编译的程序(可能是用C、Pascal、FORTRAN、或者甚至是COBOL编写的程序)产生一个执行概要。
-
Despite the limitations outlined above , gprof can be a very useful tool for optimizing your code , particularly if your code is generally CPU bound in user space .
尽管gprof存在上面的限制,但是它对于优化代码来说依然是个非常有用的工具,如果您的代码大部分是用户空间CPU密集型的,它的用处就更加明显。
-
Our LTTng integration features a new histogram view to help with visualizing trace files and our GProf plug-ins now allow for easy viewing with BIRT-driven charts .
我们的LTTng集成功能还包含新的直方图,可用来可视化追踪文件,我们的GProf插件现在可允许轻松查看BIRT驱动的图表。
-
On the other hand assuming you have gcc installed one of the main advantages of gprof over the alternatives is that you most likely already have it installed on any Linux machine you use .
从另一个方面来说,假设我们已经安装了gcc,gprof相对于其他工具来说,一个主要的优点是很可能早已在Linux机器上安装了需要使用的工具。
-
This article introduces a profiling tool provided with the GNU compiler tool chain , the imaginatively named GNU profiler ( gprof ), for those who are relatively new to open source development tools .
本文将简要介绍GNU编译器工具包所提供的一种剖析工具,它的名字让人可以产生无限遐想,叫GNUprofiler(gprof)。本文主要面向那些开放源码软件开发工具的新手。
-
Prof and gprof require code to be compiled with either the – p or – gp flag to provide information on the number of times a function is called , who called the function , and the like .
prof和gprof要求用–p或–gp标志编译代码,从而提供调用函数的次数、函数的调用者等信息。
-
A major difference between this profiling technique and micro-profiling with tprof is that micro-profiling can analyze a time slice of the program versus the entire program , as do prof and gprof .
这种剖析技术与tprof微剖析的主要差异是,微剖析可以分析程序的时间片和整个程序,而prof和gprof只能分析整个程序。