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

Source listing output

By default, lprof displays profiled source code line by line with a count of the number of times each line was executed, 0 if an executable line was never executed. Line numbers of executable lines are enclosed in brackets, with the number of times each line was executed printed to the left of the line number, as shown in ``Example of lprof Default Output''.

Note that lines that are not executable -- declarations, comments, and blank lines, for example -- are marked neither with a line number nor an execution count.

   SOURCE FILE:  sample.c
   

#include <stdio.h>

main() 1 [4] { /* declarations are not executable lines and therefore have no line number or execution status associated with them */ int i;

1 [10] for (i = 0; i < 10; i++) 10 [11] sub1();

1 [13] }

sub1() 10 [16] { /* this initialization is an executable statement */ 10 [18] int i = 0;

10 [20] if (i > 0) { 0 [21] sub2(); } else { 10 [24] sub3(); } 10 [26] }

sub2() 0 [29] { /* do nothing */ 0 [31] }

sub3() 10 [34] { /* do nothing */ 10 [36] }

Example of lprof Default Output


Next topic: Highlighting unexecuted lines
Previous topic: Searching for source files

© 2005 The SCO Group, Inc. All rights reserved.
SCO OpenServer Release 6.0.0 -- 02 June 2005