Display of GProf profiling data.
GProf预配置数据显示。
Another important thread command used in programming is gprof.
编程中使用的另一个重要线程命令是gprof。
You can use gprof to profile your program and determine which functions are using the CPU.
您可以使用gprof对您的程序进行概要分析,并确定哪些函数正在使用CPU。
You can see that approximately no time is spent executing code in user space, so gprof will not really be useful here.
我们可以看出几乎没有多少时间被花费在执行用户空间的代码上,因此gprof在此处不会非常有用。
The gprof command produces an execution profile of your compiled programs, either in c, Pascal, FORTRAN, or even COBOL.
gprof命令为您所编译的程序(可能是用c、Pascal、FORTRAN、或者甚至是COBOL编写的程序)产生一个执行概要。
Once you start getting into multiple threads, you might want to start looking at a profiler. gprof is a good place to start.
一旦你开始为多个线程,你可能要开始寻找一个分析器。 预测模型是一个好的开始。
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对于帮助对应用程序进行优化是多么有用,方法是在time命令下面执行它。
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时间。
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标志编译代码,从而提供调用函数的次数、函数的调用者等信息。
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机器上安装了需要使用的工具。
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只能分析整个程序。
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)。 本文主要面向那些开放源码软件开发工具的新手。
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)。 本文主要面向那些开放源码软件开发工具的新手。
应用推荐