Simplify Tor's control flow graph to the extent we can.
For background, see http://archives.seul.org/tor/dev/Mar-2015/msg00197.html .
As of this writing, the largest strongly-connected component in Tor's callgraph has 407 functions in it. Nobody can actually understand a program that's so complex. Let's simplify it!
(This is a parent ticket.)
- Show closed items
Activity
-
Newest first Oldest first
-
Show all activity Show comments only Show history only
- Nick Mathewson changed milestone to %Tor: unspecified
changed milestone to %Tor: unspecified
- Author
Updated to include all branches written so far. With these, we're at 93 items in the blob, down from ~450 in March.
The remaining functions in the blob will be:
['append_cell_to_circuit_queue', 'authority_certs_fetch_missing', 'cell_queues_check_size', 'channel_connect', 'channel_connect_for_circuit', 'channel_tls_connect', 'circuit_build_failed', 'circuit_deliver_create_cell', 'circuit_discard_optional_exit_enclaves', 'circuit_establish_circuit', 'circuit_extend_to_new_exit', 'circuit_get_open_circ_or_launch', 'circuit_handle_first_hop', 'circuit_has_opened', 'circuit_launch_by_extend_info', 'circuit_mark_for_close_', 'circuit_package_relay_cell', 'circuit_send_next_onion_skin', 'circuit_testing_opened', 'circuit_try_attaching_streams', 'circuits_handle_oom', 'connection_ap_attach_pending', 'connection_ap_fail_onehop', 'connection_ap_handshake_attach_chosen_circuit', 'connection_ap_handshake_attach_circuit', 'connection_ap_handshake_send_begin', 'connection_ap_handshake_send_resolve', 'connection_ap_handshake_socks_reply', 'connection_ap_handshake_socks_resolved', 'connection_ap_make_link', 'connection_control_closed', 'connection_dir_bridge_routerdesc_failed', 'connection_dir_download_cert_failed', 'connection_dir_request_failed', 'connection_dir_retry_bridges', 'connection_edge_destroy', 'connection_edge_package_raw_inbuf', 'connection_edge_send_command', 'connection_free', 'connection_mark_unattached_ap_', 'connection_or_connect', 'connection_or_finished_connecting', 'connection_or_launch_v3_or_handshake', 'connection_or_send_versions', 'connection_or_write_var_cell_to_buf', 'connection_proxy_connect', 'connection_tls_continue_handshake', 'connection_tls_finish_handshake', 'connection_tls_start_handshake', 'connection_write_to_buf', 'connection_write_to_buf_impl_', 'consider_plaintext_ports', 'consider_testing_reachability', 'directory_get_from_dirserver', 'directory_get_from_hs_dir', 'directory_initiate_command', 'directory_initiate_command_rend', 'directory_initiate_command_routerstatus', 'directory_initiate_command_routerstatus_rend', 'directory_send_command', 'fetch_v2_desc_by_addr', 'fetch_v2_desc_by_descid', 'initiate_descriptor_downloads', 'launch_descriptor_downloads', 'launch_direct_bridge_descriptor_fetch', 'launch_dummy_descriptor_download_as_needed', 'networkstatus_consensus_download_failed', 'pathbias_check_close', 'pathbias_send_usable_probe', 'relay_send_command_from_edge_', 'rend_client_desc_trynow', 'rend_client_fetch_v2_desc', 'rend_client_introcirc_has_opened', 'rend_client_reextend_intro_circuit', 'rend_client_refetch_v2_renddesc', 'rend_client_rendcirc_has_opened', 'rend_client_report_intro_point_failure', 'rend_client_send_establish_rendezvous', 'rend_client_send_introduction', 'rend_service_del_ephemeral', 'rend_service_intro_has_opened', 'rend_service_relaunch_rendezvous', 'rend_service_rendezvous_has_opened', 'retry_bridge_descriptor_fetch_directly', 'router_perform_bandwidth_test', 'routerlist_retry_directory_downloads', 'update_all_descriptor_downloads', 'update_certificate_downloads', 'update_consensus_networkstatus_downloads', 'update_consensus_router_descriptor_downloads', 'update_microdesc_downloads', 'update_networkstatus_downloads', 'update_router_descriptor_downloads']
In addition to the tickets currently open, these seem like promising areas to try removing a single call dependency on. Each of them would remove the stated number of functions from the largest SCC:
[(4, 'rend_client_fetch_v2_desc', 'called by', 'rend_client_refetch_v2_renddesc'), (4, 'retry_bridge_descriptor_fetch_directly', 'called by', 'connection_dir_retry_bridges'), (5, 'cell_queues_check_size', 'called by', 'append_cell_to_circuit_queue'), (5, 'circuit_build_failed', 'called by', 'circuit_mark_for_close_'), (5, 'circuits_handle_oom', 'called by', 'cell_queues_check_size'), (5, 'initiate_descriptor_downloads', 'called by', 'launch_descriptor_downloads'), (6, 'connection_or_write_var_cell_to_buf', 'called by', 'connection_or_send_versions'), (6, 'connection_tls_continue_handshake', 'called by', 'connection_tls_start_handshake'), (6, 'connection_tls_start_handshake', 'called by', 'connection_or_finished_connecting'), (7, 'connection_dir_request_failed', 'called by', 'directory_initiate_command_rend'), (7, 'update_all_descriptor_downloads', 'called by', 'routerlist_retry_directory_downloads'), (8, 'connection_or_finished_connecting', 'called by', 'connection_or_connect'), (9, 'routerlist_retry_directory_downloads', 'called by', 'circuit_get_open_circ_or_launch'), (12, 'channel_connect', 'called by', 'channel_connect_for_circuit'), (12, 'channel_connect_for_circuit', 'called by', 'circuit_handle_first_hop'), (12, 'channel_tls_connect', 'called by', 'channel_connect'), (12, 'connection_or_connect', 'called by', 'channel_tls_connect'), (13, 'circuit_handle_first_hop', 'called by', 'circuit_establish_circuit'), (14, 'circuit_establish_circuit', 'called by', 'circuit_launch_by_extend_info'), (18, 'connection_write_to_buf_impl_', 'called by', 'connection_write_to_buf')]
And these are the functions which (after the currently open tickets are applied) which pull the most other functions into the largest SCC.
(7, 'rend_client_refetch_v2_renddesc'), (7, 'update_all_descriptor_downloads'), (8, 'connection_or_finished_connecting'), (8, 'directory_get_from_dirserver'), (9, 'routerlist_retry_directory_downloads'), (10, 'circuit_get_open_circ_or_launch'), (10, 'circuit_has_opened'), (12, 'channel_connect'), (12, 'channel_connect_for_circuit'), (12, 'channel_tls_connect'), (12, 'connection_or_connect'), (13, 'circuit_handle_first_hop'), (14, 'circuit_establish_circuit'), (16, 'circuit_launch_by_extend_info'), (18, 'connection_ap_handshake_attach_circuit'), (18, 'connection_write_to_buf'), (18, 'connection_write_to_buf_impl_'), (30, 'directory_initiate_command_rend'), (46, 'circuit_mark_for_close_')]
- Author
Trac:
Milestone: Tor: 0.2.7.x-final to Tor: 0.2.8.x-final - Author
Trac:
Keywords: N/A deleted, 028-triage added - Author
Bulk-replace SponsorS keyword with SponsorS sponsor field in Tor component.
Trac:
Sponsor: N/A to SponsorS
Keywords: SponsorS deleted, N/A added - Author
Trac:
Points: N/A to medium/large - Author
Deferring these two to 0.2.9; we have already made big progress in simplifying the Blob.
Trac:
Milestone: Tor: 0.2.8.x-final to Tor: 0.2.9.x-final Trac:
Sponsor: SponsorS to SponsorS-can- Author
Trac:
Priority: Medium to High - Author
Trac:
Status: new to accepted
Owner: N/A to nickm - Author
Trac:
Keywords: N/A deleted, tor-modularity added Trac:
Points: medium/large to 4.5- Author
Trac:
Reviewer: N/A to N/A
Severity: N/A to Normal
Points: 4.5 to parent - Author
Trac:
Status: accepted to assigned
Owner: nickm to N/A - Author
Put all unowned "assigned" tickets back into "new".
Trac:
Status: assigned to new - Author
This is very largely done. The blob is tiny now. Dropping this from 0.2.9.
Trac:
Milestone: Tor: 0.2.9.x-final to Tor: 0.2.??? - Author
Finally admitting that 0.3.??? was a euphemism for Tor: unspecified all along.
Trac:
Keywords: N/A deleted, tor-03-unspecified-201612 added
Milestone: Tor: 0.3.??? to Tor: unspecified - Author
Remove an old triaging keyword.
Trac:
Keywords: tor-03-unspecified-201612 deleted, N/A added - Author
Trac:
Keywords: 028-triage deleted, N/A added - Author
Trac:
Keywords: N/A deleted, callgraph, technical-debt added - Nick Mathewson mentioned in issue #16826 (moved)
mentioned in issue #16826 (moved)
- traumschule mentioned in issue #27879 (moved)
mentioned in issue #27879 (moved)
- Trac moved to tpo/core/tor#16764 (closed)
moved to tpo/core/tor#16764 (closed)
- Trac mentioned in issue tpo/core/tor#27879 (closed)
mentioned in issue tpo/core/tor#27879 (closed)