Flat profile:
Each sample counts as 0.01 seconds.% cumulative self self totaltime seconds seconds calls s/call s/call name100.35 3.67 3.67 123003 0.00 0.00 common0.00 3.67 0.00 3 0.00 0.03 fast0.00 3.67 0.00 3 0.00 1.19 maybe_slow
Call graph
granularity: each sample hit covers 2 byte(s) for 0.27% of 3.67 seconds
index % time self children called name0.09 0.00 3003/123003 fast [4]3.58 0.00 120000/123003 maybe_slow [3][1] 100.0 3.67 0.00 123003 common [1]-----------------------------------------------<spontaneous>[2] 100.0 0.00 3.67 main [2]0.00 3.58 3/3 maybe_slow [3]0.00 0.09 3/3 fast [4]-----------------------------------------------0.00 3.58 3/3 main [2][3] 97.6 0.00 3.58 3 maybe_slow [3]3.58 0.00 120000/123003 common [1]-----------------------------------------------0.00 0.09 3/3 main [2][4] 2.4 0.00 0.09 3 fast [4]0.09 0.00 3003/123003 common [1]-----------------------------------------------
Index by function name
[1] common [4] fast [3] maybe_slow
对于-O3:
Flat profile:
Each sample counts as 0.01 seconds.% cumulative self self totaltime seconds seconds calls us/call us/call name100.52 1.84 1.84 123003 14.96 14.96 common
Call graph
granularity: each sample hit covers 2 byte(s) for 0.54% of 1.84 seconds
index % time self children called name0.04 0.00 3003/123003 fast [3]1.79 0.00 120000/123003 maybe_slow [2][1] 100.0 1.84 0.00 123003 common [1]-----------------------------------------------<spontaneous>[2] 97.6 0.00 1.79 maybe_slow [2]1.79 0.00 120000/123003 common [1]-----------------------------------------------<spontaneous>[3] 2.4 0.00 0.04 fast [3]0.04 0.00 3003/123003 common [1]-----------------------------------------------
Index by function name
[1] common
作为每个部分的快速摘要,例如:
0.00 3.58 3/3 main [2][3] 97.6 0.00 3.58 3 maybe_slow [3]3.58 0.00 120000/123003 common [1]