Creating a profiled version of a program
If a program is to be profiled with lprof,
it must be compiled with the -ql option
to the cc command so that line count data will be saved.
$ cc -ql travel.c
If you wish to create relocatable object files and link them
later, you must specify -ql
when you link as well as when you compile:
$ cc -ql -c travel.c
$ cc -ql -c misc.c
$ cc -ql -o travel travel.o misc.o
To profile an
individual source file, rather than the source
for the whole program,
create a profiled version by
using the -ql option when you compile the
source file in question, and again when you link.
Running the profiled program
© 2003 Caldera International, Inc. All rights reserved.
SCO OpenServer Release 5.0.7 -- 11 February 2003