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