|
|
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