BSD 4_3_Net_2 release
[unix-history] / usr / src / usr.bin / gprof / gprof.1
index 0b5adda..443d959 100644 (file)
@@ -1,13 +1,37 @@
 .\" Copyright (c) 1983, 1990 The Regents of the University of California.
 .\" All rights reserved.
 .\"
 .\" Copyright (c) 1983, 1990 The Regents of the University of California.
 .\" All rights reserved.
 .\"
-.\" %sccs.include.redist.man%
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\"    notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\"    notice, this list of conditions and the following disclaimer in the
+.\"    documentation and/or other materials provided with the distribution.
+.\" 3. All advertising materials mentioning features or use of this software
+.\"    must display the following acknowledgement:
+.\"    This product includes software developed by the University of
+.\"    California, Berkeley and its contributors.
+.\" 4. Neither the name of the University nor the names of its contributors
+.\"    may be used to endorse or promote products derived from this software
+.\"    without specific prior written permission.
 .\"
 .\"
-.\"     @(#)gprof.1    6.7 (Berkeley) %G%
+.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
 .\"
 .\"
-.Vx
-.Vx
-.Dd 
+.\"    @(#)gprof.1     6.8 (Berkeley) 7/24/91
+.\"
+.Dd July 24, 1991
 .Dt GPROF 1
 .Os BSD 4.2
 .Sh NAME
 .Dt GPROF 1
 .Os BSD 4.2
 .Sh NAME
 .Op options
 .Op Ar a.out Op Ar gmon.out ...
 .Sh DESCRIPTION
 .Op options
 .Op Ar a.out Op Ar gmon.out ...
 .Sh DESCRIPTION
-.Nm gprof
+.Nm Gprof
 produces an execution profile of C, Pascal, or Fortran77 programs.
 The effect of called routines is incorporated in the profile of each caller.
 The profile data is taken from the call graph profile file
 produces an execution profile of C, Pascal, or Fortran77 programs.
 The effect of called routines is incorporated in the profile of each caller.
 The profile data is taken from the call graph profile file
-.Pf \&( Pa gmon.out
+.Pf ( Pa gmon.out
 default) which is created by programs
 that are compiled with the
 .Fl pg
 default) which is created by programs
 that are compiled with the
 .Fl pg
@@ -74,26 +98,23 @@ its descendents.
 Finally, an index of the function names is provided.
 .Pp
 The following options are available:
 Finally, an index of the function names is provided.
 .Pp
 The following options are available:
-.Tw Fl
-.Tp Fl a
-suppresses the printing of statically declared functions.
+.Bl -tag -width Fl
+.It Fl a
+Suppresses the printing of statically declared functions.
 If this option is given, all relevant information about the static function
 (e.g., time samples, calls to other functions, calls from other functions)
 belongs to the function loaded just before the static function in the
 .Pa a.out
 file.
 If this option is given, all relevant information about the static function
 (e.g., time samples, calls to other functions, calls from other functions)
 belongs to the function loaded just before the static function in the
 .Pa a.out
 file.
-.Tp Fl b
-suppresses the printing of a description of each field in the profile.
-.Tp Fl c
-the static call graph of the program is discovered by a heuristic
+.It Fl b
+Suppresses the printing of a description of each field in the profile.
+.It Fl c
+The static call graph of the program is discovered by a heuristic
 that examines the text space of the object file.
 Static-only parents or children are shown
 with call counts of 0.
 that examines the text space of the object file.
 Static-only parents or children are shown
 with call counts of 0.
-.Tc Fl e
-.Ws
-.Ar name
-.Cx
-suppresses the printing of the graph profile entry for routine
+.It Fl e Ar name 
+Suppresses the printing of the graph profile entry for routine
 .Ar name
 and all its descendants
 (unless they have other ancestors that aren't suppressed).
 .Ar name
 and all its descendants
 (unless they have other ancestors that aren't suppressed).
@@ -105,11 +126,8 @@ Only one
 may be given with each
 .Fl e
 option.
 may be given with each
 .Fl e
 option.
-.Tc Fl E
-.Ws
-.Ar name
-.Cx
-suppresses the printing of the graph profile entry for routine
+.It Fl E Ar name 
+Suppresses the printing of the graph profile entry for routine
 .Ar name
 (and its descendants) as
 .Fl e  ,
 .Ar name
 (and its descendants) as
 .Fl e  ,
@@ -122,11 +140,8 @@ above, and also excludes the time spent in
 .Fl E
 .Ar mcleanup
 is the default.)
 .Fl E
 .Ar mcleanup
 is the default.)
-.Tc Fl f
-.Ws
-.Ar name
-.Cx
-prints the graph profile entry of only the specified routine
+.It Fl f Ar name 
+Prints the graph profile entry of only the specified routine
 .Ar name
 and its descendants.
 More than one
 .Ar name
 and its descendants.
 More than one
