Open ndfred opened 3 years ago
Repeating some of the steps in #8, top functions look reasonable:
$ xcrun llvm-profdata show -topn=50 OptimizationProfiles/iperf.profdata
Instrumentation level: Front-end
Total functions: 397
Maximum function count: 310495
Maximum internal block count: 310495
Top 50 functions with the largest internal block counts:
__darwin_check_fd_set, max count = 310495
__darwin_fd_isset, max count = 227100
iperf_recv, max count = 188335
Nread, max count = 169956
__darwin_fd_clr, max count = 83389
iperf_tcp_recv, max count = 83383
iperf_time_compare, max count = 76788
iperf_time_now, max count = 76602
timer.c:getnow, max count = 76451
iperf_time_diff, max count = 38942
iperf_run_client, max count = 38784
tmr_timeout, max count = 38784
iperf_time_in_usecs, max count = 38782
tmr_run, max count = 37725
cjson.c:case_insensitive_strcmp, max count = 443
cjson.c:parse_string, max count = 413
cjson.c:print_string_ptr, max count = 404
cjson.c:parse_number, max count = 276
cjson.c:ensure, max count = 231
cjson.c:buffer_skip_whitespace, max count = 202
cjson.c:get_object_item, max count = 201
cjson.c:print_number, max count = 178
iperf_time_in_secs, max count = 160
iperf_stats_callback, max count = 150
add_to_interval_list, max count = 150
has_tcpinfo, max count = 150
iperf_free_stream, max count = 150
IPFTestRunner.m:-[IPFTestRunner handleStatsCallback:], max count = 150
cjson.c:update_offset, max count = 113
cJSON_Delete, max count = 112
cjson.c:cJSON_New_Item, max count = 112
cjson.c:get_decimal_point, max count = 93
timer.c:list_add, max count = 63
iperf_time_add_usecs, max count = 63
timer.c:list_remove, max count = 63
cjson.c:print_value, max count = 60
timer.c:list_resort, max count = 60
cjson.c:add_item_to_array, max count = 58
cjson.c:cJSON_strdup, max count = 54
cjson.c:print_object, max count = 53
cjson.c:add_item_to_object, max count = 53
cjson.c:parse_value, max count = 52
cjson.c:suffix_object, max count = 50
__inline_isnand, max count = 49
__inline_isinfd, max count = 49
cjson.c:compare_double, max count = 49
cJSON_AddNumberToObject, max count = 49
cJSON_CreateNumber, max count = 49
cJSON_GetObjectItem, max count = 46
cjson.c:parse_object, max count = 46
We spend all of our time reading from the network which is great:
No memory leaks as we run multiple tests, heap tops at 4.3MiB
Binary is 2.6M with armv7, armv7s and arm64 support
Looking at this again now, we are seeing issues with signing:
The profile data is also out of date and needs a new profiling run.
Now that we have 3.9 working, we'll need to ship it: