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