bprint - expression profiler


bprint [ option ] [ file ]


bprint produces on the standard output a listing of the programs compiled by lcc with the -b option. Executing an a.out so compiled appends profiling data to prof.out. The first token of each expression in the listing is preceded by the number of times it was executed enclosed in angle brackets as determined from the data in prof.out. bprint interprets the following options.
Compress the prof.out file, which otherwise grows with every execution of a.out.
Print an annotated listing as described above.
Include line numbers in the listing.
Print only the number of invocations of each function. A second -f summarizes call sites instead of callers.
-I\*Sdir specifies additional directories in which to seek files given in prof.out that do not begin with `/'.

If any file names are given, only the requested data for those files are printed in the order presented. If no options are given, -b is assumed.


prof.out profiling data

/usr/lib/bbexit.o creates prof.out when a.out exits


lcc(1), prof(1)


Macros and comments can confuse bprint because it uses post-expansion source coordinates to annotate pre-expansion source files. If bprint sees that it's about to print a statement count inside a number or identifier, it moves the count to just before the token.

Can't cope with an ill-formed prof.out.