Hi,
My program's Gprof output is a little weird!
Code:
Call graph (explanation follows)
granularity: each sample hit covers 4 byte(s) for 50.00% of 0.02 seconds
index % time self children called name
0.01 0.01 10/10 main [2]
[1] 100.0 0.01 0.01 10 route_aggregation_main [1]
0.00 0.01 10/10 route_to_file [4]
0.00 0.00 10/10 access_file_insert_data [19]
0.00 0.00 10/10 route_processing [25]
0.00 0.00 10/10 route_aggregate [24]
0.00 0.00 10/10 display [22]
-----------------------------------------------
<spontaneous>
[2] 100.0 0.00 0.02 main [2]
0.01 0.01 10/10 route_aggregation_main [1]
0.00 0.00 10/10 append_to_file [20]
0.00 0.00 10/10 map_notify_packet_initialization [23]
0.00 0.00 1/1 recved_map_register_packet_initialization [32]
-----------------------------------------------
0.01 0.00 10/10 route_to_file [4]
[3] 50.0 0.01 0.00 10 delegation_aggregation_main [3]
0.00 0.00 20/20 is_virtual_ip [16]
0.00 0.00 10/10 Delegation_select_query [18]
-----------------------------------------------
0.00 0.01 10/10 route_aggregation_main [1]
[4] 50.0 0.00 0.01 10 route_to_file [4]
0.01 0.00 10/10 delegation_aggregation_main [3]
0.00 0.00 10/10 db_access_main [21]
0.00 0.00 10/10 vtysh_input [28]
-----------------------------------------------
Now, as far as I know, "%time" column shows the percentage of the `total' time that was spent in this function and its children. Then how can both index 1 and 2 show 100. What does this mean? Note that, this profile has 32 indexes. I have omitted those because they show 0 in their %time column.
Bye.