xref: /original-bsd/usr.bin/pascal/pxp/pxp.1 (revision c3e32dec)
1.\" Copyright (c) 1980, 1990, 1993
2.\"	The Regents of the University of California.  All rights reserved.
3.\"
4.\" %sccs.include.redist.man%
5.\"
6.\"	@(#)pxp.1	8.1 (Berkeley) 06/06/93
7.\"
8.Dd
9.Dt PXP 1
10.Os BSD 3
11.Sh NAME
12.Nm pxp
13.Nd Pascal execution profiler
14.Sh SYNOPSIS
15.Nm pxp
16.Op Fl acdefjnstuw_
17.Op Fl 23456789
18.Op Fl z Op Ar name ...
19.Ar name.p
20.Sh DESCRIPTION
21.Nm Pxp
22can be used to obtain execution profiles of Pascal programs or
23as a pretty-printer.
24To produce an execution profile all that is necessary is to translate
25the program specifying the
26.Fl z
27option to
28.Xr pi 1
29or
30.Xr pix 1 ,
31to execute the program,
32and to then issue the command
33.Bd -literal -offset indent
34pxp -x name.p
35.Ed
36.Pp
37A reformatted listing is output if none of the
38.Fl c  ,
39.Fl t ,
40or
41.Fl z
42options are specified;
43thus
44.Bd -literal -offset indent
45pxp old.p > new.p
46.Ed
47.Pp
48places a pretty-printed version of the program in `old.p' in the file `new.p'.
49.Pp
50The use of the following options of
51.Nm pxp
52is discussed in sections 2.6, 5.4, 5.5 and 5.10 of the
53.%T "Berkeley Pascal User's Manual" .
54.Bl -tag -width Fl
55.It Fl a
56Print the bodies of all procedures and functions in the profile;
57even those which were never executed.
58.It Fl c
59Extract profile data from the file
60.Pa core  .
61.It Fl d
62Include declaration parts in a profile.
63.It Fl e
64Eliminate
65.Ic include
66directives when reformatting a file;
67the
68.Ic include
69is replaced by the reformatted contents of the specified
70file.
71.It Fl f
72Fully parenthesize expressions.
73.It Fl j
74Left justify all procedures and functions.
75.It Fl n
76Eject a new page
77as each file is included;
78in profiles, print a blank line at the top of the page.
79.It Fl s
80Strip comments from the input text.
81.It Fl t
82Print a table summarizing
83.Ic procedure
84and
85.Ic function
86call counts.
87.It Fl u
88Card image mode; only the first 72 characters of input lines
89are used.
90.It Fl w
91Suppress warning diagnostics.
92.It Fl z
93Generate an execution profile.
94If no
95.Ar name Ns 's
96are given the profile is of the entire program.
97If a list of names is given, then only any specified
98.Ic procedure Ns s
99or
100.Cx Ic function Ns s
101and the contents of any specified
102.Ic include
103files will appear in the profile.
104.It Fl \&_
105Underline keywords.
106.It Fl d
107With
108.Ar d
109a digit, 2 \*(Le
110.Ar d
111\*(Le 9,
112causes
113.Nm pxp
114to use
115.Ar d
116spaces as the basic indenting unit.
117The default is 4.
118.El
119.Sh FILES
120.Bl -tag -width /usr/lib/how_pxp -compact
121.It Pa name.p
122input file
123.It Pa name.i
124include file(s)
125.It Pa pmon.out
126profile data
127.It Pa core
128profile data source with
129.Fl c
130.It Pa /usr/lib/how_pxp
131information on basic usage
132.El
133.Sh SEE ALSO
134.Xr pi 1 ,
135.Xr px 1
136.Rs
137.%T "Berkeley Pascal User's Manual"
138.Re
139.Sh DIAGNOSTICS
140For a basic explanation do
141.Bd -literal -offset indent
142pxp
143.Ed
144.Pp
145Error diagnostics include
146`No profile data in file'
147with the
148.Fl c
149option if the
150.Fl z
151option was not enabled to
152.Nm pi ;
153`Not a Pascal system core file'
154if the core is not from a
155.Nm px
156execution;
157`Program and count data do not correspond'
158if the program was changed after compilation, before profiling;
159or if the wrong program is specified.
160.Sh HISTORY
161.Nm Pxp
162appeared in
163.Bx 3.0 .
164.Sh BUGS
165Does not place multiple statements per line.
166