Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[demikernel] Enhancement: cleanup comments, rename #1443

Merged
merged 1 commit into from
Oct 19, 2024

Conversation

anandbonde
Copy link
Contributor

Cleaned up unnecessary and redundant comments which just explain what the accompanying code does. Such comments only add to visual clutter and more lines to the source code files.

Renamed a few variables for clarity and better code flow while reading.

Copy link

libos = catpowder
commit id = 960d3d8

collapsed_stack num_calls cycles_per_call nanoseconds_per_call percent_time
bgc::inetstack::poll_recv;inetstack::layer4_endpoint::poll_once 10973806.97 689.24 303.36 85.96
bgc::inetstack::poll_recv 5486903.48 1604.70 706.20 52.02
bgc::inetstack::tcp::established::background 17954.50 3648.79 1585.25 0.52
bgc::inetstack::tcp::established::background;tcp::established::background::receiver 17954.50 1360.63 577.75 33.45
bgc::inetstack::tcp::established::background;tcp::established::background::retransmitter 17934.93 1236.94 549.35 32.98
bgc::inetstack::tcp::established::background;tcp::established::background::acknowledger 17934.93 528.85 231.50 11.35
bgc::inetstack::tcp::established::background;tcp::established::background::sender 17934.93 151.29 64.72 4.22
ioc::network::libos::pop 9420.25 845.48 373.80 0.07
demikernel::sgafree 8797.45 111.47 48.62 0.01
ioc::network::libos::push;inetstack::push 8762.80 6221.65 2858.49 1.93
ioc::network::libos::push 8073.87 33643490.65 15600288.15 43.19
demikernel::push 8073.74 602.43 272.32 0.04
demikernel::sgaalloc 6573.88 154.78 69.14 0.03
demikernel::pop 6052.98 610.88 270.39 0.03
bgc::inetstack::poll_recv;inetstack::poll_bg_work::for::for 6006.83 648.45 285.22 0.72
ioc::network::libos::pushto 1543.00 4462.60 1869.91 6.11
ioc::network::libos::pushto;inetstack::push 1543.00 3938.91 1650.48 88.25
demikernel::pushto 1543.00 484.20 202.85 0.64
bgc::inetstack::poll_recv;inetstack::poll_bg_work::for::for;udp::receive 514.00 206.80 87.20 63.60
bgc::passive_listening::poll 62.46 4837.29 2166.31 0.00
ioc::network::libos::close 45.97 10393.38 4574.46 0.13
ioc::network::libos::connect 41.86 21046.29 9494.79 0.16
bgc::inetstack::tcp::passiveopen::background 41.86 14849.84 6667.34 0.00
ioc::network::libos::accept 38.54 2521.17 1128.51 0.00
demikernel::async_close 32.50 700.77 283.20 0.01
demikernel::accept 21.86 1212.87 544.69 0.00
demikernel::connect 20.93 3528.10 1578.82 0.02
demikernel::socket 10.30 1362.46 602.22 0.00
bgc::inetstack::arp::background 4.12 1889.36 828.98 0.00
bgc::inetstack::poll_recv;inetstack::poll;inetstack::layer4_endpoint::poll_once 2.00 5364.97 2353.72 83.37
bgc::inetstack::icmp::background 1.03 3175.38 1396.40 0.00
demikernel::new 1.00 87640579.37 38430328.29 19.44
demikernel::bind 1.00 23021.00 9610.30 0.00
bgc::inetstack::poll_recv;inetstack::poll 1.00 12834.17 5628.44 0.03
demikernel::listen 1.00 5863.79 2571.36 0.00
demikernel::close 0.00 nan nan 0.00

Copy link

libos = catnap
commit id = 960d3d8

