DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
Analyzing run-time behavior

Searching for source files

To produce the source listing output described in the next section, lprof must be able to access the source and header files that comprise the profiled program (or the profiled part of it). By default, lprof searches

If your source or header files are in directories different from these, you must specify their paths with the -I option. Unlike cc -I, you use lprof -I to specify directories to be searched for source files as well as header files. If some of the source and header files for the profiled program sample are stored in the directory /usr/src/cmd, and the rest in your current directory and the standard place for header files, you use the command

   $ lprof -c sample.cnt -I/usr/src/cmd
to produce a source listing for all your profiled files. You can specify -I more than once on the lprof command line. Directories are searched in the order they appear on the command line.

If you want a source listing for selected source files, you specify the files with the -r option:

   $ lprof -c sample.cnt -r sample.c -r sample2.c
This command produces source listing output only for sample.c and sample2.c of the profiled program sample, provided, of course, that the source files are in your current directory.
Next topic: Source listing output
Previous topic: Invoking lprof

© 2004 The SCO Group, Inc. All rights reserved.
UnixWare 7 Release 7.1.4 - 27 April 2004