xref: /csrg-svn/usr.bin/pascal/pxp/pxp.1 (revision 62191)
1*62191Sbostic.\" Copyright (c) 1980, 1990, 1993
2*62191Sbostic.\"	The Regents of the University of California.  All rights reserved.
319276Smckusick.\"
443083Scael.\" %sccs.include.redist.man%
519276Smckusick.\"
6*62191Sbostic.\"	@(#)pxp.1	8.1 (Berkeley) 06/06/93
743083Scael.\"
843083Scael.Dd
943083Scael.Dt PXP 1
1049960Scael.Os BSD 3
1143083Scael.Sh NAME
1243083Scael.Nm pxp
1343083Scael.Nd Pascal execution profiler
1443083Scael.Sh SYNOPSIS
1543083Scael.Nm pxp
1643083Scael.Op Fl acdefjnstuw_
1743083Scael.Op Fl 23456789
1843083Scael.Op Fl z Op Ar name ...
1943083Scael.Ar name.p
2043083Scael.Sh DESCRIPTION
2143083Scael.Nm Pxp
2219276Smckusickcan be used to obtain execution profiles of Pascal programs or
2319276Smckusickas a pretty-printer.
2419276SmckusickTo produce an execution profile all that is necessary is to translate
2519276Smckusickthe program specifying the
2643083Scael.Fl z
2719276Smckusickoption to
2843083Scael.Xr pi 1
2919276Smckusickor
3043083Scael.Xr pix 1 ,
3119276Smckusickto execute the program,
3219276Smckusickand to then issue the command
3349960Scael.Bd -literal -offset indent
3449960Scaelpxp -x name.p
3549960Scael.Ed
3643083Scael.Pp
3719276SmckusickA reformatted listing is output if none of the
3843083Scael.Fl c  ,
3943083Scael.Fl t ,
4019276Smckusickor
4143083Scael.Fl z
4219276Smckusickoptions are specified;
4319276Smckusickthus
4449960Scael.Bd -literal -offset indent
4549960Scaelpxp old.p > new.p
4649960Scael.Ed
4743083Scael.Pp
4819276Smckusickplaces a pretty-printed version of the program in `old.p' in the file `new.p'.
4943083Scael.Pp
5019276SmckusickThe use of the following options of
5143083Scael.Nm pxp
5219276Smckusickis discussed in sections 2.6, 5.4, 5.5 and 5.10 of the
5349960Scael.%T "Berkeley Pascal User's Manual" .
5449960Scael.Bl -tag -width Fl
5549960Scael.It Fl a
5619276SmckusickPrint the bodies of all procedures and functions in the profile;
5719276Smckusickeven those which were never executed.
5849960Scael.It Fl c
5919276SmckusickExtract profile data from the file
6043083Scael.Pa core  .
6149960Scael.It Fl d
6219276SmckusickInclude declaration parts in a profile.
6349960Scael.It Fl e
6419276SmckusickEliminate
6543083Scael.Ic include
6619276Smckusickdirectives when reformatting a file;
6719276Smckusickthe
6843083Scael.Ic include
6919276Smckusickis replaced by the reformatted contents of the specified
7019276Smckusickfile.
7149960Scael.It Fl f
7219276SmckusickFully parenthesize expressions.
7349960Scael.It Fl j
7419276SmckusickLeft justify all procedures and functions.
7549960Scael.It Fl n
7643083ScaelEject a new page
7719276Smckusickas each file is included;
7819276Smckusickin profiles, print a blank line at the top of the page.
7949960Scael.It Fl s
8019276SmckusickStrip comments from the input text.
8149960Scael.It Fl t
8219276SmckusickPrint a table summarizing
8343083Scael.Ic procedure
8419276Smckusickand
8543083Scael.Ic function
8619276Smckusickcall counts.
8749960Scael.It Fl u
8819276SmckusickCard image mode; only the first 72 characters of input lines
8919276Smckusickare used.
9049960Scael.It Fl w
9119276SmckusickSuppress warning diagnostics.
9249960Scael.It Fl z
9319276SmckusickGenerate an execution profile.
9419276SmckusickIf no
9549960Scael.Ar name Ns 's
9619276Smckusickare given the profile is of the entire program.
9719276SmckusickIf a list of names is given, then only any specified
9849960Scael.Ic procedure Ns s
9919276Smckusickor
10049960Scael.Cx Ic function Ns s
10119276Smckusickand the contents of any specified
10243083Scael.Ic include
10319276Smckusickfiles will appear in the profile.
10449960Scael.It Fl \&_
10519276SmckusickUnderline keywords.
10649960Scael.It Fl d
10719276SmckusickWith
10843083Scael.Ar d
10949960Scaela digit, 2 \*(Le
11043083Scael.Ar d
11149960Scael\*(Le 9,
11219276Smckusickcauses
11343083Scael.Nm pxp
11419276Smckusickto use
11543083Scael.Ar d
11619276Smckusickspaces as the basic indenting unit.
11719276SmckusickThe default is 4.
11849960Scael.El
11943083Scael.Sh FILES
12049960Scael.Bl -tag -width /usr/lib/how_pxp -compact
12149960Scael.It Pa name.p
12243083Scaelinput file
12349960Scael.It Pa name.i
12443083Scaelinclude file(s)
12549960Scael.It Pa pmon.out
12643083Scaelprofile data
12749960Scael.It Pa core
12843083Scaelprofile data source with
12943083Scael.Fl c
13049960Scael.It Pa /usr/lib/how_pxp
13143083Scaelinformation on basic usage
13249960Scael.El
13343083Scael.Sh SEE ALSO
13443083Scael.Xr pi 1 ,
13543083Scael.Xr px 1
13649960Scael.Rs
13749960Scael.%T "Berkeley Pascal User's Manual"
13849960Scael.Re
13943083Scael.Sh DIAGNOSTICS
14019276SmckusickFor a basic explanation do
14149960Scael.Bd -literal -offset indent
14249960Scaelpxp
14349960Scael.Ed
14443083Scael.Pp
14519276SmckusickError diagnostics include
14619276Smckusick`No profile data in file'
14719276Smckusickwith the
14843083Scael.Fl c
14919276Smckusickoption if the
15043083Scael.Fl z
15119276Smckusickoption was not enabled to
15243083Scael.Nm pi ;
15319276Smckusick`Not a Pascal system core file'
15419276Smckusickif the core is not from a
15543083Scael.Nm px
15619276Smckusickexecution;
15719276Smckusick`Program and count data do not correspond'
15819276Smckusickif the program was changed after compilation, before profiling;
15919276Smckusickor if the wrong program is specified.
16043083Scael.Sh HISTORY
16143083Scael.Nm Pxp
16249960Scaelappeared in
16349960Scael.Bx 3.0 .
16443083Scael.Sh BUGS
16519276SmckusickDoes not place multiple statements per line.
166