collapsed_stack num_calls cycles_per_call nanoseconds_per_call percent_time
bgc::catnap::transport::epoll 9609470.43 2077.59 893.45 32.22
demikernel::sgafree 11538.01 75.57 32.20 0.05
demikernel::sgaalloc 11288.42 129.50 55.98 0.13
ioc::network::libos::push;catnap::linux::transport::push 9066.10 787.42 343.26 4.93
ioc::network::libos::push 8800.48 16776.80 7274.39 6.87
demikernel::push 8800.48 523.47 226.58 0.17
ioc::network::libos::pop;catnap::linux::transport::pop 8023.66 568.73 244.23 3.19
ioc::network::libos::pop 7815.19 8480091.94 3459984.69 25.47
demikernel::pop 7815.19 549.38 235.05 0.12
ioc::network::libos::pushto 682.33 8242.27 3532.48 23.98
ioc::network::libos::pushto;catnap::linux::transport::push 682.33 614.07 263.19 7.45
demikernel::pushto 682.33 550.24 236.96 1.70
demikernel::async_close 32.50 943.85 366.32 0.02
ioc::network::libos::connect 24.95 5407750.57 2327586.48 26.53
ioc::network::libos::connect;catnap::linux::transport::connect 24.95 55257.47 23738.10 2.16
demikernel::connect 24.95 2159.58 926.83 0.01
ioc::network::libos::close 18.35 22878.62 9804.57 0.08
ioc::network::libos::close;catnap::linux::transport::close 18.35 21920.80 9394.03 96.04
demikernel::accept 15.42 1430.26 614.39 0.00
ioc::network::libos::accept 15.41 868735715.15 379181737.95 44.47
ioc::network::libos::accept;catnap::linux::transport::accept 15.39 2300.93 983.53 0.00
demikernel::socket 9.50 55906.77 23905.12 0.11
demikernel::socket;catnap::linux::transport::socket 9.50 54809.71 23441.15 98.04
demikernel::new 1.00 1608925.24 688583.10 0.68
demikernel::bind 1.00 32814.18 14053.36 0.01
demikernel::bind;catnap::linux::transport::bind 1.00 26837.72 11507.59 81.86
demikernel::listen 1.00 15257.82 6541.10 0.00
demikernel::listen;catnap::linux::transport::listen 1.00 14074.42 6036.62 92.14
demikernel::close 0.00 nan nan 0.00

Copy link

libos = catnip
commit id = 960d3d8

collapsed_stack num_calls cycles_per_call nanoseconds_per_call percent_time
bgc::inetstack::poll_recv;inetstack::layer4_endpoint::poll_once 6423915.12 331.49 141.75 76.89
bgc::inetstack::poll_recv;inetstack::layer4_endpoint::poll_once;catnip::runtime::receive 6423915.12 195.81 83.71 59.09
bgc::inetstack::poll_recv 3211957.56 862.45 368.72 32.20
bgc::inetstack::tcp::established::background 16480.32 2968.15 1273.28 0.34
bgc::inetstack::tcp::established::background;tcp::established::background::receiver 16480.32 922.41 392.79 31.25
bgc::inetstack::tcp::established::background;tcp::established::background::retransmitter 16459.39 1207.78 522.02 34.05
bgc::inetstack::tcp::established::background;tcp::established::background::acknowledger 16459.39 384.04 165.05 11.19
bgc::inetstack::tcp::established::background;tcp::established::background::sender 16459.39 136.75 57.95 4.25
ioc::network::libos::pop 9201.00 761.67 330.23 0.05
demikernel::sgafree 9147.04 85.27 36.77 0.00
ioc::network::libos::push;inetstack::push 8762.80 2249.09 975.14 0.58
ioc::network::libos::push;inetstack::push;catnip::runtime::transmit 8762.80 355.34 153.19 14.66
ioc::network::libos::push 8073.76 33616797.87 13795291.53 32.08
demikernel::push 8073.74 682.61 292.72 0.02
demikernel::sgaalloc 7020.50 137.52 57.87 0.01
ioc::network::libos::pushto 7005.00 1325.63 545.05 0.50
ioc::network::libos::pushto;inetstack::push 7005.00 648.35 266.59 48.91
demikernel::pushto 7005.00 465.82 191.49 0.18
ioc::network::libos::pushto;inetstack::push;catnip::runtime::transmit 7005.00 215.95 88.90 33.26
demikernel::pop 6148.06 509.32 218.59 0.01
bgc::inetstack::poll_recv;inetstack::poll_bg_work::for::for 3072.69 834.85 359.58 0.56
bgc::inetstack::poll_recv;inetstack::poll_bg_work::for::for;udp::receive 89.00 257.32 111.48 71.05
bgc::passive_listening::poll 59.18 5452.35 2385.67 0.00
ioc::network::libos::close 50.17 8093.16 3430.79 0.01
ioc::network::libos::connect 41.86 14441.65 6140.43 0.01
bgc::inetstack::tcp::passiveopen::background 41.86 13644.21 5947.70 0.00
ioc::network::libos::connect;catnip::runtime::transmit 41.86 5137.78 2195.93 25.65
ioc::network::libos::accept 38.61 2619.16 1141.53 0.00
demikernel::async_close 32.50 567.79 234.20 0.00
ioc::network::libos::close;catnip::runtime::transmit 31.39 579.58 248.36 5.38
demikernel::accept 21.86 1617.31 704.04 0.00
bgc::inetstack::tcp::passiveopen::background;catnip::runtime::transmit 20.93 16486.46 7167.76 40.15
demikernel::connect 20.93 3035.11 1273.30 0.00
bgc::inetstack::tcp::established::background;tcp::established::background::receiver;catnip::runtime::transmit 20.93 732.30 318.18 4.64
demikernel::socket 10.46 1132.51 484.52 0.00
bgc::inetstack::tcp::established::background;tcp::established::background::acknowledger;catnip::runtime::transmit 9.00 1813.11 740.71 26.96
bgc::inetstack::arp::background 2.29 1981.63 854.58 0.00
bgc::inetstack::poll_recv;inetstack::poll;inetstack::layer4_endpoint::poll_once 2.00 19765.34 8461.62 95.45
bgc::inetstack::poll_recv;inetstack::poll;inetstack::layer4_endpoint::poll_once;catnip::runtime::receive 2.00 17744.19 7597.84 89.75
bgc::inetstack::icmp::background 1.03 3072.47 1312.93 0.00
demikernel::new 1.00 1786755966.75 763840063.36 46.70
bgc::inetstack::poll_recv;inetstack::poll 1.00 41405.42 17722.17 0.13
demikernel::bind 1.00 23482.45 10121.62 0.00
demikernel::listen 1.00 6270.21 2720.69 0.00
demikernel::close 0.00 nan nan 0.00

