index % time self children called name 0.00 0.00 1/13496 name_too_long 0.00 0.00 40/13496 deflate 0.00 0.00 128/13496 deflate_fast 0.00 0.00 13327/13496 ct_init [7] 0.0 0.00 0.00 13496 init_block Now let's look at some of 'gprof''s output from the same program run, this time with line-by-line profiling enabled. Note that 'ct_init''s four histogram hits are broken down into four lines of source code--one hit occurred on each of lines 349, 351, 382 and 385. In the call graph, note how 'ct_init''s 13327 calls to 'init_block' are broken down into one call from line 396, 3071 calls from line 384, 3730 calls from line 385, and 6525 calls from 387. Flat profile: Each sample counts as 0.01 seconds. % cumulative self time seconds seconds calls name 7.69 0.10 0.01 ct_init (trees.c:349) 7.69 0.11 0.01 ct_init (trees.c:351) 7.69 0.12 0.01 ct_init (trees.c:382) 7.69 0.13 0.01 ct_init (trees.c:385) Call graph (explanation follows) granularity: each sample hit covers 4 byte(s) for 7.69% of 0.13 seconds % time self children called name 0.00 0.00 1/13496 name_too_long (gzip.c:1440) 0.00 0.00 1/13496 deflate (deflate.c:763) 0.00 0.00 1/13496 ct_init (trees.c:396) 0.00 0.00 2/13496 deflate (deflate.c:727) 0.00 0.00 4/13496 deflate (deflate.c:686) 0.00 0.00 5/13496 deflate (deflate.c:675) 0.00 0.00 12/13496 deflate (deflate.c:679) 0.00 0.00 16/13496 deflate (deflate.c:730) 0.00 0.00 128/13496 deflate_fast (deflate.c:654) 0.00 0.00 3071/13496 ct_init (trees.c:384) 0.00 0.00 3730/13496 ct_init (trees.c:385) 0.00 0.00 6525/13496 ct_init (trees.c:387) [6] 0.0 0.00 0.00 13496 init_block (trees.c:408)