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.
For example:
$ cc -ql travel.cIf 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.oTo 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.