@anandbonde anandbonde self-assigned this Oct 18, 2024
examples/tcp-echo/server.rs Outdated Show resolved Hide resolved
Copy link

libos = catpowder
commit id = 3847214

collapsed_stack num_calls cycles_per_call nanoseconds_per_call percent_time
bgc::inetstack::poll_recv;inetstack::layer4_endpoint::poll_once 11049253.87 690.32 308.70 86.16
bgc::inetstack::poll_recv 5524626.93 1603.61 717.12 52.58
bgc::inetstack::tcp::established::background 17862.30 3837.31 1712.65 0.56
bgc::inetstack::tcp::established::background;tcp::established::background::receiver 17862.30 1488.57 652.94 34.15
bgc::inetstack::tcp::established::background;tcp::established::background::retransmitter 17842.36 1307.81 592.84 33.21
bgc::inetstack::tcp::established::background;tcp::established::background::acknowledger 17842.36 496.18 224.56 10.86
bgc::inetstack::tcp::established::background;tcp::established::background::sender 17842.36 168.12 74.01 4.30
ioc::network::libos::pop 9286.24 1053.85 477.87 0.09
ioc::network::libos::push;inetstack::push 8762.80 6533.89 3012.43 2.04
demikernel::sgafree 8746.66 129.20 57.73 0.01
ioc::network::libos::push 8073.97 33692563.54 15404662.58 42.88
demikernel::push 8073.74 746.13 338.64 0.05
demikernel::sgaalloc 6499.88 141.52 63.63 0.02
demikernel::pop 6035.22 682.64 306.38 0.04
bgc::inetstack::poll_recv;inetstack::poll_bg_work::for::for 5934.00 657.64 294.82 0.73
ioc::network::libos::pushto 645.67 5009.20 2135.45 2.21
ioc::network::libos::pushto;inetstack::push 645.67 4401.77 1876.54 87.87
demikernel::pushto 645.67 580.58 247.30 0.26
bgc::inetstack::poll_recv;inetstack::poll_bg_work::for::for;udp::receive 191.33 240.33 104.79 64.52
bgc::passive_listening::poll 63.18 5374.18 2449.30 0.00
ioc::network::libos::close 46.62 10356.90 4614.73 0.14
ioc::network::libos::connect 41.86 22221.80 10086.39 0.17
bgc::inetstack::tcp::passiveopen::background 41.86 15738.39 7210.22 0.00
ioc::network::libos::accept 38.68 2618.54 1196.67 0.00
demikernel::async_close 32.50 673.05 286.91 0.01
demikernel::accept 21.86 1697.66 781.21 0.00
demikernel::connect 20.93 4108.11 1858.06 0.02
demikernel::socket 10.30 1656.07 754.21 0.00
bgc::inetstack::arp::background 4.05 2080.25 932.14 0.00
bgc::inetstack::poll_recv;inetstack::poll;inetstack::layer4_endpoint::poll_once 2.00 5849.33 2612.93 83.21
bgc::inetstack::icmp::background 1.03 3493.50 1560.31 0.00
demikernel::new 1.00 92824181.25 41551071.53 19.23
demikernel::bind 1.00 25823.50 11382.36 0.00
bgc::inetstack::poll_recv;inetstack::poll 1.00 13996.73 6250.98 0.04
demikernel::listen 1.00 5167.36 2333.54 0.00
demikernel::close 0.00 nan nan 0.00