@@ -137,11 +152,8 @@ Only one
 may be given with each
 .Fl f
 option.
 may be given with each
 .Fl f
 option.
-.Tc Fl F
-.Ws
-.Ar name
-.Cx
-prints the graph profile entry of only the routine
+.It Fl F Ar name 
+Prints the graph profile entry of only the routine
 .Ar name
 and its descendants (as
 .Fl f ,
 .Ar name
 and its descendants (as
 .Fl f ,
@@ -162,16 +174,11 @@ overrides
 the
 .Fl E
 option.
 the
 .Fl E
 option.
-.Tc Fl k
-.Ws
-.Ar fromname
-.Ws
-.Ar toname
-.Cx
-will delete any arcs from routine
+.It Fl k Ar fromname Ar toname 
+Will delete any arcs from routine
 .Ar fromname
 to routine
 .Ar fromname
 to routine
-.Ar toname  .
+.Ar toname .
 This can be used to break undesired cycles.
 More than one
 .Fl k
 This can be used to break undesired cycles.
 More than one
 .Fl k
@@ -179,53 +186,65 @@ option may be given.
 Only one pair of routine names may be given with each
 .Fl k
 option.
 Only one pair of routine names may be given with each
 .Fl k
 option.
-.Tp Fl s
-a profile file
+.It Fl s
+A profile file
 .Pa gmon.sum
 is produced that represents
 the sum of the profile information in all the specified profile files.
 This summary profile file may be given to later
 executions of gprof (probably also with a
 .Pa gmon.sum
 is produced that represents
 the sum of the profile information in all the specified profile files.
 This summary profile file may be given to later
 executions of gprof (probably also with a
-.Fl s  )
+.Fl s )
 to accumulate profile data across several runs of an
 .Pa a.out
 file.
 to accumulate profile data across several runs of an
 .Pa a.out
 file.
-.Tp Fl z
-displays routines that have zero usage (as shown by call counts
+.It Fl z
+Displays routines that have zero usage (as shown by call counts
 and accumulated time).
 This is useful with the
 .Fl c
 option for discovering which routines were never called.
 and accumulated time).
 This is useful with the
 .Fl c
 option for discovering which routines were never called.
-.Tp
+.El
 .Sh FILES
 .Sh FILES
-.Dw gmon.sum
-.Di L
-.Dp Pa a.out
-the namelist and text space.
-.Dp Pa gmon.out
-dynamic call graph and profile.
-.Dp Pa gmon.sum
-summarized dynamic call graph and profile.
-.Dp
+.Bl -tag -width gmon.sum -compact
+.It Pa a.out
+The namelist and text space.
+.It Pa gmon.out
+Dynamic call graph and profile.
+.It Pa gmon.sum
+Summarized dynamic call graph and profile.
+.El
 .Sh SEE ALSO
 .Xr monitor 3 ,
 .Xr profil 2 ,
 .Xr cc 1 ,
 .Xr prof 1
 .Sh SEE ALSO
 .Xr monitor 3 ,
 .Xr profil 2 ,
 .Xr cc 1 ,
 .Xr prof 1
-.br
-.Em An Execution Profiler for Modular Programs ,
-by
-S. Graham, P. Kessler, M. McKusick;
-Software  - Practice and Experience,
-Vol. 13, pp. 671-685, 1983.
-.br
-.Em gprof: A Call Graph Execution Profiler ,
-by S. Graham, P. Kessler, M. McKusick;
-Proceedings of the SIGPLAN '82 Symposium on Compiler Construction,
-SIGPLAN Notices, Vol. 17, No  6, pp. 120-126, June 1982.
+.Rs
+.%T "An Execution Profiler for Modular Programs"
+.%A S. Graham
+.%A P. Kessler
+.%A M. McKusick
+.%J "Software - Practice and Experience"
+.%V 13
+.%P pp. 671-685
+.%D 1983
+.Re
+.Rs
+.%T "gprof: A Call Graph Execution Profiler"
+.%A S. Graham
+.%A P. Kessler
+.%A M. McKusick
+.%J "Proceedings of the SIGPLAN '82 Symposium on Compiler Construction, SIGPLAN Notices"
+.%V 17
+.%N 6
+.%P pp. 120-126
+.%D June 1982
+.Re
 .Sh HISTORY
 .Sh HISTORY
-.Nm Gprof
-appeared in 4.2 BSD.
+The
+.Nm gprof
+profiler
+appeared in
+.Bx 4.2 .
 .Sh BUGS
 The granularity of the sampling is shown, but remains
 statistical at best.
 .Sh BUGS
 The granularity of the sampling is shown, but remains
 statistical at best.