.\" $Id: bprint.1,v 1.4 1998/08/24 21:18:18 drh Exp $
|
.\" $Id: bprint.1,v 1.4 1998/08/24 21:18:18 drh Exp $
|
.TH BPRINT 1 "local \- $Date: 1998/08/24 21:18:18 $"
|
.TH BPRINT 1 "local \- $Date: 1998/08/24 21:18:18 $"
|
.SH NAME
|
.SH NAME
|
bprint \- expression profiler
|
bprint \- expression profiler
|
.SH SYNOPSIS
|
.SH SYNOPSIS
|
.B bprint
|
.B bprint
|
[
|
[
|
.I option ...
|
.I option ...
|
]
|
]
|
[
|
[
|
.I file ...
|
.I file ...
|
]
|
]
|
.SH DESCRIPTION
|
.SH DESCRIPTION
|
.I bprint
|
.I bprint
|
produces on the standard output a listing of the programs compiled by
|
produces on the standard output a listing of the programs compiled by
|
.I lcc
|
.I lcc
|
with the
|
with the
|
.B \-b
|
.B \-b
|
option.
|
option.
|
Executing an
|
Executing an
|
.B a.out
|
.B a.out
|
so compiled appends profiling data to
|
so compiled appends profiling data to
|
.BR prof.out .
|
.BR prof.out .
|
The first token of each expression in the listing is preceded
|
The first token of each expression in the listing is preceded
|
by the number of times it was executed
|
by the number of times it was executed
|
enclosed in angle brackets as determined from the data in
|
enclosed in angle brackets as determined from the data in
|
.BR prof.out .
|
.BR prof.out .
|
.I bprint
|
.I bprint
|
interprets the following options.
|
interprets the following options.
|
.TP
|
.TP
|
.B \-c
|
.B \-c
|
Compress the
|
Compress the
|
.B prof.out
|
.B prof.out
|
file, which otherwise grows with every execution of
|
file, which otherwise grows with every execution of
|
.BR a.out .
|
.BR a.out .
|
.TP
|
.TP
|
.B \-b
|
.B \-b
|
Print an annotated listing as described above.
|
Print an annotated listing as described above.
|
.TP
|
.TP
|
.B \-n
|
.B \-n
|
Include line numbers in the listing.
|
Include line numbers in the listing.
|
.TP
|
.TP
|
.B \-f
|
.B \-f
|
Print only the number of invocations of each function.
|
Print only the number of invocations of each function.
|
A second
|
A second
|
.B \-f
|
.B \-f
|
summarizes call sites instead of callers.
|
summarizes call sites instead of callers.
|
.TP
|
.TP
|
.BI \-I \*Sdir
|
.BI \-I \*Sdir
|
specifies additional directories in which to seek
|
specifies additional directories in which to seek
|
files given in
|
files given in
|
.B prof.out
|
.B prof.out
|
that do not begin with `/'.
|
that do not begin with `/'.
|
.PP
|
.PP
|
If any file names are given, only the requested data for those files are printed
|
If any file names are given, only the requested data for those files are printed
|
in the order presented.
|
in the order presented.
|
If no options are given,
|
If no options are given,
|
.B \-b
|
.B \-b
|
is assumed.
|
is assumed.
|
.SH FILES
|
.SH FILES
|
.PP
|
.PP
|
.ta \w'$LCCDIR/liblcc.{a,lib}XX'u
|
.ta \w'$LCCDIR/liblcc.{a,lib}XX'u
|
.nf
|
.nf
|
prof.out profiling data
|
prof.out profiling data
|
$LCCDIR/liblcc.{a,lib} \fIlcc\fP-specific library
|
$LCCDIR/liblcc.{a,lib} \fIlcc\fP-specific library
|
.SH "SEE ALSO"
|
.SH "SEE ALSO"
|
.IR lcc (1),
|
.IR lcc (1),
|
.IR prof (1)
|
.IR prof (1)
|
.SH BUGS
|
.SH BUGS
|
Macros and comments can confuse
|
Macros and comments can confuse
|
.I bprint
|
.I bprint
|
because it uses post-expansion source coordinates
|
because it uses post-expansion source coordinates
|
to annotate pre-expansion source files.
|
to annotate pre-expansion source files.
|
If
|
If
|
.I bprint
|
.I bprint
|
sees that it's about to print a statement count
|
sees that it's about to print a statement count
|
.I inside
|
.I inside
|
a number or identifier, it moves the count to just
|
a number or identifier, it moves the count to just
|
.I before
|
.I before
|
the token.
|
the token.
|
.PP
|
.PP
|
Can't cope with an ill-formed
|
Can't cope with an ill-formed
|
.BR prof.out .
|
.BR prof.out .
|
|
|