Copy link

libos = catnap
commit id = 3847214

collapsed_stack num_calls cycles_per_call nanoseconds_per_call percent_time
bgc::catnap::transport::epoll 9567469.15 2014.28 864.38 32.20
demikernel::sgafree 11536.26 71.54 30.38 0.05
demikernel::sgaalloc 11285.05 120.84 52.05 0.10
ioc::network::libos::push;catnap::linux::transport::push 9066.12 720.01 315.20 4.52
ioc::network::libos::push 8800.49 16609.22 7243.50 6.00
demikernel::push 8800.49 542.73 235.74 0.15
ioc::network::libos::pop;catnap::linux::transport::pop 8024.07 548.96 236.93 2.07
ioc::network::libos::pop 7815.59 9944923.74 4193476.41 26.03
demikernel::pop 7815.59 583.98 249.86 0.11
ioc::network::libos::pushto 613.67 7602.65 3255.02 25.59
ioc::network::libos::pushto;catnap::linux::transport::push 613.67 547.08 233.95 7.21
demikernel::pushto 613.67 462.82 198.46 1.57
demikernel::async_close 32.50 870.80 349.77 0.01
ioc::network::libos::connect 24.95 5865537.34 2536668.19 28.12
ioc::network::libos::connect;catnap::linux::transport::connect 24.95 53130.95 23256.81 1.49
demikernel::connect 24.95 2097.72 923.93 0.01
ioc::network::libos::close 18.35 22111.96 9533.55 0.06
ioc::network::libos::close;catnap::linux::transport::close 18.35 21180.29 9130.35 95.98
demikernel::accept 15.42 1364.86 591.19 0.00
ioc::network::libos::accept 15.39 887684107.86 383929317.40 44.78
ioc::network::libos::accept;catnap::linux::transport::accept 15.39 2324.08 1012.03 0.00
demikernel::socket 9.50 117609.47 52441.84 0.18
demikernel::socket;catnap::linux::transport::socket 9.50 115524.22 51535.13 96.63
demikernel::new 1.00 259465.70 111639.43 0.09
demikernel::bind 1.00 28026.05 12082.33 0.01
demikernel::bind;catnap::linux::transport::bind 1.00 23355.15 10079.54 83.41
demikernel::listen 1.00 15372.39 6627.80 0.00
demikernel::listen;catnap::linux::transport::listen 1.00 14344.87 6186.24 93.16
demikernel::close 0.00 nan nan 0.00

Copy link

libos = catnip
commit id = 3847214

