gprof.1 (86675) | gprof.1 (95124) |
---|---|
1.\" Copyright (c) 1983, 1990, 1993 2.\" The Regents of the University of California. All rights reserved. 3.\" 4.\" Redistribution and use in source and binary forms, with or without 5.\" modification, are permitted provided that the following conditions 6.\" are met: 7.\" 1. Redistributions of source code must retain the above copyright 8.\" notice, this list of conditions and the following disclaimer. --- 16 unchanged lines hidden (view full) --- 25.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 26.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 27.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 28.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 29.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 30.\" SUCH DAMAGE. 31.\" 32.\" @(#)gprof.1 8.1 (Berkeley) 6/6/93 | 1.\" Copyright (c) 1983, 1990, 1993 2.\" The Regents of the University of California. All rights reserved. 3.\" 4.\" Redistribution and use in source and binary forms, with or without 5.\" modification, are permitted provided that the following conditions 6.\" are met: 7.\" 1. Redistributions of source code must retain the above copyright 8.\" notice, this list of conditions and the following disclaimer. --- 16 unchanged lines hidden (view full) --- 25.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 26.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 27.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 28.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 29.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 30.\" SUCH DAMAGE. 31.\" 32.\" @(#)gprof.1 8.1 (Berkeley) 6/6/93 |
33.\" $FreeBSD: head/usr.bin/gprof/gprof.1 86675 2001-11-20 15:49:18Z ru $ | 33.\" $FreeBSD: head/usr.bin/gprof/gprof.1 95124 2002-04-20 12:18:28Z charnier $ |
34.\" 35.Dd June 6, 1993 36.Dt GPROF 1 37.Os 38.Sh NAME 39.Nm gprof 40.Nd display call graph profile data 41.Sh SYNOPSIS 42.Nm 43.Op options 44.Op Ar a.out Op Ar a.out.gmon ... 45.Sh DESCRIPTION | 34.\" 35.Dd June 6, 1993 36.Dt GPROF 1 37.Os 38.Sh NAME 39.Nm gprof 40.Nd display call graph profile data 41.Sh SYNOPSIS 42.Nm 43.Op options 44.Op Ar a.out Op Ar a.out.gmon ... 45.Sh DESCRIPTION |
46.Nm Gprof 47produces an execution profile of C, Pascal, or Fortran77 programs. | 46The 47.Nm 48utility produces an execution profile of C, Pascal, or Fortran77 programs. |
48The effect of called routines is incorporated in the profile of each caller. 49The profile data is taken from the call graph profile file 50which is created by programs that are compiled with the 51.Fl pg 52option of 53.Xr cc 1 , 54.Xr pc 1 , 55and --- 8 unchanged lines hidden (view full) --- 64.Pa libc.a 65is 66.Pa libc_p.a 67and if you specify libraries directly to the 68compiler or linker you can use 69.Fl l Ns Ar c_p 70instead of 71.Fl l Ns Ar c . | 49The effect of called routines is incorporated in the profile of each caller. 50The profile data is taken from the call graph profile file 51which is created by programs that are compiled with the 52.Fl pg 53option of 54.Xr cc 1 , 55.Xr pc 1 , 56and --- 8 unchanged lines hidden (view full) --- 65.Pa libc.a 66is 67.Pa libc_p.a 68and if you specify libraries directly to the 69compiler or linker you can use 70.Fl l Ns Ar c_p 71instead of 72.Fl l Ns Ar c . |
72.Nm Gprof 73reads the given object file (the default is | 73Read the given object file (the default is |
74.Pa a.out) 75and establishes the relation between its symbol table 76and the call graph profile. 77The default graph profile file name is the name 78of the executable with the suffix 79.Pa .gmon 80appended. 81If more than one profile file is specified, 82the 83.Nm 84output shows the sum of the profile information in the given profile files. 85.Pp | 74.Pa a.out) 75and establishes the relation between its symbol table 76and the call graph profile. 77The default graph profile file name is the name 78of the executable with the suffix 79.Pa .gmon 80appended. 81If more than one profile file is specified, 82the 83.Nm 84output shows the sum of the profile information in the given profile files. 85.Pp |
86.Nm Gprof 87calculates the amount of time spent in each routine. | 86The 87.Nm 88utility calculates the amount of time spent in each routine. |
88Next, these times are propagated along the edges of the call graph. 89Cycles are discovered, and calls into a cycle are made to share the time 90of the cycle. 91The first listing shows the functions 92sorted according to the time they represent 93including the time of their call graph descendents. 94Below each function entry is shown its (direct) call graph children, 95and how their times are propagated to this function. --- 227 unchanged lines hidden --- | 89Next, these times are propagated along the edges of the call graph. 90Cycles are discovered, and calls into a cycle are made to share the time 91of the cycle. 92The first listing shows the functions 93sorted according to the time they represent 94including the time of their call graph descendents. 95Below each function entry is shown its (direct) call graph children, 96and how their times are propagated to this function. --- 227 unchanged lines hidden --- |