home | O'Reilly's CD bookshelfs | FreeBSD | Linux | Cisco | Cisco Exam  


lprof

lprof [options ]
lprof -m files [-T ] -d out

SVR4 only. Display a program's profile data on a line-by-line basis. Data includes a list of source files, each source-code line (with line numbers), and the number of times each line was executed. By default, lprof interprets the profile file prog .cnt . This file is generated by specifying cc -ql when compiling a program or when creating a shared object named prog (default is a.out ). The PROFOPTS environment variable can control profiling at runtime. See also prof and gprof .

Options

-c file

Read input profile file instead of prog .cnt .

-d out

Store merged profile data in file out . Must be used with -m .

-I dir

Search for include files in dir as well as in the default place (/usr/include ).

-m files

Merge several profile files and total the execution counts. files are of the form f1 .cnt , f2 .cnt , f3 .cnt , etc., where each file contains the profile data from a different run of the same program. Used with -d .

-o prog

Look in the profile file for a program named prog instead of the name used when the profile file was created. -o is needed when files have been renamed or moved.

-p

Print the default listing; useful with -r and -s .

-r list

Used with -p to print only the source files given in list .

-s

For each function, print the percentage of code lines that are executed.

-T

Ignore timestamp of executable files being profiled. Normally, times are checked to insure that the various profiles were made from the same version of an executable.

-V

Print the version of lprof on standard error.

-x

Omit execution counts. For lines that executed, show only the line numbers; for lines that didn't execute, print the line number, the symbol [U] , and the source line.


Previous: Reference: lprm UNIX in a Nutshell: System V Edition Next: Reference: lpstat
Reference: lprm Book Index Reference: lpstat

The UNIX CD Bookshelf NavigationThe UNIX CD BookshelfUNIX Power ToolsUNIX in a NutshellLearning the vi Editorsed & awkLearning the Korn ShellLearning the UNIX Operating System