collapsed_stack num_calls cycles_per_call nanoseconds_per_call percent_time
bgc::inetstack::poll_recv;inetstack::layer4_endpoint::poll_once 17472283.20 332.93 140.75 76.74
bgc::inetstack::poll_recv;inetstack::layer4_endpoint::poll_once;catnip::runtime::receive 17472283.20 194.30 82.14 58.39
bgc::inetstack::poll_recv 8736141.60 868.14 367.11 33.58
bgc::inetstack::tcp::established::background 16480.09 2889.99 1217.75 0.34
bgc::inetstack::tcp::established::background;tcp::established::background::receiver 16480.09 863.29 356.48 30.48
bgc::inetstack::tcp::established::background;tcp::established::background::retransmitter 16459.16 1191.11 507.92 34.33
bgc::inetstack::tcp::established::background;tcp::established::background::acknowledger 16459.16 387.68 166.48 11.32
bgc::inetstack::tcp::established::background;tcp::established::background::sender 16459.16 134.52 55.25 4.33
ioc::network::libos::pop 9041.94 758.95 326.24 0.05
demikernel::sgafree 8772.19 82.65 35.22 0.00
ioc::network::libos::push;inetstack::push 8762.80 2170.49 941.58 0.57
ioc::network::libos::push;inetstack::push;catnip::runtime::transmit 8762.80 322.27 139.33 14.32
ioc::network::libos::push 8073.74 33604634.82 13665238.64 32.01
demikernel::push 8073.74 679.20 289.51 0.02
demikernel::sgaalloc 6526.62 149.68 62.71 0.00
demikernel::pop 6049.18 528.63 225.83 0.01
bgc::inetstack::poll_recv;inetstack::poll_bg_work::for::for 3080.46 811.12 344.71 0.66
ioc::network::libos::pushto 1096.67 1442.74 609.78 0.05
ioc::network::libos::pushto;inetstack::push 1096.67 696.49 294.18 48.36
demikernel::pushto 1096.67 478.44 201.75 0.02
ioc::network::libos::pushto;inetstack::push;catnip::runtime::transmit 1096.67 253.84 107.44 36.30
bgc::inetstack::poll_recv;inetstack::poll_bg_work::for::for;udp::receive 472.67 260.33 119.18 71.64
bgc::passive_listening::poll 59.04 5497.34 2358.86 0.00
ioc::network::libos::close 49.17 7752.95 3295.07 0.01
ioc::network::libos::connect 41.86 15212.68 6579.76 0.01
bgc::inetstack::tcp::passiveopen::background 41.86 13940.80 6038.37 0.00
ioc::network::libos::connect;catnip::runtime::transmit 41.86 5908.42 2586.28 27.83
ioc::network::libos::accept 38.32 2405.65 1036.29 0.00
demikernel::async_close 32.50 608.26 239.27 0.00
ioc::network::libos::close;catnip::runtime::transmit 31.39 570.10 244.01 5.27
demikernel::accept 21.86 1131.67 485.40 0.00
bgc::inetstack::tcp::passiveopen::background;catnip::runtime::transmit 20.93 16674.46 7240.37 39.28
demikernel::connect 20.93 2703.17 1165.59 0.00
bgc::inetstack::tcp::established::background;tcp::established::background::receiver;catnip::runtime::transmit 20.93 725.03 308.44 4.52
demikernel::socket 10.30 1707.59 716.43 0.00
bgc::inetstack::tcp::established::background;tcp::established::background::acknowledger;catnip::runtime::transmit 9.00 3074.89 1394.78 32.54
bgc::inetstack::arp::background 4.30 2121.31 902.13 0.00
bgc::inetstack::poll_recv;inetstack::poll;inetstack::layer4_endpoint::poll_once 2.00 20711.35 8760.76 95.54
bgc::inetstack::poll_recv;inetstack::poll;inetstack::layer4_endpoint::poll_once;catnip::runtime::receive 2.00 18469.07 7807.72 89.18
bgc::inetstack::icmp::background 1.05 3506.93 1487.61 0.00
demikernel::new 1.00 1780030038.58 752415113.47 45.73
bgc::inetstack::poll_recv;inetstack::poll 1.00 43355.40 18337.60 0.19
demikernel::bind 1.00 11142.50 4744.95 0.00
demikernel::listen 1.00 6196.71 2657.04 0.00
demikernel::close 0.00 nan nan 0.00

@anandbonde anandbonde merged commit e9591a1 into dev Oct 19, 2024
14 checks passed
@anandbonde anandbonde deleted the ab-remove-useless-comments branch October 19, 2024 16:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants