diff --git a/.gitignore b/.gitignore index 2315eb5..23ac691 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ .vscode/ *.cpu *.mem -*.test \ No newline at end of file +*.test +*.code-workspace \ No newline at end of file diff --git a/assets/nonsqpoll.svg b/assets/nonsqpoll.svg index 3c2c42c..12786f6 100644 --- a/assets/nonsqpoll.svg +++ b/assets/nonsqpoll.svg @@ -1,531 +1,582 @@ -<svg width="552pt" height="1038pt" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> - <g id="graph0" class="graph" transform="scale(1.3 1.3) rotate(0) translate(4 1034)"> +<svg width="546pt" height="1228pt" viewBox="-58.5192 -35.0708 790.784 1778.54" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> + <g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 1224)"> <title>perf</title> - <polygon fill="white" stroke="transparent" points="-4,4 -4,-1034 547.5,-1034 547.5,4 -4,4"></polygon> + <polygon fill="white" stroke="transparent" points="-4,4 -4,-1224 542,-1224 542,4 -4,4" data-darkreader-inline-stroke="" style="--darkreader-inline-stroke:transparent; --darkreader-inline-fill:#181a1b;" data-darkreader-inline-fill=""></polygon> <!-- N1 --> <g id="node1" class="node"> <title>N1</title> - <g id="a_node1"><a xlink:title="main.main (111.14s)"> - <polygon fill="#edd5d5" stroke="#b20000" points="248,-943 118,-943 118,-875 248,-875 248,-943"></polygon> - <text text-anchor="middle" x="183" y="-927.8" font-family="Times,serif" font-size="14.00">main</text> - <text text-anchor="middle" x="183" y="-912.8" font-family="Times,serif" font-size="14.00">main</text> - <text text-anchor="middle" x="183" y="-897.8" font-family="Times,serif" font-size="14.00">9.73s (8.75%)</text> - <text text-anchor="middle" x="183" y="-882.8" font-family="Times,serif" font-size="14.00">of 111.14s (99.92%)</text> - </a> - </g> - </g> - <!-- N10 --> - <g id="node10" class="node"> - <title>N10</title> - <g id="a_node10"><a xlink:title="github.com/ii64/gouring.(*IoUring).GetSqe (4.08s)"> - <polygon fill="#edebe8" stroke="#b2a691" points="118.5,-809 35.5,-809 35.5,-746 118.5,-746 118.5,-809"></polygon> - <text text-anchor="middle" x="77" y="-797" font-family="Times,serif" font-size="10.00">gouring</text> - <text text-anchor="middle" x="77" y="-786" font-family="Times,serif" font-size="10.00">(*IoUring)</text> - <text text-anchor="middle" x="77" y="-775" font-family="Times,serif" font-size="10.00">GetSqe</text> - <text text-anchor="middle" x="77" y="-764" font-family="Times,serif" font-size="10.00">0.39s (0.35%)</text> - <text text-anchor="middle" x="77" y="-753" font-family="Times,serif" font-size="10.00">of 4.08s (3.67%)</text> - </a> - </g> - </g> - <!-- N1->N10 --> - <g id="edge14" class="edge"> - <title>N1->N10</title> - <g id="a_edge14"><a xlink:title="main.main -> github.com/ii64/gouring.(*IoUring).GetSqe (4.08s)"> - <path fill="none" stroke="#b2a691" d="M150.66,-874.77C145.31,-868.95 139.91,-862.88 135,-857 124.58,-844.52 113.82,-830.36 104.44,-817.54"></path> - <polygon fill="#b2a691" stroke="#b2a691" points="107.19,-815.38 98.49,-809.34 101.53,-819.49 107.19,-815.38"></polygon> - </a> - </g> - <g id="a_edge14-label"><a xlink:title="main.main -> github.com/ii64/gouring.(*IoUring).GetSqe (4.08s)"> - <text text-anchor="middle" x="157" y="-845.8" font-family="Times,serif" font-size="14.00"> 4.08s</text> - <text text-anchor="middle" x="157" y="-830.8" font-family="Times,serif" font-size="14.00"> (inline)</text> - </a> - </g> - </g> - <!-- N14 --> - <g id="node14" class="node"> - <title>N14</title> - <g id="a_node14"><a xlink:title="github.com/ii64/gouring.(*IoUring).Submit (81.67s)"> - <polygon fill="#edd7d5" stroke="#b20f00" points="226,-806.5 140,-806.5 140,-748.5 226,-748.5 226,-806.5"></polygon> - <text text-anchor="middle" x="183" y="-795.3" font-family="Times,serif" font-size="9.00">gouring</text> - <text text-anchor="middle" x="183" y="-785.3" font-family="Times,serif" font-size="9.00">(*IoUring)</text> - <text text-anchor="middle" x="183" y="-775.3" font-family="Times,serif" font-size="9.00">Submit</text> - <text text-anchor="middle" x="183" y="-765.3" font-family="Times,serif" font-size="9.00">0.04s (0.036%)</text> - <text text-anchor="middle" x="183" y="-755.3" font-family="Times,serif" font-size="9.00">of 81.67s (73.42%)</text> - </a> - </g> - </g> - <!-- N1->N14 --> - <g id="edge2" class="edge"> - <title>N1->N14</title> - <g id="a_edge2"><a xlink:title="main.main -> github.com/ii64/gouring.(*IoUring).Submit (81.67s)"> - <path fill="none" stroke="#b20f00" stroke-width="4" d="M183,-874.99C183,-857.24 183,-835.26 183,-816.77"></path> - <polygon fill="#b20f00" stroke="#b20f00" stroke-width="4" points="186.5,-816.63 183,-806.63 179.5,-816.63 186.5,-816.63"></polygon> - </a> - </g> - <g id="a_edge2-label"><a xlink:title="main.main -> github.com/ii64/gouring.(*IoUring).Submit (81.67s)"> - <text text-anchor="middle" x="203" y="-838.3" font-family="Times,serif" font-size="14.00"> 81.67s</text> - </a> - </g> - </g> - <!-- N15 --> - <g id="node15" class="node"> - <title>N15</title> - <g id="a_node15"><a xlink:title="github.com/ii64/gouring.(*IoUring).WaitCqe (9.87s)"> - <polygon fill="#ede8e2" stroke="#b28c63" points="324.5,-806.5 247.5,-806.5 247.5,-748.5 324.5,-748.5 324.5,-806.5"></polygon> - <text text-anchor="middle" x="286" y="-795.3" font-family="Times,serif" font-size="9.00">gouring</text> - <text text-anchor="middle" x="286" y="-785.3" font-family="Times,serif" font-size="9.00">(*IoUring)</text> - <text text-anchor="middle" x="286" y="-775.3" font-family="Times,serif" font-size="9.00">WaitCqe</text> - <text text-anchor="middle" x="286" y="-765.3" font-family="Times,serif" font-size="9.00">0.05s (0.045%)</text> - <text text-anchor="middle" x="286" y="-755.3" font-family="Times,serif" font-size="9.00">of 9.87s (8.87%)</text> - </a> - </g> - </g> - <!-- N1->N15 --> - <g id="edge9" class="edge"> - <title>N1->N15</title> - <g id="a_edge9"><a xlink:title="main.main -> github.com/ii64/gouring.(*IoUring).WaitCqe (9.87s)"> - <path fill="none" stroke="#b28c63" d="M212.2,-874.8C217.21,-868.93 222.3,-862.83 227,-857 237.89,-843.48 249.46,-828.29 259.44,-814.9"></path> - <polygon fill="#b28c63" stroke="#b28c63" points="262.28,-816.94 265.43,-806.83 256.66,-812.77 262.28,-816.94"></polygon> - </a> - </g> - <g id="a_edge9-label"><a xlink:title="main.main -> github.com/ii64/gouring.(*IoUring).WaitCqe (9.87s)"> - <text text-anchor="middle" x="273" y="-845.8" font-family="Times,serif" font-size="14.00"> 9.87s</text> - <text text-anchor="middle" x="273" y="-830.8" font-family="Times,serif" font-size="14.00"> (inline)</text> - </a> - </g> - </g> - <!-- N17 --> - <g id="node17" class="node"> - <title>N17</title> - <g id="a_node17"><a xlink:title="github.com/ii64/gouring.(*IoUring).SeenCqe (1.17s)"> - <polygon fill="#edeceb" stroke="#b2b0a9" points="425.5,-806.5 348.5,-806.5 348.5,-748.5 425.5,-748.5 425.5,-806.5"></polygon> - <text text-anchor="middle" x="387" y="-795.3" font-family="Times,serif" font-size="9.00">gouring</text> - <text text-anchor="middle" x="387" y="-785.3" font-family="Times,serif" font-size="9.00">(*IoUring)</text> - <text text-anchor="middle" x="387" y="-775.3" font-family="Times,serif" font-size="9.00">SeenCqe</text> - <text text-anchor="middle" x="387" y="-765.3" font-family="Times,serif" font-size="9.00">0.02s (0.018%)</text> - <text text-anchor="middle" x="387" y="-755.3" font-family="Times,serif" font-size="9.00">of 1.17s (1.05%)</text> - </a> - </g> - </g> - <!-- N1->N17 --> - <g id="edge18" class="edge"> - <title>N1->N17</title> - <g id="a_edge18"><a xlink:title="main.main -> github.com/ii64/gouring.(*IoUring).SeenCqe (1.17s)"> - <path fill="none" stroke="#b2b0a9" d="M248.07,-883.67C265.2,-876.13 283.27,-867.11 299,-857 318.09,-844.73 337.15,-828.36 352.63,-813.75"></path> - <polygon fill="#b2b0a9" stroke="#b2b0a9" points="355.13,-816.2 359.92,-806.75 350.28,-811.15 355.13,-816.2"></polygon> - </a> - </g> - <g id="a_edge18-label"><a xlink:title="main.main -> github.com/ii64/gouring.(*IoUring).SeenCqe (1.17s)"> - <text text-anchor="middle" x="355" y="-838.3" font-family="Times,serif" font-size="14.00"> 1.17s</text> - </a> - </g> - </g> - <!-- N20 --> - <g id="node20" class="node"> - <title>N20</title> - <g id="a_node20"><a xlink:title="github.com/ii64/gouring.PrepNop (4.61s)"> - <polygon fill="#edebe8" stroke="#b2a48d" points="530.5,-795.5 453.5,-795.5 453.5,-759.5 530.5,-759.5 530.5,-795.5"></polygon> - <text text-anchor="middle" x="492" y="-784.6" font-family="Times,serif" font-size="8.00">gouring</text> - <text text-anchor="middle" x="492" y="-775.6" font-family="Times,serif" font-size="8.00">PrepNop</text> - <text text-anchor="middle" x="492" y="-766.6" font-family="Times,serif" font-size="8.00">0 of 4.61s (4.14%)</text> - </a> - </g> - </g> - <!-- N1->N20 --> - <g id="edge13" class="edge"> - <title>N1->N20</title> - <g id="a_edge13"><a xlink:title="main.main -> github.com/ii64/gouring.PrepNop (4.61s)"> - <path fill="none" stroke="#b2a48d" d="M248.32,-896.46C286.61,-888.31 335.3,-875.5 376,-857 408,-842.46 440.84,-819.31 463.37,-801.91"></path> - <polygon fill="#b2a48d" stroke="#b2a48d" points="465.77,-804.48 471.48,-795.56 461.45,-798.97 465.77,-804.48"></polygon> - </a> - </g> - <g id="a_edge13-label"><a xlink:title="main.main -> github.com/ii64/gouring.PrepNop (4.61s)"> - <text text-anchor="middle" x="449" y="-845.8" font-family="Times,serif" font-size="14.00"> 4.61s</text> - <text text-anchor="middle" x="449" y="-830.8" font-family="Times,serif" font-size="14.00"> (inline)</text> + <g id="a_node1"><a xlink:title="runtime/internal/syscall.Syscall6 (108.98s)"> + <polygon fill="#edd7d5" stroke="#b20c00" points="269.5,-86 81.5,-86 81.5,0 269.5,0 269.5,-86" data-darkreader-inline-stroke="" style="--darkreader-inline-stroke:#ff5b4f; --darkreader-inline-fill:#3d1d1a;" data-darkreader-inline-fill=""></polygon> + <text text-anchor="middle" x="175.5" y="-62.8" font-family="Times,serif" font-size="24.00">syscall</text> + <text text-anchor="middle" x="175.5" y="-36.8" font-family="Times,serif" font-size="24.00">Syscall6</text> + <text text-anchor="middle" x="175.5" y="-10.8" font-family="Times,serif" font-size="24.00">108.98s (77.87%)</text> </a> </g> </g> <!-- N2 --> <g id="node2" class="node"> <title>N2</title> - <g id="a_node2"><a xlink:title="syscall.Syscall6 (79.40s)"> - <polygon fill="#edd7d5" stroke="#b21100" points="284.5,-112 81.5,-112 81.5,0 284.5,0 284.5,-112"></polygon> - <text text-anchor="middle" x="183" y="-88.8" font-family="Times,serif" font-size="24.00">syscall</text> - <text text-anchor="middle" x="183" y="-62.8" font-family="Times,serif" font-size="24.00">Syscall6</text> - <text text-anchor="middle" x="183" y="-36.8" font-family="Times,serif" font-size="24.00">78.84s (70.88%)</text> - <text text-anchor="middle" x="183" y="-10.8" font-family="Times,serif" font-size="24.00">of 79.40s (71.38%)</text> + <g id="a_node2"><a xlink:title="main.main (139.86s)"> + <polygon fill="#edd5d5" stroke="#b20000" points="238,-1133 113,-1133 113,-1069 238,-1069 238,-1133" data-darkreader-inline-stroke="" style="--darkreader-inline-stroke:#ff4f4f; --darkreader-inline-fill:#3d1a1a;" data-darkreader-inline-fill=""></polygon> + <text text-anchor="middle" x="175.5" y="-1118.6" font-family="Times,serif" font-size="13.00">main</text> + <text text-anchor="middle" x="175.5" y="-1104.6" font-family="Times,serif" font-size="13.00">main</text> + <text text-anchor="middle" x="175.5" y="-1090.6" font-family="Times,serif" font-size="13.00">9.51s (6.79%)</text> + <text text-anchor="middle" x="175.5" y="-1076.6" font-family="Times,serif" font-size="13.00">of 139.86s (99.93%)</text> + </a> + </g> + </g> + <!-- N10 --> + <g id="node10" class="node"> + <title>N10</title> + <g id="a_node10"><a xlink:title="github.com/ii64/gouring.(*IoUring).GetSqe (3.52s)"> + <polygon fill="#edecea" stroke="#b2ab9c" points="109,-1003 32,-1003 32,-945 109,-945 109,-1003" data-darkreader-inline-stroke="" style="--darkreader-inline-stroke:#b0aa9f; --darkreader-inline-fill:#232627;" data-darkreader-inline-fill=""></polygon> + <text text-anchor="middle" x="70.5" y="-991.8" font-family="Times,serif" font-size="9.00">gouring</text> + <text text-anchor="middle" x="70.5" y="-981.8" font-family="Times,serif" font-size="9.00">(*IoUring)</text> + <text text-anchor="middle" x="70.5" y="-971.8" font-family="Times,serif" font-size="9.00">GetSqe</text> + <text text-anchor="middle" x="70.5" y="-961.8" font-family="Times,serif" font-size="9.00">0.31s (0.22%)</text> + <text text-anchor="middle" x="70.5" y="-951.8" font-family="Times,serif" font-size="9.00">of 3.52s (2.52%)</text> + </a> + </g> + </g> + <!-- N2->N10 --> + <g id="edge16" class="edge"> + <title>N2->N10</title> + <g id="a_edge16"><a xlink:title="main.main -> github.com/ii64/gouring.(*IoUring).GetSqe (3.52s)"> + <path fill="none" stroke="#b2ab9c" d="M143.89,-1068.95C138.29,-1063.11 132.62,-1056.96 127.5,-1051 116.75,-1038.47 105.69,-1024.13 96.21,-1011.3" data-darkreader-inline-stroke="" style="--darkreader-inline-stroke:#b0aa9f;"></path> + <polygon fill="#b2ab9c" stroke="#b2ab9c" points="98.96,-1009.12 90.23,-1003.12 93.31,-1013.26 98.96,-1009.12" data-darkreader-inline-stroke="" style="--darkreader-inline-stroke:#b0aa9f; --darkreader-inline-fill:#423d33;" data-darkreader-inline-fill=""></polygon> + </a> + </g> + <g id="a_edge16-label"><a xlink:title="main.main -> github.com/ii64/gouring.(*IoUring).GetSqe (3.52s)"> + <text text-anchor="middle" x="149.5" y="-1039.8" font-family="Times,serif" font-size="14.00"> 3.52s</text> + <text text-anchor="middle" x="149.5" y="-1024.8" font-family="Times,serif" font-size="14.00"> (inline)</text> + </a> + </g> + </g> + <!-- N15 --> + <g id="node15" class="node"> + <title>N15</title> + <g id="a_node15"><a xlink:title="github.com/ii64/gouring.(*IoUring).Submit (111.78s)"> + <polygon fill="#edd6d5" stroke="#b20b00" points="221,-1003 130,-1003 130,-945 221,-945 221,-1003" data-darkreader-inline-stroke="" style="--darkreader-inline-stroke:#ff5a4f; --darkreader-inline-fill:#3d1c1a;" data-darkreader-inline-fill=""></polygon> + <text text-anchor="middle" x="175.5" y="-991.8" font-family="Times,serif" font-size="9.00">gouring</text> + <text text-anchor="middle" x="175.5" y="-981.8" font-family="Times,serif" font-size="9.00">(*IoUring)</text> + <text text-anchor="middle" x="175.5" y="-971.8" font-family="Times,serif" font-size="9.00">Submit</text> + <text text-anchor="middle" x="175.5" y="-961.8" font-family="Times,serif" font-size="9.00">0.04s (0.029%)</text> + <text text-anchor="middle" x="175.5" y="-951.8" font-family="Times,serif" font-size="9.00">of 111.78s (79.87%)</text> + </a> + </g> + </g> + <!-- N2->N15 --> + <g id="edge2" class="edge"> + <title>N2->N15</title> + <g id="a_edge2"><a xlink:title="main.main -> github.com/ii64/gouring.(*IoUring).Submit (111.78s)"> + <path fill="none" stroke="#b20b00" stroke-width="4" d="M175.5,-1068.78C175.5,-1051.97 175.5,-1031.11 175.5,-1013.32" data-darkreader-inline-stroke="" style="--darkreader-inline-stroke:#ff5a4f;"></path> + <polygon fill="#b20b00" stroke="#b20b00" stroke-width="4" points="179,-1013.26 175.5,-1003.26 172,-1013.26 179,-1013.26" data-darkreader-inline-stroke="" style="--darkreader-inline-stroke:#ff5a4f; --darkreader-inline-fill:#8e0900;" data-darkreader-inline-fill=""></polygon> + </a> + </g> + <g id="a_edge2-label"><a xlink:title="main.main -> github.com/ii64/gouring.(*IoUring).Submit (111.78s)"> + <text text-anchor="middle" x="199" y="-1032.3" font-family="Times,serif" font-size="14.00"> 111.78s</text> + </a> + </g> + </g> + <!-- N17 --> + <g id="node17" class="node"> + <title>N17</title> + <g id="a_node17"><a xlink:title="github.com/ii64/gouring.(*IoUring).WaitCqe (9.03s)"> + <polygon fill="#ede9e5" stroke="#b29978" points="319,-1003 242,-1003 242,-945 319,-945 319,-1003" data-darkreader-inline-stroke="" style="--darkreader-inline-stroke:#b79f80; --darkreader-inline-fill:#2e2720;" data-darkreader-inline-fill=""></polygon> + <text text-anchor="middle" x="280.5" y="-991.8" font-family="Times,serif" font-size="9.00">gouring</text> + <text text-anchor="middle" x="280.5" y="-981.8" font-family="Times,serif" font-size="9.00">(*IoUring)</text> + <text text-anchor="middle" x="280.5" y="-971.8" font-family="Times,serif" font-size="9.00">WaitCqe</text> + <text text-anchor="middle" x="280.5" y="-961.8" font-family="Times,serif" font-size="9.00">0.02s (0.014%)</text> + <text text-anchor="middle" x="280.5" y="-951.8" font-family="Times,serif" font-size="9.00">of 9.03s (6.45%)</text> + </a> + </g> + </g> + <!-- N2->N17 --> + <g id="edge11" class="edge"> + <title>N2->N17</title> + <g id="a_edge11"><a xlink:title="main.main -> github.com/ii64/gouring.(*IoUring).WaitCqe (9.03s)"> + <path fill="none" stroke="#b29978" d="M209.6,-1068.97C215.44,-1063.18 221.29,-1057.04 226.5,-1051 237.06,-1038.75 247.61,-1024.48 256.54,-1011.64" data-darkreader-inline-stroke="" style="--darkreader-inline-stroke:#b79f80;"></path> + <polygon fill="#b29978" stroke="#b29978" points="259.68,-1013.24 262.45,-1003.02 253.91,-1009.29 259.68,-1013.24" data-darkreader-inline-stroke="" style="--darkreader-inline-stroke:#b79f80; --darkreader-inline-fill:#715c41;" data-darkreader-inline-fill=""></polygon> + </a> + </g> + <g id="a_edge11-label"><a xlink:title="main.main -> github.com/ii64/gouring.(*IoUring).WaitCqe (9.03s)"> + <text text-anchor="middle" x="271.5" y="-1039.8" font-family="Times,serif" font-size="14.00"> 9.03s</text> + <text text-anchor="middle" x="271.5" y="-1024.8" font-family="Times,serif" font-size="14.00"> (inline)</text> + </a> + </g> + </g> + <!-- N20 --> + <g id="node20" class="node"> + <title>N20</title> + <g id="a_node20"><a xlink:title="github.com/ii64/gouring.(*IoUring).SeenCqe (0.98s)"> + <polygon fill="#edecec" stroke="#b2b1ac" points="416,-996 343,-996 343,-952 416,-952 416,-996" data-darkreader-inline-stroke="" style="--darkreader-inline-stroke:#b5afa6; --darkreader-inline-fill:#222527;" data-darkreader-inline-fill=""></polygon> + <text text-anchor="middle" x="379.5" y="-985.6" font-family="Times,serif" font-size="8.00">gouring</text> + <text text-anchor="middle" x="379.5" y="-976.6" font-family="Times,serif" font-size="8.00">(*IoUring)</text> + <text text-anchor="middle" x="379.5" y="-967.6" font-family="Times,serif" font-size="8.00">SeenCqe</text> + <text text-anchor="middle" x="379.5" y="-958.6" font-family="Times,serif" font-size="8.00">0 of 0.98s (0.7%)</text> + </a> + </g> + </g> + <!-- N2->N20 --> + <g id="edge21" class="edge"> + <title>N2->N20</title> + <g id="a_edge21"><a xlink:title="main.main -> github.com/ii64/gouring.(*IoUring).SeenCqe (0.98s)"> + <path fill="none" stroke="#b2b1ac" d="M238.15,-1079.88C257.89,-1072.24 279.28,-1062.54 297.5,-1051 318.21,-1037.88 338.45,-1019.2 353.64,-1003.64" data-darkreader-inline-stroke="" style="--darkreader-inline-stroke:#b5afa6;"></path> + <polygon fill="#b2b1ac" stroke="#b2b1ac" points="356.29,-1005.94 360.67,-996.3 351.23,-1001.1 356.29,-1005.94" data-darkreader-inline-stroke="" style="--darkreader-inline-stroke:#b5afa6; --darkreader-inline-fill:#454b4e;" data-darkreader-inline-fill=""></polygon> + </a> + </g> + <g id="a_edge21-label"><a xlink:title="main.main -> github.com/ii64/gouring.(*IoUring).SeenCqe (0.98s)"> + <text text-anchor="middle" x="356.5" y="-1039.8" font-family="Times,serif" font-size="14.00"> 0.98s</text> + <text text-anchor="middle" x="356.5" y="-1024.8" font-family="Times,serif" font-size="14.00"> (inline)</text> + </a> + </g> + </g> + <!-- N23 --> + <g id="node23" class="node"> + <title>N23</title> + <g id="a_node23"><a xlink:title="github.com/ii64/gouring.PrepNop (5.03s)"> + <polygon fill="#edebe8" stroke="#b2a692" points="523,-992 446,-992 446,-956 523,-956 523,-992" data-darkreader-inline-stroke="" style="--darkreader-inline-stroke:#ada69c; --darkreader-inline-fill:#2a2721;" data-darkreader-inline-fill=""></polygon> + <text text-anchor="middle" x="484.5" y="-981.1" font-family="Times,serif" font-size="8.00">gouring</text> + <text text-anchor="middle" x="484.5" y="-972.1" font-family="Times,serif" font-size="8.00">PrepNop</text> + <text text-anchor="middle" x="484.5" y="-963.1" font-family="Times,serif" font-size="8.00">0 of 5.03s (3.59%)</text> + </a> + </g> + </g> + <!-- N2->N23 --> + <g id="edge15" class="edge"> + <title>N2->N23</title> + <g id="a_edge15"><a xlink:title="main.main -> github.com/ii64/gouring.PrepNop (5.03s)"> + <path fill="none" stroke="#b2a692" d="M238.38,-1091.94C280.59,-1084.91 336.65,-1072.39 382.5,-1051 411,-1037.71 439.35,-1015.69 458.9,-998.77" data-darkreader-inline-stroke="" style="--darkreader-inline-stroke:#ada69c;"></path> + <polygon fill="#b2a692" stroke="#b2a692" points="461.27,-1001.34 466.46,-992.1 456.64,-996.09 461.27,-1001.34" data-darkreader-inline-stroke="" style="--darkreader-inline-stroke:#ada69c; --darkreader-inline-fill:#5f5543;" data-darkreader-inline-fill=""></polygon> + </a> + </g> + <g id="a_edge15-label"><a xlink:title="main.main -> github.com/ii64/gouring.PrepNop (5.03s)"> + <text text-anchor="middle" x="452.5" y="-1039.8" font-family="Times,serif" font-size="14.00"> 5.03s</text> + <text text-anchor="middle" x="452.5" y="-1024.8" font-family="Times,serif" font-size="14.00"> (inline)</text> </a> </g> </g> <!-- N3 --> <g id="node3" class="node"> <title>N3</title> - <g id="a_node3"><a xlink:title="runtime.main (111.14s)"> - <polygon fill="#edd5d5" stroke="#b20000" points="227,-1030 139,-1030 139,-994 227,-994 227,-1030"></polygon> - <text text-anchor="middle" x="183" y="-1019.1" font-family="Times,serif" font-size="8.00">runtime</text> - <text text-anchor="middle" x="183" y="-1010.1" font-family="Times,serif" font-size="8.00">main</text> - <text text-anchor="middle" x="183" y="-1001.1" font-family="Times,serif" font-size="8.00">0 of 111.14s (99.92%)</text> + <g id="a_node3"><a xlink:title="runtime.main (139.86s)"> + <polygon fill="#edd5d5" stroke="#b20000" points="219.5,-1220 131.5,-1220 131.5,-1184 219.5,-1184 219.5,-1220" data-darkreader-inline-stroke="" style="--darkreader-inline-stroke:#ff4f4f; --darkreader-inline-fill:#3d1a1a;" data-darkreader-inline-fill=""></polygon> + <text text-anchor="middle" x="175.5" y="-1209.1" font-family="Times,serif" font-size="8.00">runtime</text> + <text text-anchor="middle" x="175.5" y="-1200.1" font-family="Times,serif" font-size="8.00">main</text> + <text text-anchor="middle" x="175.5" y="-1191.1" font-family="Times,serif" font-size="8.00">0 of 139.86s (99.93%)</text> </a> </g> </g> - <!-- N3->N1 --> + <!-- N3->N2 --> <g id="edge1" class="edge"> - <title>N3->N1</title> - <g id="a_edge1"><a xlink:title="runtime.main -> main.main (111.14s)"> - <path fill="none" stroke="#b20000" stroke-width="5" d="M183,-993.87C183,-982.73 183,-967.66 183,-953.38"></path> - <polygon fill="#b20000" stroke="#b20000" stroke-width="5" points="187.38,-953.18 183,-943.18 178.63,-953.18 187.38,-953.18"></polygon> + <title>N3->N2</title> + <g id="a_edge1"><a xlink:title="runtime.main -> main.main (139.86s)"> + <path fill="none" stroke="#b20000" stroke-width="5" d="M175.5,-1183.76C175.5,-1172.52 175.5,-1157.36 175.5,-1143.15" data-darkreader-inline-stroke="" style="--darkreader-inline-stroke:#ff4f4f;"></path> + <polygon fill="#b20000" stroke="#b20000" stroke-width="5" points="179.88,-1143.04 175.5,-1133.04 171.13,-1143.04 179.88,-1143.04" data-darkreader-inline-stroke="" style="--darkreader-inline-stroke:#ff4f4f; --darkreader-inline-fill:#8e0000;" data-darkreader-inline-fill=""></polygon> </a> </g> - <g id="a_edge1-label"><a xlink:title="runtime.main -> main.main (111.14s)"> - <text text-anchor="middle" x="206.5" y="-964.8" font-family="Times,serif" font-size="14.00"> 111.14s</text> + <g id="a_edge1-label"><a xlink:title="runtime.main -> main.main (139.86s)"> + <text text-anchor="middle" x="199" y="-1154.8" font-family="Times,serif" font-size="14.00"> 139.86s</text> </a> </g> </g> <!-- N4 --> <g id="node4" class="node"> <title>N4</title> - <g id="a_node4"><a xlink:title="github.com/ii64/gouring.(*IoUring).__io_uring_peek_cqe (7.38s)"> - <polygon fill="#ede9e5" stroke="#b29877" points="396,-561 262,-561 262,-483 396,-483 396,-561"></polygon> - <text text-anchor="middle" x="329" y="-546.6" font-family="Times,serif" font-size="13.00">gouring</text> - <text text-anchor="middle" x="329" y="-532.6" font-family="Times,serif" font-size="13.00">(*IoUring)</text> - <text text-anchor="middle" x="329" y="-518.6" font-family="Times,serif" font-size="13.00">__io_uring_peek_cqe</text> - <text text-anchor="middle" x="329" y="-504.6" font-family="Times,serif" font-size="13.00">7.09s (6.37%)</text> - <text text-anchor="middle" x="329" y="-490.6" font-family="Times,serif" font-size="13.00">of 7.38s (6.63%)</text> - </a> - </g> - </g> - <!-- N5 --> - <g id="node5" class="node"> - <title>N5</title> - <g id="a_node5"><a xlink:title="github.com/ii64/gouring.(*IoUring).__io_uring_submit_and_wait (81.62s)"> - <polygon fill="#edd7d5" stroke="#b20f00" points="243.5,-551 122.5,-551 122.5,-493 243.5,-493 243.5,-551"></polygon> - <text text-anchor="middle" x="183" y="-539.8" font-family="Times,serif" font-size="9.00">gouring</text> - <text text-anchor="middle" x="183" y="-529.8" font-family="Times,serif" font-size="9.00">(*IoUring)</text> - <text text-anchor="middle" x="183" y="-519.8" font-family="Times,serif" font-size="9.00">__io_uring_submit_and_wait</text> - <text text-anchor="middle" x="183" y="-509.8" font-family="Times,serif" font-size="9.00">0.03s (0.027%)</text> - <text text-anchor="middle" x="183" y="-499.8" font-family="Times,serif" font-size="9.00">of 81.62s (73.38%)</text> + <g id="a_node4"><a xlink:title="github.com/ii64/gouring.(*IoUring).__io_uring_submit_and_wait (111.74s)"> + <polygon fill="#edd6d5" stroke="#b20b00" points="236,-735 115,-735 115,-677 236,-677 236,-735" data-darkreader-inline-stroke="" style="--darkreader-inline-stroke:#ff5a4f; --darkreader-inline-fill:#3d1c1a;" data-darkreader-inline-fill=""></polygon> + <text text-anchor="middle" x="175.5" y="-723.8" font-family="Times,serif" font-size="9.00">gouring</text> + <text text-anchor="middle" x="175.5" y="-713.8" font-family="Times,serif" font-size="9.00">(*IoUring)</text> + <text text-anchor="middle" x="175.5" y="-703.8" font-family="Times,serif" font-size="9.00">__io_uring_submit_and_wait</text> + <text text-anchor="middle" x="175.5" y="-693.8" font-family="Times,serif" font-size="9.00">0.04s (0.029%)</text> + <text text-anchor="middle" x="175.5" y="-683.8" font-family="Times,serif" font-size="9.00">of 111.74s (79.84%)</text> </a> </g> </g> <!-- N9 --> <g id="node9" class="node"> <title>N9</title> - <g id="a_node9"><a xlink:title="github.com/ii64/gouring.(*IoUring).__io_uring_flush_sq (2.09s)"> - <polygon fill="#edecea" stroke="#b2ada1" points="121.5,-432 16.5,-432 16.5,-364 121.5,-364 121.5,-432"></polygon> - <text text-anchor="middle" x="69" y="-419.2" font-family="Times,serif" font-size="11.00">gouring</text> - <text text-anchor="middle" x="69" y="-407.2" font-family="Times,serif" font-size="11.00">(*IoUring)</text> - <text text-anchor="middle" x="69" y="-395.2" font-family="Times,serif" font-size="11.00">__io_uring_flush_sq</text> - <text text-anchor="middle" x="69" y="-383.2" font-family="Times,serif" font-size="11.00">2.02s (1.82%)</text> - <text text-anchor="middle" x="69" y="-371.2" font-family="Times,serif" font-size="11.00">of 2.09s (1.88%)</text> + <g id="a_node9"><a xlink:title="github.com/ii64/gouring.(*IoUring).__io_uring_flush_sq (2.03s)"> + <polygon fill="#edeceb" stroke="#b2aea5" points="112,-616 7,-616 7,-548 112,-548 112,-616" data-darkreader-inline-stroke="" style="--darkreader-inline-stroke:#b3ada3; --darkreader-inline-fill:#232627;" data-darkreader-inline-fill=""></polygon> + <text text-anchor="middle" x="59.5" y="-603.2" font-family="Times,serif" font-size="11.00">gouring</text> + <text text-anchor="middle" x="59.5" y="-591.2" font-family="Times,serif" font-size="11.00">(*IoUring)</text> + <text text-anchor="middle" x="59.5" y="-579.2" font-family="Times,serif" font-size="11.00">__io_uring_flush_sq</text> + <text text-anchor="middle" x="59.5" y="-567.2" font-family="Times,serif" font-size="11.00">1.92s (1.37%)</text> + <text text-anchor="middle" x="59.5" y="-555.2" font-family="Times,serif" font-size="11.00">of 2.03s (1.45%)</text> </a> </g> </g> - <!-- N5->N9 --> - <g id="edge17" class="edge"> - <title>N5->N9</title> - <g id="a_edge17"><a xlink:title="github.com/ii64/gouring.(*IoUring).__io_uring_submit_and_wait -> github.com/ii64/gouring.(*IoUring).__io_uring_flush_sq (2.09s)"> - <path fill="none" stroke="#b2ada1" d="M156.56,-492.7C141.96,-477.08 123.56,-457.39 107.4,-440.09"></path> - <polygon fill="#b2ada1" stroke="#b2ada1" points="109.54,-437.25 100.15,-432.34 104.42,-442.03 109.54,-437.25"></polygon> + <!-- N4->N9 --> + <g id="edge19" class="edge"> + <title>N4->N9</title> + <g id="a_edge19"><a xlink:title="github.com/ii64/gouring.(*IoUring).__io_uring_submit_and_wait -> github.com/ii64/gouring.(*IoUring).__io_uring_flush_sq (2.03s)"> + <path fill="none" stroke="#b2aea5" d="M148.6,-676.7C133.6,-660.94 114.68,-641.03 98.13,-623.62" data-darkreader-inline-stroke="" style="--darkreader-inline-stroke:#b3ada3;"></path> + <polygon fill="#b2aea5" stroke="#b2aea5" points="100.62,-621.17 91.2,-616.34 95.55,-626 100.62,-621.17" data-darkreader-inline-stroke="" style="--darkreader-inline-stroke:#b3ada3; --darkreader-inline-fill:#474d50;" data-darkreader-inline-fill=""></polygon> </a> </g> - <g id="a_edge17-label"><a xlink:title="github.com/ii64/gouring.(*IoUring).__io_uring_submit_and_wait -> github.com/ii64/gouring.(*IoUring).__io_uring_flush_sq (2.09s)"> - <text text-anchor="middle" x="147" y="-453.8" font-family="Times,serif" font-size="14.00"> 2.09s</text> + <g id="a_edge19-label"><a xlink:title="github.com/ii64/gouring.(*IoUring).__io_uring_submit_and_wait -> github.com/ii64/gouring.(*IoUring).__io_uring_flush_sq (2.03s)"> + <text text-anchor="middle" x="138.5" y="-637.8" font-family="Times,serif" font-size="14.00"> 2.03s</text> </a> </g> </g> <!-- N16 --> <g id="node16" class="node"> <title>N16</title> - <g id="a_node16"><a xlink:title="github.com/ii64/gouring.(*IoUring).__io_uring_submit (79.50s)"> - <polygon fill="#edd7d5" stroke="#b21100" points="226,-427 140,-427 140,-369 226,-369 226,-427"></polygon> - <text text-anchor="middle" x="183" y="-415.8" font-family="Times,serif" font-size="9.00">gouring</text> - <text text-anchor="middle" x="183" y="-405.8" font-family="Times,serif" font-size="9.00">(*IoUring)</text> - <text text-anchor="middle" x="183" y="-395.8" font-family="Times,serif" font-size="9.00">__io_uring_submit</text> - <text text-anchor="middle" x="183" y="-385.8" font-family="Times,serif" font-size="9.00">0.02s (0.018%)</text> - <text text-anchor="middle" x="183" y="-375.8" font-family="Times,serif" font-size="9.00">of 79.50s (71.47%)</text> + <g id="a_node16"><a xlink:title="github.com/ii64/gouring.(*IoUring).__io_uring_submit (109.67s)"> + <polygon fill="#edd7d5" stroke="#b20c00" points="221,-611 130,-611 130,-553 221,-553 221,-611" data-darkreader-inline-stroke="" style="--darkreader-inline-stroke:#ff5b4f; --darkreader-inline-fill:#3d1d1a;" data-darkreader-inline-fill=""></polygon> + <text text-anchor="middle" x="175.5" y="-599.8" font-family="Times,serif" font-size="9.00">gouring</text> + <text text-anchor="middle" x="175.5" y="-589.8" font-family="Times,serif" font-size="9.00">(*IoUring)</text> + <text text-anchor="middle" x="175.5" y="-579.8" font-family="Times,serif" font-size="9.00">__io_uring_submit</text> + <text text-anchor="middle" x="175.5" y="-569.8" font-family="Times,serif" font-size="9.00">0.04s (0.029%)</text> + <text text-anchor="middle" x="175.5" y="-559.8" font-family="Times,serif" font-size="9.00">of 109.67s (78.36%)</text> </a> </g> </g> - <!-- N5->N16 --> + <!-- N4->N16 --> <g id="edge5" class="edge"> - <title>N5->N16</title> - <g id="a_edge5"><a xlink:title="github.com/ii64/gouring.(*IoUring).__io_uring_submit_and_wait -> github.com/ii64/gouring.(*IoUring).__io_uring_submit (79.50s)"> - <path fill="none" stroke="#b21100" stroke-width="4" d="M183,-492.7C183,-476.23 183,-455.23 183,-437.29"></path> - <polygon fill="#b21100" stroke="#b21100" stroke-width="4" points="186.5,-437.14 183,-427.14 179.5,-437.14 186.5,-437.14"></polygon> + <title>N4->N16</title> + <g id="a_edge5"><a xlink:title="github.com/ii64/gouring.(*IoUring).__io_uring_submit_and_wait -> github.com/ii64/gouring.(*IoUring).__io_uring_submit (109.67s)"> + <path fill="none" stroke="#b20c00" stroke-width="4" d="M175.5,-676.7C175.5,-660.23 175.5,-639.23 175.5,-621.29" data-darkreader-inline-stroke="" style="--darkreader-inline-stroke:#ff5b4f;"></path> + <polygon fill="#b20c00" stroke="#b20c00" stroke-width="4" points="179,-621.14 175.5,-611.14 172,-621.14 179,-621.14" data-darkreader-inline-stroke="" style="--darkreader-inline-stroke:#ff5b4f; --darkreader-inline-fill:#8e0a00;" data-darkreader-inline-fill=""></polygon> </a> </g> - <g id="a_edge5-label"><a xlink:title="github.com/ii64/gouring.(*IoUring).__io_uring_submit_and_wait -> github.com/ii64/gouring.(*IoUring).__io_uring_submit (79.50s)"> - <text text-anchor="middle" x="203" y="-453.8" font-family="Times,serif" font-size="14.00"> 79.50s</text> + <g id="a_edge5-label"><a xlink:title="github.com/ii64/gouring.(*IoUring).__io_uring_submit_and_wait -> github.com/ii64/gouring.(*IoUring).__io_uring_submit (109.67s)"> + <text text-anchor="middle" x="199" y="-637.8" font-family="Times,serif" font-size="14.00"> 109.67s</text> + </a> + </g> + </g> + <!-- N5 --> + <g id="node5" class="node"> + <title>N5</title> + <g id="a_node5"><a xlink:title="github.com/ii64/gouring.(*IoUring).__io_uring_peek_cqe (7.14s)"> + <polygon fill="#edeae7" stroke="#b29f84" points="388.5,-745 254.5,-745 254.5,-667 388.5,-667 388.5,-745" data-darkreader-inline-stroke="" style="--darkreader-inline-stroke:#a9a196; --darkreader-inline-fill:#2c2621;" data-darkreader-inline-fill=""></polygon> + <text text-anchor="middle" x="321.5" y="-730.6" font-family="Times,serif" font-size="13.00">gouring</text> + <text text-anchor="middle" x="321.5" y="-716.6" font-family="Times,serif" font-size="13.00">(*IoUring)</text> + <text text-anchor="middle" x="321.5" y="-702.6" font-family="Times,serif" font-size="13.00">__io_uring_peek_cqe</text> + <text text-anchor="middle" x="321.5" y="-688.6" font-family="Times,serif" font-size="13.00">6.83s (4.88%)</text> + <text text-anchor="middle" x="321.5" y="-674.6" font-family="Times,serif" font-size="13.00">of 7.14s (5.10%)</text> </a> </g> </g> <!-- N6 --> <g id="node6" class="node"> <title>N6</title> - <g id="a_node6"><a xlink:title="github.com/ii64/gouring.(*IoUring).io_uring_wait_cqe (9.82s)"> - <polygon fill="#ede8e2" stroke="#b28c63" points="341,-680 243,-680 243,-612 341,-612 341,-680"></polygon> - <text text-anchor="middle" x="292" y="-667.2" font-family="Times,serif" font-size="11.00">gouring</text> - <text text-anchor="middle" x="292" y="-655.2" font-family="Times,serif" font-size="11.00">(*IoUring)</text> - <text text-anchor="middle" x="292" y="-643.2" font-family="Times,serif" font-size="11.00">io_uring_wait_cqe</text> - <text text-anchor="middle" x="292" y="-631.2" font-family="Times,serif" font-size="11.00">2.44s (2.19%)</text> - <text text-anchor="middle" x="292" y="-619.2" font-family="Times,serif" font-size="11.00">of 9.82s (8.83%)</text> - </a> - </g> - </g> - <!-- N6->N4 --> - <g id="edge11" class="edge"> - <title>N6->N4</title> - <g id="a_edge11"><a xlink:title="github.com/ii64/gouring.(*IoUring).io_uring_wait_cqe -> github.com/ii64/gouring.(*IoUring).__io_uring_peek_cqe (7.38s)"> - <path fill="none" stroke="#b29877" d="M302.01,-611.99C305.84,-599.38 310.28,-584.74 314.44,-571.01"></path> - <polygon fill="#b29877" stroke="#b29877" points="317.85,-571.81 317.41,-561.23 311.16,-569.78 317.85,-571.81"></polygon> - </a> - </g> - <g id="a_edge11-label"><a xlink:title="github.com/ii64/gouring.(*IoUring).io_uring_wait_cqe -> github.com/ii64/gouring.(*IoUring).__io_uring_peek_cqe (7.38s)"> - <text text-anchor="middle" x="329" y="-582.8" font-family="Times,serif" font-size="14.00"> 7.38s</text> + <g id="a_node6"><a xlink:title="github.com/ii64/gouring.PrepRW (5.03s)"> + <polygon fill="#edebe8" stroke="#b2a692" points="538,-868.5 455,-868.5 455,-821.5 538,-821.5 538,-868.5" data-darkreader-inline-stroke="" style="--darkreader-inline-stroke:#ada69c; --darkreader-inline-fill:#2a2721;" data-darkreader-inline-fill=""></polygon> + <text text-anchor="middle" x="496.5" y="-854.9" font-family="Times,serif" font-size="12.00">gouring</text> + <text text-anchor="middle" x="496.5" y="-841.9" font-family="Times,serif" font-size="12.00">PrepRW</text> + <text text-anchor="middle" x="496.5" y="-828.9" font-family="Times,serif" font-size="12.00">5.03s (3.59%)</text> </a> </g> </g> <!-- N7 --> <g id="node7" class="node"> <title>N7</title> - <g id="a_node7"><a xlink:title="github.com/ii64/gouring.PrepRW (4.61s)"> - <polygon fill="#edebe8" stroke="#b2a48d" points="543.5,-669.5 460.5,-669.5 460.5,-622.5 543.5,-622.5 543.5,-669.5"></polygon> - <text text-anchor="middle" x="502" y="-655.9" font-family="Times,serif" font-size="12.00">gouring</text> - <text text-anchor="middle" x="502" y="-642.9" font-family="Times,serif" font-size="12.00">PrepRW</text> - <text text-anchor="middle" x="502" y="-629.9" font-family="Times,serif" font-size="12.00">4.61s (4.14%)</text> + <g id="a_node7"><a xlink:title="github.com/ii64/gouring.(*IoUring).io_uring_wait_cqe (9.01s)"> + <polygon fill="#ede9e5" stroke="#b29979" points="335.5,-879 237.5,-879 237.5,-811 335.5,-811 335.5,-879" data-darkreader-inline-stroke="" style="--darkreader-inline-stroke:#b69f81; --darkreader-inline-fill:#2e2720;" data-darkreader-inline-fill=""></polygon> + <text text-anchor="middle" x="286.5" y="-866.2" font-family="Times,serif" font-size="11.00">gouring</text> + <text text-anchor="middle" x="286.5" y="-854.2" font-family="Times,serif" font-size="11.00">(*IoUring)</text> + <text text-anchor="middle" x="286.5" y="-842.2" font-family="Times,serif" font-size="11.00">io_uring_wait_cqe</text> + <text text-anchor="middle" x="286.5" y="-830.2" font-family="Times,serif" font-size="11.00">1.87s (1.34%)</text> + <text text-anchor="middle" x="286.5" y="-818.2" font-family="Times,serif" font-size="11.00">of 9.01s (6.44%)</text> + </a> + </g> + </g> + <!-- N7->N5 --> + <g id="edge13" class="edge"> + <title>N7->N5</title> + <g id="a_edge13"><a xlink:title="github.com/ii64/gouring.(*IoUring).io_uring_wait_cqe -> github.com/ii64/gouring.(*IoUring).__io_uring_peek_cqe (7.14s)"> + <path fill="none" stroke="#b29f84" d="M294.97,-810.84C299.26,-794.05 304.54,-773.38 309.26,-754.9" data-darkreader-inline-stroke="" style="--darkreader-inline-stroke:#a9a196;"></path> + <polygon fill="#b29f84" stroke="#b29f84" points="312.66,-755.75 311.74,-745.19 305.88,-754.01 312.66,-755.75" data-darkreader-inline-stroke="" style="--darkreader-inline-stroke:#a9a196; --darkreader-inline-fill:#695942;" data-darkreader-inline-fill=""></polygon> + </a> + </g> + <g id="a_edge13-label"><a xlink:title="github.com/ii64/gouring.(*IoUring).io_uring_wait_cqe -> github.com/ii64/gouring.(*IoUring).__io_uring_peek_cqe (7.14s)"> + <text text-anchor="middle" x="324.5" y="-774.3" font-family="Times,serif" font-size="14.00"> 7.14s</text> </a> </g> </g> <!-- N8 --> <g id="node8" class="node"> <title>N8</title> - <g id="a_node8"><a xlink:title="github.com/ii64/gouring.(*IoUring)._io_uring_get_sqe (3.69s)"> - <polygon fill="#edebe9" stroke="#b2a794" points="104,-558.5 0,-558.5 0,-485.5 104,-485.5 104,-558.5"></polygon> - <text text-anchor="middle" x="52" y="-544.9" font-family="Times,serif" font-size="12.00">gouring</text> - <text text-anchor="middle" x="52" y="-531.9" font-family="Times,serif" font-size="12.00">(*IoUring)</text> - <text text-anchor="middle" x="52" y="-518.9" font-family="Times,serif" font-size="12.00">_io_uring_get_sqe</text> - <text text-anchor="middle" x="52" y="-505.9" font-family="Times,serif" font-size="12.00">3.22s (2.89%)</text> - <text text-anchor="middle" x="52" y="-492.9" font-family="Times,serif" font-size="12.00">of 3.69s (3.32%)</text> - </a> - </g> - </g> - <!-- N18 --> - <g id="node18" class="node"> - <title>N18</title> - <g id="a_node18"><a xlink:title="github.com/ii64/gouring.(*IoUring).io_uring_get_sqe (3.69s)"> - <polygon fill="#edebe9" stroke="#b2a794" points="97.5,-668 20.5,-668 20.5,-624 97.5,-624 97.5,-668"></polygon> - <text text-anchor="middle" x="59" y="-657.6" font-family="Times,serif" font-size="8.00">gouring</text> - <text text-anchor="middle" x="59" y="-648.6" font-family="Times,serif" font-size="8.00">(*IoUring)</text> - <text text-anchor="middle" x="59" y="-639.6" font-family="Times,serif" font-size="8.00">io_uring_get_sqe</text> - <text text-anchor="middle" x="59" y="-630.6" font-family="Times,serif" font-size="8.00">0 of 3.69s (3.32%)</text> - </a> - </g> - </g> - <!-- N10->N18 --> - <g id="edge15" class="edge"> - <title>N10->N18</title> - <g id="a_edge15"><a xlink:title="github.com/ii64/gouring.(*IoUring).GetSqe -> github.com/ii64/gouring.(*IoUring).io_uring_get_sqe (3.69s)"> - <path fill="none" stroke="#b2a794" d="M72.73,-745.81C69.9,-725.43 66.19,-698.75 63.34,-678.26"></path> - <polygon fill="#b2a794" stroke="#b2a794" points="66.79,-677.59 61.94,-668.17 59.85,-678.55 66.79,-677.59"></polygon> - </a> - </g> - <g id="a_edge15-label"><a xlink:title="github.com/ii64/gouring.(*IoUring).GetSqe -> github.com/ii64/gouring.(*IoUring).io_uring_get_sqe (3.69s)"> - <text text-anchor="middle" x="93" y="-716.8" font-family="Times,serif" font-size="14.00"> 3.69s</text> - <text text-anchor="middle" x="93" y="-701.8" font-family="Times,serif" font-size="14.00"> (inline)</text> - </a> - </g> - </g> - <!-- N11 --> - <g id="node11" class="node"> - <title>N11</title> - <g id="a_node11"><a xlink:title="github.com/ii64/gouring.(*IoUring).io_uring_cq_advance (1s)"> - <polygon fill="#edecec" stroke="#b2b0aa" points="520,-548 414,-548 414,-496 520,-496 520,-548"></polygon> - <text text-anchor="middle" x="467" y="-536" font-family="Times,serif" font-size="10.00">gouring</text> - <text text-anchor="middle" x="467" y="-525" font-family="Times,serif" font-size="10.00">(*IoUring)</text> - <text text-anchor="middle" x="467" y="-514" font-family="Times,serif" font-size="10.00">io_uring_cq_advance</text> - <text text-anchor="middle" x="467" y="-503" font-family="Times,serif" font-size="10.00">1s (0.9%)</text> - </a> - </g> - </g> - <!-- N12 --> - <g id="node12" class="node"> - <title>N12</title> - <g id="a_node12"><a xlink:title="github.com/ii64/gouring.io_uring_enter2 (79.48s)"> - <polygon fill="#edd7d5" stroke="#b21100" points="226,-211 140,-211 140,-163 226,-163 226,-211"></polygon> - <text text-anchor="middle" x="183" y="-199.8" font-family="Times,serif" font-size="9.00">gouring</text> - <text text-anchor="middle" x="183" y="-189.8" font-family="Times,serif" font-size="9.00">io_uring_enter2</text> - <text text-anchor="middle" x="183" y="-179.8" font-family="Times,serif" font-size="9.00">0.08s (0.072%)</text> - <text text-anchor="middle" x="183" y="-169.8" font-family="Times,serif" font-size="9.00">of 79.48s (71.46%)</text> - </a> - </g> - </g> - <!-- N12->N2 --> - <g id="edge8" class="edge"> - <title>N12->N2</title> - <g id="a_edge8"><a xlink:title="github.com/ii64/gouring.io_uring_enter2 -> syscall.Syscall6 (79.40s)"> - <path fill="none" stroke="#b21100" stroke-width="4" d="M183,-162.94C183,-151.4 183,-136.79 183,-122.13"></path> - <polygon fill="#b21100" stroke="#b21100" stroke-width="4" points="186.5,-122.02 183,-112.02 179.5,-122.02 186.5,-122.02"></polygon> - </a> - </g> - <g id="a_edge8-label"><a xlink:title="github.com/ii64/gouring.io_uring_enter2 -> syscall.Syscall6 (79.40s)"> - <text text-anchor="middle" x="203" y="-133.8" font-family="Times,serif" font-size="14.00"> 79.40s</text> - </a> - </g> - </g> - <!-- N13 --> - <g id="node13" class="node"> - <title>N13</title> - <g id="a_node13"><a xlink:title="github.com/ii64/gouring.(*IoUring).io_uring_cqe_seen (1.15s)"> - <polygon fill="#edeceb" stroke="#b2b0a9" points="442.5,-675 359.5,-675 359.5,-617 442.5,-617 442.5,-675"></polygon> - <text text-anchor="middle" x="401" y="-663.8" font-family="Times,serif" font-size="9.00">gouring</text> - <text text-anchor="middle" x="401" y="-653.8" font-family="Times,serif" font-size="9.00">(*IoUring)</text> - <text text-anchor="middle" x="401" y="-643.8" font-family="Times,serif" font-size="9.00">io_uring_cqe_seen</text> - <text text-anchor="middle" x="401" y="-633.8" font-family="Times,serif" font-size="9.00">0.15s (0.13%)</text> - <text text-anchor="middle" x="401" y="-623.8" font-family="Times,serif" font-size="9.00">of 1.15s (1.03%)</text> - </a> - </g> - </g> - <!-- N13->N11 --> - <g id="edge20" class="edge"> - <title>N13->N11</title> - <g id="a_edge20"><a xlink:title="github.com/ii64/gouring.(*IoUring).io_uring_cqe_seen -> github.com/ii64/gouring.(*IoUring).io_uring_cq_advance (1s)"> - <path fill="none" stroke="#b2b0aa" d="M416.31,-616.7C425.93,-598.92 438.4,-575.87 448.56,-557.08"></path> - <polygon fill="#b2b0aa" stroke="#b2b0aa" points="451.66,-558.7 453.34,-548.24 445.51,-555.37 451.66,-558.7"></polygon> - </a> - </g> - <g id="a_edge20-label"><a xlink:title="github.com/ii64/gouring.(*IoUring).io_uring_cqe_seen -> github.com/ii64/gouring.(*IoUring).io_uring_cq_advance (1s)"> - <text text-anchor="middle" x="444" y="-582.8" font-family="Times,serif" font-size="14.00"> 1s</text> - </a> - </g> - </g> - <!-- N19 --> - <g id="node19" class="node"> - <title>N19</title> - <g id="a_node19"><a xlink:title="github.com/ii64/gouring.(*IoUring).io_uringn_submit (81.62s)"> - <polygon fill="#edd7d5" stroke="#b20f00" points="225,-668 141,-668 141,-624 225,-624 225,-668"></polygon> - <text text-anchor="middle" x="183" y="-657.6" font-family="Times,serif" font-size="8.00">gouring</text> - <text text-anchor="middle" x="183" y="-648.6" font-family="Times,serif" font-size="8.00">(*IoUring)</text> - <text text-anchor="middle" x="183" y="-639.6" font-family="Times,serif" font-size="8.00">io_uringn_submit</text> - <text text-anchor="middle" x="183" y="-630.6" font-family="Times,serif" font-size="8.00">0 of 81.62s (73.38%)</text> - </a> - </g> - </g> - <!-- N14->N19 --> - <g id="edge3" class="edge"> - <title>N14->N19</title> - <g id="a_edge3"><a xlink:title="github.com/ii64/gouring.(*IoUring).Submit -> github.com/ii64/gouring.(*IoUring).io_uringn_submit (81.62s)"> - <path fill="none" stroke="#b20f00" stroke-width="4" d="M183,-748.4C183,-727.78 183,-699.77 183,-678.41"></path> - <polygon fill="#b20f00" stroke="#b20f00" stroke-width="4" points="186.5,-678.23 183,-668.23 179.5,-678.23 186.5,-678.23"></polygon> - </a> - </g> - <g id="a_edge3-label"><a xlink:title="github.com/ii64/gouring.(*IoUring).Submit -> github.com/ii64/gouring.(*IoUring).io_uringn_submit (81.62s)"> - <text text-anchor="middle" x="205" y="-716.8" font-family="Times,serif" font-size="14.00"> 81.62s</text> - <text text-anchor="middle" x="205" y="-701.8" font-family="Times,serif" font-size="14.00"> (inline)</text> - </a> - </g> - </g> - <!-- N15->N6 --> - <g id="edge10" class="edge"> - <title>N15->N6</title> - <g id="a_edge10"><a xlink:title="github.com/ii64/gouring.(*IoUring).WaitCqe -> github.com/ii64/gouring.(*IoUring).io_uring_wait_cqe (9.82s)"> - <path fill="none" stroke="#b28c63" d="M287.3,-748.4C288.09,-731.38 289.11,-709.31 290,-690.11"></path> - <polygon fill="#b28c63" stroke="#b28c63" points="293.5,-690.24 290.47,-680.08 286.51,-689.91 293.5,-690.24"></polygon> - </a> - </g> - <g id="a_edge10-label"><a xlink:title="github.com/ii64/gouring.(*IoUring).WaitCqe -> github.com/ii64/gouring.(*IoUring).io_uring_wait_cqe (9.82s)"> - <text text-anchor="middle" x="307" y="-709.3" font-family="Times,serif" font-size="14.00"> 9.82s</text> + <g id="a_node8"><a xlink:title="github.com/ii64/gouring.(*IoUring)._io_uring_get_sqe (3.21s)"> + <polygon fill="#edecea" stroke="#b2ab9e" points="97,-740 0,-740 0,-672 97,-672 97,-740" data-darkreader-inline-stroke="" style="--darkreader-inline-stroke:#b1aaa0; --darkreader-inline-fill:#232627;" data-darkreader-inline-fill=""></polygon> + <text text-anchor="middle" x="48.5" y="-727.2" font-family="Times,serif" font-size="11.00">gouring</text> + <text text-anchor="middle" x="48.5" y="-715.2" font-family="Times,serif" font-size="11.00">(*IoUring)</text> + <text text-anchor="middle" x="48.5" y="-703.2" font-family="Times,serif" font-size="11.00">_io_uring_get_sqe</text> + <text text-anchor="middle" x="48.5" y="-691.2" font-family="Times,serif" font-size="11.00">2.82s (2.01%)</text> + <text text-anchor="middle" x="48.5" y="-679.2" font-family="Times,serif" font-size="11.00">of 3.21s (2.29%)</text> </a> </g> </g> <!-- N21 --> <g id="node21" class="node"> <title>N21</title> - <g id="a_node21"><a xlink:title="github.com/ii64/gouring.io_uring_enter (79.48s)"> - <polygon fill="#edd7d5" stroke="#b21100" points="225,-298 141,-298 141,-262 225,-262 225,-298"></polygon> - <text text-anchor="middle" x="183" y="-287.1" font-family="Times,serif" font-size="8.00">gouring</text> - <text text-anchor="middle" x="183" y="-278.1" font-family="Times,serif" font-size="8.00">io_uring_enter</text> - <text text-anchor="middle" x="183" y="-269.1" font-family="Times,serif" font-size="8.00">0 of 79.48s (71.46%)</text> + <g id="a_node21"><a xlink:title="github.com/ii64/gouring.(*IoUring).io_uring_get_sqe (3.21s)"> + <polygon fill="#edecea" stroke="#b2ab9e" points="93,-867 16,-867 16,-823 93,-823 93,-867" data-darkreader-inline-stroke="" style="--darkreader-inline-stroke:#b1aaa0; --darkreader-inline-fill:#232627;" data-darkreader-inline-fill=""></polygon> + <text text-anchor="middle" x="54.5" y="-856.6" font-family="Times,serif" font-size="8.00">gouring</text> + <text text-anchor="middle" x="54.5" y="-847.6" font-family="Times,serif" font-size="8.00">(*IoUring)</text> + <text text-anchor="middle" x="54.5" y="-838.6" font-family="Times,serif" font-size="8.00">io_uring_get_sqe</text> + <text text-anchor="middle" x="54.5" y="-829.6" font-family="Times,serif" font-size="8.00">0 of 3.21s (2.29%)</text> </a> </g> </g> - <!-- N16->N21 --> + <!-- N10->N21 --> + <g id="edge17" class="edge"> + <title>N10->N21</title> + <g id="a_edge17"><a xlink:title="github.com/ii64/gouring.(*IoUring).GetSqe -> github.com/ii64/gouring.(*IoUring).io_uring_get_sqe (3.21s)"> + <path fill="none" stroke="#b2ab9e" d="M66.95,-944.81C64.42,-924.78 61.03,-897.86 58.43,-877.18" data-darkreader-inline-stroke="" style="--darkreader-inline-stroke:#b1aaa0;"></path> + <polygon fill="#b2ab9e" stroke="#b2ab9e" points="61.87,-876.49 57.15,-867 54.92,-877.36 61.87,-876.49" data-darkreader-inline-stroke="" style="--darkreader-inline-stroke:#b1aaa0; --darkreader-inline-fill:#494f52;" data-darkreader-inline-fill=""></polygon> + </a> + </g> + <g id="a_edge17-label"><a xlink:title="github.com/ii64/gouring.(*IoUring).GetSqe -> github.com/ii64/gouring.(*IoUring).io_uring_get_sqe (3.21s)"> + <text text-anchor="middle" x="86.5" y="-915.8" font-family="Times,serif" font-size="14.00"> 3.21s</text> + <text text-anchor="middle" x="86.5" y="-900.8" font-family="Times,serif" font-size="14.00"> (inline)</text> + </a> + </g> + </g> + <!-- N11 --> + <g id="node11" class="node"> + <title>N11</title> + <g id="a_node11"><a xlink:title="github.com/ii64/gouring.(*IoUring).io_uring_cq_advance (0.76s)"> + <polygon fill="#ededec" stroke="#b2b1ad" points="512.5,-732 406.5,-732 406.5,-680 512.5,-680 512.5,-732" data-darkreader-inline-stroke="" style="--darkreader-inline-stroke:#b6afa6; --darkreader-inline-fill:#222527;" data-darkreader-inline-fill=""></polygon> + <text text-anchor="middle" x="459.5" y="-720" font-family="Times,serif" font-size="10.00">gouring</text> + <text text-anchor="middle" x="459.5" y="-709" font-family="Times,serif" font-size="10.00">(*IoUring)</text> + <text text-anchor="middle" x="459.5" y="-698" font-family="Times,serif" font-size="10.00">io_uring_cq_advance</text> + <text text-anchor="middle" x="459.5" y="-687" font-family="Times,serif" font-size="10.00">0.76s (0.54%)</text> + </a> + </g> + </g> + <!-- N12 --> + <g id="node12" class="node"> + <title>N12</title> + <g id="a_node12"><a xlink:title="github.com/ii64/gouring.(*IoUring).io_uring_cqe_seen (0.98s)"> + <polygon fill="#edecec" stroke="#b2b1ac" points="437,-874 354,-874 354,-816 437,-816 437,-874" data-darkreader-inline-stroke="" style="--darkreader-inline-stroke:#b5afa6; --darkreader-inline-fill:#222527;" data-darkreader-inline-fill=""></polygon> + <text text-anchor="middle" x="395.5" y="-862.8" font-family="Times,serif" font-size="9.00">gouring</text> + <text text-anchor="middle" x="395.5" y="-852.8" font-family="Times,serif" font-size="9.00">(*IoUring)</text> + <text text-anchor="middle" x="395.5" y="-842.8" font-family="Times,serif" font-size="9.00">io_uring_cqe_seen</text> + <text text-anchor="middle" x="395.5" y="-832.8" font-family="Times,serif" font-size="9.00">0.22s (0.16%)</text> + <text text-anchor="middle" x="395.5" y="-822.8" font-family="Times,serif" font-size="9.00">of 0.98s (0.7%)</text> + </a> + </g> + </g> + <!-- N12->N11 --> + <g id="edge22" class="edge"> + <title>N12->N11</title> + <g id="a_edge22"><a xlink:title="github.com/ii64/gouring.(*IoUring).io_uring_cqe_seen -> github.com/ii64/gouring.(*IoUring).io_uring_cq_advance (0.76s)"> + <path fill="none" stroke="#b2b1ad" d="M408.61,-815.95C418.7,-794.34 432.7,-764.37 443.46,-741.34" data-darkreader-inline-stroke="" style="--darkreader-inline-stroke:#b6afa6;"></path> + <polygon fill="#b2b1ad" stroke="#b2b1ad" points="446.64,-742.79 447.7,-732.25 440.3,-739.83 446.64,-742.79" data-darkreader-inline-stroke="" style="--darkreader-inline-stroke:#b6afa6; --darkreader-inline-fill:#454b4e;" data-darkreader-inline-fill=""></polygon> + </a> + </g> + <g id="a_edge22-label"><a xlink:title="github.com/ii64/gouring.(*IoUring).io_uring_cqe_seen -> github.com/ii64/gouring.(*IoUring).io_uring_cq_advance (0.76s)"> + <text text-anchor="middle" x="455.5" y="-781.8" font-family="Times,serif" font-size="14.00"> 0.76s</text> + <text text-anchor="middle" x="455.5" y="-766.8" font-family="Times,serif" font-size="14.00"> (inline)</text> + </a> + </g> + </g> + <!-- N13 --> + <g id="node13" class="node"> + <title>N13</title> + <g id="a_node13"><a xlink:title="syscall.RawSyscall6 (109.04s)"> + <polygon fill="#edd7d5" stroke="#b20c00" points="221,-185 130,-185 130,-137 221,-137 221,-185" data-darkreader-inline-stroke="" style="--darkreader-inline-stroke:#ff5b4f; --darkreader-inline-fill:#3d1d1a;" data-darkreader-inline-fill=""></polygon> + <text text-anchor="middle" x="175.5" y="-173.8" font-family="Times,serif" font-size="9.00">syscall</text> + <text text-anchor="middle" x="175.5" y="-163.8" font-family="Times,serif" font-size="9.00">RawSyscall6</text> + <text text-anchor="middle" x="175.5" y="-153.8" font-family="Times,serif" font-size="9.00">0.06s (0.043%)</text> + <text text-anchor="middle" x="175.5" y="-143.8" font-family="Times,serif" font-size="9.00">of 109.04s (77.91%)</text> + </a> + </g> + </g> + <!-- N13->N1 --> + <g id="edge10" class="edge"> + <title>N13->N1</title> + <g id="a_edge10"><a xlink:title="syscall.RawSyscall6 -> runtime/internal/syscall.Syscall6 (108.98s)"> + <path fill="none" stroke="#b20c00" stroke-width="4" d="M175.5,-136.8C175.5,-125.21 175.5,-110.66 175.5,-96.55" data-darkreader-inline-stroke="" style="--darkreader-inline-stroke:#ff5b4f;"></path> + <polygon fill="#b20c00" stroke="#b20c00" stroke-width="4" points="179,-96.4 175.5,-86.4 172,-96.4 179,-96.4" data-darkreader-inline-stroke="" style="--darkreader-inline-stroke:#ff5b4f; --darkreader-inline-fill:#8e0a00;" data-darkreader-inline-fill=""></polygon> + </a> + </g> + <g id="a_edge10-label"><a xlink:title="syscall.RawSyscall6 -> runtime/internal/syscall.Syscall6 (108.98s)"> + <text text-anchor="middle" x="199" y="-107.8" font-family="Times,serif" font-size="14.00"> 108.98s</text> + </a> + </g> + </g> + <!-- N14 --> + <g id="node14" class="node"> + <title>N14</title> + <g id="a_node14"><a xlink:title="github.com/ii64/gouring.io_uring_enter2 (109.59s)"> + <polygon fill="#edd7d5" stroke="#b20c00" points="221,-383 130,-383 130,-335 221,-335 221,-383" data-darkreader-inline-stroke="" style="--darkreader-inline-stroke:#ff5b4f; --darkreader-inline-fill:#3d1d1a;" data-darkreader-inline-fill=""></polygon> + <text text-anchor="middle" x="175.5" y="-371.8" font-family="Times,serif" font-size="9.00">gouring</text> + <text text-anchor="middle" x="175.5" y="-361.8" font-family="Times,serif" font-size="9.00">io_uring_enter2</text> + <text text-anchor="middle" x="175.5" y="-351.8" font-family="Times,serif" font-size="9.00">0.05s (0.036%)</text> + <text text-anchor="middle" x="175.5" y="-341.8" font-family="Times,serif" font-size="9.00">of 109.59s (78.30%)</text> + </a> + </g> + </g> + <!-- N18 --> + <g id="node18" class="node"> + <title>N18</title> + <g id="a_node18"><a xlink:title="syscall.Syscall6 (109.54s)"> + <polygon fill="#edd7d5" stroke="#b20c00" points="221,-284 130,-284 130,-236 221,-236 221,-284" data-darkreader-inline-stroke="" style="--darkreader-inline-stroke:#ff5b4f; --darkreader-inline-fill:#3d1d1a;" data-darkreader-inline-fill=""></polygon> + <text text-anchor="middle" x="175.5" y="-272.8" font-family="Times,serif" font-size="9.00">syscall</text> + <text text-anchor="middle" x="175.5" y="-262.8" font-family="Times,serif" font-size="9.00">Syscall6</text> + <text text-anchor="middle" x="175.5" y="-252.8" font-family="Times,serif" font-size="9.00">0.01s (0.0071%)</text> + <text text-anchor="middle" x="175.5" y="-242.8" font-family="Times,serif" font-size="9.00">of 109.54s (78.27%)</text> + </a> + </g> + </g> + <!-- N14->N18 --> + <g id="edge8" class="edge"> + <title>N14->N18</title> + <g id="a_edge8"><a xlink:title="github.com/ii64/gouring.io_uring_enter2 -> syscall.Syscall6 (109.54s)"> + <path fill="none" stroke="#b20c00" stroke-width="4" d="M175.5,-334.52C175.5,-322.49 175.5,-307.62 175.5,-294.42" data-darkreader-inline-stroke="" style="--darkreader-inline-stroke:#ff5b4f;"></path> + <polygon fill="#b20c00" stroke="#b20c00" stroke-width="4" points="179,-294.26 175.5,-284.26 172,-294.26 179,-294.26" data-darkreader-inline-stroke="" style="--darkreader-inline-stroke:#ff5b4f; --darkreader-inline-fill:#8e0a00;" data-darkreader-inline-fill=""></polygon> + </a> + </g> + <g id="a_edge8-label"><a xlink:title="github.com/ii64/gouring.io_uring_enter2 -> syscall.Syscall6 (109.54s)"> + <text text-anchor="middle" x="199" y="-305.8" font-family="Times,serif" font-size="14.00"> 109.54s</text> + </a> + </g> + </g> + <!-- N22 --> + <g id="node22" class="node"> + <title>N22</title> + <g id="a_node22"><a xlink:title="github.com/ii64/gouring.(*IoUring).io_uring_submit (111.74s)"> + <polygon fill="#edd6d5" stroke="#b20b00" points="219.5,-867 131.5,-867 131.5,-823 219.5,-823 219.5,-867" data-darkreader-inline-stroke="" style="--darkreader-inline-stroke:#ff5a4f; --darkreader-inline-fill:#3d1c1a;" data-darkreader-inline-fill=""></polygon> + <text text-anchor="middle" x="175.5" y="-856.6" font-family="Times,serif" font-size="8.00">gouring</text> + <text text-anchor="middle" x="175.5" y="-847.6" font-family="Times,serif" font-size="8.00">(*IoUring)</text> + <text text-anchor="middle" x="175.5" y="-838.6" font-family="Times,serif" font-size="8.00">io_uring_submit</text> + <text text-anchor="middle" x="175.5" y="-829.6" font-family="Times,serif" font-size="8.00">0 of 111.74s (79.84%)</text> + </a> + </g> + </g> + <!-- N15->N22 --> + <g id="edge3" class="edge"> + <title>N15->N22</title> + <g id="a_edge3"><a xlink:title="github.com/ii64/gouring.(*IoUring).Submit -> github.com/ii64/gouring.(*IoUring).io_uring_submit (111.74s)"> + <path fill="none" stroke="#b20b00" stroke-width="4" d="M175.5,-944.81C175.5,-924.78 175.5,-897.86 175.5,-877.18" data-darkreader-inline-stroke="" style="--darkreader-inline-stroke:#ff5a4f;"></path> + <polygon fill="#b20b00" stroke="#b20b00" stroke-width="4" points="179,-877 175.5,-867 172,-877 179,-877" data-darkreader-inline-stroke="" style="--darkreader-inline-stroke:#ff5a4f; --darkreader-inline-fill:#8e0900;" data-darkreader-inline-fill=""></polygon> + </a> + </g> + <g id="a_edge3-label"><a xlink:title="github.com/ii64/gouring.(*IoUring).Submit -> github.com/ii64/gouring.(*IoUring).io_uring_submit (111.74s)"> + <text text-anchor="middle" x="199" y="-915.8" font-family="Times,serif" font-size="14.00"> 111.74s</text> + <text text-anchor="middle" x="199" y="-900.8" font-family="Times,serif" font-size="14.00"> (inline)</text> + </a> + </g> + </g> + <!-- N19 --> + <g id="node19" class="node"> + <title>N19</title> + <g id="a_node19"><a xlink:title="github.com/ii64/gouring.io_uring_enter (109.60s)"> + <polygon fill="#edd7d5" stroke="#b20c00" points="221,-482 130,-482 130,-434 221,-434 221,-482" data-darkreader-inline-stroke="" style="--darkreader-inline-stroke:#ff5b4f; --darkreader-inline-fill:#3d1d1a;" data-darkreader-inline-fill=""></polygon> + <text text-anchor="middle" x="175.5" y="-470.8" font-family="Times,serif" font-size="9.00">gouring</text> + <text text-anchor="middle" x="175.5" y="-460.8" font-family="Times,serif" font-size="9.00">io_uring_enter</text> + <text text-anchor="middle" x="175.5" y="-450.8" font-family="Times,serif" font-size="9.00">0.01s (0.0071%)</text> + <text text-anchor="middle" x="175.5" y="-440.8" font-family="Times,serif" font-size="9.00">of 109.60s (78.31%)</text> + </a> + </g> + </g> + <!-- N16->N19 --> <g id="edge6" class="edge"> - <title>N16->N21</title> - <g id="a_edge6"><a xlink:title="github.com/ii64/gouring.(*IoUring).__io_uring_submit -> github.com/ii64/gouring.io_uring_enter (79.48s)"> - <path fill="none" stroke="#b21100" stroke-width="4" d="M183,-368.92C183,-350.42 183,-326.34 183,-308.05"></path> - <polygon fill="#b21100" stroke="#b21100" stroke-width="4" points="186.5,-308.04 183,-298.04 179.5,-308.04 186.5,-308.04"></polygon> + <title>N16->N19</title> + <g id="a_edge6"><a xlink:title="github.com/ii64/gouring.(*IoUring).__io_uring_submit -> github.com/ii64/gouring.io_uring_enter (109.60s)"> + <path fill="none" stroke="#b20c00" stroke-width="4" d="M175.5,-552.7C175.5,-534.73 175.5,-511.38 175.5,-492.49" data-darkreader-inline-stroke="" style="--darkreader-inline-stroke:#ff5b4f;"></path> + <polygon fill="#b20c00" stroke="#b20c00" stroke-width="4" points="179,-492.23 175.5,-482.23 172,-492.23 179,-492.23" data-darkreader-inline-stroke="" style="--darkreader-inline-stroke:#ff5b4f; --darkreader-inline-fill:#8e0a00;" data-darkreader-inline-fill=""></polygon> </a> </g> - <g id="a_edge6-label"><a xlink:title="github.com/ii64/gouring.(*IoUring).__io_uring_submit -> github.com/ii64/gouring.io_uring_enter (79.48s)"> - <text text-anchor="middle" x="205" y="-334.8" font-family="Times,serif" font-size="14.00"> 79.48s</text> - <text text-anchor="middle" x="205" y="-319.8" font-family="Times,serif" font-size="14.00"> (inline)</text> + <g id="a_edge6-label"><a xlink:title="github.com/ii64/gouring.(*IoUring).__io_uring_submit -> github.com/ii64/gouring.io_uring_enter (109.60s)"> + <text text-anchor="middle" x="199" y="-518.8" font-family="Times,serif" font-size="14.00"> 109.60s</text> + <text text-anchor="middle" x="199" y="-503.8" font-family="Times,serif" font-size="14.00"> (inline)</text> </a> </g> </g> - <!-- N17->N13 --> - <g id="edge19" class="edge"> - <title>N17->N13</title> - <g id="a_edge19"><a xlink:title="github.com/ii64/gouring.(*IoUring).SeenCqe -> github.com/ii64/gouring.(*IoUring).io_uring_cqe_seen (1.15s)"> - <path fill="none" stroke="#b2b0a9" d="M390.04,-748.4C392.04,-729.9 394.68,-705.46 396.87,-685.2"></path> - <polygon fill="#b2b0a9" stroke="#b2b0a9" points="400.37,-685.36 397.97,-675.04 393.41,-684.61 400.37,-685.36"></polygon> - </a> - </g> - <g id="a_edge19-label"><a xlink:title="github.com/ii64/gouring.(*IoUring).SeenCqe -> github.com/ii64/gouring.(*IoUring).io_uring_cqe_seen (1.15s)"> - <text text-anchor="middle" x="418" y="-716.8" font-family="Times,serif" font-size="14.00"> 1.15s</text> - <text text-anchor="middle" x="418" y="-701.8" font-family="Times,serif" font-size="14.00"> (inline)</text> - </a> - </g> - </g> - <!-- N18->N8 --> - <g id="edge16" class="edge"> - <title>N18->N8</title> - <g id="a_edge16"><a xlink:title="github.com/ii64/gouring.(*IoUring).io_uring_get_sqe -> github.com/ii64/gouring.(*IoUring)._io_uring_get_sqe (3.69s)"> - <path fill="none" stroke="#b2a794" d="M57.78,-623.75C56.91,-608.66 55.72,-587.82 54.64,-569"></path> - <polygon fill="#b2a794" stroke="#b2a794" points="58.12,-568.59 54.05,-558.81 51.13,-568.99 58.12,-568.59"></polygon> - </a> - </g> - <g id="a_edge16-label"><a xlink:title="github.com/ii64/gouring.(*IoUring).io_uring_get_sqe -> github.com/ii64/gouring.(*IoUring)._io_uring_get_sqe (3.69s)"> - <text text-anchor="middle" x="73" y="-582.8" font-family="Times,serif" font-size="14.00"> 3.69s</text> - </a> - </g> - </g> - <!-- N19->N5 --> - <g id="edge4" class="edge"> - <title>N19->N5</title> - <g id="a_edge4"><a xlink:title="github.com/ii64/gouring.(*IoUring).io_uringn_submit -> github.com/ii64/gouring.(*IoUring).__io_uring_submit_and_wait (81.62s)"> - <path fill="none" stroke="#b20f00" stroke-width="4" d="M183,-623.75C183,-606.58 183,-581.97 183,-561.37"></path> - <polygon fill="#b20f00" stroke="#b20f00" stroke-width="4" points="186.5,-561.32 183,-551.32 179.5,-561.32 186.5,-561.32"></polygon> - </a> - </g> - <g id="a_edge4-label"><a xlink:title="github.com/ii64/gouring.(*IoUring).io_uringn_submit -> github.com/ii64/gouring.(*IoUring).__io_uring_submit_and_wait (81.62s)"> - <text text-anchor="middle" x="203" y="-582.8" font-family="Times,serif" font-size="14.00"> 81.62s</text> - </a> - </g> - </g> - <!-- N20->N7 --> + <!-- N17->N7 --> <g id="edge12" class="edge"> - <title>N20->N7</title> - <g id="a_edge12"><a xlink:title="github.com/ii64/gouring.PrepNop -> github.com/ii64/gouring.PrepRW (4.61s)"> - <path fill="none" stroke="#b2a48d" d="M493.33,-759.3C494.88,-739.2 497.49,-705.45 499.44,-680.19"></path> - <polygon fill="#b2a48d" stroke="#b2a48d" points="502.95,-680.19 500.23,-669.95 495.97,-679.65 502.95,-680.19"></polygon> + <title>N17->N7</title> + <g id="a_edge12"><a xlink:title="github.com/ii64/gouring.(*IoUring).WaitCqe -> github.com/ii64/gouring.(*IoUring).io_uring_wait_cqe (9.01s)"> + <path fill="none" stroke="#b29979" d="M281.83,-944.81C282.6,-928.49 283.59,-907.6 284.46,-889.23" data-darkreader-inline-stroke="" style="--darkreader-inline-stroke:#b69f81;"></path> + <polygon fill="#b29979" stroke="#b29979" points="287.96,-889.21 284.94,-879.05 280.97,-888.88 287.96,-889.21" data-darkreader-inline-stroke="" style="--darkreader-inline-stroke:#b69f81; --darkreader-inline-fill:#715c41;" data-darkreader-inline-fill=""></polygon> </a> </g> - <g id="a_edge12-label"><a xlink:title="github.com/ii64/gouring.PrepNop -> github.com/ii64/gouring.PrepRW (4.61s)"> - <text text-anchor="middle" x="519" y="-716.8" font-family="Times,serif" font-size="14.00"> 4.61s</text> - <text text-anchor="middle" x="519" y="-701.8" font-family="Times,serif" font-size="14.00"> (inline)</text> + <g id="a_edge12-label"><a xlink:title="github.com/ii64/gouring.(*IoUring).WaitCqe -> github.com/ii64/gouring.(*IoUring).io_uring_wait_cqe (9.01s)"> + <text text-anchor="middle" x="301.5" y="-908.3" font-family="Times,serif" font-size="14.00"> 9.01s</text> </a> </g> </g> - <!-- N21->N12 --> + <!-- N18->N13 --> + <g id="edge9" class="edge"> + <title>N18->N13</title> + <g id="a_edge9"><a xlink:title="syscall.Syscall6 -> syscall.RawSyscall6 (109.04s)"> + <path fill="none" stroke="#b20c00" stroke-width="4" d="M175.5,-235.52C175.5,-223.49 175.5,-208.62 175.5,-195.42" data-darkreader-inline-stroke="" style="--darkreader-inline-stroke:#ff5b4f;"></path> + <polygon fill="#b20c00" stroke="#b20c00" stroke-width="4" points="179,-195.26 175.5,-185.26 172,-195.26 179,-195.26" data-darkreader-inline-stroke="" style="--darkreader-inline-stroke:#ff5b4f; --darkreader-inline-fill:#8e0a00;" data-darkreader-inline-fill=""></polygon> + </a> + </g> + <g id="a_edge9-label"><a xlink:title="syscall.Syscall6 -> syscall.RawSyscall6 (109.04s)"> + <text text-anchor="middle" x="199" y="-206.8" font-family="Times,serif" font-size="14.00"> 109.04s</text> + </a> + </g> + </g> + <!-- N19->N14 --> <g id="edge7" class="edge"> - <title>N21->N12</title> - <g id="a_edge7"><a xlink:title="github.com/ii64/gouring.io_uring_enter -> github.com/ii64/gouring.io_uring_enter2 (79.48s)"> - <path fill="none" stroke="#b21100" stroke-width="4" d="M183,-261.88C183,-250.48 183,-235.11 183,-221.34"></path> - <polygon fill="#b21100" stroke="#b21100" stroke-width="4" points="186.5,-221.22 183,-211.22 179.5,-221.22 186.5,-221.22"></polygon> + <title>N19->N14</title> + <g id="a_edge7"><a xlink:title="github.com/ii64/gouring.io_uring_enter -> github.com/ii64/gouring.io_uring_enter2 (109.59s)"> + <path fill="none" stroke="#b20c00" stroke-width="4" d="M175.5,-433.52C175.5,-421.49 175.5,-406.62 175.5,-393.42" data-darkreader-inline-stroke="" style="--darkreader-inline-stroke:#ff5b4f;"></path> + <polygon fill="#b20c00" stroke="#b20c00" stroke-width="4" points="179,-393.26 175.5,-383.26 172,-393.26 179,-393.26" data-darkreader-inline-stroke="" style="--darkreader-inline-stroke:#ff5b4f; --darkreader-inline-fill:#8e0a00;" data-darkreader-inline-fill=""></polygon> </a> </g> - <g id="a_edge7-label"><a xlink:title="github.com/ii64/gouring.io_uring_enter -> github.com/ii64/gouring.io_uring_enter2 (79.48s)"> - <text text-anchor="middle" x="203" y="-232.8" font-family="Times,serif" font-size="14.00"> 79.48s</text> + <g id="a_edge7-label"><a xlink:title="github.com/ii64/gouring.io_uring_enter -> github.com/ii64/gouring.io_uring_enter2 (109.59s)"> + <text text-anchor="middle" x="199" y="-404.8" font-family="Times,serif" font-size="14.00"> 109.59s</text> + </a> + </g> + </g> + <!-- N20->N12 --> + <g id="edge20" class="edge"> + <title>N20->N12</title> + <g id="a_edge20"><a xlink:title="github.com/ii64/gouring.(*IoUring).SeenCqe -> github.com/ii64/gouring.(*IoUring).io_uring_cqe_seen (0.98s)"> + <path fill="none" stroke="#b2b1ac" d="M382.18,-951.74C384.5,-933.33 387.91,-906.25 390.7,-884.11" data-darkreader-inline-stroke="" style="--darkreader-inline-stroke:#b5afa6;"></path> + <polygon fill="#b2b1ac" stroke="#b2b1ac" points="394.19,-884.37 391.97,-874.01 387.25,-883.5 394.19,-884.37" data-darkreader-inline-stroke="" style="--darkreader-inline-stroke:#b5afa6; --darkreader-inline-fill:#454b4e;" data-darkreader-inline-fill=""></polygon> + </a> + </g> + <g id="a_edge20-label"><a xlink:title="github.com/ii64/gouring.(*IoUring).SeenCqe -> github.com/ii64/gouring.(*IoUring).io_uring_cqe_seen (0.98s)"> + <text text-anchor="middle" x="411.5" y="-915.8" font-family="Times,serif" font-size="14.00"> 0.98s</text> + <text text-anchor="middle" x="411.5" y="-900.8" font-family="Times,serif" font-size="14.00"> (inline)</text> + </a> + </g> + </g> + <!-- N21->N8 --> + <g id="edge18" class="edge"> + <title>N21->N8</title> + <g id="a_edge18"><a xlink:title="github.com/ii64/gouring.(*IoUring).io_uring_get_sqe -> github.com/ii64/gouring.(*IoUring)._io_uring_get_sqe (3.21s)"> + <path fill="none" stroke="#b2ab9e" d="M53.58,-822.89C52.73,-803.59 51.45,-774.42 50.39,-750.18" data-darkreader-inline-stroke="" style="--darkreader-inline-stroke:#b1aaa0;"></path> + <polygon fill="#b2ab9e" stroke="#b2ab9e" points="53.89,-749.98 49.95,-740.14 46.89,-750.28 53.89,-749.98" data-darkreader-inline-stroke="" style="--darkreader-inline-stroke:#b1aaa0; --darkreader-inline-fill:#494f52;" data-darkreader-inline-fill=""></polygon> + </a> + </g> + <g id="a_edge18-label"><a xlink:title="github.com/ii64/gouring.(*IoUring).io_uring_get_sqe -> github.com/ii64/gouring.(*IoUring)._io_uring_get_sqe (3.21s)"> + <text text-anchor="middle" x="69.5" y="-774.3" font-family="Times,serif" font-size="14.00"> 3.21s</text> + </a> + </g> + </g> + <!-- N22->N4 --> + <g id="edge4" class="edge"> + <title>N22->N4</title> + <g id="a_edge4"><a xlink:title="github.com/ii64/gouring.(*IoUring).io_uring_submit -> github.com/ii64/gouring.(*IoUring).__io_uring_submit_and_wait (111.74s)"> + <path fill="none" stroke="#b20b00" stroke-width="4" d="M175.5,-822.89C175.5,-802.27 175.5,-770.41 175.5,-745.31" data-darkreader-inline-stroke="" style="--darkreader-inline-stroke:#ff5a4f;"></path> + <polygon fill="#b20b00" stroke="#b20b00" stroke-width="4" points="179,-745.02 175.5,-735.02 172,-745.02 179,-745.02" data-darkreader-inline-stroke="" style="--darkreader-inline-stroke:#ff5a4f; --darkreader-inline-fill:#8e0900;" data-darkreader-inline-fill=""></polygon> + </a> + </g> + <g id="a_edge4-label"><a xlink:title="github.com/ii64/gouring.(*IoUring).io_uring_submit -> github.com/ii64/gouring.(*IoUring).__io_uring_submit_and_wait (111.74s)"> + <text text-anchor="middle" x="199" y="-774.3" font-family="Times,serif" font-size="14.00"> 111.74s</text> + </a> + </g> + </g> + <!-- N23->N6 --> + <g id="edge14" class="edge"> + <title>N23->N6</title> + <g id="a_edge14"><a xlink:title="github.com/ii64/gouring.PrepNop -> github.com/ii64/gouring.PrepRW (5.03s)"> + <path fill="none" stroke="#b2a692" d="M486.12,-955.87C487.98,-936.2 491.07,-903.48 493.4,-878.85" data-darkreader-inline-stroke="" style="--darkreader-inline-stroke:#ada69c;"></path> + <polygon fill="#b2a692" stroke="#b2a692" points="496.88,-879.14 494.34,-868.86 489.92,-878.48 496.88,-879.14" data-darkreader-inline-stroke="" style="--darkreader-inline-stroke:#ada69c; --darkreader-inline-fill:#5f5543;" data-darkreader-inline-fill=""></polygon> + </a> + </g> + <g id="a_edge14-label"><a xlink:title="github.com/ii64/gouring.PrepNop -> github.com/ii64/gouring.PrepRW (5.03s)"> + <text text-anchor="middle" x="513.5" y="-915.8" font-family="Times,serif" font-size="14.00"> 5.03s</text> + <text text-anchor="middle" x="513.5" y="-900.8" font-family="Times,serif" font-size="14.00"> (inline)</text> </a> </g> </g> diff --git a/assets/sqpoll.svg b/assets/sqpoll.svg index dba38a8..8b0aa81 100644 --- a/assets/sqpoll.svg +++ b/assets/sqpoll.svg @@ -1,1039 +1,1077 @@ -<svg width="1228pt" height="1119pt" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> - <g id="graph0" class="graph" transform="scale(1.3 1.3) rotate(0) translate(4 1115)"> +<svg width="1192pt" height="1273pt" viewBox="0.00 0.00 1192.00 1273.00" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> + <g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 1269)"> <title>perf</title> - <polygon fill="white" stroke="transparent" points="-4,4 -4,-1115 1223.5,-1115 1223.5,4 -4,4"></polygon> + <polygon fill="white" stroke="transparent" points="-4,4 -4,-1269 1188,-1269 1188,4 -4,4"></polygon> <!-- N1 --> <g id="node1" class="node"> <title>N1</title> - <g id="a_node1"><a xlink:title="main.main (71.27s)"> - <polygon fill="#eddad5" stroke="#b22300" points="385.5,-1008 237.5,-1008 237.5,-924 385.5,-924 385.5,-1008"></polygon> - <text text-anchor="middle" x="311.5" y="-990.4" font-family="Times,serif" font-size="17.00">main</text> - <text text-anchor="middle" x="311.5" y="-971.4" font-family="Times,serif" font-size="17.00">main</text> - <text text-anchor="middle" x="311.5" y="-952.4" font-family="Times,serif" font-size="17.00">17.80s (11.99%)</text> - <text text-anchor="middle" x="311.5" y="-933.4" font-family="Times,serif" font-size="17.00">of 71.27s (48.02%)</text> - </a> - </g> - </g> - <!-- N20 --> - <g id="node20" class="node"> - <title>N20</title> - <g id="a_node20"><a xlink:title="github.com/ii64/gouring.(*IoUring).GetSqe (8.58s)"> - <polygon fill="#edeae6" stroke="#b29c7e" points="149,-858 66,-858 66,-795 149,-795 149,-858"></polygon> - <text text-anchor="middle" x="107.5" y="-846" font-family="Times,serif" font-size="10.00">gouring</text> - <text text-anchor="middle" x="107.5" y="-835" font-family="Times,serif" font-size="10.00">(*IoUring)</text> - <text text-anchor="middle" x="107.5" y="-824" font-family="Times,serif" font-size="10.00">GetSqe</text> - <text text-anchor="middle" x="107.5" y="-813" font-family="Times,serif" font-size="10.00">0.32s (0.22%)</text> - <text text-anchor="middle" x="107.5" y="-802" font-family="Times,serif" font-size="10.00">of 8.58s (5.78%)</text> - </a> - </g> - </g> - <!-- N1->N20 --> - <g id="edge13" class="edge"> - <title>N1->N20</title> - <g id="a_edge13"><a xlink:title="main.main -> github.com/ii64/gouring.(*IoUring).GetSqe (8.58s)"> - <path fill="none" stroke="#b29c7e" d="M237.24,-928.86C224.37,-921.76 211.33,-914.01 199.5,-906 181.59,-893.86 163.19,-878.78 147.6,-865.09"></path> - <polygon fill="#b29c7e" stroke="#b29c7e" points="149.52,-862.11 139.72,-858.08 144.87,-867.34 149.52,-862.11"></polygon> - </a> - </g> - <g id="a_edge13-label"><a xlink:title="main.main -> github.com/ii64/gouring.(*IoUring).GetSqe (8.58s)"> - <text text-anchor="middle" x="221.5" y="-894.8" font-family="Times,serif" font-size="14.00"> 8.58s</text> - <text text-anchor="middle" x="221.5" y="-879.8" font-family="Times,serif" font-size="14.00"> (inline)</text> - </a> - </g> - </g> - <!-- N26 --> - <g id="node26" class="node"> - <title>N26</title> - <g id="a_node26"><a xlink:title="github.com/ii64/gouring.(*IoUring).WaitCqe (13.12s)"> - <polygon fill="#ede8e2" stroke="#b28c63" points="252.5,-855.5 170.5,-855.5 170.5,-797.5 252.5,-797.5 252.5,-855.5"></polygon> - <text text-anchor="middle" x="211.5" y="-844.3" font-family="Times,serif" font-size="9.00">gouring</text> - <text text-anchor="middle" x="211.5" y="-834.3" font-family="Times,serif" font-size="9.00">(*IoUring)</text> - <text text-anchor="middle" x="211.5" y="-824.3" font-family="Times,serif" font-size="9.00">WaitCqe</text> - <text text-anchor="middle" x="211.5" y="-814.3" font-family="Times,serif" font-size="9.00">0.11s (0.074%)</text> - <text text-anchor="middle" x="211.5" y="-804.3" font-family="Times,serif" font-size="9.00">of 13.12s (8.84%)</text> - </a> - </g> - </g> - <!-- N1->N26 --> - <g id="edge11" class="edge"> - <title>N1->N26</title> - <g id="a_edge11"><a xlink:title="main.main -> github.com/ii64/gouring.(*IoUring).WaitCqe (13.12s)"> - <path fill="none" stroke="#b28c63" d="M280.62,-923.82C276.19,-917.86 271.72,-911.78 267.5,-906 257.55,-892.35 246.74,-877.27 237.3,-864"></path> - <polygon fill="#b28c63" stroke="#b28c63" points="239.96,-861.7 231.31,-855.58 234.25,-865.76 239.96,-861.7"></polygon> - </a> - </g> - <g id="a_edge11-label"><a xlink:title="main.main -> github.com/ii64/gouring.(*IoUring).WaitCqe (13.12s)"> - <text text-anchor="middle" x="287.5" y="-887.3" font-family="Times,serif" font-size="14.00"> 13.12s</text> - </a> - </g> - </g> - <!-- N27 --> - <g id="node27" class="node"> - <title>N27</title> - <g id="a_node27"><a xlink:title="github.com/ii64/gouring.(*IoUring).Submit (6.96s)"> - <polygon fill="#edeae7" stroke="#b2a188" points="350,-855.5 273,-855.5 273,-797.5 350,-797.5 350,-855.5"></polygon> - <text text-anchor="middle" x="311.5" y="-844.3" font-family="Times,serif" font-size="9.00">gouring</text> - <text text-anchor="middle" x="311.5" y="-834.3" font-family="Times,serif" font-size="9.00">(*IoUring)</text> - <text text-anchor="middle" x="311.5" y="-824.3" font-family="Times,serif" font-size="9.00">Submit</text> - <text text-anchor="middle" x="311.5" y="-814.3" font-family="Times,serif" font-size="9.00">0.09s (0.061%)</text> - <text text-anchor="middle" x="311.5" y="-804.3" font-family="Times,serif" font-size="9.00">of 6.96s (4.69%)</text> - </a> - </g> - </g> - <!-- N1->N27 --> - <g id="edge17" class="edge"> - <title>N1->N27</title> - <g id="a_edge17"><a xlink:title="main.main -> github.com/ii64/gouring.(*IoUring).Submit (6.96s)"> - <path fill="none" stroke="#b2a188" d="M311.5,-923.75C311.5,-905.36 311.5,-883.84 311.5,-865.81"></path> - <polygon fill="#b2a188" stroke="#b2a188" points="315,-865.65 311.5,-855.65 308,-865.65 315,-865.65"></polygon> - </a> - </g> - <g id="a_edge17-label"><a xlink:title="main.main -> github.com/ii64/gouring.(*IoUring).Submit (6.96s)"> - <text text-anchor="middle" x="328.5" y="-887.3" font-family="Times,serif" font-size="14.00"> 6.96s</text> - </a> - </g> - </g> - <!-- N31 --> - <g id="node31" class="node"> - <title>N31</title> - <g id="a_node31"><a xlink:title="github.com/ii64/gouring.(*IoUring).SeenCqe (1.65s)"> - <polygon fill="#edeceb" stroke="#b2afa8" points="446,-855.5 369,-855.5 369,-797.5 446,-797.5 446,-855.5"></polygon> - <text text-anchor="middle" x="407.5" y="-844.3" font-family="Times,serif" font-size="9.00">gouring</text> - <text text-anchor="middle" x="407.5" y="-834.3" font-family="Times,serif" font-size="9.00">(*IoUring)</text> - <text text-anchor="middle" x="407.5" y="-824.3" font-family="Times,serif" font-size="9.00">SeenCqe</text> - <text text-anchor="middle" x="407.5" y="-814.3" font-family="Times,serif" font-size="9.00">0.05s (0.034%)</text> - <text text-anchor="middle" x="407.5" y="-804.3" font-family="Times,serif" font-size="9.00">of 1.65s (1.11%)</text> - </a> - </g> - </g> - <!-- N1->N31 --> - <g id="edge28" class="edge"> - <title>N1->N31</title> - <g id="a_edge28"><a xlink:title="main.main -> github.com/ii64/gouring.(*IoUring).SeenCqe (1.65s)"> - <path fill="none" stroke="#b2afa8" d="M340.3,-923.75C353.5,-904.85 369.01,-882.63 381.8,-864.31"></path> - <polygon fill="#b2afa8" stroke="#b2afa8" points="384.99,-865.86 387.84,-855.65 379.25,-861.85 384.99,-865.86"></polygon> - </a> - </g> - <g id="a_edge28-label"><a xlink:title="main.main -> github.com/ii64/gouring.(*IoUring).SeenCqe (1.65s)"> - <text text-anchor="middle" x="388.5" y="-887.3" font-family="Times,serif" font-size="14.00"> 1.65s</text> - </a> - </g> - </g> - <!-- N32 --> - <g id="node32" class="node"> - <title>N32</title> - <g id="a_node32"><a xlink:title="github.com/ii64/gouring.PrepNop (23.09s)"> - <polygon fill="#ede2da" stroke="#b26327" points="565.5,-850.5 479.5,-850.5 479.5,-802.5 565.5,-802.5 565.5,-850.5"></polygon> - <text text-anchor="middle" x="522.5" y="-839.3" font-family="Times,serif" font-size="9.00">gouring</text> - <text text-anchor="middle" x="522.5" y="-829.3" font-family="Times,serif" font-size="9.00">PrepNop</text> - <text text-anchor="middle" x="522.5" y="-819.3" font-family="Times,serif" font-size="9.00">0.01s (0.0067%)</text> - <text text-anchor="middle" x="522.5" y="-809.3" font-family="Times,serif" font-size="9.00">of 23.09s (15.56%)</text> - </a> - </g> - </g> - <!-- N1->N32 --> - <g id="edge9" class="edge"> - <title>N1->N32</title> - <g id="a_edge9"><a xlink:title="main.main -> github.com/ii64/gouring.PrepNop (23.09s)"> - <path fill="none" stroke="#b26327" d="M380.92,-923.98C390.58,-918.04 400.33,-911.94 409.5,-906 433.93,-890.18 460.7,-871.64 482.05,-856.55"></path> - <polygon fill="#b26327" stroke="#b26327" points="484.11,-859.38 490.25,-850.74 480.06,-853.67 484.11,-859.38"></polygon> - </a> - </g> - <g id="a_edge9-label"><a xlink:title="main.main -> github.com/ii64/gouring.PrepNop (23.09s)"> - <text text-anchor="middle" x="475.5" y="-894.8" font-family="Times,serif" font-size="14.00"> 23.09s</text> - <text text-anchor="middle" x="475.5" y="-879.8" font-family="Times,serif" font-size="14.00"> (inline)</text> + <g id="a_node1"><a xlink:title="runtime.nanotime (86.85s)"> + <polygon fill="#eddad5" stroke="#b22300" points="176,-474 0,-474 0,-388 176,-388 176,-474"></polygon> + <text text-anchor="middle" x="88" y="-450.8" font-family="Times,serif" font-size="24.00">runtime</text> + <text text-anchor="middle" x="88" y="-424.8" font-family="Times,serif" font-size="24.00">nanotime</text> + <text text-anchor="middle" x="88" y="-398.8" font-family="Times,serif" font-size="24.00">86.85s (48.15%)</text> </a> </g> </g> <!-- N2 --> <g id="node2" class="node"> <title>N2</title> - <g id="a_node2"><a xlink:title="runtime.nanotime (62.94s)"> - <polygon fill="#eddad5" stroke="#b22800" points="816.5,-292 640.5,-292 640.5,-206 816.5,-206 816.5,-292"></polygon> - <text text-anchor="middle" x="728.5" y="-268.8" font-family="Times,serif" font-size="24.00">runtime</text> - <text text-anchor="middle" x="728.5" y="-242.8" font-family="Times,serif" font-size="24.00">nanotime</text> - <text text-anchor="middle" x="728.5" y="-216.8" font-family="Times,serif" font-size="24.00">62.94s (42.41%)</text> - </a> - </g> - </g> - <!-- N3 --> - <g id="node3" class="node"> - <title>N3</title> - <g id="a_node3"><a xlink:title="runtime.goschedImpl (75.91s)"> - <polygon fill="#edd9d5" stroke="#b22000" points="804.5,-852.5 710.5,-852.5 710.5,-800.5 804.5,-800.5 804.5,-852.5"></polygon> - <text text-anchor="middle" x="757.5" y="-840.5" font-family="Times,serif" font-size="10.00">runtime</text> - <text text-anchor="middle" x="757.5" y="-829.5" font-family="Times,serif" font-size="10.00">goschedImpl</text> - <text text-anchor="middle" x="757.5" y="-818.5" font-family="Times,serif" font-size="10.00">0.37s (0.25%)</text> - <text text-anchor="middle" x="757.5" y="-807.5" font-family="Times,serif" font-size="10.00">of 75.91s (51.15%)</text> - </a> - </g> - </g> - <!-- N5 --> - <g id="node5" class="node"> - <title>N5</title> - <g id="a_node5"><a xlink:title="runtime.casgstatus (63.15s)"> - <polygon fill="#eddad5" stroke="#b22800" points="779,-427.5 678,-427.5 678,-371.5 779,-371.5 779,-427.5"></polygon> - <text text-anchor="middle" x="728.5" y="-414.7" font-family="Times,serif" font-size="11.00">runtime</text> - <text text-anchor="middle" x="728.5" y="-402.7" font-family="Times,serif" font-size="11.00">casgstatus</text> - <text text-anchor="middle" x="728.5" y="-390.7" font-family="Times,serif" font-size="11.00">2.16s (1.46%)</text> - <text text-anchor="middle" x="728.5" y="-378.7" font-family="Times,serif" font-size="11.00">of 63.15s (42.55%)</text> - </a> - </g> - </g> - <!-- N3->N5 --> - <g id="edge7" class="edge"> - <title>N3->N5</title> - <g id="a_edge7"><a xlink:title="runtime.goschedImpl -> runtime.casgstatus (31.66s)"> - <path fill="none" stroke="#b24200" stroke-width="2" d="M736.38,-800.37C722.32,-781.93 705.08,-755.56 697.5,-729 670.41,-634.13 683.57,-604.68 697.5,-507 700.89,-483.24 708.32,-457.38 715.06,-437.09"></path> - <polygon fill="#b24200" stroke="#b24200" stroke-width="2" points="718.38,-438.21 718.29,-427.61 711.75,-435.95 718.38,-438.21"></polygon> - </a> - </g> - <g id="a_edge7-label"><a xlink:title="runtime.goschedImpl -> runtime.casgstatus (31.66s)"> - <text text-anchor="middle" x="703.5" y="-619.3" font-family="Times,serif" font-size="14.00"> 31.66s</text> - </a> - </g> - </g> - <!-- N8 --> - <g id="node8" class="node"> - <title>N8</title> - <g id="a_node8"><a xlink:title="runtime.schedule (41.60s)"> - <polygon fill="#eddcd5" stroke="#b23800" points="808,-720.5 707,-720.5 707,-664.5 808,-664.5 808,-720.5"></polygon> - <text text-anchor="middle" x="757.5" y="-707.7" font-family="Times,serif" font-size="11.00">runtime</text> - <text text-anchor="middle" x="757.5" y="-695.7" font-family="Times,serif" font-size="11.00">schedule</text> - <text text-anchor="middle" x="757.5" y="-683.7" font-family="Times,serif" font-size="11.00">1.94s (1.31%)</text> - <text text-anchor="middle" x="757.5" y="-671.7" font-family="Times,serif" font-size="11.00">of 41.60s (28.03%)</text> - </a> - </g> - </g> - <!-- N3->N8 --> - <g id="edge5" class="edge"> - <title>N3->N8</title> - <g id="a_edge5"><a xlink:title="runtime.goschedImpl -> runtime.schedule (41.56s)"> - <path fill="none" stroke="#b23800" stroke-width="2" d="M757.5,-800.36C757.5,-780.73 757.5,-753.15 757.5,-730.92"></path> - <polygon fill="#b23800" stroke="#b23800" stroke-width="2" points="761,-730.82 757.5,-720.82 754,-730.82 761,-730.82"></polygon> - </a> - </g> - <g id="a_edge5-label"><a xlink:title="runtime.goschedImpl -> runtime.schedule (41.56s)"> - <text text-anchor="middle" x="777.5" y="-758.3" font-family="Times,serif" font-size="14.00"> 41.56s</text> + <g id="a_node2"><a xlink:title="main.main (76.01s)"> + <polygon fill="#eddad5" stroke="#b22800" points="906,-1162 772,-1162 772,-1086 906,-1086 906,-1162"></polygon> + <text text-anchor="middle" x="839" y="-1146" font-family="Times,serif" font-size="15.00">main</text> + <text text-anchor="middle" x="839" y="-1129" font-family="Times,serif" font-size="15.00">main</text> + <text text-anchor="middle" x="839" y="-1112" font-family="Times,serif" font-size="15.00">16.34s (9.06%)</text> + <text text-anchor="middle" x="839" y="-1095" font-family="Times,serif" font-size="15.00">of 76.01s (42.14%)</text> </a> </g> </g> <!-- N24 --> <g id="node24" class="node"> <title>N24</title> - <g id="a_node24"><a xlink:title="runtime.unlock (1.54s)"> - <polygon fill="#edeceb" stroke="#b2b0a9" points="1104,-417.5 1027,-417.5 1027,-381.5 1104,-381.5 1104,-417.5"></polygon> - <text text-anchor="middle" x="1065.5" y="-406.6" font-family="Times,serif" font-size="8.00">runtime</text> - <text text-anchor="middle" x="1065.5" y="-397.6" font-family="Times,serif" font-size="8.00">unlock</text> - <text text-anchor="middle" x="1065.5" y="-388.6" font-family="Times,serif" font-size="8.00">0 of 1.54s (1.04%)</text> + <g id="a_node24"><a xlink:title="github.com/ii64/gouring.(*IoUring).GetSqe (9.21s)"> + <polygon fill="#edeae7" stroke="#b29f84" points="655.5,-1020 578.5,-1020 578.5,-962 655.5,-962 655.5,-1020"></polygon> + <text text-anchor="middle" x="617" y="-1008.8" font-family="Times,serif" font-size="9.00">gouring</text> + <text text-anchor="middle" x="617" y="-998.8" font-family="Times,serif" font-size="9.00">(*IoUring)</text> + <text text-anchor="middle" x="617" y="-988.8" font-family="Times,serif" font-size="9.00">GetSqe</text> + <text text-anchor="middle" x="617" y="-978.8" font-family="Times,serif" font-size="9.00">0.16s (0.089%)</text> + <text text-anchor="middle" x="617" y="-968.8" font-family="Times,serif" font-size="9.00">of 9.21s (5.11%)</text> </a> </g> </g> - <!-- N3->N24 --> - <g id="edge41" class="edge"> - <title>N3->N24</title> - <g id="a_edge41"><a xlink:title="runtime.goschedImpl -> runtime.unlock (0.73s)"> - <path fill="none" stroke="#b2b1ae" d="M800.43,-800.33C878.43,-751.78 1041.06,-636.82 1103.5,-489 1112.5,-467.69 1100.67,-443.56 1087.9,-425.89"></path> - <polygon fill="#b2b1ae" stroke="#b2b1ae" points="1090.52,-423.55 1081.64,-417.77 1084.98,-427.83 1090.52,-423.55"></polygon> + <!-- N2->N24 --> + <g id="edge13" class="edge"> + <title>N2->N24</title> + <g id="a_edge13"><a xlink:title="main.main -> github.com/ii64/gouring.(*IoUring).GetSqe (9.21s)"> + <path fill="none" stroke="#b29f84" d="M771.73,-1092.8C756.13,-1085.18 739.78,-1076.69 725,-1068 703.65,-1055.45 681.09,-1039.96 662.14,-1026.25"></path> + <polygon fill="#b29f84" stroke="#b29f84" points="664.12,-1023.36 653.98,-1020.29 659.99,-1029.01 664.12,-1023.36"></polygon> </a> </g> - <g id="a_edge41-label"><a xlink:title="runtime.goschedImpl -> runtime.unlock (0.73s)"> - <text text-anchor="middle" x="1047.5" y="-626.8" font-family="Times,serif" font-size="14.00"> 0.73s</text> - <text text-anchor="middle" x="1047.5" y="-611.8" font-family="Times,serif" font-size="14.00"> (inline)</text> + <g id="a_edge13-label"><a xlink:title="main.main -> github.com/ii64/gouring.(*IoUring).GetSqe (9.21s)"> + <text text-anchor="middle" x="747" y="-1056.8" font-family="Times,serif" font-size="14.00"> 9.21s</text> + <text text-anchor="middle" x="747" y="-1041.8" font-family="Times,serif" font-size="14.00"> (inline)</text> </a> </g> </g> - <!-- N25 --> - <g id="node25" class="node"> - <title>N25</title> - <g id="a_node25"><a xlink:title="runtime.lock (1.48s)"> - <polygon fill="#edeceb" stroke="#b2b0a9" points="1211.5,-423.5 1139.5,-423.5 1139.5,-375.5 1211.5,-375.5 1211.5,-423.5"></polygon> - <text text-anchor="middle" x="1175.5" y="-412.3" font-family="Times,serif" font-size="9.00">runtime</text> - <text text-anchor="middle" x="1175.5" y="-402.3" font-family="Times,serif" font-size="9.00">lock</text> - <text text-anchor="middle" x="1175.5" y="-392.3" font-family="Times,serif" font-size="9.00">0.02s (0.013%)</text> - <text text-anchor="middle" x="1175.5" y="-382.3" font-family="Times,serif" font-size="9.00">of 1.48s (1%)</text> + <!-- N26 --> + <g id="node26" class="node"> + <title>N26</title> + <g id="a_node26"><a xlink:title="github.com/ii64/gouring.(*IoUring).Submit (8.31s)"> + <polygon fill="#edeae7" stroke="#b2a289" points="775.5,-1020 698.5,-1020 698.5,-962 775.5,-962 775.5,-1020"></polygon> + <text text-anchor="middle" x="737" y="-1008.8" font-family="Times,serif" font-size="9.00">gouring</text> + <text text-anchor="middle" x="737" y="-998.8" font-family="Times,serif" font-size="9.00">(*IoUring)</text> + <text text-anchor="middle" x="737" y="-988.8" font-family="Times,serif" font-size="9.00">Submit</text> + <text text-anchor="middle" x="737" y="-978.8" font-family="Times,serif" font-size="9.00">0.13s (0.072%)</text> + <text text-anchor="middle" x="737" y="-968.8" font-family="Times,serif" font-size="9.00">of 8.31s (4.61%)</text> </a> </g> </g> - <!-- N3->N25 --> + <!-- N2->N26 --> + <g id="edge18" class="edge"> + <title>N2->N26</title> + <g id="a_edge18"><a xlink:title="main.main -> github.com/ii64/gouring.(*IoUring).Submit (8.31s)"> + <path fill="none" stroke="#b2a289" d="M810.04,-1085.81C795.95,-1067.71 779.07,-1046.03 765.09,-1028.07"></path> + <polygon fill="#b2a289" stroke="#b2a289" points="767.79,-1025.85 758.89,-1020.11 762.27,-1030.15 767.79,-1025.85"></polygon> + </a> + </g> + <g id="a_edge18-label"><a xlink:title="main.main -> github.com/ii64/gouring.(*IoUring).Submit (8.31s)"> + <text text-anchor="middle" x="812" y="-1049.3" font-family="Times,serif" font-size="14.00"> 8.31s</text> + </a> + </g> + </g> + <!-- N27 --> + <g id="node27" class="node"> + <title>N27</title> + <g id="a_node27"><a xlink:title="github.com/ii64/gouring.(*IoUring).WaitCqe (13.13s)"> + <polygon fill="#ede9e4" stroke="#b29471" points="880,-1020 798,-1020 798,-962 880,-962 880,-1020"></polygon> + <text text-anchor="middle" x="839" y="-1008.8" font-family="Times,serif" font-size="9.00">gouring</text> + <text text-anchor="middle" x="839" y="-998.8" font-family="Times,serif" font-size="9.00">(*IoUring)</text> + <text text-anchor="middle" x="839" y="-988.8" font-family="Times,serif" font-size="9.00">WaitCqe</text> + <text text-anchor="middle" x="839" y="-978.8" font-family="Times,serif" font-size="9.00">0.07s (0.039%)</text> + <text text-anchor="middle" x="839" y="-968.8" font-family="Times,serif" font-size="9.00">of 13.13s (7.28%)</text> + </a> + </g> + </g> + <!-- N2->N27 --> + <g id="edge11" class="edge"> + <title>N2->N27</title> + <g id="a_edge11"><a xlink:title="main.main -> github.com/ii64/gouring.(*IoUring).WaitCqe (13.13s)"> + <path fill="none" stroke="#b29471" d="M839,-1085.81C839,-1068.52 839,-1047.97 839,-1030.52"></path> + <polygon fill="#b29471" stroke="#b29471" points="842.5,-1030.11 839,-1020.11 835.5,-1030.11 842.5,-1030.11"></polygon> + </a> + </g> + <g id="a_edge11-label"><a xlink:title="main.main -> github.com/ii64/gouring.(*IoUring).WaitCqe (13.13s)"> + <text text-anchor="middle" x="861" y="-1056.8" font-family="Times,serif" font-size="14.00"> 13.13s</text> + <text text-anchor="middle" x="861" y="-1041.8" font-family="Times,serif" font-size="14.00"> (inline)</text> + </a> + </g> + </g> + <!-- N32 --> + <g id="node32" class="node"> + <title>N32</title> + <g id="a_node32"><a xlink:title="github.com/ii64/gouring.(*IoUring).SeenCqe (1.11s)"> + <polygon fill="#edecec" stroke="#b2b1ad" points="980.5,-1020 903.5,-1020 903.5,-962 980.5,-962 980.5,-1020"></polygon> + <text text-anchor="middle" x="942" y="-1008.8" font-family="Times,serif" font-size="9.00">gouring</text> + <text text-anchor="middle" x="942" y="-998.8" font-family="Times,serif" font-size="9.00">(*IoUring)</text> + <text text-anchor="middle" x="942" y="-988.8" font-family="Times,serif" font-size="9.00">SeenCqe</text> + <text text-anchor="middle" x="942" y="-978.8" font-family="Times,serif" font-size="9.00">0.02s (0.011%)</text> + <text text-anchor="middle" x="942" y="-968.8" font-family="Times,serif" font-size="9.00">of 1.11s (0.62%)</text> + </a> + </g> + </g> + <!-- N2->N32 --> <g id="edge38" class="edge"> - <title>N3->N25</title> - <g id="a_edge38"><a xlink:title="runtime.goschedImpl -> runtime.lock (1.06s)"> - <path fill="none" stroke="#b2b1ac" d="M804.75,-810.14C874.07,-785.19 1002.73,-729.23 1073.5,-638 1123.19,-573.95 1153.54,-482.03 1167.11,-433.47"></path> - <polygon fill="#b2b1ac" stroke="#b2b1ac" points="1170.49,-434.36 1169.75,-423.79 1163.74,-432.51 1170.49,-434.36"></polygon> + <title>N2->N32</title> + <g id="a_edge38"><a xlink:title="main.main -> github.com/ii64/gouring.(*IoUring).SeenCqe (1.11s)"> + <path fill="none" stroke="#b2b1ad" d="M872.26,-1085.81C877.29,-1079.93 882.34,-1073.85 887,-1068 896.97,-1055.47 907.39,-1041.35 916.45,-1028.72"></path> + <polygon fill="#b2b1ad" stroke="#b2b1ad" points="919.53,-1030.42 922.48,-1020.25 913.83,-1026.36 919.53,-1030.42"></polygon> </a> </g> - <g id="a_edge38-label"><a xlink:title="runtime.goschedImpl -> runtime.lock (1.06s)"> - <text text-anchor="middle" x="1114.5" y="-626.8" font-family="Times,serif" font-size="14.00"> 1.06s</text> - <text text-anchor="middle" x="1114.5" y="-611.8" font-family="Times,serif" font-size="14.00"> (inline)</text> - </a> - </g> - </g> - <!-- N4 --> - <g id="node4" class="node"> - <title>N4</title> - <g id="a_node4"><a xlink:title="runtime.mcall (76.68s)"> - <polygon fill="#edd9d5" stroke="#b22000" points="804.5,-1111 710.5,-1111 710.5,-1059 804.5,-1059 804.5,-1111"></polygon> - <text text-anchor="middle" x="757.5" y="-1099" font-family="Times,serif" font-size="10.00">runtime</text> - <text text-anchor="middle" x="757.5" y="-1088" font-family="Times,serif" font-size="10.00">mcall</text> - <text text-anchor="middle" x="757.5" y="-1077" font-family="Times,serif" font-size="10.00">0.54s (0.36%)</text> - <text text-anchor="middle" x="757.5" y="-1066" font-family="Times,serif" font-size="10.00">of 76.68s (51.67%)</text> - </a> - </g> - </g> - <!-- N21 --> - <g id="node21" class="node"> - <title>N21</title> - <g id="a_node21"><a xlink:title="runtime.gosched_m (76.10s)"> - <polygon fill="#edd9d5" stroke="#b22000" points="800.5,-990 714.5,-990 714.5,-942 800.5,-942 800.5,-990"></polygon> - <text text-anchor="middle" x="757.5" y="-978.8" font-family="Times,serif" font-size="9.00">runtime</text> - <text text-anchor="middle" x="757.5" y="-968.8" font-family="Times,serif" font-size="9.00">gosched_m</text> - <text text-anchor="middle" x="757.5" y="-958.8" font-family="Times,serif" font-size="9.00">0.19s (0.13%)</text> - <text text-anchor="middle" x="757.5" y="-948.8" font-family="Times,serif" font-size="9.00">of 76.10s (51.28%)</text> - </a> - </g> - </g> - <!-- N4->N21 --> - <g id="edge1" class="edge"> - <title>N4->N21</title> - <g id="a_edge1"><a xlink:title="runtime.mcall -> runtime.gosched_m (76.10s)"> - <path fill="none" stroke="#b22000" stroke-width="3" d="M757.5,-1058.9C757.5,-1041.76 757.5,-1018.86 757.5,-1000.21"></path> - <polygon fill="#b22000" stroke="#b22000" stroke-width="3" points="761,-1000.07 757.5,-990.07 754,-1000.07 761,-1000.07"></polygon> - </a> - </g> - <g id="a_edge1-label"><a xlink:title="runtime.mcall -> runtime.gosched_m (76.10s)"> - <text text-anchor="middle" x="777.5" y="-1029.8" font-family="Times,serif" font-size="14.00"> 76.10s</text> - </a> - </g> - </g> - <!-- N5->N2 --> - <g id="edge4" class="edge"> - <title>N5->N2</title> - <g id="a_edge4"><a xlink:title="runtime.casgstatus -> runtime.nanotime (60.75s)"> - <path fill="none" stroke="#b22900" stroke-width="3" d="M728.5,-371.26C728.5,-352.01 728.5,-325.59 728.5,-302.32"></path> - <polygon fill="#b22900" stroke="#b22900" stroke-width="3" points="732,-302.23 728.5,-292.23 725,-302.23 732,-302.23"></polygon> - </a> - </g> - <g id="a_edge4-label"><a xlink:title="runtime.casgstatus -> runtime.nanotime (60.75s)"> - <text text-anchor="middle" x="750.5" y="-328.8" font-family="Times,serif" font-size="14.00"> 60.75s</text> - <text text-anchor="middle" x="750.5" y="-313.8" font-family="Times,serif" font-size="14.00"> (inline)</text> - </a> - </g> - </g> - <!-- N6 --> - <g id="node6" class="node"> - <title>N6</title> - <g id="a_node6"><a xlink:title="runtime.main (71.27s)"> - <polygon fill="#eddad5" stroke="#b22300" points="353.5,-1103 269.5,-1103 269.5,-1067 353.5,-1067 353.5,-1103"></polygon> - <text text-anchor="middle" x="311.5" y="-1092.1" font-family="Times,serif" font-size="8.00">runtime</text> - <text text-anchor="middle" x="311.5" y="-1083.1" font-family="Times,serif" font-size="8.00">main</text> - <text text-anchor="middle" x="311.5" y="-1074.1" font-family="Times,serif" font-size="8.00">0 of 71.27s (48.02%)</text> - </a> - </g> - </g> - <!-- N6->N1 --> - <g id="edge3" class="edge"> - <title>N6->N1</title> - <g id="a_edge3"><a xlink:title="runtime.main -> main.main (71.27s)"> - <path fill="none" stroke="#b22300" stroke-width="3" d="M311.5,-1066.99C311.5,-1054.17 311.5,-1035.87 311.5,-1018.42"></path> - <polygon fill="#b22300" stroke="#b22300" stroke-width="3" points="315,-1018.29 311.5,-1008.29 308,-1018.29 315,-1018.29"></polygon> - </a> - </g> - <g id="a_edge3-label"><a xlink:title="runtime.main -> main.main (71.27s)"> - <text text-anchor="middle" x="331.5" y="-1029.8" font-family="Times,serif" font-size="14.00"> 71.27s</text> - </a> - </g> - </g> - <!-- N7 --> - <g id="node7" class="node"> - <title>N7</title> - <g id="a_node7"><a xlink:title="github.com/ii64/gouring.PrepRW (23.08s)"> - <polygon fill="#ede2da" stroke="#b26327" points="605.5,-726.5 469.5,-726.5 469.5,-658.5 605.5,-658.5 605.5,-726.5"></polygon> - <text text-anchor="middle" x="537.5" y="-708.1" font-family="Times,serif" font-size="18.00">gouring</text> - <text text-anchor="middle" x="537.5" y="-688.1" font-family="Times,serif" font-size="18.00">PrepRW</text> - <text text-anchor="middle" x="537.5" y="-668.1" font-family="Times,serif" font-size="18.00">23.08s (15.55%)</text> - </a> - </g> - </g> - <!-- N12 --> - <g id="node12" class="node"> - <title>N12</title> - <g id="a_node12"><a xlink:title="runtime.findrunnable (5.12s)"> - <polygon fill="#edebe9" stroke="#b2a793" points="986.5,-576.5 896.5,-576.5 896.5,-520.5 986.5,-520.5 986.5,-576.5"></polygon> - <text text-anchor="middle" x="941.5" y="-563.7" font-family="Times,serif" font-size="11.00">runtime</text> - <text text-anchor="middle" x="941.5" y="-551.7" font-family="Times,serif" font-size="11.00">findrunnable</text> - <text text-anchor="middle" x="941.5" y="-539.7" font-family="Times,serif" font-size="11.00">1.31s (0.88%)</text> - <text text-anchor="middle" x="941.5" y="-527.7" font-family="Times,serif" font-size="11.00">of 5.12s (3.45%)</text> - </a> - </g> - </g> - <!-- N8->N12 --> - <g id="edge21" class="edge"> - <title>N8->N12</title> - <g id="a_edge21"><a xlink:title="runtime.schedule -> runtime.findrunnable (5.12s)"> - <path fill="none" stroke="#b2a793" d="M808.03,-668.88C824.81,-660.3 843.13,-649.74 858.5,-638 878.82,-622.48 898.54,-601.77 913.65,-584.29"></path> - <polygon fill="#b2a793" stroke="#b2a793" points="916.45,-586.41 920.25,-576.52 911.11,-581.87 916.45,-586.41"></polygon> - </a> - </g> - <g id="a_edge21-label"><a xlink:title="runtime.schedule -> runtime.findrunnable (5.12s)"> - <text text-anchor="middle" x="907.5" y="-619.3" font-family="Times,serif" font-size="14.00"> 5.12s</text> - </a> - </g> - </g> - <!-- N14 --> - <g id="node14" class="node"> - <title>N14</title> - <g id="a_node14"><a xlink:title="runtime.execute (32.99s)"> - <polygon fill="#edded5" stroke="#b24000" points="808,-576.5 707,-576.5 707,-520.5 808,-520.5 808,-576.5"></polygon> - <text text-anchor="middle" x="757.5" y="-563.7" font-family="Times,serif" font-size="11.00">runtime</text> - <text text-anchor="middle" x="757.5" y="-551.7" font-family="Times,serif" font-size="11.00">execute</text> - <text text-anchor="middle" x="757.5" y="-539.7" font-family="Times,serif" font-size="11.00">1.45s (0.98%)</text> - <text text-anchor="middle" x="757.5" y="-527.7" font-family="Times,serif" font-size="11.00">of 32.99s (22.23%)</text> - </a> - </g> - </g> - <!-- N8->N14 --> - <g id="edge6" class="edge"> - <title>N8->N14</title> - <g id="a_edge6"><a xlink:title="runtime.schedule -> runtime.execute (32.99s)"> - <path fill="none" stroke="#b24000" stroke-width="2" d="M757.5,-664.46C757.5,-642.59 757.5,-611.54 757.5,-587.23"></path> - <polygon fill="#b24000" stroke="#b24000" stroke-width="2" points="761,-586.93 757.5,-576.93 754,-586.93 761,-586.93"></polygon> - </a> - </g> - <g id="a_edge6-label"><a xlink:title="runtime.schedule -> runtime.execute (32.99s)"> - <text text-anchor="middle" x="777.5" y="-619.3" font-family="Times,serif" font-size="14.00"> 32.99s</text> - </a> - </g> - </g> - <!-- N15 --> - <g id="node15" class="node"> - <title>N15</title> - <g id="a_node15"><a xlink:title="runtime.checkTimers (2.82s)"> - <polygon fill="#edecea" stroke="#b2ada1" points="880,-425.5 797,-425.5 797,-373.5 880,-373.5 880,-425.5"></polygon> - <text text-anchor="middle" x="838.5" y="-413.5" font-family="Times,serif" font-size="10.00">runtime</text> - <text text-anchor="middle" x="838.5" y="-402.5" font-family="Times,serif" font-size="10.00">checkTimers</text> - <text text-anchor="middle" x="838.5" y="-391.5" font-family="Times,serif" font-size="10.00">0.63s (0.42%)</text> - <text text-anchor="middle" x="838.5" y="-380.5" font-family="Times,serif" font-size="10.00">of 2.82s (1.90%)</text> - </a> - </g> - </g> - <!-- N8->N15 --> - <g id="edge37" class="edge"> - <title>N8->N15</title> - <g id="a_edge37"><a xlink:title="runtime.schedule -> runtime.checkTimers (1.39s)"> - <path fill="none" stroke="#b2b0aa" d="M783.09,-664.31C789.73,-656.27 796.44,-647.16 801.5,-638 837.33,-573.18 841.26,-484.09 840.31,-435.53"></path> - <polygon fill="#b2b0aa" stroke="#b2b0aa" points="843.8,-435.42 840.03,-425.52 836.81,-435.62 843.8,-435.42"></polygon> - </a> - </g> - <g id="a_edge37-label"><a xlink:title="runtime.schedule -> runtime.checkTimers (1.39s)"> - <text text-anchor="middle" x="854.5" y="-544.8" font-family="Times,serif" font-size="14.00"> 1.39s</text> - </a> - </g> - </g> - <!-- N9 --> - <g id="node9" class="node"> - <title>N9</title> - <g id="a_node9"><a xlink:title="github.com/ii64/gouring.(*IoUring).io_uring_wait_cqe (13.01s)"> - <polygon fill="#ede8e2" stroke="#b28c64" points="255,-729 150,-729 150,-656 255,-656 255,-729"></polygon> - <text text-anchor="middle" x="202.5" y="-715.4" font-family="Times,serif" font-size="12.00">gouring</text> - <text text-anchor="middle" x="202.5" y="-702.4" font-family="Times,serif" font-size="12.00">(*IoUring)</text> - <text text-anchor="middle" x="202.5" y="-689.4" font-family="Times,serif" font-size="12.00">io_uring_wait_cqe</text> - <text text-anchor="middle" x="202.5" y="-676.4" font-family="Times,serif" font-size="12.00">2.78s (1.87%)</text> - <text text-anchor="middle" x="202.5" y="-663.4" font-family="Times,serif" font-size="12.00">of 13.01s (8.77%)</text> - </a> - </g> - </g> - <!-- N10 --> - <g id="node10" class="node"> - <title>N10</title> - <g id="a_node10"><a xlink:title="github.com/ii64/gouring.(*IoUring).__io_uring_peek_cqe (8.28s)"> - <polygon fill="#edeae6" stroke="#b29d80" points="269.5,-590 135.5,-590 135.5,-507 269.5,-507 269.5,-590"></polygon> - <text text-anchor="middle" x="202.5" y="-574.8" font-family="Times,serif" font-size="14.00">gouring</text> - <text text-anchor="middle" x="202.5" y="-559.8" font-family="Times,serif" font-size="14.00">(*IoUring)</text> - <text text-anchor="middle" x="202.5" y="-544.8" font-family="Times,serif" font-size="14.00">__io_uring_peek_cqe</text> - <text text-anchor="middle" x="202.5" y="-529.8" font-family="Times,serif" font-size="14.00">7.71s (5.20%)</text> - <text text-anchor="middle" x="202.5" y="-514.8" font-family="Times,serif" font-size="14.00">of 8.28s (5.58%)</text> - </a> - </g> - </g> - <!-- N9->N10 --> - <g id="edge16" class="edge"> - <title>N9->N10</title> - <g id="a_edge16"><a xlink:title="github.com/ii64/gouring.(*IoUring).io_uring_wait_cqe -> github.com/ii64/gouring.(*IoUring).__io_uring_peek_cqe (8.26s)"> - <path fill="none" stroke="#b29d80" d="M202.5,-655.67C202.5,-638.9 202.5,-618.63 202.5,-600.32"></path> - <polygon fill="#b29d80" stroke="#b29d80" points="206,-600.09 202.5,-590.09 199,-600.09 206,-600.09"></polygon> - </a> - </g> - <g id="a_edge16-label"><a xlink:title="github.com/ii64/gouring.(*IoUring).io_uring_wait_cqe -> github.com/ii64/gouring.(*IoUring).__io_uring_peek_cqe (8.26s)"> - <text text-anchor="middle" x="219.5" y="-619.3" font-family="Times,serif" font-size="14.00"> 8.26s</text> + <g id="a_edge38-label"><a xlink:title="main.main -> github.com/ii64/gouring.(*IoUring).SeenCqe (1.11s)"> + <text text-anchor="middle" x="930" y="-1056.8" font-family="Times,serif" font-size="14.00"> 1.11s</text> + <text text-anchor="middle" x="930" y="-1041.8" font-family="Times,serif" font-size="14.00"> (inline)</text> </a> </g> </g> <!-- N33 --> <g id="node33" class="node"> <title>N33</title> - <g id="a_node33"><a xlink:title="github.com/ii64/gouring.(*IoUring).io_uring_wait_cqe_nr (1.97s)"> - <polygon fill="#edeceb" stroke="#b2afa6" points="383,-577.5 288,-577.5 288,-519.5 383,-519.5 383,-577.5"></polygon> - <text text-anchor="middle" x="335.5" y="-566.3" font-family="Times,serif" font-size="9.00">gouring</text> - <text text-anchor="middle" x="335.5" y="-556.3" font-family="Times,serif" font-size="9.00">(*IoUring)</text> - <text text-anchor="middle" x="335.5" y="-546.3" font-family="Times,serif" font-size="9.00">io_uring_wait_cqe_nr</text> - <text text-anchor="middle" x="335.5" y="-536.3" font-family="Times,serif" font-size="9.00">0.01s (0.0067%)</text> - <text text-anchor="middle" x="335.5" y="-526.3" font-family="Times,serif" font-size="9.00">of 1.97s (1.33%)</text> + <g id="a_node33"><a xlink:title="github.com/ii64/gouring.PrepNop (27.88s)"> + <polygon fill="#ede2da" stroke="#b26328" points="1102,-1015 1016,-1015 1016,-967 1102,-967 1102,-1015"></polygon> + <text text-anchor="middle" x="1059" y="-1003.8" font-family="Times,serif" font-size="9.00">gouring</text> + <text text-anchor="middle" x="1059" y="-993.8" font-family="Times,serif" font-size="9.00">PrepNop</text> + <text text-anchor="middle" x="1059" y="-983.8" font-family="Times,serif" font-size="9.00">0.01s (0.0055%)</text> + <text text-anchor="middle" x="1059" y="-973.8" font-family="Times,serif" font-size="9.00">of 27.88s (15.46%)</text> </a> </g> </g> - <!-- N9->N33 --> - <g id="edge23" class="edge"> - <title>N9->N33</title> - <g id="a_edge23"><a xlink:title="github.com/ii64/gouring.(*IoUring).io_uring_wait_cqe -> github.com/ii64/gouring.(*IoUring).io_uring_wait_cqe_nr (1.97s)"> - <path fill="none" stroke="#b2afa6" d="M236.06,-655.67C256.3,-634.06 281.98,-606.64 302.18,-585.08"></path> - <polygon fill="#b2afa6" stroke="#b2afa6" points="304.79,-587.4 309.07,-577.71 299.68,-582.62 304.79,-587.4"></polygon> + <!-- N2->N33 --> + <g id="edge9" class="edge"> + <title>N2->N33</title> + <g id="a_edge9"><a xlink:title="main.main -> github.com/ii64/gouring.PrepNop (27.88s)"> + <path fill="none" stroke="#b26328" d="M906.07,-1094.23C922.72,-1086.34 940.29,-1077.37 956,-1068 979.22,-1054.16 1003.62,-1036.32 1022.85,-1021.4"></path> + <polygon fill="#b26328" stroke="#b26328" points="1025.04,-1024.13 1030.75,-1015.2 1020.72,-1018.62 1025.04,-1024.13"></polygon> </a> </g> - <g id="a_edge23-label"><a xlink:title="github.com/ii64/gouring.(*IoUring).io_uring_wait_cqe -> github.com/ii64/gouring.(*IoUring).io_uring_wait_cqe_nr (1.97s)"> - <text text-anchor="middle" x="294.5" y="-619.3" font-family="Times,serif" font-size="14.00"> 1.97s</text> + <g id="a_edge9-label"><a xlink:title="main.main -> github.com/ii64/gouring.PrepNop (27.88s)"> + <text text-anchor="middle" x="1021" y="-1056.8" font-family="Times,serif" font-size="14.00"> 27.88s</text> + <text text-anchor="middle" x="1021" y="-1041.8" font-family="Times,serif" font-size="14.00"> (inline)</text> </a> </g> </g> - <!-- N11 --> - <g id="node11" class="node"> - <title>N11</title> - <g id="a_node11"><a xlink:title="github.com/ii64/gouring.(*IoUring).__io_uring_flush_sq (6.79s)"> - <polygon fill="#edeae7" stroke="#b2a289" points="525.5,-441 397.5,-441 397.5,-358 525.5,-358 525.5,-441"></polygon> - <text text-anchor="middle" x="461.5" y="-425.8" font-family="Times,serif" font-size="14.00">gouring</text> - <text text-anchor="middle" x="461.5" y="-410.8" font-family="Times,serif" font-size="14.00">(*IoUring)</text> - <text text-anchor="middle" x="461.5" y="-395.8" font-family="Times,serif" font-size="14.00">__io_uring_flush_sq</text> - <text text-anchor="middle" x="461.5" y="-380.8" font-family="Times,serif" font-size="14.00">6.59s (4.44%)</text> - <text text-anchor="middle" x="461.5" y="-365.8" font-family="Times,serif" font-size="14.00">of 6.79s (4.58%)</text> + <!-- N3 --> + <g id="node3" class="node"> + <title>N3</title> + <g id="a_node3"><a xlink:title="runtime.goschedImpl (102.13s)"> + <polygon fill="#edd9d5" stroke="#b21c00" points="212.5,-1015 121.5,-1015 121.5,-967 212.5,-967 212.5,-1015"></polygon> + <text text-anchor="middle" x="167" y="-1003.8" font-family="Times,serif" font-size="9.00">runtime</text> + <text text-anchor="middle" x="167" y="-993.8" font-family="Times,serif" font-size="9.00">goschedImpl</text> + <text text-anchor="middle" x="167" y="-983.8" font-family="Times,serif" font-size="9.00">0.31s (0.17%)</text> + <text text-anchor="middle" x="167" y="-973.8" font-family="Times,serif" font-size="9.00">of 102.13s (56.62%)</text> </a> </g> </g> - <!-- N12->N15 --> - <g id="edge36" class="edge"> - <title>N12->N15</title> - <g id="a_edge36"><a xlink:title="runtime.findrunnable -> runtime.checkTimers (1.43s)"> - <path fill="none" stroke="#b2b0a9" d="M920,-520.44C912.41,-510.66 903.92,-499.44 896.5,-489 883.93,-471.31 870.61,-451.11 859.91,-434.47"></path> - <polygon fill="#b2b0a9" stroke="#b2b0a9" points="862.59,-432.17 854.26,-425.63 856.7,-435.94 862.59,-432.17"></polygon> + <!-- N5 --> + <g id="node5" class="node"> + <title>N5</title> + <g id="a_node5"><a xlink:title="runtime.casgstatus (86.43s)"> + <polygon fill="#eddad5" stroke="#b22300" points="138.5,-607 37.5,-607 37.5,-551 138.5,-551 138.5,-607"></polygon> + <text text-anchor="middle" x="88" y="-594.2" font-family="Times,serif" font-size="11.00">runtime</text> + <text text-anchor="middle" x="88" y="-582.2" font-family="Times,serif" font-size="11.00">casgstatus</text> + <text text-anchor="middle" x="88" y="-570.2" font-family="Times,serif" font-size="11.00">2.29s (1.27%)</text> + <text text-anchor="middle" x="88" y="-558.2" font-family="Times,serif" font-size="11.00">of 86.43s (47.92%)</text> </a> </g> - <g id="a_edge36-label"><a xlink:title="runtime.findrunnable -> runtime.checkTimers (1.43s)"> - <text text-anchor="middle" x="913.5" y="-470.3" font-family="Times,serif" font-size="14.00"> 1.43s</text> + </g> + <!-- N3->N5 --> + <g id="edge7" class="edge"> + <title>N3->N5</title> + <g id="a_edge7"><a xlink:title="runtime.goschedImpl -> runtime.casgstatus (44.50s)"> + <path fill="none" stroke="#b23d00" stroke-width="2" d="M148.94,-966.75C135.91,-948.57 119.21,-922.09 111,-896 80.54,-799.23 82.03,-677.89 85.25,-617.6"></path> + <polygon fill="#b23d00" stroke="#b23d00" stroke-width="2" points="88.75,-617.6 85.84,-607.42 81.76,-617.2 88.75,-617.6"></polygon> + </a> + </g> + <g id="a_edge7-label"><a xlink:title="runtime.goschedImpl -> runtime.casgstatus (44.50s)"> + <text text-anchor="middle" x="112" y="-791.3" font-family="Times,serif" font-size="14.00"> 44.50s</text> + </a> + </g> + </g> + <!-- N8 --> + <g id="node8" class="node"> + <title>N8</title> + <g id="a_node8"><a xlink:title="runtime.schedule (54.50s)"> + <polygon fill="#eddcd5" stroke="#b23500" points="214,-888 120,-888 120,-836 214,-836 214,-888"></polygon> + <text text-anchor="middle" x="167" y="-876" font-family="Times,serif" font-size="10.00">runtime</text> + <text text-anchor="middle" x="167" y="-865" font-family="Times,serif" font-size="10.00">schedule</text> + <text text-anchor="middle" x="167" y="-854" font-family="Times,serif" font-size="10.00">0.92s (0.51%)</text> + <text text-anchor="middle" x="167" y="-843" font-family="Times,serif" font-size="10.00">of 54.50s (30.21%)</text> + </a> + </g> + </g> + <!-- N3->N8 --> + <g id="edge5" class="edge"> + <title>N3->N8</title> + <g id="a_edge5"><a xlink:title="runtime.goschedImpl -> runtime.schedule (54.48s)"> + <path fill="none" stroke="#b23500" stroke-width="2" d="M167,-966.71C167,-947.63 167,-920.33 167,-898.52"></path> + <polygon fill="#b23500" stroke="#b23500" stroke-width="2" points="170.5,-898.32 167,-888.32 163.5,-898.32 170.5,-898.32"></polygon> + </a> + </g> + <g id="a_edge5-label"><a xlink:title="runtime.goschedImpl -> runtime.schedule (54.48s)"> + <text text-anchor="middle" x="187" y="-925.3" font-family="Times,serif" font-size="14.00"> 54.48s</text> + </a> + </g> + </g> + <!-- N20 --> + <g id="node20" class="node"> + <title>N20</title> + <g id="a_node20"><a xlink:title="runtime.lock (2.37s)"> + <polygon fill="#edeceb" stroke="#b2afa6" points="538.5,-603 461.5,-603 461.5,-555 538.5,-555 538.5,-603"></polygon> + <text text-anchor="middle" x="500" y="-591.8" font-family="Times,serif" font-size="9.00">runtime</text> + <text text-anchor="middle" x="500" y="-581.8" font-family="Times,serif" font-size="9.00">lock</text> + <text text-anchor="middle" x="500" y="-571.8" font-family="Times,serif" font-size="9.00">0.01s (0.0055%)</text> + <text text-anchor="middle" x="500" y="-561.8" font-family="Times,serif" font-size="9.00">of 2.37s (1.31%)</text> + </a> + </g> + </g> + <!-- N3->N20 --> + <g id="edge37" class="edge"> + <title>N3->N20</title> + <g id="a_edge37"><a xlink:title="runtime.goschedImpl -> runtime.lock (1.58s)"> + <path fill="none" stroke="#b2b0aa" d="M212.52,-968.8C268.35,-940.46 361.97,-884.98 414,-810 457.39,-747.48 482.08,-660.33 493.06,-613.29"></path> + <polygon fill="#b2b0aa" stroke="#b2b0aa" points="496.52,-613.86 495.31,-603.33 489.69,-612.31 496.52,-613.86"></polygon> + </a> + </g> + <g id="a_edge37-label"><a xlink:title="runtime.goschedImpl -> runtime.lock (1.58s)"> + <text text-anchor="middle" x="454" y="-798.8" font-family="Times,serif" font-size="14.00"> 1.58s</text> + <text text-anchor="middle" x="454" y="-783.8" font-family="Times,serif" font-size="14.00"> (inline)</text> </a> </g> </g> <!-- N23 --> <g id="node23" class="node"> <title>N23</title> - <g id="a_node23"><a xlink:title="runtime.globrunqget (0.93s)"> - <polygon fill="#edecec" stroke="#b2b1ac" points="981,-425.5 898,-425.5 898,-373.5 981,-373.5 981,-425.5"></polygon> - <text text-anchor="middle" x="939.5" y="-413.5" font-family="Times,serif" font-size="10.00">runtime</text> - <text text-anchor="middle" x="939.5" y="-402.5" font-family="Times,serif" font-size="10.00">globrunqget</text> - <text text-anchor="middle" x="939.5" y="-391.5" font-family="Times,serif" font-size="10.00">0.87s (0.59%)</text> - <text text-anchor="middle" x="939.5" y="-380.5" font-family="Times,serif" font-size="10.00">of 0.93s (0.63%)</text> + <g id="a_node23"><a xlink:title="runtime.unlock (1.89s)"> + <polygon fill="#edeceb" stroke="#b2b0a9" points="440.5,-597 363.5,-597 363.5,-561 440.5,-561 440.5,-597"></polygon> + <text text-anchor="middle" x="402" y="-586.1" font-family="Times,serif" font-size="8.00">runtime</text> + <text text-anchor="middle" x="402" y="-577.1" font-family="Times,serif" font-size="8.00">unlock</text> + <text text-anchor="middle" x="402" y="-568.1" font-family="Times,serif" font-size="8.00">0 of 1.89s (1.05%)</text> </a> </g> </g> - <!-- N12->N23 --> - <g id="edge39" class="edge"> - <title>N12->N23</title> - <g id="a_edge39"><a xlink:title="runtime.findrunnable -> runtime.globrunqget (0.93s)"> - <path fill="none" stroke="#b2b1ac" d="M938.14,-520.46C937.07,-510.58 936.03,-499.3 935.5,-489 934.6,-471.49 935.3,-452.02 936.35,-435.81"></path> - <polygon fill="#b2b1ac" stroke="#b2b1ac" points="939.85,-435.91 937.07,-425.68 932.87,-435.41 939.85,-435.91"></polygon> - </a> - </g> - <g id="a_edge39-label"><a xlink:title="runtime.findrunnable -> runtime.globrunqget (0.93s)"> - <text text-anchor="middle" x="952.5" y="-470.3" font-family="Times,serif" font-size="14.00"> 0.93s</text> - </a> - </g> - </g> - <!-- N12->N24 --> - <g id="edge40" class="edge"> - <title>N12->N24</title> - <g id="a_edge40"><a xlink:title="runtime.findrunnable -> runtime.unlock (0.78s)"> - <path fill="none" stroke="#b2b1ad" d="M953.86,-520.26C962.99,-501.84 976.57,-477.57 992.5,-459 1003.69,-445.96 1018.1,-433.7 1031.16,-423.81"></path> - <polygon fill="#b2b1ad" stroke="#b2b1ad" points="1033.52,-426.42 1039.5,-417.67 1029.37,-420.78 1033.52,-426.42"></polygon> - </a> - </g> - <g id="a_edge40-label"><a xlink:title="runtime.findrunnable -> runtime.unlock (0.78s)"> - <text text-anchor="middle" x="1014.5" y="-477.8" font-family="Times,serif" font-size="14.00"> 0.78s</text> - <text text-anchor="middle" x="1014.5" y="-462.8" font-family="Times,serif" font-size="14.00"> (inline)</text> - </a> - </g> - </g> - <!-- N12->N25 --> + <!-- N3->N23 --> <g id="edge42" class="edge"> - <title>N12->N25</title> - <g id="a_edge42"><a xlink:title="runtime.findrunnable -> runtime.lock (0.41s)"> - <path fill="none" stroke="#b2b2b0" d="M985.9,-520.47C1020.75,-499.14 1070.42,-468.49 1113.5,-441 1119.54,-437.15 1125.88,-433.06 1132.11,-429.01"></path> - <polygon fill="#b2b2b0" stroke="#b2b2b0" points="1134.03,-431.94 1140.5,-423.55 1130.21,-426.07 1134.03,-431.94"></polygon> + <title>N3->N23</title> + <g id="a_edge42"><a xlink:title="runtime.goschedImpl -> runtime.unlock (0.89s)"> + <path fill="none" stroke="#b2b1ae" d="M195.29,-966.91C252.17,-918.39 378.81,-799.27 424,-666 430.66,-646.36 424.24,-623.6 416.65,-606.43"></path> + <polygon fill="#b2b1ae" stroke="#b2b1ae" points="419.62,-604.53 412.13,-597.03 413.31,-607.56 419.62,-604.53"></polygon> </a> </g> - <g id="a_edge42-label"><a xlink:title="runtime.findrunnable -> runtime.lock (0.41s)"> - <text text-anchor="middle" x="1102.5" y="-477.8" font-family="Times,serif" font-size="14.00"> 0.41s</text> - <text text-anchor="middle" x="1102.5" y="-462.8" font-family="Times,serif" font-size="14.00"> (inline)</text> + <g id="a_edge42-label"><a xlink:title="runtime.goschedImpl -> runtime.unlock (0.89s)"> + <text text-anchor="middle" x="388" y="-798.8" font-family="Times,serif" font-size="14.00"> 0.89s</text> + <text text-anchor="middle" x="388" y="-783.8" font-family="Times,serif" font-size="14.00"> (inline)</text> </a> </g> </g> - <!-- N13 --> - <g id="node13" class="node"> - <title>N13</title> - <g id="a_node13"><a xlink:title="github.com/ii64/gouring.(*IoUring)._io_uring_get_sqe (8.26s)"> - <polygon fill="#edeae6" stroke="#b29d80" points="117,-587.5 0,-587.5 0,-509.5 117,-509.5 117,-587.5"></polygon> - <text text-anchor="middle" x="58.5" y="-573.1" font-family="Times,serif" font-size="13.00">gouring</text> - <text text-anchor="middle" x="58.5" y="-559.1" font-family="Times,serif" font-size="13.00">(*IoUring)</text> - <text text-anchor="middle" x="58.5" y="-545.1" font-family="Times,serif" font-size="13.00">_io_uring_get_sqe</text> - <text text-anchor="middle" x="58.5" y="-531.1" font-family="Times,serif" font-size="13.00">6.07s (4.09%)</text> - <text text-anchor="middle" x="58.5" y="-517.1" font-family="Times,serif" font-size="13.00">of 8.26s (5.57%)</text> + <!-- N4 --> + <g id="node4" class="node"> + <title>N4</title> + <g id="a_node4"><a xlink:title="runtime.mcall (103.52s)"> + <polygon fill="#edd9d5" stroke="#b21b00" points="216.5,-1265 117.5,-1265 117.5,-1213 216.5,-1213 216.5,-1265"></polygon> + <text text-anchor="middle" x="167" y="-1253" font-family="Times,serif" font-size="10.00">runtime</text> + <text text-anchor="middle" x="167" y="-1242" font-family="Times,serif" font-size="10.00">mcall</text> + <text text-anchor="middle" x="167" y="-1231" font-family="Times,serif" font-size="10.00">1.29s (0.72%)</text> + <text text-anchor="middle" x="167" y="-1220" font-family="Times,serif" font-size="10.00">of 103.52s (57.39%)</text> </a> </g> </g> - <!-- N16 --> - <g id="node16" class="node"> - <title>N16</title> - <g id="a_node16"><a xlink:title="github.com/ii64/gouring.(*IoUringSq)._RingEntries (1.59s)"> - <polygon fill="#edeceb" stroke="#b2b0a8" points="97.5,-427.5 19.5,-427.5 19.5,-371.5 97.5,-371.5 97.5,-427.5"></polygon> - <text text-anchor="middle" x="58.5" y="-414.7" font-family="Times,serif" font-size="11.00">gouring</text> - <text text-anchor="middle" x="58.5" y="-402.7" font-family="Times,serif" font-size="11.00">(*IoUringSq)</text> - <text text-anchor="middle" x="58.5" y="-390.7" font-family="Times,serif" font-size="11.00">_RingEntries</text> - <text text-anchor="middle" x="58.5" y="-378.7" font-family="Times,serif" font-size="11.00">1.59s (1.07%)</text> + <!-- N25 --> + <g id="node25" class="node"> + <title>N25</title> + <g id="a_node25"><a xlink:title="runtime.gosched_m (102.21s)"> + <polygon fill="#edd9d5" stroke="#b21b00" points="212.5,-1148 121.5,-1148 121.5,-1100 212.5,-1100 212.5,-1148"></polygon> + <text text-anchor="middle" x="167" y="-1136.8" font-family="Times,serif" font-size="9.00">runtime</text> + <text text-anchor="middle" x="167" y="-1126.8" font-family="Times,serif" font-size="9.00">gosched_m</text> + <text text-anchor="middle" x="167" y="-1116.8" font-family="Times,serif" font-size="9.00">0.10s (0.055%)</text> + <text text-anchor="middle" x="167" y="-1106.8" font-family="Times,serif" font-size="9.00">of 102.21s (56.66%)</text> </a> </g> </g> - <!-- N13->N16 --> - <g id="edge30" class="edge"> - <title>N13->N16</title> - <g id="a_edge30"><a xlink:title="github.com/ii64/gouring.(*IoUring)._io_uring_get_sqe -> github.com/ii64/gouring.(*IoUringSq)._RingEntries (1.59s)"> - <path fill="none" stroke="#b2b0a8" d="M58.5,-509.26C58.5,-487.33 58.5,-459.91 58.5,-438.09"></path> - <polygon fill="#b2b0a8" stroke="#b2b0a8" points="62,-437.87 58.5,-427.87 55,-437.87 62,-437.87"></polygon> + <!-- N4->N25 --> + <g id="edge1" class="edge"> + <title>N4->N25</title> + <g id="a_edge1"><a xlink:title="runtime.mcall -> runtime.gosched_m (102.21s)"> + <path fill="none" stroke="#b21b00" stroke-width="3" d="M167,-1212.92C167,-1196.88 167,-1175.87 167,-1158.42"></path> + <polygon fill="#b21b00" stroke="#b21b00" stroke-width="3" points="170.5,-1158.08 167,-1148.08 163.5,-1158.08 170.5,-1158.08"></polygon> </a> </g> - <g id="a_edge30-label"><a xlink:title="github.com/ii64/gouring.(*IoUring)._io_uring_get_sqe -> github.com/ii64/gouring.(*IoUringSq)._RingEntries (1.59s)"> - <text text-anchor="middle" x="80.5" y="-477.8" font-family="Times,serif" font-size="14.00"> 1.59s</text> - <text text-anchor="middle" x="80.5" y="-462.8" font-family="Times,serif" font-size="14.00"> (inline)</text> + <g id="a_edge1-label"><a xlink:title="runtime.mcall -> runtime.gosched_m (102.21s)"> + <text text-anchor="middle" x="190.5" y="-1183.8" font-family="Times,serif" font-size="14.00"> 102.21s</text> </a> </g> </g> - <!-- N14->N5 --> - <g id="edge8" class="edge"> - <title>N14->N5</title> - <g id="a_edge8"><a xlink:title="runtime.execute -> runtime.casgstatus (31.48s)"> - <path fill="none" stroke="#b24200" stroke-width="2" d="M752.11,-520.19C747.54,-496.99 740.92,-463.45 735.85,-437.78"></path> - <polygon fill="#b24200" stroke="#b24200" stroke-width="2" points="739.23,-436.79 733.86,-427.66 732.36,-438.15 739.23,-436.79"></polygon> + <!-- N5->N1 --> + <g id="edge3" class="edge"> + <title>N5->N1</title> + <g id="a_edge3"><a xlink:title="runtime.casgstatus -> runtime.nanotime (83.82s)"> + <path fill="none" stroke="#b22400" stroke-width="3" d="M88,-550.88C88,-532.22 88,-506.82 88,-484.29"></path> + <polygon fill="#b22400" stroke="#b22400" stroke-width="3" points="91.5,-484.18 88,-474.18 84.5,-484.18 91.5,-484.18"></polygon> </a> </g> - <g id="a_edge8-label"><a xlink:title="runtime.execute -> runtime.casgstatus (31.48s)"> - <text text-anchor="middle" x="766.5" y="-470.3" font-family="Times,serif" font-size="14.00"> 31.48s</text> + <g id="a_edge3-label"><a xlink:title="runtime.casgstatus -> runtime.nanotime (83.82s)"> + <text text-anchor="middle" x="110" y="-510.8" font-family="Times,serif" font-size="14.00"> 83.82s</text> + <text text-anchor="middle" x="110" y="-495.8" font-family="Times,serif" font-size="14.00"> (inline)</text> </a> </g> </g> - <!-- N15->N2 --> - <g id="edge22" class="edge"> - <title>N15->N2</title> - <g id="a_edge22"><a xlink:title="runtime.checkTimers -> runtime.nanotime (2.19s)"> - <path fill="none" stroke="#b2aea5" d="M821.55,-373.4C809.31,-355.52 792.25,-331.02 776.5,-310 774.03,-306.7 771.45,-303.32 768.83,-299.92"></path> - <polygon fill="#b2aea5" stroke="#b2aea5" points="771.58,-297.76 762.67,-292.02 766.06,-302.06 771.58,-297.76"></polygon> - </a> - </g> - <g id="a_edge22-label"><a xlink:title="runtime.checkTimers -> runtime.nanotime (2.19s)"> - <text text-anchor="middle" x="818.5" y="-328.8" font-family="Times,serif" font-size="14.00"> 2.19s</text> - <text text-anchor="middle" x="818.5" y="-313.8" font-family="Times,serif" font-size="14.00"> (inline)</text> + <!-- N6 --> + <g id="node6" class="node"> + <title>N6</title> + <g id="a_node6"><a xlink:title="runtime.main (76.01s)"> + <polygon fill="#eddad5" stroke="#b22800" points="881,-1257 797,-1257 797,-1221 881,-1221 881,-1257"></polygon> + <text text-anchor="middle" x="839" y="-1246.1" font-family="Times,serif" font-size="8.00">runtime</text> + <text text-anchor="middle" x="839" y="-1237.1" font-family="Times,serif" font-size="8.00">main</text> + <text text-anchor="middle" x="839" y="-1228.1" font-family="Times,serif" font-size="8.00">0 of 76.01s (42.14%)</text> </a> </g> </g> - <!-- N17 --> - <g id="node17" class="node"> - <title>N17</title> - <g id="a_node17"><a xlink:title="runtime.unlock2 (1.54s)"> - <polygon fill="#edeceb" stroke="#b2b0a9" points="1104.5,-153 1026.5,-153 1026.5,-109 1104.5,-109 1104.5,-153"></polygon> - <text text-anchor="middle" x="1065.5" y="-140.2" font-family="Times,serif" font-size="11.00">runtime</text> - <text text-anchor="middle" x="1065.5" y="-128.2" font-family="Times,serif" font-size="11.00">unlock2</text> - <text text-anchor="middle" x="1065.5" y="-116.2" font-family="Times,serif" font-size="11.00">1.54s (1.04%)</text> + <!-- N6->N2 --> + <g id="edge4" class="edge"> + <title>N6->N2</title> + <g id="a_edge4"><a xlink:title="runtime.main -> main.main (76.01s)"> + <path fill="none" stroke="#b22800" stroke-width="3" d="M839,-1220.84C839,-1207.95 839,-1189.65 839,-1172.49"></path> + <polygon fill="#b22800" stroke="#b22800" stroke-width="3" points="842.5,-1172.01 839,-1162.01 835.5,-1172.01 842.5,-1172.01"></polygon> + </a> + </g> + <g id="a_edge4-label"><a xlink:title="runtime.main -> main.main (76.01s)"> + <text text-anchor="middle" x="859" y="-1183.8" font-family="Times,serif" font-size="14.00"> 76.01s</text> </a> </g> </g> - <!-- N18 --> - <g id="node18" class="node"> - <title>N18</title> - <g id="a_node18"><a xlink:title="github.com/ii64/gouring.(*IoUring).io_uring_cq_advance (1.51s)"> - <polygon fill="#edeceb" stroke="#b2b0a9" points="650.5,-576.5 540.5,-576.5 540.5,-520.5 650.5,-520.5 650.5,-576.5"></polygon> - <text text-anchor="middle" x="595.5" y="-563.7" font-family="Times,serif" font-size="11.00">gouring</text> - <text text-anchor="middle" x="595.5" y="-551.7" font-family="Times,serif" font-size="11.00">(*IoUring)</text> - <text text-anchor="middle" x="595.5" y="-539.7" font-family="Times,serif" font-size="11.00">io_uring_cq_advance</text> - <text text-anchor="middle" x="595.5" y="-527.7" font-family="Times,serif" font-size="11.00">1.51s (1.02%)</text> + <!-- N7 --> + <g id="node7" class="node"> + <title>N7</title> + <g id="a_node7"><a xlink:title="github.com/ii64/gouring.PrepRW (27.87s)"> + <polygon fill="#ede2da" stroke="#b26328" points="1144,-896 1008,-896 1008,-828 1144,-828 1144,-896"></polygon> + <text text-anchor="middle" x="1076" y="-877.6" font-family="Times,serif" font-size="18.00">gouring</text> + <text text-anchor="middle" x="1076" y="-857.6" font-family="Times,serif" font-size="18.00">PrepRW</text> + <text text-anchor="middle" x="1076" y="-837.6" font-family="Times,serif" font-size="18.00">27.87s (15.45%)</text> + </a> + </g> + </g> + <!-- N9 --> + <g id="node9" class="node"> + <title>N9</title> + <g id="a_node9"><a xlink:title="runtime.findRunnable (9.06s)"> + <polygon fill="#edeae7" stroke="#b2a085" points="326,-751 236,-751 236,-695 326,-695 326,-751"></polygon> + <text text-anchor="middle" x="281" y="-738.2" font-family="Times,serif" font-size="11.00">runtime</text> + <text text-anchor="middle" x="281" y="-726.2" font-family="Times,serif" font-size="11.00">findRunnable</text> + <text text-anchor="middle" x="281" y="-714.2" font-family="Times,serif" font-size="11.00">2s (1.11%)</text> + <text text-anchor="middle" x="281" y="-702.2" font-family="Times,serif" font-size="11.00">of 9.06s (5.02%)</text> + </a> + </g> + </g> + <!-- N8->N9 --> + <g id="edge14" class="edge"> + <title>N8->N9</title> + <g id="a_edge14"><a xlink:title="runtime.schedule -> runtime.findRunnable (9.06s)"> + <path fill="none" stroke="#b2a085" d="M188.85,-835.96C195.97,-827.73 203.86,-818.51 211,-810 224.9,-793.41 240.09,-774.81 252.76,-759.16"></path> + <polygon fill="#b2a085" stroke="#b2a085" points="255.57,-761.25 259.13,-751.28 250.12,-756.85 255.57,-761.25"></polygon> + </a> + </g> + <g id="a_edge14-label"><a xlink:title="runtime.schedule -> runtime.findRunnable (9.06s)"> + <text text-anchor="middle" x="252" y="-791.3" font-family="Times,serif" font-size="14.00"> 9.06s</text> + </a> + </g> + </g> + <!-- N12 --> + <g id="node12" class="node"> + <title>N12</title> + <g id="a_node12"><a xlink:title="runtime.execute (44.52s)"> + <polygon fill="#edddd5" stroke="#b23d00" points="217.5,-751 116.5,-751 116.5,-695 217.5,-695 217.5,-751"></polygon> + <text text-anchor="middle" x="167" y="-738.2" font-family="Times,serif" font-size="11.00">runtime</text> + <text text-anchor="middle" x="167" y="-726.2" font-family="Times,serif" font-size="11.00">execute</text> + <text text-anchor="middle" x="167" y="-714.2" font-family="Times,serif" font-size="11.00">2.37s (1.31%)</text> + <text text-anchor="middle" x="167" y="-702.2" font-family="Times,serif" font-size="11.00">of 44.52s (24.68%)</text> + </a> + </g> + </g> + <!-- N8->N12 --> + <g id="edge6" class="edge"> + <title>N8->N12</title> + <g id="a_edge6"><a xlink:title="runtime.schedule -> runtime.execute (44.52s)"> + <path fill="none" stroke="#b23d00" stroke-width="2" d="M167,-835.87C167,-815.01 167,-785.04 167,-761.36"></path> + <polygon fill="#b23d00" stroke="#b23d00" stroke-width="2" points="170.5,-761.32 167,-751.32 163.5,-761.32 170.5,-761.32"></polygon> + </a> + </g> + <g id="a_edge6-label"><a xlink:title="runtime.schedule -> runtime.execute (44.52s)"> + <text text-anchor="middle" x="187" y="-791.3" font-family="Times,serif" font-size="14.00"> 44.52s</text> </a> </g> </g> <!-- N19 --> <g id="node19" class="node"> <title>N19</title> - <g id="a_node19"><a xlink:title="runtime.lock2 (1.46s)"> - <polygon fill="#edeceb" stroke="#b2b0a9" points="1214.5,-153 1136.5,-153 1136.5,-109 1214.5,-109 1214.5,-153"></polygon> - <text text-anchor="middle" x="1175.5" y="-140.2" font-family="Times,serif" font-size="11.00">runtime</text> - <text text-anchor="middle" x="1175.5" y="-128.2" font-family="Times,serif" font-size="11.00">lock2</text> - <text text-anchor="middle" x="1175.5" y="-116.2" font-family="Times,serif" font-size="11.00">1.46s (0.98%)</text> + <g id="a_node19"><a xlink:title="runtime.globrunqget (1.63s)"> + <polygon fill="#edecec" stroke="#b2b0aa" points="342.5,-607 257.5,-607 257.5,-551 342.5,-551 342.5,-607"></polygon> + <text text-anchor="middle" x="300" y="-594.2" font-family="Times,serif" font-size="11.00">runtime</text> + <text text-anchor="middle" x="300" y="-582.2" font-family="Times,serif" font-size="11.00">globrunqget</text> + <text text-anchor="middle" x="300" y="-570.2" font-family="Times,serif" font-size="11.00">1.56s (0.86%)</text> + <text text-anchor="middle" x="300" y="-558.2" font-family="Times,serif" font-size="11.00">of 1.63s (0.9%)</text> </a> </g> </g> - <!-- N36 --> - <g id="node36" class="node"> - <title>N36</title> - <g id="a_node36"><a xlink:title="github.com/ii64/gouring.(*IoUring).io_uring_get_sqe (8.26s)"> - <polygon fill="#edeae6" stroke="#b29d80" points="117,-714.5 40,-714.5 40,-670.5 117,-670.5 117,-714.5"></polygon> - <text text-anchor="middle" x="78.5" y="-704.1" font-family="Times,serif" font-size="8.00">gouring</text> - <text text-anchor="middle" x="78.5" y="-695.1" font-family="Times,serif" font-size="8.00">(*IoUring)</text> - <text text-anchor="middle" x="78.5" y="-686.1" font-family="Times,serif" font-size="8.00">io_uring_get_sqe</text> - <text text-anchor="middle" x="78.5" y="-677.1" font-family="Times,serif" font-size="8.00">0 of 8.26s (5.57%)</text> + <!-- N9->N19 --> + <g id="edge36" class="edge"> + <title>N9->N19</title> + <g id="a_edge36"><a xlink:title="runtime.findRunnable -> runtime.globrunqget (1.63s)"> + <path fill="none" stroke="#b2b0aa" d="M264.36,-694.67C256.15,-677.66 249.29,-655.4 256,-636 258.47,-628.85 262.28,-621.92 266.64,-615.51"></path> + <polygon fill="#b2b0aa" stroke="#b2b0aa" points="269.71,-617.24 272.85,-607.12 264.08,-613.08 269.71,-617.24"></polygon> + </a> + </g> + <g id="a_edge36-label"><a xlink:title="runtime.findRunnable -> runtime.globrunqget (1.63s)"> + <text text-anchor="middle" x="273" y="-647.3" font-family="Times,serif" font-size="14.00"> 1.63s</text> </a> </g> </g> - <!-- N20->N36 --> - <g id="edge14" class="edge"> - <title>N20->N36</title> - <g id="a_edge14"><a xlink:title="github.com/ii64/gouring.(*IoUring).GetSqe -> github.com/ii64/gouring.(*IoUring).io_uring_get_sqe (8.26s)"> - <path fill="none" stroke="#b29d80" d="M100.77,-794.88C96.14,-773.81 90.01,-745.9 85.35,-724.7"></path> - <polygon fill="#b29d80" stroke="#b29d80" points="88.76,-723.91 83.2,-714.89 81.93,-725.41 88.76,-723.91"></polygon> + <!-- N9->N20 --> + <g id="edge43" class="edge"> + <title>N9->N20</title> + <g id="a_edge43"><a xlink:title="runtime.findRunnable -> runtime.lock (0.79s)"> + <path fill="none" stroke="#b2b1ae" d="M326.24,-695.44C360.44,-675.01 408.3,-645.69 449,-618 453.17,-615.16 457.48,-612.13 461.74,-609.05"></path> + <polygon fill="#b2b1ae" stroke="#b2b1ae" points="463.83,-611.87 469.84,-603.14 459.7,-606.21 463.83,-611.87"></polygon> </a> </g> - <g id="a_edge14-label"><a xlink:title="github.com/ii64/gouring.(*IoUring).GetSqe -> github.com/ii64/gouring.(*IoUring).io_uring_get_sqe (8.26s)"> - <text text-anchor="middle" x="118.5" y="-765.8" font-family="Times,serif" font-size="14.00"> 8.26s</text> - <text text-anchor="middle" x="118.5" y="-750.8" font-family="Times,serif" font-size="14.00"> (inline)</text> + <g id="a_edge43-label"><a xlink:title="runtime.findRunnable -> runtime.lock (0.79s)"> + <text text-anchor="middle" x="440" y="-654.8" font-family="Times,serif" font-size="14.00"> 0.79s</text> + <text text-anchor="middle" x="440" y="-639.8" font-family="Times,serif" font-size="14.00"> (inline)</text> </a> </g> </g> - <!-- N21->N3 --> - <g id="edge2" class="edge"> - <title>N21->N3</title> - <g id="a_edge2"><a xlink:title="runtime.gosched_m -> runtime.goschedImpl (75.91s)"> - <path fill="none" stroke="#b22000" stroke-width="3" d="M757.5,-941.99C757.5,-920.45 757.5,-887.94 757.5,-863.07"></path> - <polygon fill="#b22000" stroke="#b22000" stroke-width="3" points="761,-862.93 757.5,-852.93 754,-862.93 761,-862.93"></polygon> - </a> - </g> - <g id="a_edge2-label"><a xlink:title="runtime.gosched_m -> runtime.goschedImpl (75.91s)"> - <text text-anchor="middle" x="777.5" y="-887.3" font-family="Times,serif" font-size="14.00"> 75.91s</text> + <!-- N21 --> + <g id="node21" class="node"> + <title>N21</title> + <g id="a_node21"><a xlink:title="runtime.checkTimers (3.39s)"> + <polygon fill="#edecea" stroke="#b2ada1" points="239.5,-605 156.5,-605 156.5,-553 239.5,-553 239.5,-605"></polygon> + <text text-anchor="middle" x="198" y="-593" font-family="Times,serif" font-size="10.00">runtime</text> + <text text-anchor="middle" x="198" y="-582" font-family="Times,serif" font-size="10.00">checkTimers</text> + <text text-anchor="middle" x="198" y="-571" font-family="Times,serif" font-size="10.00">0.38s (0.21%)</text> + <text text-anchor="middle" x="198" y="-560" font-family="Times,serif" font-size="10.00">of 3.39s (1.88%)</text> </a> </g> </g> - <!-- N22 --> - <g id="node22" class="node"> - <title>N22</title> - <g id="a_node22"><a xlink:title="syscall.Syscall6 (1.86s)"> - <polygon fill="#edeceb" stroke="#b2afa7" points="380.5,-56 290.5,-56 290.5,0 380.5,0 380.5,-56"></polygon> - <text text-anchor="middle" x="335.5" y="-43.2" font-family="Times,serif" font-size="11.00">syscall</text> - <text text-anchor="middle" x="335.5" y="-31.2" font-family="Times,serif" font-size="11.00">Syscall6</text> - <text text-anchor="middle" x="335.5" y="-19.2" font-family="Times,serif" font-size="11.00">1.79s (1.21%)</text> - <text text-anchor="middle" x="335.5" y="-7.2" font-family="Times,serif" font-size="11.00">of 1.86s (1.25%)</text> + <!-- N9->N21 --> + <g id="edge22" class="edge"> + <title>N9->N21</title> + <g id="a_edge22"><a xlink:title="runtime.findRunnable -> runtime.checkTimers (3.39s)"> + <path fill="none" stroke="#b2ada1" d="M241.01,-694.73C231.54,-686.51 222.36,-676.78 216,-666 207.04,-650.8 202.5,-631.78 200.22,-615.5"></path> + <polygon fill="#b2ada1" stroke="#b2ada1" points="203.66,-614.78 199.02,-605.26 196.7,-615.6 203.66,-614.78"></polygon> + </a> + </g> + <g id="a_edge22-label"><a xlink:title="runtime.findRunnable -> runtime.checkTimers (3.39s)"> + <text text-anchor="middle" x="233" y="-647.3" font-family="Times,serif" font-size="14.00"> 3.39s</text> </a> </g> </g> - <!-- N39 --> - <g id="node39" class="node"> - <title>N39</title> - <g id="a_node39"><a xlink:title="runtime.unlockWithRank (1.54s)"> - <polygon fill="#edeceb" stroke="#b2b0a9" points="1104,-267 1027,-267 1027,-231 1104,-231 1104,-267"></polygon> - <text text-anchor="middle" x="1065.5" y="-256.1" font-family="Times,serif" font-size="8.00">runtime</text> - <text text-anchor="middle" x="1065.5" y="-247.1" font-family="Times,serif" font-size="8.00">unlockWithRank</text> - <text text-anchor="middle" x="1065.5" y="-238.1" font-family="Times,serif" font-size="8.00">0 of 1.54s (1.04%)</text> + <!-- N9->N23 --> + <g id="edge41" class="edge"> + <title>N9->N23</title> + <g id="a_edge41"><a xlink:title="runtime.findRunnable -> runtime.unlock (1s)"> + <path fill="none" stroke="#b2b1ad" d="M285.56,-694.75C289.88,-676.27 298.03,-652.32 313,-636 325.63,-622.23 334.98,-627.63 351,-618 358.19,-613.68 365.6,-608.58 372.47,-603.54"></path> + <polygon fill="#b2b1ad" stroke="#b2b1ad" points="374.93,-606.06 380.82,-597.26 370.72,-600.47 374.93,-606.06"></polygon> + </a> + </g> + <g id="a_edge41-label"><a xlink:title="runtime.findRunnable -> runtime.unlock (1s)"> + <text text-anchor="middle" x="335" y="-654.8" font-family="Times,serif" font-size="14.00"> 1s</text> + <text text-anchor="middle" x="335" y="-639.8" font-family="Times,serif" font-size="14.00"> (inline)</text> </a> </g> </g> - <!-- N24->N39 --> - <g id="edge31" class="edge"> - <title>N24->N39</title> - <g id="a_edge31"><a xlink:title="runtime.unlock -> runtime.unlockWithRank (1.54s)"> - <path fill="none" stroke="#b2b0a9" d="M1065.5,-381.47C1065.5,-356.09 1065.5,-308.09 1065.5,-277.64"></path> - <polygon fill="#b2b0a9" stroke="#b2b0a9" points="1069,-277.29 1065.5,-267.29 1062,-277.29 1069,-277.29"></polygon> - </a> - </g> - <g id="a_edge31-label"><a xlink:title="runtime.unlock -> runtime.unlockWithRank (1.54s)"> - <text text-anchor="middle" x="1087.5" y="-328.8" font-family="Times,serif" font-size="14.00"> 1.54s</text> - <text text-anchor="middle" x="1087.5" y="-313.8" font-family="Times,serif" font-size="14.00"> (inline)</text> + <!-- N10 --> + <g id="node10" class="node"> + <title>N10</title> + <g id="a_node10"><a xlink:title="github.com/ii64/gouring.(*IoUring).io_uring_wait_cqe (13.06s)"> + <polygon fill="#ede9e4" stroke="#b29571" points="888,-896 790,-896 790,-828 888,-828 888,-896"></polygon> + <text text-anchor="middle" x="839" y="-883.2" font-family="Times,serif" font-size="11.00">gouring</text> + <text text-anchor="middle" x="839" y="-871.2" font-family="Times,serif" font-size="11.00">(*IoUring)</text> + <text text-anchor="middle" x="839" y="-859.2" font-family="Times,serif" font-size="11.00">io_uring_wait_cqe</text> + <text text-anchor="middle" x="839" y="-847.2" font-family="Times,serif" font-size="11.00">2.51s (1.39%)</text> + <text text-anchor="middle" x="839" y="-835.2" font-family="Times,serif" font-size="11.00">of 13.06s (7.24%)</text> </a> </g> </g> - <!-- N38 --> - <g id="node38" class="node"> - <title>N38</title> - <g id="a_node38"><a xlink:title="runtime.lockWithRank (1.46s)"> - <polygon fill="#edeceb" stroke="#b2b0a9" points="1214,-267 1137,-267 1137,-231 1214,-231 1214,-267"></polygon> - <text text-anchor="middle" x="1175.5" y="-256.1" font-family="Times,serif" font-size="8.00">runtime</text> - <text text-anchor="middle" x="1175.5" y="-247.1" font-family="Times,serif" font-size="8.00">lockWithRank</text> - <text text-anchor="middle" x="1175.5" y="-238.1" font-family="Times,serif" font-size="8.00">0 of 1.46s (0.98%)</text> + <!-- N11 --> + <g id="node11" class="node"> + <title>N11</title> + <g id="a_node11"><a xlink:title="github.com/ii64/gouring.(*IoUring).__io_uring_peek_cqe (8.70s)"> + <polygon fill="#edeae7" stroke="#b2a187" points="946,-762 812,-762 812,-684 946,-684 946,-762"></polygon> + <text text-anchor="middle" x="879" y="-747.6" font-family="Times,serif" font-size="13.00">gouring</text> + <text text-anchor="middle" x="879" y="-733.6" font-family="Times,serif" font-size="13.00">(*IoUring)</text> + <text text-anchor="middle" x="879" y="-719.6" font-family="Times,serif" font-size="13.00">__io_uring_peek_cqe</text> + <text text-anchor="middle" x="879" y="-705.6" font-family="Times,serif" font-size="13.00">8.21s (4.55%)</text> + <text text-anchor="middle" x="879" y="-691.6" font-family="Times,serif" font-size="13.00">of 8.70s (4.82%)</text> </a> </g> </g> - <!-- N25->N38 --> - <g id="edge34" class="edge"> - <title>N25->N38</title> - <g id="a_edge34"><a xlink:title="runtime.lock -> runtime.lockWithRank (1.46s)"> - <path fill="none" stroke="#b2b0a9" d="M1175.5,-375.3C1175.5,-348.8 1175.5,-305.48 1175.5,-277.36"></path> - <polygon fill="#b2b0a9" stroke="#b2b0a9" points="1179,-277.03 1175.5,-267.03 1172,-277.03 1179,-277.03"></polygon> + <!-- N10->N11 --> + <g id="edge17" class="edge"> + <title>N10->N11</title> + <g id="a_edge17"><a xlink:title="github.com/ii64/gouring.(*IoUring).io_uring_wait_cqe -> github.com/ii64/gouring.(*IoUring).__io_uring_peek_cqe (8.68s)"> + <path fill="none" stroke="#b2a187" d="M848.68,-827.84C853.58,-811.05 859.62,-790.38 865.01,-771.9"></path> + <polygon fill="#b2a187" stroke="#b2a187" points="868.41,-772.77 867.85,-762.19 861.69,-770.81 868.41,-772.77"></polygon> </a> </g> - <g id="a_edge34-label"><a xlink:title="runtime.lock -> runtime.lockWithRank (1.46s)"> - <text text-anchor="middle" x="1197.5" y="-328.8" font-family="Times,serif" font-size="14.00"> 1.46s</text> - <text text-anchor="middle" x="1197.5" y="-313.8" font-family="Times,serif" font-size="14.00"> (inline)</text> - </a> - </g> - </g> - <!-- N26->N9 --> - <g id="edge12" class="edge"> - <title>N26->N9</title> - <g id="a_edge12"><a xlink:title="github.com/ii64/gouring.(*IoUring).WaitCqe -> github.com/ii64/gouring.(*IoUring).io_uring_wait_cqe (13.01s)"> - <path fill="none" stroke="#b28c64" d="M209.57,-797.18C208.42,-780.36 206.94,-758.62 205.63,-739.4"></path> - <polygon fill="#b28c64" stroke="#b28c64" points="209.11,-739.06 204.94,-729.32 202.13,-739.54 209.11,-739.06"></polygon> - </a> - </g> - <g id="a_edge12-label"><a xlink:title="github.com/ii64/gouring.(*IoUring).WaitCqe -> github.com/ii64/gouring.(*IoUring).io_uring_wait_cqe (13.01s)"> - <text text-anchor="middle" x="228.5" y="-758.3" font-family="Times,serif" font-size="14.00"> 13.01s</text> - </a> - </g> - </g> - <!-- N37 --> - <g id="node37" class="node"> - <title>N37</title> - <g id="a_node37"><a xlink:title="github.com/ii64/gouring.(*IoUring).io_uringn_submit (6.87s)"> - <polygon fill="#edeae7" stroke="#b2a289" points="350,-714.5 273,-714.5 273,-670.5 350,-670.5 350,-714.5"></polygon> - <text text-anchor="middle" x="311.5" y="-704.1" font-family="Times,serif" font-size="8.00">gouring</text> - <text text-anchor="middle" x="311.5" y="-695.1" font-family="Times,serif" font-size="8.00">(*IoUring)</text> - <text text-anchor="middle" x="311.5" y="-686.1" font-family="Times,serif" font-size="8.00">io_uringn_submit</text> - <text text-anchor="middle" x="311.5" y="-677.1" font-family="Times,serif" font-size="8.00">0 of 6.87s (4.63%)</text> - </a> - </g> - </g> - <!-- N27->N37 --> - <g id="edge18" class="edge"> - <title>N27->N37</title> - <g id="a_edge18"><a xlink:title="github.com/ii64/gouring.(*IoUring).Submit -> github.com/ii64/gouring.(*IoUring).io_uringn_submit (6.87s)"> - <path fill="none" stroke="#b2a289" d="M311.5,-797.18C311.5,-775.96 311.5,-746.92 311.5,-724.97"></path> - <polygon fill="#b2a289" stroke="#b2a289" points="315,-724.83 311.5,-714.83 308,-724.83 315,-724.83"></polygon> - </a> - </g> - <g id="a_edge18-label"><a xlink:title="github.com/ii64/gouring.(*IoUring).Submit -> github.com/ii64/gouring.(*IoUring).io_uringn_submit (6.87s)"> - <text text-anchor="middle" x="333.5" y="-765.8" font-family="Times,serif" font-size="14.00"> 6.87s</text> - <text text-anchor="middle" x="333.5" y="-750.8" font-family="Times,serif" font-size="14.00"> (inline)</text> - </a> - </g> - </g> - <!-- N28 --> - <g id="node28" class="node"> - <title>N28</title> - <g id="a_node28"><a xlink:title="github.com/ii64/gouring.(*IoUring)._io_uring_get_cqe (1.96s)"> - <polygon fill="#edeceb" stroke="#b2afa6" points="377,-278 294,-278 294,-220 377,-220 377,-278"></polygon> - <text text-anchor="middle" x="335.5" y="-266.8" font-family="Times,serif" font-size="9.00">gouring</text> - <text text-anchor="middle" x="335.5" y="-256.8" font-family="Times,serif" font-size="9.00">(*IoUring)</text> - <text text-anchor="middle" x="335.5" y="-246.8" font-family="Times,serif" font-size="9.00">_io_uring_get_cqe</text> - <text text-anchor="middle" x="335.5" y="-236.8" font-family="Times,serif" font-size="9.00">0.07s (0.047%)</text> - <text text-anchor="middle" x="335.5" y="-226.8" font-family="Times,serif" font-size="9.00">of 1.96s (1.32%)</text> - </a> - </g> - </g> - <!-- N34 --> - <g id="node34" class="node"> - <title>N34</title> - <g id="a_node34"><a xlink:title="github.com/ii64/gouring.io_uring_enter2 (1.87s)"> - <polygon fill="#edeceb" stroke="#b2afa7" points="374,-155 297,-155 297,-107 374,-107 374,-155"></polygon> - <text text-anchor="middle" x="335.5" y="-143.8" font-family="Times,serif" font-size="9.00">gouring</text> - <text text-anchor="middle" x="335.5" y="-133.8" font-family="Times,serif" font-size="9.00">io_uring_enter2</text> - <text text-anchor="middle" x="335.5" y="-123.8" font-family="Times,serif" font-size="9.00">0.01s (0.0067%)</text> - <text text-anchor="middle" x="335.5" y="-113.8" font-family="Times,serif" font-size="9.00">of 1.87s (1.26%)</text> - </a> - </g> - </g> - <!-- N28->N34 --> - <g id="edge26" class="edge"> - <title>N28->N34</title> - <g id="a_edge26"><a xlink:title="github.com/ii64/gouring.(*IoUring)._io_uring_get_cqe -> github.com/ii64/gouring.io_uring_enter2 (1.87s)"> - <path fill="none" stroke="#b2afa7" d="M335.5,-219.92C335.5,-203.48 335.5,-182.63 335.5,-165.36"></path> - <polygon fill="#b2afa7" stroke="#b2afa7" points="339,-165.14 335.5,-155.14 332,-165.14 339,-165.14"></polygon> - </a> - </g> - <g id="a_edge26-label"><a xlink:title="github.com/ii64/gouring.(*IoUring)._io_uring_get_cqe -> github.com/ii64/gouring.io_uring_enter2 (1.87s)"> - <text text-anchor="middle" x="352.5" y="-176.8" font-family="Times,serif" font-size="14.00"> 1.87s</text> - </a> - </g> - </g> - <!-- N29 --> - <g id="node29" class="node"> - <title>N29</title> - <g id="a_node29"><a xlink:title="github.com/ii64/gouring.(*IoUring).io_uring_cqe_seen (1.60s)"> - <polygon fill="#edeceb" stroke="#b2b0a8" points="451,-721.5 368,-721.5 368,-663.5 451,-663.5 451,-721.5"></polygon> - <text text-anchor="middle" x="409.5" y="-710.3" font-family="Times,serif" font-size="9.00">gouring</text> - <text text-anchor="middle" x="409.5" y="-700.3" font-family="Times,serif" font-size="9.00">(*IoUring)</text> - <text text-anchor="middle" x="409.5" y="-690.3" font-family="Times,serif" font-size="9.00">io_uring_cqe_seen</text> - <text text-anchor="middle" x="409.5" y="-680.3" font-family="Times,serif" font-size="9.00">0.09s (0.061%)</text> - <text text-anchor="middle" x="409.5" y="-670.3" font-family="Times,serif" font-size="9.00">of 1.60s (1.08%)</text> - </a> - </g> - </g> - <!-- N29->N18 --> - <g id="edge33" class="edge"> - <title>N29->N18</title> - <g id="a_edge33"><a xlink:title="github.com/ii64/gouring.(*IoUring).io_uring_cqe_seen -> github.com/ii64/gouring.(*IoUring).io_uring_cq_advance (1.51s)"> - <path fill="none" stroke="#b2b0a9" d="M446.25,-663.45C476.57,-640.3 519.67,-607.39 551.77,-582.89"></path> - <polygon fill="#b2b0a9" stroke="#b2b0a9" points="554.27,-585.38 560.09,-576.53 550.02,-579.82 554.27,-585.38"></polygon> - </a> - </g> - <g id="a_edge33-label"><a xlink:title="github.com/ii64/gouring.(*IoUring).io_uring_cqe_seen -> github.com/ii64/gouring.(*IoUring).io_uring_cq_advance (1.51s)"> - <text text-anchor="middle" x="536.5" y="-626.8" font-family="Times,serif" font-size="14.00"> 1.51s</text> - <text text-anchor="middle" x="536.5" y="-611.8" font-family="Times,serif" font-size="14.00"> (inline)</text> - </a> - </g> - </g> - <!-- N30 --> - <g id="node30" class="node"> - <title>N30</title> - <g id="a_node30"><a xlink:title="github.com/ii64/gouring.(*IoUring).__io_uring_submit_and_wait (6.87s)"> - <polygon fill="#edeae7" stroke="#b2a289" points="522,-577.5 401,-577.5 401,-519.5 522,-519.5 522,-577.5"></polygon> - <text text-anchor="middle" x="461.5" y="-566.3" font-family="Times,serif" font-size="9.00">gouring</text> - <text text-anchor="middle" x="461.5" y="-556.3" font-family="Times,serif" font-size="9.00">(*IoUring)</text> - <text text-anchor="middle" x="461.5" y="-546.3" font-family="Times,serif" font-size="9.00">__io_uring_submit_and_wait</text> - <text text-anchor="middle" x="461.5" y="-536.3" font-family="Times,serif" font-size="9.00">0.06s (0.04%)</text> - <text text-anchor="middle" x="461.5" y="-526.3" font-family="Times,serif" font-size="9.00">of 6.87s (4.63%)</text> - </a> - </g> - </g> - <!-- N30->N11 --> - <g id="edge20" class="edge"> - <title>N30->N11</title> - <g id="a_edge20"><a xlink:title="github.com/ii64/gouring.(*IoUring).__io_uring_submit_and_wait -> github.com/ii64/gouring.(*IoUring).__io_uring_flush_sq (6.79s)"> - <path fill="none" stroke="#b2a289" d="M461.5,-519.16C461.5,-499.98 461.5,-474.12 461.5,-451.43"></path> - <polygon fill="#b2a289" stroke="#b2a289" points="465,-451.26 461.5,-441.26 458,-451.26 465,-451.26"></polygon> - </a> - </g> - <g id="a_edge20-label"><a xlink:title="github.com/ii64/gouring.(*IoUring).__io_uring_submit_and_wait -> github.com/ii64/gouring.(*IoUring).__io_uring_flush_sq (6.79s)"> - <text text-anchor="middle" x="478.5" y="-470.3" font-family="Times,serif" font-size="14.00"> 6.79s</text> - </a> - </g> - </g> - <!-- N31->N29 --> - <g id="edge29" class="edge"> - <title>N31->N29</title> - <g id="a_edge29"><a xlink:title="github.com/ii64/gouring.(*IoUring).SeenCqe -> github.com/ii64/gouring.(*IoUring).io_uring_cqe_seen (1.60s)"> - <path fill="none" stroke="#b2b0a8" d="M407.93,-797.18C408.22,-778.13 408.6,-752.78 408.92,-731.91"></path> - <polygon fill="#b2b0a8" stroke="#b2b0a8" points="412.42,-731.82 409.07,-721.77 405.42,-731.72 412.42,-731.82"></polygon> - </a> - </g> - <g id="a_edge29-label"><a xlink:title="github.com/ii64/gouring.(*IoUring).SeenCqe -> github.com/ii64/gouring.(*IoUring).io_uring_cqe_seen (1.60s)"> - <text text-anchor="middle" x="431.5" y="-765.8" font-family="Times,serif" font-size="14.00"> 1.60s</text> - <text text-anchor="middle" x="431.5" y="-750.8" font-family="Times,serif" font-size="14.00"> (inline)</text> - </a> - </g> - </g> - <!-- N32->N7 --> - <g id="edge10" class="edge"> - <title>N32->N7</title> - <g id="a_edge10"><a xlink:title="github.com/ii64/gouring.PrepNop -> github.com/ii64/gouring.PrepRW (23.08s)"> - <path fill="none" stroke="#b26327" d="M525.15,-802.2C527.19,-784.19 530.09,-758.73 532.56,-736.98"></path> - <polygon fill="#b26327" stroke="#b26327" points="536.05,-737.3 533.7,-726.97 529.09,-736.51 536.05,-737.3"></polygon> - </a> - </g> - <g id="a_edge10-label"><a xlink:title="github.com/ii64/gouring.PrepNop -> github.com/ii64/gouring.PrepRW (23.08s)"> - <text text-anchor="middle" x="553.5" y="-765.8" font-family="Times,serif" font-size="14.00"> 23.08s</text> - <text text-anchor="middle" x="553.5" y="-750.8" font-family="Times,serif" font-size="14.00"> (inline)</text> + <g id="a_edge17-label"><a xlink:title="github.com/ii64/gouring.(*IoUring).io_uring_wait_cqe -> github.com/ii64/gouring.(*IoUring).__io_uring_peek_cqe (8.68s)"> + <text text-anchor="middle" x="879" y="-791.3" font-family="Times,serif" font-size="14.00"> 8.68s</text> </a> </g> </g> <!-- N35 --> <g id="node35" class="node"> <title>N35</title> - <g id="a_node35"><a xlink:title="github.com/ii64/gouring.(*IoUring).__io_uring_get_cqe (1.96s)"> - <polygon fill="#edeceb" stroke="#b2afa6" points="375,-421.5 296,-421.5 296,-377.5 375,-377.5 375,-421.5"></polygon> - <text text-anchor="middle" x="335.5" y="-411.1" font-family="Times,serif" font-size="8.00">gouring</text> - <text text-anchor="middle" x="335.5" y="-402.1" font-family="Times,serif" font-size="8.00">(*IoUring)</text> - <text text-anchor="middle" x="335.5" y="-393.1" font-family="Times,serif" font-size="8.00">__io_uring_get_cqe</text> - <text text-anchor="middle" x="335.5" y="-384.1" font-family="Times,serif" font-size="8.00">0 of 1.96s (1.32%)</text> + <g id="a_node35"><a xlink:title="github.com/ii64/gouring.(*IoUring).io_uring_wait_cqe_nr (1.87s)"> + <polygon fill="#edeceb" stroke="#b2b0a9" points="1059.5,-752 964.5,-752 964.5,-694 1059.5,-694 1059.5,-752"></polygon> + <text text-anchor="middle" x="1012" y="-740.8" font-family="Times,serif" font-size="9.00">gouring</text> + <text text-anchor="middle" x="1012" y="-730.8" font-family="Times,serif" font-size="9.00">(*IoUring)</text> + <text text-anchor="middle" x="1012" y="-720.8" font-family="Times,serif" font-size="9.00">io_uring_wait_cqe_nr</text> + <text text-anchor="middle" x="1012" y="-710.8" font-family="Times,serif" font-size="9.00">0.01s (0.0055%)</text> + <text text-anchor="middle" x="1012" y="-700.8" font-family="Times,serif" font-size="9.00">of 1.87s (1.04%)</text> </a> </g> </g> - <!-- N33->N35 --> - <g id="edge25" class="edge"> - <title>N33->N35</title> - <g id="a_edge25"><a xlink:title="github.com/ii64/gouring.(*IoUring).io_uring_wait_cqe_nr -> github.com/ii64/gouring.(*IoUring).__io_uring_get_cqe (1.96s)"> - <path fill="none" stroke="#b2afa6" d="M335.5,-519.16C335.5,-494.08 335.5,-457.55 335.5,-431.66"></path> - <polygon fill="#b2afa6" stroke="#b2afa6" points="339,-431.62 335.5,-421.62 332,-431.62 339,-431.62"></polygon> + <!-- N10->N35 --> + <g id="edge29" class="edge"> + <title>N10->N35</title> + <g id="a_edge29"><a xlink:title="github.com/ii64/gouring.(*IoUring).io_uring_wait_cqe -> github.com/ii64/gouring.(*IoUring).io_uring_wait_cqe_nr (1.87s)"> + <path fill="none" stroke="#b2b0a9" d="M880.88,-827.84C907.43,-806.81 941.71,-779.66 968.56,-758.4"></path> + <polygon fill="#b2b0a9" stroke="#b2b0a9" points="970.97,-760.96 976.64,-752.01 966.62,-755.47 970.97,-760.96"></polygon> </a> </g> - <g id="a_edge25-label"><a xlink:title="github.com/ii64/gouring.(*IoUring).io_uring_wait_cqe_nr -> github.com/ii64/gouring.(*IoUring).__io_uring_get_cqe (1.96s)"> - <text text-anchor="middle" x="357.5" y="-477.8" font-family="Times,serif" font-size="14.00"> 1.96s</text> - <text text-anchor="middle" x="357.5" y="-462.8" font-family="Times,serif" font-size="14.00"> (inline)</text> + <g id="a_edge29-label"><a xlink:title="github.com/ii64/gouring.(*IoUring).io_uring_wait_cqe -> github.com/ii64/gouring.(*IoUring).io_uring_wait_cqe_nr (1.87s)"> + <text text-anchor="middle" x="957" y="-791.3" font-family="Times,serif" font-size="14.00"> 1.87s</text> </a> </g> </g> - <!-- N34->N22 --> - <g id="edge27" class="edge"> - <title>N34->N22</title> - <g id="a_edge27"><a xlink:title="github.com/ii64/gouring.io_uring_enter2 -> syscall.Syscall6 (1.86s)"> - <path fill="none" stroke="#b2afa7" d="M335.5,-106.83C335.5,-94.85 335.5,-79.95 335.5,-66.39"></path> - <polygon fill="#b2afa7" stroke="#b2afa7" points="339,-66.36 335.5,-56.36 332,-66.36 339,-66.36"></polygon> + <!-- N12->N5 --> + <g id="edge8" class="edge"> + <title>N12->N5</title> + <g id="a_edge8"><a xlink:title="runtime.execute -> runtime.casgstatus (41.91s)"> + <path fill="none" stroke="#b23f00" stroke-width="2" d="M151.95,-694.96C139.57,-672.69 121.9,-640.93 108.27,-616.43"></path> + <polygon fill="#b23f00" stroke="#b23f00" stroke-width="2" points="111.18,-614.46 103.26,-607.43 105.06,-617.87 111.18,-614.46"></polygon> </a> </g> - <g id="a_edge27-label"><a xlink:title="github.com/ii64/gouring.io_uring_enter2 -> syscall.Syscall6 (1.86s)"> - <text text-anchor="middle" x="352.5" y="-77.8" font-family="Times,serif" font-size="14.00"> 1.86s</text> + <g id="a_edge8-label"><a xlink:title="runtime.execute -> runtime.casgstatus (41.91s)"> + <text text-anchor="middle" x="155" y="-647.3" font-family="Times,serif" font-size="14.00"> 41.91s</text> </a> </g> </g> - <!-- N35->N28 --> + <!-- N13 --> + <g id="node13" class="node"> + <title>N13</title> + <g id="a_node13"><a xlink:title="github.com/ii64/gouring.(*IoUring).__io_uring_flush_sq (7.80s)"> + <polygon fill="#edebe8" stroke="#b2a38b" points="797,-618 669,-618 669,-540 797,-540 797,-618"></polygon> + <text text-anchor="middle" x="733" y="-603.6" font-family="Times,serif" font-size="13.00">gouring</text> + <text text-anchor="middle" x="733" y="-589.6" font-family="Times,serif" font-size="13.00">(*IoUring)</text> + <text text-anchor="middle" x="733" y="-575.6" font-family="Times,serif" font-size="13.00">__io_uring_flush_sq</text> + <text text-anchor="middle" x="733" y="-561.6" font-family="Times,serif" font-size="13.00">7.53s (4.17%)</text> + <text text-anchor="middle" x="733" y="-547.6" font-family="Times,serif" font-size="13.00">of 7.80s (4.32%)</text> + </a> + </g> + </g> + <!-- N14 --> + <g id="node14" class="node"> + <title>N14</title> + <g id="a_node14"><a xlink:title="github.com/ii64/gouring.(*IoUring)._io_uring_get_sqe (9.04s)"> + <polygon fill="#edeae7" stroke="#b2a085" points="654.5,-762 537.5,-762 537.5,-684 654.5,-684 654.5,-762"></polygon> + <text text-anchor="middle" x="596" y="-747.6" font-family="Times,serif" font-size="13.00">gouring</text> + <text text-anchor="middle" x="596" y="-733.6" font-family="Times,serif" font-size="13.00">(*IoUring)</text> + <text text-anchor="middle" x="596" y="-719.6" font-family="Times,serif" font-size="13.00">_io_uring_get_sqe</text> + <text text-anchor="middle" x="596" y="-705.6" font-family="Times,serif" font-size="13.00">6.09s (3.38%)</text> + <text text-anchor="middle" x="596" y="-691.6" font-family="Times,serif" font-size="13.00">of 9.04s (5.01%)</text> + </a> + </g> + </g> + <!-- N16 --> + <g id="node16" class="node"> + <title>N16</title> + <g id="a_node16"><a xlink:title="github.com/ii64/gouring.(*IoUringSq)._RingEntries (2.27s)"> + <polygon fill="#edeceb" stroke="#b2afa7" points="635,-607 557,-607 557,-551 635,-551 635,-607"></polygon> + <text text-anchor="middle" x="596" y="-594.2" font-family="Times,serif" font-size="11.00">gouring</text> + <text text-anchor="middle" x="596" y="-582.2" font-family="Times,serif" font-size="11.00">(*IoUringSq)</text> + <text text-anchor="middle" x="596" y="-570.2" font-family="Times,serif" font-size="11.00">_RingEntries</text> + <text text-anchor="middle" x="596" y="-558.2" font-family="Times,serif" font-size="11.00">2.27s (1.26%)</text> + </a> + </g> + </g> + <!-- N14->N16 --> + <g id="edge26" class="edge"> + <title>N14->N16</title> + <g id="a_edge26"><a xlink:title="github.com/ii64/gouring.(*IoUring)._io_uring_get_sqe -> github.com/ii64/gouring.(*IoUringSq)._RingEntries (2.27s)"> + <path fill="none" stroke="#b2afa7" d="M596,-683.95C596,-663.38 596,-638.07 596,-617.58"></path> + <polygon fill="#b2afa7" stroke="#b2afa7" points="599.5,-617.35 596,-607.35 592.5,-617.35 599.5,-617.35"></polygon> + </a> + </g> + <g id="a_edge26-label"><a xlink:title="github.com/ii64/gouring.(*IoUring)._io_uring_get_sqe -> github.com/ii64/gouring.(*IoUringSq)._RingEntries (2.27s)"> + <text text-anchor="middle" x="618" y="-654.8" font-family="Times,serif" font-size="14.00"> 2.27s</text> + <text text-anchor="middle" x="618" y="-639.8" font-family="Times,serif" font-size="14.00"> (inline)</text> + </a> + </g> + </g> + <!-- N15 --> + <g id="node15" class="node"> + <title>N15</title> + <g id="a_node15"><a xlink:title="runtime.lock2 (2.36s)"> + <polygon fill="#edeceb" stroke="#b2afa6" points="539,-337 461,-337 461,-293 539,-293 539,-337"></polygon> + <text text-anchor="middle" x="500" y="-324.2" font-family="Times,serif" font-size="11.00">runtime</text> + <text text-anchor="middle" x="500" y="-312.2" font-family="Times,serif" font-size="11.00">lock2</text> + <text text-anchor="middle" x="500" y="-300.2" font-family="Times,serif" font-size="11.00">2.36s (1.31%)</text> + </a> + </g> + </g> + <!-- N17 --> + <g id="node17" class="node"> + <title>N17</title> + <g id="a_node17"><a xlink:title="runtime.unlock2 (1.89s)"> + <polygon fill="#edeceb" stroke="#b2b0a9" points="441,-337 363,-337 363,-293 441,-293 441,-337"></polygon> + <text text-anchor="middle" x="402" y="-324.2" font-family="Times,serif" font-size="11.00">runtime</text> + <text text-anchor="middle" x="402" y="-312.2" font-family="Times,serif" font-size="11.00">unlock2</text> + <text text-anchor="middle" x="402" y="-300.2" font-family="Times,serif" font-size="11.00">1.89s (1.05%)</text> + </a> + </g> + </g> + <!-- N18 --> + <g id="node18" class="node"> + <title>N18</title> + <g id="a_node18"><a xlink:title="runtime/internal/syscall.Syscall6 (1.65s)"> + <polygon fill="#edecec" stroke="#b2b0aa" points="1051,-44 973,-44 973,0 1051,0 1051,-44"></polygon> + <text text-anchor="middle" x="1012" y="-31.2" font-family="Times,serif" font-size="11.00">syscall</text> + <text text-anchor="middle" x="1012" y="-19.2" font-family="Times,serif" font-size="11.00">Syscall6</text> + <text text-anchor="middle" x="1012" y="-7.2" font-family="Times,serif" font-size="11.00">1.65s (0.91%)</text> + </a> + </g> + </g> + <!-- N40 --> + <g id="node40" class="node"> + <title>N40</title> + <g id="a_node40"><a xlink:title="runtime.lockWithRank (2.36s)"> + <polygon fill="#edeceb" stroke="#b2afa6" points="538.5,-449 461.5,-449 461.5,-413 538.5,-413 538.5,-449"></polygon> + <text text-anchor="middle" x="500" y="-438.1" font-family="Times,serif" font-size="8.00">runtime</text> + <text text-anchor="middle" x="500" y="-429.1" font-family="Times,serif" font-size="8.00">lockWithRank</text> + <text text-anchor="middle" x="500" y="-420.1" font-family="Times,serif" font-size="8.00">0 of 2.36s (1.31%)</text> + </a> + </g> + </g> + <!-- N20->N40 --> <g id="edge24" class="edge"> - <title>N35->N28</title> - <g id="a_edge24"><a xlink:title="github.com/ii64/gouring.(*IoUring).__io_uring_get_cqe -> github.com/ii64/gouring.(*IoUring)._io_uring_get_cqe (1.96s)"> - <path fill="none" stroke="#b2afa6" d="M335.5,-377.22C335.5,-354.11 335.5,-316.71 335.5,-288.43"></path> - <polygon fill="#b2afa6" stroke="#b2afa6" points="339,-288.09 335.5,-278.09 332,-288.09 339,-288.09"></polygon> + <title>N20->N40</title> + <g id="a_edge24"><a xlink:title="runtime.lock -> runtime.lockWithRank (2.36s)"> + <path fill="none" stroke="#b2afa6" d="M500,-554.87C500,-528.89 500,-486.76 500,-459.22"></path> + <polygon fill="#b2afa6" stroke="#b2afa6" points="503.5,-459.1 500,-449.1 496.5,-459.1 503.5,-459.1"></polygon> </a> </g> - <g id="a_edge24-label"><a xlink:title="github.com/ii64/gouring.(*IoUring).__io_uring_get_cqe -> github.com/ii64/gouring.(*IoUring)._io_uring_get_cqe (1.96s)"> - <text text-anchor="middle" x="352.5" y="-321.3" font-family="Times,serif" font-size="14.00"> 1.96s</text> + <g id="a_edge24-label"><a xlink:title="runtime.lock -> runtime.lockWithRank (2.36s)"> + <text text-anchor="middle" x="522" y="-510.8" font-family="Times,serif" font-size="14.00"> 2.36s</text> + <text text-anchor="middle" x="522" y="-495.8" font-family="Times,serif" font-size="14.00"> (inline)</text> </a> </g> </g> - <!-- N36->N13 --> + <!-- N21->N1 --> + <g id="edge23" class="edge"> + <title>N21->N1</title> + <g id="a_edge23"><a xlink:title="runtime.checkTimers -> runtime.nanotime (3.01s)"> + <path fill="none" stroke="#b2aea3" d="M180.42,-552.92C168.18,-535.64 151.37,-512.23 136,-492 133.5,-488.71 130.91,-485.35 128.28,-481.96"></path> + <polygon fill="#b2aea3" stroke="#b2aea3" points="131.02,-479.79 122.1,-474.08 125.51,-484.11 131.02,-479.79"></polygon> + </a> + </g> + <g id="a_edge23-label"><a xlink:title="runtime.checkTimers -> runtime.nanotime (3.01s)"> + <text text-anchor="middle" x="179" y="-510.8" font-family="Times,serif" font-size="14.00"> 3.01s</text> + <text text-anchor="middle" x="179" y="-495.8" font-family="Times,serif" font-size="14.00"> (inline)</text> + </a> + </g> + </g> + <!-- N22 --> + <g id="node22" class="node"> + <title>N22</title> + <g id="a_node22"><a xlink:title="github.com/ii64/gouring.(*IoUring).io_uring_cq_advance (1.03s)"> + <polygon fill="#ededec" stroke="#b2b1ad" points="1184,-749 1078,-749 1078,-697 1184,-697 1184,-749"></polygon> + <text text-anchor="middle" x="1131" y="-737" font-family="Times,serif" font-size="10.00">gouring</text> + <text text-anchor="middle" x="1131" y="-726" font-family="Times,serif" font-size="10.00">(*IoUring)</text> + <text text-anchor="middle" x="1131" y="-715" font-family="Times,serif" font-size="10.00">io_uring_cq_advance</text> + <text text-anchor="middle" x="1131" y="-704" font-family="Times,serif" font-size="10.00">1.03s (0.57%)</text> + </a> + </g> + </g> + <!-- N41 --> + <g id="node41" class="node"> + <title>N41</title> + <g id="a_node41"><a xlink:title="runtime.unlockWithRank (1.89s)"> + <polygon fill="#edeceb" stroke="#b2b0a9" points="440.5,-449 363.5,-449 363.5,-413 440.5,-413 440.5,-449"></polygon> + <text text-anchor="middle" x="402" y="-438.1" font-family="Times,serif" font-size="8.00">runtime</text> + <text text-anchor="middle" x="402" y="-429.1" font-family="Times,serif" font-size="8.00">unlockWithRank</text> + <text text-anchor="middle" x="402" y="-420.1" font-family="Times,serif" font-size="8.00">0 of 1.89s (1.05%)</text> + </a> + </g> + </g> + <!-- N23->N41 --> + <g id="edge27" class="edge"> + <title>N23->N41</title> + <g id="a_edge27"><a xlink:title="runtime.unlock -> runtime.unlockWithRank (1.89s)"> + <path fill="none" stroke="#b2b0a9" d="M402,-560.97C402,-536.04 402,-489.37 402,-459.54"></path> + <polygon fill="#b2b0a9" stroke="#b2b0a9" points="405.5,-459.38 402,-449.38 398.5,-459.38 405.5,-459.38"></polygon> + </a> + </g> + <g id="a_edge27-label"><a xlink:title="runtime.unlock -> runtime.unlockWithRank (1.89s)"> + <text text-anchor="middle" x="424" y="-510.8" font-family="Times,serif" font-size="14.00"> 1.89s</text> + <text text-anchor="middle" x="424" y="-495.8" font-family="Times,serif" font-size="14.00"> (inline)</text> + </a> + </g> + </g> + <!-- N34 --> + <g id="node34" class="node"> + <title>N34</title> + <g id="a_node34"><a xlink:title="github.com/ii64/gouring.(*IoUring).io_uring_get_sqe (9.05s)"> + <polygon fill="#edeae7" stroke="#b2a085" points="643,-891 565,-891 565,-833 643,-833 643,-891"></polygon> + <text text-anchor="middle" x="604" y="-879.8" font-family="Times,serif" font-size="9.00">gouring</text> + <text text-anchor="middle" x="604" y="-869.8" font-family="Times,serif" font-size="9.00">(*IoUring)</text> + <text text-anchor="middle" x="604" y="-859.8" font-family="Times,serif" font-size="9.00">io_uring_get_sqe</text> + <text text-anchor="middle" x="604" y="-849.8" font-family="Times,serif" font-size="9.00">0.01s (0.0055%)</text> + <text text-anchor="middle" x="604" y="-839.8" font-family="Times,serif" font-size="9.00">of 9.05s (5.02%)</text> + </a> + </g> + </g> + <!-- N24->N34 --> <g id="edge15" class="edge"> - <title>N36->N13</title> - <g id="a_edge15"><a xlink:title="github.com/ii64/gouring.(*IoUring).io_uring_get_sqe -> github.com/ii64/gouring.(*IoUring)._io_uring_get_sqe (8.26s)"> - <path fill="none" stroke="#b29d80" d="M75.51,-670.24C72.81,-651.13 68.76,-622.37 65.29,-597.7"></path> - <polygon fill="#b29d80" stroke="#b29d80" points="68.75,-597.19 63.89,-587.78 61.82,-598.17 68.75,-597.19"></polygon> + <title>N24->N34</title> + <g id="a_edge15"><a xlink:title="github.com/ii64/gouring.(*IoUring).GetSqe -> github.com/ii64/gouring.(*IoUring).io_uring_get_sqe (9.05s)"> + <path fill="none" stroke="#b2a085" d="M614.11,-961.81C612.29,-943.97 609.9,-920.68 607.91,-901.19"></path> + <polygon fill="#b2a085" stroke="#b2a085" points="611.38,-900.7 606.88,-891.11 604.41,-901.41 611.38,-900.7"></polygon> </a> </g> - <g id="a_edge15-label"><a xlink:title="github.com/ii64/gouring.(*IoUring).io_uring_get_sqe -> github.com/ii64/gouring.(*IoUring)._io_uring_get_sqe (8.26s)"> - <text text-anchor="middle" x="88.5" y="-619.3" font-family="Times,serif" font-size="14.00"> 8.26s</text> + <g id="a_edge15-label"><a xlink:title="github.com/ii64/gouring.(*IoUring).GetSqe -> github.com/ii64/gouring.(*IoUring).io_uring_get_sqe (9.05s)"> + <text text-anchor="middle" x="635" y="-932.8" font-family="Times,serif" font-size="14.00"> 9.05s</text> + <text text-anchor="middle" x="635" y="-917.8" font-family="Times,serif" font-size="14.00"> (inline)</text> </a> </g> </g> - <!-- N37->N30 --> + <!-- N25->N3 --> + <g id="edge2" class="edge"> + <title>N25->N3</title> + <g id="a_edge2"><a xlink:title="runtime.gosched_m -> runtime.goschedImpl (102.11s)"> + <path fill="none" stroke="#b21c00" stroke-width="3" d="M167,-1099.88C167,-1079.24 167,-1048.77 167,-1025.47"></path> + <polygon fill="#b21c00" stroke="#b21c00" stroke-width="3" points="170.5,-1025.33 167,-1015.33 163.5,-1025.33 170.5,-1025.33"></polygon> + </a> + </g> + <g id="a_edge2-label"><a xlink:title="runtime.gosched_m -> runtime.goschedImpl (102.11s)"> + <text text-anchor="middle" x="190.5" y="-1049.3" font-family="Times,serif" font-size="14.00"> 102.11s</text> + </a> + </g> + </g> + <!-- N38 --> + <g id="node38" class="node"> + <title>N38</title> + <g id="a_node38"><a xlink:title="github.com/ii64/gouring.(*IoUring).io_uring_submit (8.17s)"> + <polygon fill="#edebe7" stroke="#b2a28a" points="771.5,-884 694.5,-884 694.5,-840 771.5,-840 771.5,-884"></polygon> + <text text-anchor="middle" x="733" y="-873.6" font-family="Times,serif" font-size="8.00">gouring</text> + <text text-anchor="middle" x="733" y="-864.6" font-family="Times,serif" font-size="8.00">(*IoUring)</text> + <text text-anchor="middle" x="733" y="-855.6" font-family="Times,serif" font-size="8.00">io_uring_submit</text> + <text text-anchor="middle" x="733" y="-846.6" font-family="Times,serif" font-size="8.00">0 of 8.17s (4.53%)</text> + </a> + </g> + </g> + <!-- N26->N38 --> <g id="edge19" class="edge"> - <title>N37->N30</title> - <g id="a_edge19"><a xlink:title="github.com/ii64/gouring.(*IoUring).io_uringn_submit -> github.com/ii64/gouring.(*IoUring).__io_uring_submit_and_wait (6.87s)"> - <path fill="none" stroke="#b2a289" d="M333.96,-670.24C357.89,-647.58 396.17,-611.35 424.55,-584.48"></path> - <polygon fill="#b2a289" stroke="#b2a289" points="427.05,-586.93 431.91,-577.51 422.24,-581.85 427.05,-586.93"></polygon> + <title>N26->N38</title> + <g id="a_edge19"><a xlink:title="github.com/ii64/gouring.(*IoUring).Submit -> github.com/ii64/gouring.(*IoUring).io_uring_submit (8.17s)"> + <path fill="none" stroke="#b2a28a" d="M736.11,-961.81C735.48,-941.78 734.63,-914.86 733.98,-894.18"></path> + <polygon fill="#b2a28a" stroke="#b2a28a" points="737.47,-893.89 733.66,-884 730.48,-894.11 737.47,-893.89"></polygon> </a> </g> - <g id="a_edge19-label"><a xlink:title="github.com/ii64/gouring.(*IoUring).io_uringn_submit -> github.com/ii64/gouring.(*IoUring).__io_uring_submit_and_wait (6.87s)"> - <text text-anchor="middle" x="412.5" y="-619.3" font-family="Times,serif" font-size="14.00"> 6.87s</text> + <g id="a_edge19-label"><a xlink:title="github.com/ii64/gouring.(*IoUring).Submit -> github.com/ii64/gouring.(*IoUring).io_uring_submit (8.17s)"> + <text text-anchor="middle" x="758" y="-932.8" font-family="Times,serif" font-size="14.00"> 8.17s</text> + <text text-anchor="middle" x="758" y="-917.8" font-family="Times,serif" font-size="14.00"> (inline)</text> </a> </g> </g> - <!-- N38->N19 --> - <g id="edge35" class="edge"> - <title>N38->N19</title> - <g id="a_edge35"><a xlink:title="runtime.lockWithRank -> runtime.lock2 (1.46s)"> - <path fill="none" stroke="#b2b0a9" d="M1175.5,-230.88C1175.5,-213.12 1175.5,-184.94 1175.5,-163.21"></path> - <polygon fill="#b2b0a9" stroke="#b2b0a9" points="1179,-163.12 1175.5,-153.12 1172,-163.12 1179,-163.12"></polygon> + <!-- N27->N10 --> + <g id="edge12" class="edge"> + <title>N27->N10</title> + <g id="a_edge12"><a xlink:title="github.com/ii64/gouring.(*IoUring).WaitCqe -> github.com/ii64/gouring.(*IoUring).io_uring_wait_cqe (13.06s)"> + <path fill="none" stroke="#b29571" d="M839,-961.81C839,-945.49 839,-924.6 839,-906.23"></path> + <polygon fill="#b29571" stroke="#b29571" points="842.5,-906.05 839,-896.05 835.5,-906.05 842.5,-906.05"></polygon> </a> </g> - <g id="a_edge35-label"><a xlink:title="runtime.lockWithRank -> runtime.lock2 (1.46s)"> - <text text-anchor="middle" x="1192.5" y="-176.8" font-family="Times,serif" font-size="14.00"> 1.46s</text> + <g id="a_edge12-label"><a xlink:title="github.com/ii64/gouring.(*IoUring).WaitCqe -> github.com/ii64/gouring.(*IoUring).io_uring_wait_cqe (13.06s)"> + <text text-anchor="middle" x="859" y="-925.3" font-family="Times,serif" font-size="14.00"> 13.06s</text> </a> </g> </g> - <!-- N39->N17 --> + <!-- N28 --> + <g id="node28" class="node"> + <title>N28</title> + <g id="a_node28"><a xlink:title="syscall.Syscall6 (1.82s)"> + <polygon fill="#edeceb" stroke="#b2b0a9" points="1050.5,-242 973.5,-242 973.5,-194 1050.5,-194 1050.5,-242"></polygon> + <text text-anchor="middle" x="1012" y="-230.8" font-family="Times,serif" font-size="9.00">syscall</text> + <text text-anchor="middle" x="1012" y="-220.8" font-family="Times,serif" font-size="9.00">Syscall6</text> + <text text-anchor="middle" x="1012" y="-210.8" font-family="Times,serif" font-size="9.00">0.03s (0.017%)</text> + <text text-anchor="middle" x="1012" y="-200.8" font-family="Times,serif" font-size="9.00">of 1.82s (1.01%)</text> + </a> + </g> + </g> + <!-- N36 --> + <g id="node36" class="node"> + <title>N36</title> + <g id="a_node36"><a xlink:title="syscall.RawSyscall6 (1.66s)"> + <polygon fill="#edecec" stroke="#b2b0aa" points="1050.5,-143 973.5,-143 973.5,-95 1050.5,-95 1050.5,-143"></polygon> + <text text-anchor="middle" x="1012" y="-131.8" font-family="Times,serif" font-size="9.00">syscall</text> + <text text-anchor="middle" x="1012" y="-121.8" font-family="Times,serif" font-size="9.00">RawSyscall6</text> + <text text-anchor="middle" x="1012" y="-111.8" font-family="Times,serif" font-size="9.00">0.01s (0.0055%)</text> + <text text-anchor="middle" x="1012" y="-101.8" font-family="Times,serif" font-size="9.00">of 1.66s (0.92%)</text> + </a> + </g> + </g> + <!-- N28->N36 --> + <g id="edge34" class="edge"> + <title>N28->N36</title> + <g id="a_edge34"><a xlink:title="syscall.Syscall6 -> syscall.RawSyscall6 (1.66s)"> + <path fill="none" stroke="#b2b0aa" d="M1012,-193.52C1012,-181.49 1012,-166.62 1012,-153.42"></path> + <polygon fill="#b2b0aa" stroke="#b2b0aa" points="1015.5,-153.26 1012,-143.26 1008.5,-153.26 1015.5,-153.26"></polygon> + </a> + </g> + <g id="a_edge34-label"><a xlink:title="syscall.Syscall6 -> syscall.RawSyscall6 (1.66s)"> + <text text-anchor="middle" x="1029" y="-164.8" font-family="Times,serif" font-size="14.00"> 1.66s</text> + </a> + </g> + </g> + <!-- N29 --> + <g id="node29" class="node"> + <title>N29</title> + <g id="a_node29"><a xlink:title="github.com/ii64/gouring.(*IoUring).__io_uring_submit_and_wait (8.17s)"> + <polygon fill="#edebe7" stroke="#b2a28a" points="793.5,-752 672.5,-752 672.5,-694 793.5,-694 793.5,-752"></polygon> + <text text-anchor="middle" x="733" y="-740.8" font-family="Times,serif" font-size="9.00">gouring</text> + <text text-anchor="middle" x="733" y="-730.8" font-family="Times,serif" font-size="9.00">(*IoUring)</text> + <text text-anchor="middle" x="733" y="-720.8" font-family="Times,serif" font-size="9.00">__io_uring_submit_and_wait</text> + <text text-anchor="middle" x="733" y="-710.8" font-family="Times,serif" font-size="9.00">0.05s (0.028%)</text> + <text text-anchor="middle" x="733" y="-700.8" font-family="Times,serif" font-size="9.00">of 8.17s (4.53%)</text> + </a> + </g> + </g> + <!-- N29->N13 --> + <g id="edge21" class="edge"> + <title>N29->N13</title> + <g id="a_edge21"><a xlink:title="github.com/ii64/gouring.(*IoUring).__io_uring_submit_and_wait -> github.com/ii64/gouring.(*IoUring).__io_uring_flush_sq (7.80s)"> + <path fill="none" stroke="#b2a38b" d="M733,-693.95C733,-675.25 733,-650.18 733,-628.32"></path> + <polygon fill="#b2a38b" stroke="#b2a38b" points="736.5,-628.21 733,-618.21 729.5,-628.21 736.5,-628.21"></polygon> + </a> + </g> + <g id="a_edge21-label"><a xlink:title="github.com/ii64/gouring.(*IoUring).__io_uring_submit_and_wait -> github.com/ii64/gouring.(*IoUring).__io_uring_flush_sq (7.80s)"> + <text text-anchor="middle" x="750" y="-647.3" font-family="Times,serif" font-size="14.00"> 7.80s</text> + </a> + </g> + </g> + <!-- N30 --> + <g id="node30" class="node"> + <title>N30</title> + <g id="a_node30"><a xlink:title="github.com/ii64/gouring.(*IoUring).io_uring_cqe_seen (1.09s)"> + <polygon fill="#edecec" stroke="#b2b1ad" points="989.5,-891 906.5,-891 906.5,-833 989.5,-833 989.5,-891"></polygon> + <text text-anchor="middle" x="948" y="-879.8" font-family="Times,serif" font-size="9.00">gouring</text> + <text text-anchor="middle" x="948" y="-869.8" font-family="Times,serif" font-size="9.00">(*IoUring)</text> + <text text-anchor="middle" x="948" y="-859.8" font-family="Times,serif" font-size="9.00">io_uring_cqe_seen</text> + <text text-anchor="middle" x="948" y="-849.8" font-family="Times,serif" font-size="9.00">0.06s (0.033%)</text> + <text text-anchor="middle" x="948" y="-839.8" font-family="Times,serif" font-size="9.00">of 1.09s (0.6%)</text> + </a> + </g> + </g> + <!-- N30->N22 --> + <g id="edge40" class="edge"> + <title>N30->N22</title> + <g id="a_edge40"><a xlink:title="github.com/ii64/gouring.(*IoUring).io_uring_cqe_seen -> github.com/ii64/gouring.(*IoUring).io_uring_cq_advance (1.03s)"> + <path fill="none" stroke="#b2b1ad" d="M985.47,-832.95C1015.71,-810.31 1058.21,-778.49 1089.48,-755.08"></path> + <polygon fill="#b2b1ad" stroke="#b2b1ad" points="1091.67,-757.82 1097.58,-749.02 1087.47,-752.21 1091.67,-757.82"></polygon> + </a> + </g> + <g id="a_edge40-label"><a xlink:title="github.com/ii64/gouring.(*IoUring).io_uring_cqe_seen -> github.com/ii64/gouring.(*IoUring).io_uring_cq_advance (1.03s)"> + <text text-anchor="middle" x="1077" y="-798.8" font-family="Times,serif" font-size="14.00"> 1.03s</text> + <text text-anchor="middle" x="1077" y="-783.8" font-family="Times,serif" font-size="14.00"> (inline)</text> + </a> + </g> + </g> + <!-- N31 --> + <g id="node31" class="node"> + <title>N31</title> + <g id="a_node31"><a xlink:title="github.com/ii64/gouring.(*IoUring)._io_uring_get_cqe (1.86s)"> + <polygon fill="#edeceb" stroke="#b2b0a9" points="1053.5,-460 970.5,-460 970.5,-402 1053.5,-402 1053.5,-460"></polygon> + <text text-anchor="middle" x="1012" y="-448.8" font-family="Times,serif" font-size="9.00">gouring</text> + <text text-anchor="middle" x="1012" y="-438.8" font-family="Times,serif" font-size="9.00">(*IoUring)</text> + <text text-anchor="middle" x="1012" y="-428.8" font-family="Times,serif" font-size="9.00">_io_uring_get_cqe</text> + <text text-anchor="middle" x="1012" y="-418.8" font-family="Times,serif" font-size="9.00">0.02s (0.011%)</text> + <text text-anchor="middle" x="1012" y="-408.8" font-family="Times,serif" font-size="9.00">of 1.86s (1.03%)</text> + </a> + </g> + </g> + <!-- N39 --> + <g id="node39" class="node"> + <title>N39</title> + <g id="a_node39"><a xlink:title="github.com/ii64/gouring.io_uring_enter2 (1.82s)"> + <polygon fill="#edeceb" stroke="#b2b0a9" points="1050.5,-333 973.5,-333 973.5,-297 1050.5,-297 1050.5,-333"></polygon> + <text text-anchor="middle" x="1012" y="-322.1" font-family="Times,serif" font-size="8.00">gouring</text> + <text text-anchor="middle" x="1012" y="-313.1" font-family="Times,serif" font-size="8.00">io_uring_enter2</text> + <text text-anchor="middle" x="1012" y="-304.1" font-family="Times,serif" font-size="8.00">0 of 1.82s (1.01%)</text> + </a> + </g> + </g> + <!-- N31->N39 --> <g id="edge32" class="edge"> - <title>N39->N17</title> - <g id="a_edge32"><a xlink:title="runtime.unlockWithRank -> runtime.unlock2 (1.54s)"> - <path fill="none" stroke="#b2b0a9" d="M1065.5,-230.88C1065.5,-213.12 1065.5,-184.94 1065.5,-163.21"></path> - <polygon fill="#b2b0a9" stroke="#b2b0a9" points="1069,-163.12 1065.5,-153.12 1062,-163.12 1069,-163.12"></polygon> + <title>N31->N39</title> + <g id="a_edge32"><a xlink:title="github.com/ii64/gouring.(*IoUring)._io_uring_get_cqe -> github.com/ii64/gouring.io_uring_enter2 (1.82s)"> + <path fill="none" stroke="#b2b0a9" d="M1012,-401.82C1012,-384.02 1012,-361.13 1012,-343.47"></path> + <polygon fill="#b2b0a9" stroke="#b2b0a9" points="1015.5,-343.24 1012,-333.24 1008.5,-343.24 1015.5,-343.24"></polygon> </a> </g> - <g id="a_edge32-label"><a xlink:title="runtime.unlockWithRank -> runtime.unlock2 (1.54s)"> - <text text-anchor="middle" x="1082.5" y="-176.8" font-family="Times,serif" font-size="14.00"> 1.54s</text> + <g id="a_edge32-label"><a xlink:title="github.com/ii64/gouring.(*IoUring)._io_uring_get_cqe -> github.com/ii64/gouring.io_uring_enter2 (1.82s)"> + <text text-anchor="middle" x="1029" y="-358.8" font-family="Times,serif" font-size="14.00"> 1.82s</text> + </a> + </g> + </g> + <!-- N32->N30 --> + <g id="edge39" class="edge"> + <title>N32->N30</title> + <g id="a_edge39"><a xlink:title="github.com/ii64/gouring.(*IoUring).SeenCqe -> github.com/ii64/gouring.(*IoUring).io_uring_cqe_seen (1.09s)"> + <path fill="none" stroke="#b2b1ad" d="M943.33,-961.81C944.17,-943.97 945.27,-920.68 946.2,-901.19"></path> + <polygon fill="#b2b1ad" stroke="#b2b1ad" points="949.7,-901.26 946.67,-891.11 942.7,-900.93 949.7,-901.26"></polygon> + </a> + </g> + <g id="a_edge39-label"><a xlink:title="github.com/ii64/gouring.(*IoUring).SeenCqe -> github.com/ii64/gouring.(*IoUring).io_uring_cqe_seen (1.09s)"> + <text text-anchor="middle" x="967" y="-932.8" font-family="Times,serif" font-size="14.00"> 1.09s</text> + <text text-anchor="middle" x="967" y="-917.8" font-family="Times,serif" font-size="14.00"> (inline)</text> + </a> + </g> + </g> + <!-- N33->N7 --> + <g id="edge10" class="edge"> + <title>N33->N7</title> + <g id="a_edge10"><a xlink:title="github.com/ii64/gouring.PrepNop -> github.com/ii64/gouring.PrepRW (27.87s)"> + <path fill="none" stroke="#b26328" d="M1062.12,-966.71C1064.38,-949.8 1067.51,-926.43 1070.22,-906.16"></path> + <polygon fill="#b26328" stroke="#b26328" points="1073.7,-906.57 1071.56,-896.19 1066.76,-905.64 1073.7,-906.57"></polygon> + </a> + </g> + <g id="a_edge10-label"><a xlink:title="github.com/ii64/gouring.PrepNop -> github.com/ii64/gouring.PrepRW (27.87s)"> + <text text-anchor="middle" x="1091" y="-932.8" font-family="Times,serif" font-size="14.00"> 27.87s</text> + <text text-anchor="middle" x="1091" y="-917.8" font-family="Times,serif" font-size="14.00"> (inline)</text> + </a> + </g> + </g> + <!-- N34->N14 --> + <g id="edge16" class="edge"> + <title>N34->N14</title> + <g id="a_edge16"><a xlink:title="github.com/ii64/gouring.(*IoUring).io_uring_get_sqe -> github.com/ii64/gouring.(*IoUring)._io_uring_get_sqe (9.04s)"> + <path fill="none" stroke="#b2a085" d="M602.36,-832.95C601.34,-815.47 600,-792.51 598.81,-772.19"></path> + <polygon fill="#b2a085" stroke="#b2a085" points="602.3,-771.92 598.23,-762.15 595.32,-772.33 602.3,-771.92"></polygon> + </a> + </g> + <g id="a_edge16-label"><a xlink:title="github.com/ii64/gouring.(*IoUring).io_uring_get_sqe -> github.com/ii64/gouring.(*IoUring)._io_uring_get_sqe (9.04s)"> + <text text-anchor="middle" x="618" y="-791.3" font-family="Times,serif" font-size="14.00"> 9.04s</text> + </a> + </g> + </g> + <!-- N37 --> + <g id="node37" class="node"> + <title>N37</title> + <g id="a_node37"><a xlink:title="github.com/ii64/gouring.(*IoUring).__io_uring_get_cqe (1.86s)"> + <polygon fill="#edeceb" stroke="#b2b0a9" points="1051.5,-601 972.5,-601 972.5,-557 1051.5,-557 1051.5,-601"></polygon> + <text text-anchor="middle" x="1012" y="-590.6" font-family="Times,serif" font-size="8.00">gouring</text> + <text text-anchor="middle" x="1012" y="-581.6" font-family="Times,serif" font-size="8.00">(*IoUring)</text> + <text text-anchor="middle" x="1012" y="-572.6" font-family="Times,serif" font-size="8.00">__io_uring_get_cqe</text> + <text text-anchor="middle" x="1012" y="-563.6" font-family="Times,serif" font-size="8.00">0 of 1.86s (1.03%)</text> + </a> + </g> + </g> + <!-- N35->N37 --> + <g id="edge31" class="edge"> + <title>N35->N37</title> + <g id="a_edge31"><a xlink:title="github.com/ii64/gouring.(*IoUring).io_uring_wait_cqe_nr -> github.com/ii64/gouring.(*IoUring).__io_uring_get_cqe (1.86s)"> + <path fill="none" stroke="#b2b0a9" d="M1012,-693.95C1012,-670.15 1012,-636.04 1012,-611.35"></path> + <polygon fill="#b2b0a9" stroke="#b2b0a9" points="1015.5,-611.07 1012,-601.07 1008.5,-611.07 1015.5,-611.07"></polygon> + </a> + </g> + <g id="a_edge31-label"><a xlink:title="github.com/ii64/gouring.(*IoUring).io_uring_wait_cqe_nr -> github.com/ii64/gouring.(*IoUring).__io_uring_get_cqe (1.86s)"> + <text text-anchor="middle" x="1034" y="-654.8" font-family="Times,serif" font-size="14.00"> 1.86s</text> + <text text-anchor="middle" x="1034" y="-639.8" font-family="Times,serif" font-size="14.00"> (inline)</text> + </a> + </g> + </g> + <!-- N36->N18 --> + <g id="edge35" class="edge"> + <title>N36->N18</title> + <g id="a_edge35"><a xlink:title="syscall.RawSyscall6 -> runtime/internal/syscall.Syscall6 (1.65s)"> + <path fill="none" stroke="#b2b0aa" d="M1012,-94.52C1012,-82.38 1012,-67.4 1012,-54.29"></path> + <polygon fill="#b2b0aa" stroke="#b2b0aa" points="1015.5,-54.27 1012,-44.27 1008.5,-54.27 1015.5,-54.27"></polygon> + </a> + </g> + <g id="a_edge35-label"><a xlink:title="syscall.RawSyscall6 -> runtime/internal/syscall.Syscall6 (1.65s)"> + <text text-anchor="middle" x="1029" y="-65.8" font-family="Times,serif" font-size="14.00"> 1.65s</text> + </a> + </g> + </g> + <!-- N37->N31 --> + <g id="edge30" class="edge"> + <title>N37->N31</title> + <g id="a_edge30"><a xlink:title="github.com/ii64/gouring.(*IoUring).__io_uring_get_cqe -> github.com/ii64/gouring.(*IoUring)._io_uring_get_cqe (1.86s)"> + <path fill="none" stroke="#b2b0a9" d="M1012,-556.77C1012,-534.12 1012,-497.77 1012,-470.13"></path> + <polygon fill="#b2b0a9" stroke="#b2b0a9" points="1015.5,-470.01 1012,-460.01 1008.5,-470.01 1015.5,-470.01"></polygon> + </a> + </g> + <g id="a_edge30-label"><a xlink:title="github.com/ii64/gouring.(*IoUring).__io_uring_get_cqe -> github.com/ii64/gouring.(*IoUring)._io_uring_get_cqe (1.86s)"> + <text text-anchor="middle" x="1029" y="-503.3" font-family="Times,serif" font-size="14.00"> 1.86s</text> + </a> + </g> + </g> + <!-- N38->N29 --> + <g id="edge20" class="edge"> + <title>N38->N29</title> + <g id="a_edge20"><a xlink:title="github.com/ii64/gouring.(*IoUring).io_uring_submit -> github.com/ii64/gouring.(*IoUring).__io_uring_submit_and_wait (8.17s)"> + <path fill="none" stroke="#b2a28a" d="M733,-839.89C733,-819.27 733,-787.41 733,-762.31"></path> + <polygon fill="#b2a28a" stroke="#b2a28a" points="736.5,-762.02 733,-752.02 729.5,-762.02 736.5,-762.02"></polygon> + </a> + </g> + <g id="a_edge20-label"><a xlink:title="github.com/ii64/gouring.(*IoUring).io_uring_submit -> github.com/ii64/gouring.(*IoUring).__io_uring_submit_and_wait (8.17s)"> + <text text-anchor="middle" x="750" y="-791.3" font-family="Times,serif" font-size="14.00"> 8.17s</text> + </a> + </g> + </g> + <!-- N39->N28 --> + <g id="edge33" class="edge"> + <title>N39->N28</title> + <g id="a_edge33"><a xlink:title="github.com/ii64/gouring.io_uring_enter2 -> syscall.Syscall6 (1.82s)"> + <path fill="none" stroke="#b2b0a9" d="M1012,-296.58C1012,-284.25 1012,-267.33 1012,-252.44"></path> + <polygon fill="#b2b0a9" stroke="#b2b0a9" points="1015.5,-252.05 1012,-242.05 1008.5,-252.05 1015.5,-252.05"></polygon> + </a> + </g> + <g id="a_edge33-label"><a xlink:title="github.com/ii64/gouring.io_uring_enter2 -> syscall.Syscall6 (1.82s)"> + <text text-anchor="middle" x="1029" y="-263.8" font-family="Times,serif" font-size="14.00"> 1.82s</text> + </a> + </g> + </g> + <!-- N40->N15 --> + <g id="edge25" class="edge"> + <title>N40->N15</title> + <g id="a_edge25"><a xlink:title="runtime.lockWithRank -> runtime.lock2 (2.36s)"> + <path fill="none" stroke="#b2afa6" d="M500,-412.69C500,-395.42 500,-368.51 500,-347.46"></path> + <polygon fill="#b2afa6" stroke="#b2afa6" points="503.5,-347.37 500,-337.37 496.5,-347.37 503.5,-347.37"></polygon> + </a> + </g> + <g id="a_edge25-label"><a xlink:title="runtime.lockWithRank -> runtime.lock2 (2.36s)"> + <text text-anchor="middle" x="517" y="-358.8" font-family="Times,serif" font-size="14.00"> 2.36s</text> + </a> + </g> + </g> + <!-- N41->N17 --> + <g id="edge28" class="edge"> + <title>N41->N17</title> + <g id="a_edge28"><a xlink:title="runtime.unlockWithRank -> runtime.unlock2 (1.89s)"> + <path fill="none" stroke="#b2b0a9" d="M402,-412.69C402,-395.42 402,-368.51 402,-347.46"></path> + <polygon fill="#b2b0a9" stroke="#b2b0a9" points="405.5,-347.37 402,-337.37 398.5,-347.37 405.5,-347.37"></polygon> + </a> + </g> + <g id="a_edge28-label"><a xlink:title="runtime.unlockWithRank -> runtime.unlock2 (1.89s)"> + <text text-anchor="middle" x="419" y="-358.8" font-family="Times,serif" font-size="14.00"> 1.89s</text> </a> </g> </g> diff --git a/atomic.go b/atomic.go new file mode 100644 index 0000000..2316f0e --- /dev/null +++ b/atomic.go @@ -0,0 +1,13 @@ +package gouring + +import _ "unsafe" + +var io_uring_smp_mb = io_uring_smp_mb_fallback + +func io_uring_smp_mb_fallback() +func io_uring_smp_mb_mfence() + +func init() { + // temporary + io_uring_smp_mb = io_uring_smp_mb_mfence +} diff --git a/atomic_amd64.s b/atomic_amd64.s new file mode 100644 index 0000000..ca88946 --- /dev/null +++ b/atomic_amd64.s @@ -0,0 +1,12 @@ +#include "go_asm.h" +#include "funcdata.h" +#include "textflag.h" + +TEXT ·io_uring_smp_mb_fallback(SB), NOSPLIT, $0 + LOCK + ORQ $0, 0(SP) + RET + +TEXT ·io_uring_smp_mb_mfence(SB), NOSPLIT, $0 + MFENCE + RET diff --git a/examples/go.mod b/examples/go.mod new file mode 100644 index 0000000..6c44fdf --- /dev/null +++ b/examples/go.mod @@ -0,0 +1,15 @@ +module github.com/ii64/gouring/examples + +go 1.20 + +replace github.com/ii64/gouring => ../ + +require ( + github.com/ii64/gouring v0.0.0-00010101000000-000000000000 + golang.org/x/sys v0.7.0 +) + +require ( + github.com/alphadose/haxmap v1.2.0 // indirect + golang.org/x/exp v0.0.0-20221031165847-c99f073a8326 // indirect +) diff --git a/examples/go.sum b/examples/go.sum new file mode 100644 index 0000000..5319aaf --- /dev/null +++ b/examples/go.sum @@ -0,0 +1,10 @@ +github.com/alphadose/haxmap v1.2.0 h1:noGrAmCE+gNheZ4KpW+sYj9W5uMcO1UAjbAq9XBOAfM= +github.com/alphadose/haxmap v1.2.0/go.mod h1:rjHw1IAqbxm0S3U5tD16GoKsiAd8FWx5BJ2IYqXwgmM= +github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY= +golang.org/x/exp v0.0.0-20221031165847-c99f073a8326 h1:QfTh0HpN6hlw6D3vu8DAwC8pBIwikq0AI1evdm+FksE= +golang.org/x/exp v0.0.0-20221031165847-c99f073a8326/go.mod h1:CxIveKay+FTh1D0yPZemJVgC/95VzuuOLq5Qi4xnoYc= +golang.org/x/sys v0.7.0 h1:3jlCCIQZPdOYu1h8BkNvLz8Kgwtae2cagcG/VamtZRU= +golang.org/x/sys v0.7.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo= diff --git a/examples/nvme/nvme.go b/examples/nvme/nvme.go new file mode 100644 index 0000000..b280592 --- /dev/null +++ b/examples/nvme/nvme.go @@ -0,0 +1,174 @@ +package main + +import ( + "fmt" + "syscall" + "unsafe" + + uring "github.com/ii64/gouring" + nvme "github.com/ii64/gouring/nvme" + "golang.org/x/sys/unix" +) + +// NOTICE NOTICE NOTICE NOTICE NOTICE +// +// This example is performing **READ** access to NVMe via low-level control device. +// +// NOTICE NOTICE NOTICE NOTICE NOTICE + +var ( + // hardcoded device path + // devicePath = "/dev/nvme0n1" + devicePath = "/dev/ng0n1" + + nsid uint32 + lbaSize uint32 + lbaShift int + BS uint64 = 8192 +) + +func DoNvmeGetInfo(devPath string) error { + fd, err := unix.Open(devPath, unix.O_RDONLY, 0) + if err != nil { + return err + } + defer func() { + if err := unix.Close(fd); err != nil { + panic(err) + } + }() + + var ( + ns nvme.NvmeIdNs + cmd nvme.NvmePassthruCmd + ) + + nsidRet, err := sys_ioctl(fd, uintptr(nvme.NVME_IOCTL_ID()), 0) + if err != nil { + return err + } + nsid = uint32(nsidRet) + + cmd = nvme.NvmePassthruCmd{ + Opcode: nvme.NVME_ADMIN_IDENTIFY, + Nsid: nsid, + Addr: uint64(uintptr(unsafe.Pointer(&ns))), + DataLen: nvme.NVME_IDENTIFY_DATA_SIZE, + Cdw10: nvme.NVME_IDENTIFY_CNS_NS, + Cdw11: nvme.NVME_CSI_NVM << nvme.NVME_IDENTIFY_CSI_SHIFT, + TimeoutMs: nvme.NVME_DEFAULT_IOCTL_TIMEOUT, + } + _, err = sys_ioctl(fd, uintptr(nvme.NVME_IOCTL_ADMIN_CMD()), uintptr(unsafe.Pointer(&cmd))) + if err != nil { + return err + } + + lbaSize = 1 << ns.Lbaf[(ns.Flbas&0x0F)].Ds + lbaShift = ilog2(uint32(lbaSize)) + + return nil +} + +func DoIoUring(devPath string) error { + ring, err := uring.New(64, + uring.IORING_SETUP_IOPOLL| + uring.IORING_SETUP_SQE128|uring.IORING_SETUP_CQE32) + if err != nil { + return err + } + defer ring.Close() + + fd, err := unix.Open(devicePath, unix.O_RDONLY, 0) // 0 as it O_RDONLY + if err != nil { + panic(err) + } + defer unix.Close(fd) + + var bufs [10][0x1000]byte + var sqe *uring.IoUringSqe + sqe = ring.GetSqe() + + buf := bufs[1] + bufSz := len(buf) + uring.PrepRead(sqe, fd, &buf[0], bufSz, 0) + + sqe.SetCmdOp(uint32(nvme.NVME_URING_CMD_IO())) + sqe.Opcode = uring.IORING_OP_URING_CMD + + var off uint64 = 0 + var i uint32 = 1 + sqe.UserData.SetUint64(uint64(off<<32) | uint64(i)) // temp + + var slba uint64 = off >> lbaShift + var nlb uint64 = BS>>lbaShift - 1 + // zero and init + cmd := nvme.NvmeUringCmd{ + Opcode: nvme.NVME_CMD_READ, + + // cdw10 and cdw11 represent starting lba + Cdw10: uint32(slba & 0xffff_ffff), + Cdw11: uint32(slba >> 32), + // represent number of lba's for read/write + Cdw12: uint32(nlb), + + Nsid: nsid, + + Addr: uint64(uintptr(unsafe.Pointer(&buf[0]))), + DataLen: uint32(bufSz), + } + cmdPtr := (*nvme.NvmeUringCmd)(sqe.GetCmd()) + *cmdPtr = cmd // copy + + fmt.Printf("CMD %+#v\n", cmdPtr) + + submitted, err := ring.SubmitAndWait(1) + if err != nil { + return err + } + fmt.Println("submitted", submitted) + + var cqe *uring.IoUringCqe + // for i := 0; i < 2; i++ { + if err := ring.WaitCqe(&cqe); err != nil { + return err + } + fmt.Printf("CQE:\t%+#v\n", cqe) + cqeExtra := (*[2]uint64)(cqe.GetBigCqe()) + fmt.Printf("CQE Extra:\t%+#v\n", cqeExtra) + fmt.Printf("Buffer: %+#v\n", buf) + fmt.Printf("=========\n") + ring.SeenCqe(cqe) + // } + return nil +} + +func main() { + err := DoNvmeGetInfo(devicePath) + if err != nil { + panic(err) + } + fmt.Printf("lbaSize: %d lbaShift: %d\n", lbaSize, lbaShift) + + if err := DoIoUring(devicePath); err != nil { + panic(err) + } + +} + +func sys_ioctl(fd int, a1, a2 uintptr) (int, error) { + r1, _, err := syscall.Syscall(syscall.SYS_IOCTL, + uintptr(fd), a1, a2) + if err != 0 { + return 0, err + } + return int(r1), nil +} + +func ilog2(i uint32) int { + log := -1 + for i > 0 { + i >>= 1 + log++ + } + return log +} diff --git a/examples/read-write-memfd/main.go b/examples/read-write-memfd/main.go new file mode 100644 index 0000000..aec733e --- /dev/null +++ b/examples/read-write-memfd/main.go @@ -0,0 +1,132 @@ +package main + +import ( + "bytes" + "fmt" + "reflect" + "runtime" + "syscall" + "time" + "unsafe" + + uring "github.com/ii64/gouring" + "golang.org/x/sys/unix" +) + +func main() { + ring, err := uring.New(64, 0) + if err != nil { + panic(err) + } + defer ring.Close() + + fd, err := unix.MemfdCreate("mymemfd", unix.MFD_CLOEXEC) + if err != nil { + panic(err) + } + defer unix.Close(fd) + + const BSIZE = 512 + unix.Ftruncate(fd, BSIZE) + + addr, err := mmap(nil, BSIZE, syscall.PROT_READ|syscall.PROT_WRITE|syscall.PROT_EXEC, syscall.MAP_SHARED, fd, 0) + if err != nil { + panic(err) + } + defer munmap(addr, BSIZE) + + var rbuf []byte + sh := (*reflect.SliceHeader)(unsafe.Pointer(&rbuf)) + sh.Data = uintptr(addr) + sh.Cap = BSIZE + sh.Len = BSIZE + + tnow := func() string { return fmt.Sprintf("CLOCK:%d\n", time.Now().UnixMilli()) } + + go func() { + flen := len(tnow()) + // monitor written bytes + for { + // copy + payload := string(rbuf[:flen]) + fmt.Printf("> %q\n", payload) + time.Sleep(time.Millisecond * 50) + } + }() + + var buf [BSIZE]byte + refresh := func() int { + b := []byte(tnow()) + copy(buf[:], b) + return len(b) + } + + qWrite := func() { + sqe := ring.GetSqe() + uring.PrepWrite(sqe, fd, &buf[0], refresh(), 0) + sqe.UserData.SetUint64(0xaaaaaaaa) + } + qRead := func() { + sqe := ring.GetSqe() + uring.PrepRead(sqe, fd, &buf[0], len(buf), 0) + sqe.UserData.SetUint64(0xbbbbbbbb) + } + + qWrite() + + submitted, err := ring.SubmitAndWait(1) + if err != nil { + panic(err) + } + println("submitted:", submitted) + + var cqe *uring.IoUringCqe + for { + err = ring.WaitCqe(&cqe) + switch err { + case syscall.EINTR, syscall.EAGAIN, syscall.ETIME: + runtime.Gosched() + continue + case nil: + goto cont + default: + panic(err) + } + cont: + switch cqe.UserData { + case 0xaaaaaaaa: + qRead() + case 0xbbbbbbbb: + // verify + if !bytes.Equal(buf[:], rbuf) { + panic("check failed") + } + qWrite() + } + + ring.SeenCqe(cqe) + submitted, err := ring.Submit() + if err != nil { + panic(err) + } else { + _ = submitted + // println("submitted:", submitted) + } + } + +} + +//go:linkname mmap syscall.mmap +func mmap(addr unsafe.Pointer, length uintptr, prot int, flags int, fd int, offset int64) (xaddr unsafe.Pointer, err error) + +//go:linkname munmap syscall.munmap +func munmap(addr unsafe.Pointer, length uintptr) (err error) + +func msync(addr unsafe.Pointer, length uintptr, flags uintptr) error { + r1, _, e1 := syscall.Syscall(syscall.SYS_MSYNC, uintptr(addr), length, flags) + if e1 != 0 { + return syscall.Errno(e1) + } + _ = r1 + return nil +} diff --git a/examples/read-write/read_write.go b/examples/read-write/read_write.go new file mode 100644 index 0000000..0f25579 --- /dev/null +++ b/examples/read-write/read_write.go @@ -0,0 +1,84 @@ +package main + +import ( + "bytes" + "fmt" + "log" + "syscall" + + uring "github.com/ii64/gouring" + "golang.org/x/sys/unix" +) + +func main() { + ring, err := uring.New(256, 0) + if err != nil { + log.Fatal(err) + } + defer ring.Close() + + fd, err := unix.Open("/tmp/test", unix.O_RDWR|unix.O_CREAT, 0677) + if err != nil { + panic(err) + } + + sqe := ring.GetSqe() + b := []byte("hello from io_uring!\n") + uring.PrepWrite(sqe, fd, &b[0], len(b), 0) + sqe.UserData.SetUint64(0x0001) + sqe.Flags |= uring.IOSQE_IO_LINK + + sqe = ring.GetSqe() + uring.PrepWrite(sqe, syscall.Stdout, &b[0], len(b), 0) + sqe.UserData.SetUint64(0x0002) + sqe.Flags |= uring.IOSQE_IO_LINK + + sqe = ring.GetSqe() + var buf = make([]byte, len(b)) + uring.PrepRead(sqe, fd, &buf[0], len(buf), 0) + sqe.UserData.SetUint64(0x0003) + sqe.Flags |= uring.IOSQE_IO_LINK + + sqe = ring.GetSqe() + uring.PrepClose(sqe, fd) + sqe.UserData.SetUint64(0x0004) + + const N = 4 + submitted, err := ring.SubmitAndWait(N) + if err != nil { /*...*/ + log.Fatal(err) + } + println(submitted) // 1 + + var cqe *uring.IoUringCqe + for i := 1; i <= N; i++ { + err = ring.WaitCqe(&cqe) + if err != nil { + log.Fatal(err) + } // check also EINTR + if cqe == nil { + log.Fatal("CQE is NULL!") + } + log.Printf("CQE: %+#v\n", cqe) + if uring.UserData(i) != cqe.UserData { + panic("UNORDERED") + } + + if cqe.Res < 0 { + panic(syscall.Errno(-cqe.Res)) + } + + if i == 0x0003 { + retvb := buf[:cqe.Res] + fmt.Printf("retv buf %+#v\n", retvb) + if !bytes.Equal(b, retvb) { + panic("RET BUF NOT EQ") + } + } + + ring.SeenCqe(cqe) + } + _ = cqe.UserData + _ = cqe.Res + _ = cqe.Flags +} diff --git a/examples/simple-eventloop/lib/lib.go b/examples/simple-eventloop/lib/lib.go new file mode 100644 index 0000000..30f01f9 --- /dev/null +++ b/examples/simple-eventloop/lib/lib.go @@ -0,0 +1,438 @@ +package lib + +import ( + "context" + "encoding/json" + "fmt" + "net" + "net/http" + "runtime" + "strings" + "sync" + "sync/atomic" + "syscall" + "time" + "unsafe" + + "github.com/alphadose/haxmap" + uring "github.com/ii64/gouring" +) + +type Context interface { + Read() + Write(buf []byte) + Close() + + SetContext(ctx context.Context) + Context() context.Context +} + +type EventHandler interface { + OnAccept(ctx Context, sa syscall.Sockaddr) + OnRead(ctx Context, buf []byte) + OnWrite(ctx Context, nb int) + OnClose(ctx Context) +} + +type eventContext struct { + evloop *Eventloop + ud *myUserdata +} + +func (e *eventContext) SetContext(ctx context.Context) { + e.ud.ctx = ctx +} +func (e *eventContext) Context() context.Context { + return e.ud.ctx +} + +func (e eventContext) Read() { + key, lud := e.evloop.allocUserdata() + sqe := e.evloop.queueRead(e.ud.fd, key) + lud.init(sqe.Opcode) + e.ud.copyTo(lud) + sqe.UserData = key +} +func (e eventContext) Write(b []byte) { + key, lud := e.evloop.allocUserdata() + sqe := e.evloop.queueWrite(e.ud.fd, key, b) + lud.init(sqe.Opcode) + e.ud.copyTo(lud) + sqe.UserData = key +} +func (e eventContext) Close() { + key, lud := e.evloop.allocUserdata() + sqe := e.evloop.queueClose(e.ud.fd, key) + lud.init(sqe.Opcode) + e.ud.copyTo(lud) + sqe.UserData = key +} + +type myUserdata struct { + ctx context.Context + rsa syscall.RawSockaddrAny + rsaSz uintptr + fd int + flag uint64 + bid int // buffer id + op uring.IoUringOp +} + +func (ud *myUserdata) init(op uring.IoUringOp) { + ud.op = op + ud.rsaSz = unsafe.Sizeof(ud.rsa) +} + +func (ud *myUserdata) copyTo(dst *myUserdata) { + oldOp := dst.op + *dst = *ud + dst.op = oldOp +} + +type Eventloop struct { + ring *uring.IoUring + fd int + bufSize, bufCount int + buffers []byte + handler EventHandler + sema *uint64 + userdata *haxmap.Map[uring.UserData, *myUserdata] + bufGroup uint16 +} + +func New(ent uint32, listenFd int, handler EventHandler) *Eventloop { + ring, err := uring.NewWithParams(ent, &uring.IoUringParams{ + Flags: uring.IORING_SETUP_SQPOLL, + SqThreadIdle: 2000, + }) + if err != nil { + panic(err) + } + bufSize := 0x1000 + bufCount := 2048 + var bufGroup uint16 = 0xffff + evloop := &Eventloop{ + fd: listenFd, + ring: ring, + bufSize: bufSize, + bufCount: bufCount, + bufGroup: bufGroup, + buffers: make([]byte, bufCount*bufSize), + userdata: haxmap.New[uring.UserData, *myUserdata](), + handler: handler, + sema: new(uint64), + } + if err := evloop.init(); err != nil { + panic(err) + } + go evloop.runDebugInterface() + return evloop +} + +func (e *Eventloop) runDebugInterface() { + mux := http.NewServeMux() + mux.HandleFunc("/submit", func(w http.ResponseWriter, r *http.Request) { + dec := json.NewDecoder(r.Body) + defer r.Body.Close() + + type SubmitRequest struct { + EventName string `json:"en"` + Fd int `json:"fd"` + Data any `json:"d"` + } + + var req SubmitRequest + if err := dec.Decode(&req); err != nil { + w.WriteHeader(http.StatusInternalServerError) + fmt.Printf("debug iface error: %s\n", err) + return + } + + cx := &eventContext{ + evloop: e, + ud: &myUserdata{ + ctx: r.Context(), + fd: req.Fd, + }, + } + + switch strings.ToUpper(strings.Trim(req.EventName, " ")) { + case "WRITE": + cx.Write([]byte("DEBUG!\n")) + case "READ": + cx.Read() + case "CLOSE": + cx.Close() + } + + if _, err := e.ring.Submit(); err != nil { + goto errInvalid + } + w.WriteHeader(http.StatusOK) + return + errInvalid: + w.WriteHeader(http.StatusInternalServerError) + }) + srv := &http.Server{ + Addr: ":19110", + Handler: mux, + } + if err := srv.ListenAndServe(); err != nil { + panic(err) + } +} + +var udPool = sync.Pool{ + New: func() any { + return new(myUserdata) + }, +} + +func (e *Eventloop) allocUserdata() (key uring.UserData, val *myUserdata) { + // val = udPool.Get().(*myUserdata) + val = new(myUserdata) + key.SetUnsafe(unsafe.Pointer(val)) + e.userdata.Set(key, val) + return +} +func (e *Eventloop) freeUserdata(key uring.UserData) { + // v, exist := e.userdata.Get(key) + // if exist { + // udPool.Put(v) + e.userdata.Del(key) + // } +} + +func (e *Eventloop) getBuf(bid int) []byte { + start := e.bufSize * bid + end := start + e.bufSize + return e.buffers[start:end] +} + +func (e *Eventloop) init() error { + // queue accept mshot + sqe := e.ring.GetSqe() + key, ud := e.allocUserdata() + uring.PrepAcceptMultishot(sqe, e.fd, &ud.rsa, &ud.rsaSz, 0) + ud.init(sqe.Opcode) + sqe.UserData = key + + // queue init provide buffers + sqe = e.ring.GetSqe() + uring.PrepProvideBuffers(sqe, unsafe.Pointer(&e.buffers[0]), e.bufSize, e.bufCount, e.bufGroup, 0) + + // wait for init provide buffers + submitted, err := e.ring.SubmitAndWait(1) + if err != nil { + return err + } + if submitted != 2 { + panic("MUST submit 2 sqes") + } + + var cqe *uring.IoUringCqe + if err = e.ring.WaitCqe(&cqe); err != nil { + return err + } + if cqe.Res < 0 { + err = syscall.Errno(-cqe.Res) + return err + } + e.ring.SeenCqe(cqe) + return nil +} + +func (e *Eventloop) queueProvideBuffer(bid int, ud uring.UserData) *uring.IoUringSqe { + fmt.Printf("[DEBUG] QU:PRV_BUF\n") + sqe := e.ring.GetSqe() + uring.PrepProvideBuffers(sqe, unsafe.Pointer(&e.getBuf(bid)[0]), e.bufSize, 1, e.bufGroup, bid) + sqe.UserData = ud + sqe.Flags |= uring.IOSQE_IO_LINK + return sqe +} +func (e *Eventloop) queueRead(fd int, ud uring.UserData) *uring.IoUringSqe { + fmt.Printf("[DEBUG] QU:READ fd=%d\n", fd) + sqe := e.ring.GetSqe() + uring.PrepRead(sqe, fd, nil, e.bufSize, 0) + sqe.Flags |= uring.IOSQE_BUFFER_SELECT + sqe.Flags |= uring.IOSQE_IO_LINK + sqe.SetBufGroup(e.bufGroup) + sqe.UserData = ud + return sqe +} +func (e *Eventloop) queueWrite(fd int, ud uring.UserData, buf []byte) *uring.IoUringSqe { + fmt.Printf("[DEBUG] QU:WRITE fd=%d\n", fd) + sqe := e.ring.GetSqe() + uring.PrepWrite(sqe, fd, &buf[0], len(buf), 0) + sqe.Flags |= uring.IOSQE_IO_LINK + sqe.UserData = ud + return sqe +} +func (e *Eventloop) queueClose(fd int, ud uring.UserData) *uring.IoUringSqe { + fmt.Printf("[DEBUG] QU:CLOSE fd=%d\n", fd) + sqe := e.ring.GetSqe() + uring.PrepClose(sqe, fd) + sqe.Flags |= uring.IOSQE_IO_LINK + sqe.UserData = ud + return sqe +} + +func (e *Eventloop) queueGraceShutdownNop() *uring.IoUringSqe { + fmt.Printf("[DEBUG] QU:GRACE_SHUTDOWN\n") + sqe := e.ring.GetSqe() + uring.PrepNop(sqe) + sqe.Flags |= uring.IOSQE_IO_LINK + + key, ud := e.allocUserdata() + ud.init(sqe.Opcode) + ud.fd = e.fd + ud.flag = 0xDEAD_DEAD_DEAD_DEAD + + sqe.UserData = key + return sqe +} + +func (e *Eventloop) Run() { + var cqe *uring.IoUringCqe + var err error + var i = 0 + + var pokeCounter uint64 = 0 + qEventPoke := func() { + sqe := e.ring.GetSqe() + uring.PrepNop(sqe) + sqe.UserData = 0xBEEF_BEEF_BEEF_BEEF + atomic.AddUint64(&pokeCounter, 1) + if _, err := e.ring.Submit(); err != nil { + panic(err) + } + } + if false { + go func() { + for { + fmt.Printf("[MON] POKE COUNT: %d\n", pokeCounter) + time.Sleep(time.Second * 2) + } + }() + qEventPoke() + } + + for { + if atomic.CompareAndSwapUint64(e.sema, 1, 0) { + break + } + if err = e.ring.WaitCqe(&cqe); err == syscall.EINTR || err == syscall.EAGAIN || err == syscall.ETIME { + fmt.Printf("[DEBUG][%d] CQE WAIT err=%+#v\n", i, err) + runtime.Gosched() // relax, do other thing while waiting for IO + continue + } else if err != nil { + panic(err) + } + if cqe.UserData == 0xBEEF_BEEF_BEEF_BEEF { + e.ring.SeenCqe(cqe) + qEventPoke() + continue + } + + ctx := &eventContext{ + evloop: e, + } + ud, ok := e.userdata.Get(cqe.UserData) + if !ok { + goto skip_no_submit + } + ctx.ud = ud + + switch ud.op { + case uring.IORING_OP_NOP: + switch { + case e.fd == ud.fd && ud.flag == 0xDEAD_DEAD_DEAD_DEAD: + break + } + + case uring.IORING_OP_ACCEPT: + fmt.Printf("[DEBUG][%d] EV:ACCEPT\n", i) + var sa syscall.Sockaddr + sa, err = anyToSockaddr(&ud.rsa) + if err != nil { + panic(err) + } + fd := cqe.Res + if fd < 0 { + goto skip_no_submit + } + ud.fd = int(fd) + e.handler.OnAccept(ctx, sa) + + case uring.IORING_OP_READ: + fmt.Printf("[DEBUG][%d] EV:READ\n", i) + if !(cqe.Flags&uring.IORING_CQE_F_BUFFER != 0) { + panic("MUST PROVIDE BUFFER") + } + nb := cqe.Res + bid := uint16(cqe.Flags >> 16) + if cqe.Res <= 0 { + e.queueClose(ud.fd, cqe.UserData) + } else { + e.handler.OnRead(ctx, e.getBuf(int(bid))[:nb]) + } + e.queueProvideBuffer(int(bid), 0) + + case uring.IORING_OP_WRITE: + fmt.Printf("[DEBUG][%d] EV:WRITE\n", i) + e.handler.OnWrite(ctx, int(cqe.Res)) + + case uring.IORING_OP_CLOSE: + fmt.Printf("[DEBUG][%d] EV:CLOSE\n", i) + e.handler.OnClose(ctx) + + } + + if ud.op != uring.IORING_OP_ACCEPT { // don't remove mshot UD + e.freeUserdata(cqe.UserData) + } + + e.reportSubmit(-1) + if submitted, err := e.ring.Submit(); err != nil { + panic(err) + } else { + _ = submitted + e.reportSubmit(submitted) + } + skip_no_submit: + e.ring.SeenCqe(cqe) + i++ + } +} + +func (e *Eventloop) reportSubmit(submitted int) { + sq := &e.ring.Sq + p := (*[2]unsafe.Pointer)(unsafe.Pointer(sq)) + khead := p[0] + ktail := p[1] + fmt.Printf("submitted: %d ht=(%d,%d) kht=(%p,%p)\n", submitted, + sq.SqeHead, sq.SqeTail, + khead, ktail) +} + +func (e *Eventloop) Stop() error { + // mark spin to stop + atomic.StoreUint64(e.sema, 1) + // if the spin waiting for an event + // submit NOP with flag + e.queueGraceShutdownNop() + if _, err := e.ring.Submit(); err != nil { + return err + } + return nil +} + +func (e *Eventloop) Close() { + e.ring.Close() +} + +//go:linkname anyToSockaddr syscall.anyToSockaddr +func anyToSockaddr(rsa *syscall.RawSockaddrAny) (syscall.Sockaddr, error) + +//go:linkname sockaddrToTCP net.sockaddrToTCP +func sockaddrToTCP(sa syscall.Sockaddr) net.Addr diff --git a/examples/simple-eventloop/main.go b/examples/simple-eventloop/main.go new file mode 100644 index 0000000..b38a8b0 --- /dev/null +++ b/examples/simple-eventloop/main.go @@ -0,0 +1,153 @@ +package main + +import ( + "bytes" + "context" + "fmt" + "net" + "net/http" + "os" + "os/signal" + "strconv" + "sync" + "syscall" + "time" + + "github.com/ii64/gouring/examples/simple-eventloop/lib" + "golang.org/x/sys/unix" +) + +type myEchoServer struct{} + +func (h myEchoServer) OnAccept(ctx lib.Context, sa syscall.Sockaddr) { + fmt.Printf("accept: %+#v\n", sa) + ctx.SetContext(context.Background()) + ctx.Read() +} +func (h myEchoServer) OnRead(ctx lib.Context, b []byte) { + sctx := ctx.Context() + fmt.Printf("read ctx %+#v %+#v\n", sctx, b) + ctx.Write(b) +} +func (h myEchoServer) OnWrite(ctx lib.Context, nb int) { + ctx.Read() +} +func (h myEchoServer) OnClose(ctx lib.Context) { +} + +type myHTTP11Server struct{} + +func (h myHTTP11Server) OnAccept(ctx lib.Context, sa syscall.Sockaddr) { + ctx.Read() +} +func (h myHTTP11Server) OnRead(ctx lib.Context, b []byte) { + statusCode := http.StatusOK + + if !bytes.HasPrefix(b, []byte("GET /")) { + statusCode = 400 + } + + statusText := http.StatusText(statusCode) + header := []byte(fmt.Sprintf("HTTP/1.1 %d %s\r\nServer: gouring-simple-evloop\r\nConnection: closed\r\nContent-Length: %d\r\n\r\n", + statusCode, statusText, + len(b))) + buf := make([]byte, len(header)+len(b)) + copy(buf[0:], header) + copy(buf[len(header):], b) + + ctx.Write(buf) +} +func (h myHTTP11Server) OnWrite(ctx lib.Context, nb int) { + ctx.Close() +} +func (h myHTTP11Server) OnClose(ctx lib.Context) { +} + +func runServer(wg *sync.WaitGroup, ctx context.Context, addr string, handler lib.EventHandler) { + defer wg.Done() + + lis, err := net.Listen("tcp", addr) + if err != nil { + panic(err) + } + defer lis.Close() + file, err := lis.(*net.TCPListener).File() + if err != nil { + panic(err) + } + defer file.Close() + fd := file.Fd() + + unix.SetsockoptInt(int(fd), unix.SOL_SOCKET, unix.SO_REUSEPORT, 1) + unix.SetsockoptInt(int(fd), unix.SOL_SOCKET, unix.SO_REUSEADDR, 1) + evloop := lib.New(32, int(fd), handler) + defer evloop.Close() + + go func() { + <-ctx.Done() + if err := evloop.Stop(); err != nil { + panic(err) + } + }() + + evloop.Run() +} + +func runClientEcho(ctx context.Context, id, serverAddr string) { + var c net.Conn + var err error + for { + if c, err = net.Dial("tcp", serverAddr); err == nil { + break + } + time.Sleep(time.Second) + } + defer c.Close() + + var buf [512]byte + var nb int + i := 0 + for ctx.Err() == nil { + c.SetReadDeadline(time.Now().Add(time.Second * 4)) + var wnb int + payload := []byte(fmt.Sprintf("ECHO[%s]:%d", id, time.Now().UnixMilli())) + if wnb, err = c.Write(payload); err != nil { + fmt.Printf("CLIENT[%s] seq=%d WRITE err=%q\n", id, i, err) + // panic(err) + continue + } + if nb, err = c.Read(buf[:]); err != nil { + fmt.Printf("CLIENT[%s] seq=%d READ err=%q\n", id, i, err) + // panic(err) + continue + } else if wnb != nb { + panic("message size not equal") + } + b := buf[:nb] + if !bytes.Equal(payload, b) { + panic("message not equal") + } + fmt.Printf("CLIENT[%s] seq=%d: OK\n", id, i) + i++ + } +} + +func main() { + sig := make(chan os.Signal, 1) + signal.Notify(sig, os.Interrupt) + + var wg sync.WaitGroup + ctx, cancel := context.WithCancel(context.Background()) + wg.Add(1) + + go runServer(&wg, ctx, "0.0.0.0:11338", myEchoServer{}) + // go runServer(&wg, ctx, "0.0.0.0:11339", myHTTP11Server{}) + + for i := 0; i < 1; i++ { + go runClientEcho(ctx, strconv.Itoa(i), "0.0.0.0:11338") + } + + <-sig + cancel() + wg.Wait() +} diff --git a/examples/tcp-echo/tcp_echo.go b/examples/tcp-echo/tcp_echo.go new file mode 100644 index 0000000..39c8b3e --- /dev/null +++ b/examples/tcp-echo/tcp_echo.go @@ -0,0 +1,246 @@ +package main + +// Based from https://github.com/frevib/io_uring-echo-server/blob/a42497e4a7b1452329f6b2aa2cbcc25c2e422391/io_uring_echo_server.c + +import ( + "fmt" + "net" + "os" + "runtime" + "syscall" + "unsafe" + + uring "github.com/ii64/gouring" + "golang.org/x/sys/unix" +) + +const ( + OP_ACCEPT = 1 << 0 // uring.IORING_OP_ACCEPT + OP_READ = 1 << 1 // uring.IORING_OP_READ + OP_WRITE = 1 << 2 // uring.IORING_OP_WRITE + OP_PRBUF = 1 << 3 // uring.IORING_OP_PROVIDE_BUFFERS +) + +type MyUserdata struct { + Fd uint32 + Flags uint16 + BufID uint16 +} + +func UnpackUD(p uring.UserData) MyUserdata { + return *(*MyUserdata)(unsafe.Pointer(&p)) +} +func (ud MyUserdata) PackUD() uring.UserData { + return *(*uring.UserData)(unsafe.Pointer(&ud)) +} + +func _SizeChecker() { + var x [1]struct{} + _ = x[unsafe.Sizeof(MyUserdata{})-unsafe.Sizeof(uring.UserData(0))] +} + +func runServer() (err error) { + var ring *uring.IoUring + ring, err = uring.New(64, 0) + if err != nil { + return + } + defer ring.Close() + + probe := ring.GetProbeRing() + fmt.Printf("probe: %+#v\n", probe) + + var ln net.Listener + ln, err = net.Listen("tcp", "0.0.0.0:11337") + if err != nil { + return err + } + defer ln.Close() + + var file *os.File + if file, err = ln.(*net.TCPListener).File(); err != nil { + return + } + defer file.Close() + fd := int(file.Fd()) + if err = unix.SetNonblock(fd, false); err != nil { + return + } + + var ( + rsa syscall.RawSockaddrAny + rsaSz uintptr + ) + + rsaSz = unsafe.Sizeof(rsa) + + const BUF_GID = 0xdead + const BUF_SIZE = 0x1000 + const BUF_COUNT = 2048 + UD_ACCEPT_MSHOT := MyUserdata{ + Fd: uint32(fd), + Flags: OP_ACCEPT, + BufID: ^uint16(0), + }.PackUD() + var sqe *uring.IoUringSqe + var bufs [BUF_COUNT][BUF_SIZE]byte + var submitted int + + // Q accept multishot + sqe = ring.GetSqe() + uring.PrepAcceptMultishot(sqe, fd, &rsa, &rsaSz, 0) + sqe.UserData = UD_ACCEPT_MSHOT + + // Q init provide buffers + sqe = ring.GetSqe() + uring.PrepProvideBuffers(sqe, unsafe.Pointer(&bufs[0][0]), BUF_SIZE, BUF_COUNT, BUF_GID, 0) + + queueRead := func(fd int, buf *byte, nb int) *uring.IoUringSqe { + sqe := ring.GetSqe() + uring.PrepRead(sqe, fd, buf, nb, 0) + return sqe + } + queueWrite := func(fd int, buf *byte, nb int) *uring.IoUringSqe { + sqe := ring.GetSqe() + uring.PrepWrite(sqe, fd, buf, nb, 0) + return sqe + } + queueProvideBuf := func(index uint16) *uring.IoUringSqe { + sqe := ring.GetSqe() + uring.PrepProvideBuffers(sqe, unsafe.Pointer(&bufs[index]), BUF_SIZE, 1, BUF_GID, int(index)) + return sqe + } + _ = queueRead + _ = queueWrite + _ = queueProvideBuf + + // wait 1 for provide buf + if submitted, err = ring.SubmitAndWait(1); err != nil { + return + } + fmt.Printf("Submitted: %d\n", submitted) + + var cqe *uring.IoUringCqe + err = ring.WaitCqe(&cqe) // init provide buffer result + if err != nil { + panic(err) + } else if cqe.Res < 0 { + panic(syscall.Errno(-cqe.Res)) + } + ring.SeenCqe(cqe) + + for { + err = ring.WaitCqe(&cqe) + if err == syscall.EINTR { + runtime.Gosched() + continue + } else if err != nil { + return + } + ud := UnpackUD(cqe.UserData) + fmt.Printf("cqe=%+#v ud=%+#v\n", cqe, ud) + + switch { + case cqe.Res == -int32(syscall.ENOBUFS): + panic("RAN OUT OF BUFFER!") + + case ud.Flags == OP_PRBUF: + if cqe.Res < 0 { + panic(syscall.Errno(-cqe.Res)) + } + + case ud.Flags == OP_ACCEPT: + var sa syscall.Sockaddr + sa, err = anyToSockaddr(&rsa) + if err != nil { + panic(err) + } + fd := cqe.Res + fmt.Printf("CQE=%+#v rsaSz=%d sa=%+#v\n", cqe, rsaSz, sa) + + if fd < 0 { + goto skip_no_submit + } + + // Read from client socket + sqe = queueRead(int(fd), nil, BUF_COUNT) + sqe.Flags |= 0 | + uring.IOSQE_BUFFER_SELECT + sqe.SetBufGroup(BUF_GID) + sqe.UserData = MyUserdata{ + Fd: uint32(fd), + Flags: OP_READ, + BufID: ^uint16(0), + }.PackUD() + + case ud.Flags == OP_READ: + if !(cqe.Flags&uring.IORING_CQE_F_BUFFER != 0) { + panic("MUST PROVIDE BUFFER") + } + nb := cqe.Res + bid := uint16(cqe.Flags >> 16) + if cqe.Res <= 0 { + // read failed, re-add the buffer + sqe = queueProvideBuf(bid) + sqe.UserData = MyUserdata{ + Fd: ud.Fd, + Flags: OP_PRBUF, + BufID: ^uint16(0), + }.PackUD() + // connection closed or error + syscall.Close(int(ud.Fd)) + } else { + // bytes have been read into bufs, now add write to socket sqe + sqe = queueWrite(int(ud.Fd), &bufs[bid][0], int(nb)) + sqe.UserData = MyUserdata{ + Fd: ud.Fd, + Flags: OP_WRITE, + BufID: bid, + }.PackUD() + } + case ud.Flags == OP_WRITE: + // write has been completed, first re-add the buffer + sqe = queueProvideBuf(ud.BufID) + sqe.UserData = MyUserdata{ + Fd: ud.Fd, + Flags: OP_PRBUF, + BufID: ^uint16(0), + }.PackUD() + + // Read from client socket + sqe = queueRead(int(ud.Fd), nil, BUF_COUNT) + sqe.Flags |= 0 | + uring.IOSQE_BUFFER_SELECT + sqe.SetBufGroup(BUF_GID) + sqe.UserData = MyUserdata{ + Fd: ud.Fd, + Flags: OP_READ, + BufID: ^uint16(0), + }.PackUD() + + } + + // skip: + if submitted, err = ring.Submit(); err != nil { + panic(err) + } else { + println("submitted", submitted) + } + skip_no_submit: + ring.SeenCqe(cqe) + } +} + +func main() { + + if err := runServer(); err != nil { + panic(err) + } + +} + +//go:linkname anyToSockaddr syscall.anyToSockaddr +func anyToSockaddr(rsa *syscall.RawSockaddrAny) (syscall.Sockaddr, error) + +//go:linkname sockaddrToTCP net.sockaddrToTCP +func sockaddrToTCP(sa syscall.Sockaddr) net.Addr diff --git a/go.mod b/go.mod index 546250a..e2dfd32 100644 --- a/go.mod +++ b/go.mod @@ -7,5 +7,6 @@ require github.com/stretchr/testify v1.7.0 require ( github.com/davecgh/go-spew v1.1.0 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect + golang.org/x/sys v0.1.0 // indirect gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c // indirect ) diff --git a/go.sum b/go.sum index acb88a4..4aa96cf 100644 --- a/go.sum +++ b/go.sum @@ -5,6 +5,8 @@ github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZN github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +golang.org/x/sys v0.1.0 h1:kunALQeHf1/185U1i0GOB/fy1IPRDDpuoOOqRReG57U= +golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo= diff --git a/go.work b/go.work new file mode 100644 index 0000000..febfd10 --- /dev/null +++ b/go.work @@ -0,0 +1,4 @@ +go 1.20 + +use ./examples +use ./ \ No newline at end of file diff --git a/hdr.go b/hdr.go index c3d48bd..a619ceb 100644 --- a/hdr.go +++ b/hdr.go @@ -7,15 +7,26 @@ */ package gouring -import "unsafe" +import ( + "syscall" + "unsafe" +) /* * IO submission data structure (Submission Queue Entry) */ type IoUringSqe_Union1 uint64 -func (u *IoUringSqe_Union1) SetOffset(v uint64) { *u = IoUringSqe_Union1(v) } -func (u *IoUringSqe_Union1) SetAddr2(v uint64) { *u = IoUringSqe_Union1(v) } +func (u *IoUringSqe_Union1) SetOffset(v uint64) { *u = IoUringSqe_Union1(v) } +func (u *IoUringSqe_Union1) SetOffset_RawPtr(v unsafe.Pointer) { *u = IoUringSqe_Union1((uintptr)(v)) } +func (u *IoUringSqe_Union1) SetAddr2(v uint64) { *u = IoUringSqe_Union1(v) } +func (u *IoUringSqe_Union1) SetAddr2_RawPtr(v unsafe.Pointer) { *u = IoUringSqe_Union1((uintptr)(v)) } +func (u *IoUringSqe_Union1) SetCmdOp(v uint32) { + (*struct { + CmdOp uint32 + __pad1 uint32 + })(unsafe.Pointer(u)).CmdOp = v +} type IoUringSqe_Union2 uint64 @@ -26,6 +37,7 @@ func (u *IoUringSqe_Union2) SetSpliceOffsetIn(v uint64) { *u = IoUringSqe_Union2 type IoUringSqe_Union3 uint32 func (u *IoUringSqe_Union3) SetRwFlags(v uint32) { *u = IoUringSqe_Union3(v) } +func (u *IoUringSqe_Union3) SetFsyncFlags(v uint32) { *u = IoUringSqe_Union3(v) } func (u *IoUringSqe_Union3) SetPollEvents(v uint16) { *u = IoUringSqe_Union3(v) } func (u *IoUringSqe_Union3) SetPoll32Events(v uint32) { *u = IoUringSqe_Union3(v) } func (u *IoUringSqe_Union3) SetSyncRangeFlags(v uint32) { *u = IoUringSqe_Union3(v) } @@ -41,6 +53,8 @@ func (u *IoUringSqe_Union3) SetRenameFlags(v uint32) { *u = IoUringSqe_Union3 func (u *IoUringSqe_Union3) SetUnlinkFlags(v uint32) { *u = IoUringSqe_Union3(v) } func (u *IoUringSqe_Union3) SetHardlinkFlags(v uint32) { *u = IoUringSqe_Union3(v) } func (u *IoUringSqe_Union3) SetXattrFlags(v uint32) { *u = IoUringSqe_Union3(v) } +func (u *IoUringSqe_Union3) SetMsgRingFlags(v uint32) { *u = IoUringSqe_Union3(v) } +func (u *IoUringSqe_Union3) SetUringCmdFlags(v uint32) { *u = IoUringSqe_Union3(v) } func (u *IoUringSqe_Union3) SetOpFlags(v uint32) { *u = IoUringSqe_Union3(v) } //generic func (u IoUringSqe_Union3) GetOpFlags() uint32 { return uint32(u) } //generic @@ -53,6 +67,21 @@ type IoUringSqe_Union5 uint32 func (u *IoUringSqe_Union5) SetSpliceFdIn(v int32) { *u = IoUringSqe_Union5(v) } func (u *IoUringSqe_Union5) SetFileIndex(v uint32) { *u = IoUringSqe_Union5(v) } +func (u *IoUringSqe_Union5) SetAddrLen(v uint16) { + s := (*[2]uint16)(unsafe.Pointer(u)) + s[0] = v // addr_len + // s[1] = 0 // __pad3[1] +} + +type IoUringSqe_Union6 [2]uint64 + +func (u *IoUringSqe_Union6) SetAddr3(v uint64) { u[0] = v } + +/* + * If the ring is initialized with IORING_SETUP_SQE128, then + * this field is used for 80 bytes of arbitrary command data + */ +func (u *IoUringSqe_Union6) GetCmd() unsafe.Pointer { return unsafe.Pointer(u) } type IoUringSqe struct { Opcode IoUringOp /* type of operation for this sqe */ @@ -63,6 +92,10 @@ type IoUringSqe struct { // union { // __u64 off; /* offset into file */ // __u64 addr2; + // struct { + // __u32 cmd_op; + // __u32 __pad1; + // }; // }; IoUringSqe_Union1 @@ -92,6 +125,8 @@ type IoUringSqe struct { // __u32 unlink_flags; // __u32 hardlink_flags; // __u32 xattr_flags; + // __u32 msg_ring_flags; + // __u32 uring_cmd_flags; // }; IoUringSqe_Union3 @@ -109,14 +144,28 @@ type IoUringSqe struct { /* personality to use, if used */ Personality uint16 - // union { - // __s32 splice_fd_in; - // __u32 file_index; - // }; + // union { + // __s32 splice_fd_in; + // __u32 file_index; + // struct { + // __u16 addr_len; + // __u16 __pad3[1]; + // }; + // }; IoUringSqe_Union5 - Addr3 uint64 - __pad2 [1]uint64 + // union { + // struct { + // __u64 addr3; + // __u64 __pad2[1]; + // }; + // /* + // * If the ring is initialized with IORING_SETUP_SQE128, then + // * this field is used for 80 bytes of arbitrary command data + // */ + // __u8 cmd[0]; + // }; + IoUringSqe_Union6 } /* @@ -187,14 +236,22 @@ const IORING_SETUP_COOP_TASKRUN = (1 << 8) * IORING_SQ_TASKRUN in the sq ring flags. Not valid with COOP_TASKRUN. */ const IORING_SETUP_TASKRUN_FLAG = (1 << 9) - const IORING_SETUP_SQE128 = (1 << 10) /* SQEs are 128 byte */ const IORING_SETUP_CQE32 = (1 << 11) /* CQEs are 32 byte */ +/* + * Only one task is allowed to submit requests + */ +const IORING_SETUP_SINGLE_ISSUER = (1 << 12) + +/* + * Defer running task work to get events. + * Rather than running bits of task work whenever the task transitions + * try to do it just before it is needed. + */ +const IORING_SETUP_DEFER_TASKRUN = (1 << 13) type IoUringOp = uint8 -//go:generate stringerx -type=IoUringOp - const ( IORING_OP_NOP IoUringOp = iota IORING_OP_READV @@ -243,11 +300,20 @@ const ( IORING_OP_GETXATTR IORING_OP_SOCKET IORING_OP_URING_CMD + IORING_OP_SEND_ZC + IORING_OP_SENDMSG_ZC /* this goes last, obviously */ IORING_OP_LAST ) +/* + * sqe->uring_cmd_flags + * IORING_URING_CMD_FIXED use registered buffer; pass thig flag + * along with setting sqe->buf_index. + */ +const IORING_URING_CMD_FIXED = (1 << 0) + /* * sqe->fsync_flags */ @@ -283,11 +349,14 @@ const SPLICE_F_FD_IN_FIXED = (1 << 31) /* the last bit of __u32 */ * * IORING_POLL_UPDATE Update existing poll request, matching * sqe->addr as the old user_data field. + * + * IORING_POLL_LEVEL Level triggered poll. */ const ( IORING_POLL_ADD_MULTI = (1 << 0) IORING_POLL_UPDATE_EVENTS = (1 << 1) IORING_POLL_UPDATE_USER_DATA = (1 << 2) + IORING_POLL_ADD_LEVEL = (1 << 3) ) /* @@ -297,11 +366,13 @@ const ( * IORING_ASYNC_CANCEL_FD Key off 'fd' for cancelation rather than the * request 'user_data' * IORING_ASYNC_CANCEL_ANY Match any request + * IORING_ASYNC_CANCEL_FD_FIXED 'fd' passed in is a fixed descriptor */ const ( - IORING_ASYNC_CANCEL_ALL = (1 << 0) - IORING_ASYNC_CANCEL_FD = (1 << 1) - IORING_ASYNC_CANCEL_ANY = (1 << 2) + IORING_ASYNC_CANCEL_ALL = (1 << 0) + IORING_ASYNC_CANCEL_FD = (1 << 1) + IORING_ASYNC_CANCEL_ANY = (1 << 2) + IORING_ASYNC_CANCEL_FD_FIXED = (1 << 3) ) /* @@ -311,14 +382,40 @@ const ( * or receive and arm poll if that yields an * -EAGAIN result, arm poll upfront and skip * the initial transfer attempt. + * IORING_RECV_MULTISHOT Multishot recv. Sets IORING_CQE_F_MORE if + * the handler will continue to report + * CQEs on behalf of the same SQE. + * + * IORING_RECVSEND_FIXED_BUF Use registered buffers, the index is stored in + * the buf_index field. */ -const IORING_RECVSEND_POLL_FIRST = (1 << 0) +const ( + IORING_RECVSEND_POLL_FIRST = (1 << 0) + IORING_RECV_MULTISHOT = (1 << 1) + IORING_RECVSEND_FIXED_BUF = (1 << 2) +) /* * accept flags stored in sqe->ioprio */ const IORING_ACCEPT_MULTISHOT = (1 << 0) +/* + * IORING_OP_MSG_RING command types, stored in sqe->addr + */ +const ( + IORING_MSG_DATA = iota /* pass sqe->len as 'res' and off as user_data */ + IORING_MSG_SEND_FD /* send a registered fd to another ring */ +) + +/* + * IORING_OP_MSG_RING flags (sqe->msg_ring_flags) + * + * IORING_MSG_RING_CQE_SKIP Don't post a CQE to the target ring. Not + * applicable for IORING_MSG_DATA, obviously. + */ +const IORING_MSG_RING_CQE_SKIP = (1 << 0) + /* * IO completion data structure (Completion Queue Entry) */ @@ -332,8 +429,6 @@ type IoUringCqe struct { * contains 16-bytes of padding, doubling the size of the CQE. */ // __u64 big_cqe[]; - - // 8+4+4 == 16 , correct } /* @@ -342,12 +437,15 @@ type IoUringCqe struct { * IORING_CQE_F_BUFFER If set, the upper 16 bits are the buffer ID * IORING_CQE_F_MORE If set, parent SQE will generate more CQE entries * IORING_CQE_F_SOCK_NONEMPTY If set, more data to read after socket recv + * IORING_CQE_F_NOTIF Set for notification CQEs. Can be used to distinct + * them from sends. */ const ( IORING_CQE_F_BUFFER = (1 << 0) IORING_CQE_F_MORE = (1 << 1) IORING_CQE_F_SOCK_NONEMPTY = (1 << 2) + IORING_CQE_F_NOTIF = (1 << 3) ) const ( @@ -493,6 +591,12 @@ const ( IORING_REGISTER_PBUF_RING = 22 IORING_UNREGISTER_PBUF_RING = 23 + /* sync cancelation API */ + IORING_REGISTER_SYNC_CANCEL = 24 + + /* register a range of fixed file slots for automatic slot allocation */ + IORING_REGISTER_FILE_ALLOC_RANGE = 25 + /* this goes last */ IORING_REGISTER_LAST ) @@ -507,7 +611,7 @@ const ( type IoUringFilesUpdate struct { Offset uint32 resv uint32 - Fds uint64 // __aligned_u64/* __s32 * */ + Fds uint64 // TODO: __aligned_u64/* __s32 * */ } /* @@ -520,25 +624,38 @@ type IoUringRsrcRegister struct { Nr uint32 Flags uint32 resv2 uint64 - Data uint64 // __aligned_u64 - Tags uint64 // __aligned_u64 + Data uint64 // TODO: __aligned_u64 + Tags uint64 // TODO: __aligned_u64 } type IoUringRsrcUpdate struct { Offset uint32 resv uint32 - Data uint64 // __aligned_u64 + Data uint64 // TODO: __aligned_u64 } type IoUringRsrcUpdate2 struct { Offset uint32 resv uint32 - Data uint64 // __aligned_u64 - Tags uint64 // __aligned_u64 + Data uint64 // TODO: __aligned_u64 + Tags uint64 // TODO: __aligned_u64 Nr uint32 resv2 uint32 } +type IoUringNotificationSlot struct { + tag uint64 + resv [3]uint64 +} + +type IoUringNotificationRegister struct { + nr_slots uint32 + resv uint32 + resv2 uint64 + data uint64 + resv3 uint64 +} + /* Skip updating fd indexes set to this value in the fd table */ const IORING_REGISTER_FILES_SKIP = (-2) @@ -553,10 +670,12 @@ type IoUringProbeOp struct { type IoUringProbe struct { last_op uint8 /* last opcode supported */ - uint8 /* length of ops[] array below */ + ops_len uint8 /* length of ops[] array below */ resv uint16 resv2 [3]uint32 - ops [0]IoUringProbeOp + + // IMPLEMENTED ON hdr_extra + // ops [0]IoUringProbeOp } type IoUringRestriction struct { @@ -590,6 +709,8 @@ type IoUringBufRing struct { resv3 uint16 Tail uint16 } + + // IMPLEMENTED ON hdr_extra // bufs [0]IoUringBuf // }; } @@ -630,6 +751,29 @@ type IoUringGeteventsArg struct { } /* - * accept flags stored in sqe->ioprio + * Argument for IORING_REGISTER_SYNC_CANCEL */ -// const IORING_ACCEPT_MULTISHOT = (1 << 0) +type IouringSyncCancelReg struct { + Addr uint64 + Fd int32 + Flags uint32 + timeout syscall.Timespec + pad [4]uint64 +} + +/* + * Argument for IORING_REGISTER_FILE_ALLOC_RANGE + * The range is specified as [off, off + len) + */ +type IoUringFileIndexRange struct { + Offset uint32 + Len uint32 + resv uint64 +} + +type IoUringRecvmsgOut struct { + Namelen uint32 + Controllen uint32 + Payloadlen uint32 + Flags uint32 +} diff --git a/hdr_extra.go b/hdr_extra.go new file mode 100644 index 0000000..9fc699b --- /dev/null +++ b/hdr_extra.go @@ -0,0 +1,39 @@ +package gouring + +import ( + "unsafe" +) + +/* + * GetBigCqe + * + * If the ring is initialized with IORING_SETUP_CQE32, then this field + * contains 16-bytes of padding, doubling the size of the CQE. + */ +func (cqe *IoUringCqe) GetBigCqe() unsafe.Pointer { + return unsafe.Add(unsafe.Pointer(cqe), SizeofIoUringCqe) +} + +/* + * GetOps + * + * Get io_uring probe ops + */ +func (probe *IoUringProbe) GetOps() unsafe.Pointer { + return unsafe.Add(unsafe.Pointer(probe), SizeofIoUringProbe) +} +func (probe *IoUringProbe) GetOpAt(index int) *IoUringProbeOp { + return (*IoUringProbeOp)(unsafe.Add(probe.GetOps(), SizeofIoUringProbeOp*uintptr(index))) +} + +/* + * GetBufs + * + * Get io_uring buf_ring bufs + */ +func (bring *IoUringBufRing) GetBufs() unsafe.Pointer { + return unsafe.Add(unsafe.Pointer(bring), SizeofIoUringBufRing) +} +func (bring *IoUringBufRing) GetBufAt(index int) *IoUringBuf { + return (*IoUringBuf)(unsafe.Add(bring.GetBufs(), SizeofIoUringBuf*uintptr(index))) +} diff --git a/hdr_struct.go b/hdr_struct.go index 0284cff..2114567 100644 --- a/hdr_struct.go +++ b/hdr_struct.go @@ -3,12 +3,29 @@ package gouring import "unsafe" const ( - SizeofUnsigned = unsafe.Sizeof(uint32(0)) - SizeofUint32 = unsafe.Sizeof(uint32(0)) - SizeofIoUringSqe = unsafe.Sizeof(IoUringSqe{}) - SizeofIoUringCqe = unsafe.Sizeof(IoUringCqe{}) + SizeofUnsigned = unsafe.Sizeof(uint32(0)) + SizeofUint32 = unsafe.Sizeof(uint32(0)) + SizeofIoUringSqe = unsafe.Sizeof(IoUringSqe{}) + Align128IoUringSqe = 64 + SizeofIoUringCqe = unsafe.Sizeof(IoUringCqe{}) + Align32IoUringCqe = SizeofIoUringCqe + + SizeofIoUringProbe = unsafe.Sizeof(IoUringProbe{}) + SizeofIoUringProbeOp = unsafe.Sizeof(IoUringProbeOp{}) + SizeofIoUringBufRing = unsafe.Sizeof(IoUringBufRing{}) + SizeofIoUringBuf = unsafe.Sizeof(IoUringBuf{}) ) +func _SizeChecker() { + var x [1]struct{} + _ = x[SizeofIoUringSqe-64] + _ = x[SizeofIoUringCqe-16] + _ = x[SizeofIoUringProbe-16] + _ = x[SizeofIoUringProbeOp-8] + _ = x[SizeofIoUringBufRing-16] + _ = x[SizeofIoUringBuf-16] +} + type IoUring struct { Sq IoUringSq Cq IoUringCq @@ -24,12 +41,12 @@ type IoUring struct { } type IoUringSq struct { - head unsafe.Pointer // *uint32 - tail unsafe.Pointer // *uint32 - ringMask unsafe.Pointer // *uint32 - ringEntries unsafe.Pointer // *uint32 - flags unsafe.Pointer // *uint32 - dropped unsafe.Pointer // *uint32 + khead unsafe.Pointer // *uint32 + ktail unsafe.Pointer // *uint32 + kringMask unsafe.Pointer // *uint32 + kringEntries unsafe.Pointer // *uint32 + kflags unsafe.Pointer // *uint32 + kdropped unsafe.Pointer // *uint32 Array uint32Array //ptr arith Sqes ioUringSqeArray //ptr arith @@ -40,35 +57,39 @@ type IoUringSq struct { RingSz uint32 RingPtr unsafe.Pointer - pad [4]uint32 + RingMask, RingEntries uint32 + + pad [2]uint32 } -func (sq *IoUringSq) _Head() *uint32 { return (*uint32)(sq.head) } -func (sq *IoUringSq) _Tail() *uint32 { return (*uint32)(sq.tail) } -func (sq *IoUringSq) _RingMask() *uint32 { return (*uint32)(sq.ringMask) } -func (sq *IoUringSq) _RingEntries() *uint32 { return (*uint32)(sq.ringEntries) } -func (sq *IoUringSq) _Flags() *uint32 { return (*uint32)(sq.flags) } -func (sq *IoUringSq) _Dropped() *uint32 { return (*uint32)(sq.dropped) } +func (sq *IoUringSq) _KHead() *uint32 { return (*uint32)(sq.khead) } +func (sq *IoUringSq) _KTail() *uint32 { return (*uint32)(sq.ktail) } +func (sq *IoUringSq) _KRingMask() *uint32 { return (*uint32)(sq.kringMask) } +func (sq *IoUringSq) _KRingEntries() *uint32 { return (*uint32)(sq.kringEntries) } +func (sq *IoUringSq) _KFlags() *uint32 { return (*uint32)(sq.kflags) } +func (sq *IoUringSq) _KDropped() *uint32 { return (*uint32)(sq.kdropped) } type IoUringCq struct { - head unsafe.Pointer // *uint32 - tail unsafe.Pointer // *uint32 - ringMask unsafe.Pointer // *uint32 - ringEntries unsafe.Pointer // *uint32 - flags unsafe.Pointer // *uint32 - overflow unsafe.Pointer // *uint32 + khead unsafe.Pointer // *uint32 + ktail unsafe.Pointer // *uint32 + kringMask unsafe.Pointer // *uint32 + kringEntries unsafe.Pointer // *uint32 + kflags unsafe.Pointer // *uint32 + koverflow unsafe.Pointer // *uint32 Cqes ioUringCqeArray //ptr arith RingSz uint32 RingPtr unsafe.Pointer - pad [4]uint32 + RingMask, RingEntries uint32 + + pad [2]uint32 } -func (cq *IoUringCq) _Head() *uint32 { return (*uint32)(cq.head) } -func (cq *IoUringCq) _Tail() *uint32 { return (*uint32)(cq.tail) } -func (cq *IoUringCq) _RingMask() *uint32 { return (*uint32)(cq.ringMask) } -func (cq *IoUringCq) _RingEntries() *uint32 { return (*uint32)(cq.ringEntries) } -func (cq *IoUringCq) _Flags() *uint32 { return (*uint32)(cq.flags) } -func (cq *IoUringCq) _Overflow() *uint32 { return (*uint32)(cq.overflow) } +func (cq *IoUringCq) _KHead() *uint32 { return (*uint32)(cq.khead) } +func (cq *IoUringCq) _KTail() *uint32 { return (*uint32)(cq.ktail) } +func (cq *IoUringCq) _KRingMask() *uint32 { return (*uint32)(cq.kringMask) } +func (cq *IoUringCq) _KRingEntries() *uint32 { return (*uint32)(cq.kringEntries) } +func (cq *IoUringCq) _KFlags() *uint32 { return (*uint32)(cq.kflags) } +func (cq *IoUringCq) _KOverflow() *uint32 { return (*uint32)(cq.koverflow) } diff --git a/ioctl/hdr_ioctl.go b/ioctl/hdr_ioctl.go new file mode 100644 index 0000000..012c188 --- /dev/null +++ b/ioctl/hdr_ioctl.go @@ -0,0 +1,50 @@ +package ioctl + +// Based on `ioctl.h` + +const ( + _IOC_NRBITS = 8 + _IOC_TYPEBITS = 8 + + _IOC_SIZEBITS = 14 // OVERRIDE + _IOC_DIRBITS = 2 // OVERRIDE + + _IOC_NRMASK = (1 << _IOC_NRBITS) - 1 + _IOC_TYPEMASK = (1 << _IOC_TYPEBITS) - 1 + _IOC_SIZEMASK = (1 << _IOC_SIZEBITS) - 1 + _IOC_DIRMASK = (1 << _IOC_DIRBITS) - 1 + + _IOC_NRSHIFT = 0 + _IOC_TYPESHIFT = (_IOC_NRSHIFT + _IOC_NRBITS) + _IOC_SIZESHIFT = (_IOC_TYPESHIFT + _IOC_TYPEBITS) + _IOC_DIRSHIFT = (_IOC_SIZESHIFT + _IOC_SIZEBITS) + + _IOC_NONE = 0b00 // OVERRIDE + _IOC_WRITE = 0b01 // OVERRIDE + _IOC_READ = 0b10 // OVERRIDE +) + +//go:nosplit +func IOC(dir, typ, nr, siz int) int { + return 0 | + (dir << _IOC_DIRSHIFT) | + (typ << _IOC_TYPESHIFT) | + (nr << _IOC_NRSHIFT) | + (siz << _IOC_SIZESHIFT) +} + +/* + IO ops +*/ + +//go:nosplit +func IO(typ, nr int) int { return IOC(_IOC_NONE, typ, nr, 0) } + +//go:nosplit +func IOR(typ, nr, siz int) int { return IOC(_IOC_READ, typ, nr, siz) } + +//go:nosplit +func IOW(typ, nr, siz int) int { return IOC(_IOC_WRITE, typ, nr, siz) } + +//go:nosplit +func IOWR(typ, nr, siz int) int { return IOC(_IOC_WRITE|_IOC_READ, typ, nr, siz) } diff --git a/nvme/hdr_nvme.go b/nvme/hdr_nvme.go new file mode 100644 index 0000000..62ab7ab --- /dev/null +++ b/nvme/hdr_nvme.go @@ -0,0 +1,199 @@ +package nvme + +import ( + "unsafe" + + "github.com/ii64/gouring/ioctl" +) + +// Based on `nvme.h` w.r.t. `linux/nvme_ioctl.h` + +const ( + SizeofNvmeAdminCmd = unsafe.Sizeof(NvmeAdminCmd{}) + SizeofNvmeUserIo = unsafe.Sizeof(NvmeUserIo{}) + SizeofNvmePassthruCmd = unsafe.Sizeof(NvmePassthruCmd{}) + SizeofNvmePassthruCmd64 = unsafe.Sizeof(NvmePassthruCmd64{}) + SizeofNvmeUringCmd = unsafe.Sizeof(NvmeUringCmd{}) + SizeofNvmeIdNs = unsafe.Sizeof(NvmeIdNs{}) + SizeofNvmeLbaf = unsafe.Sizeof(NvmeLbaf{}) + + NVME_DEFAULT_IOCTL_TIMEOUT = 0 + NVME_IDENTIFY_DATA_SIZE = 0x1000 + NVME_IDENTIFY_CSI_SHIFT = 24 + NVME_IDENTIFY_CNS_NS = 0 + NVME_CSI_NVM = 0 +) + +func _SizeChecker() { + var x [1]struct{} + _ = x[SizeofNvmeAdminCmd-72] + _ = x[SizeofNvmeUserIo-48] + _ = x[SizeofNvmePassthruCmd-72] + _ = x[SizeofNvmePassthruCmd64-80] + _ = x[SizeofNvmeUringCmd-72] + _ = x[SizeofNvmeLbaf-4] + _ = x[SizeofNvmeIdNs-0x1000] +} + +func NVME_IOCTL_ID() int { return ioctl.IO('N', 0x40) } +func NVME_IOCTL_ADMIN_CMD() int { return ioctl.IOWR('N', 0x41, int(SizeofNvmeAdminCmd)) } +func NVME_IOCTL_SUBMIT_IO() int { return ioctl.IOW('N', 0x42, int(SizeofNvmeUserIo)) } +func NVME_IOCTL_IO_CMD() int { return ioctl.IOR('N', 0x43, int(SizeofNvmePassthruCmd)) } +func NVME_IOCTL_RESET() int { return ioctl.IO('N', 0x44) } +func NVME_IOCTL_SUBSYS_RESET() int { return ioctl.IO('N', 0x45) } +func NVME_IOCTL_RESCAN() int { return ioctl.IO('N', 0x46) } +func NVME_IOCTL_ADMIN64_CMD() int { return ioctl.IOWR('N', 0x47, int(SizeofNvmePassthruCmd64)) } +func NVME_IOCTL_IO64_CMD() int { return ioctl.IOWR('N', 0x48, int(SizeofNvmePassthruCmd64)) } +func NVME_IOCTL_IO64_CMD_VEC() int { return ioctl.IOWR('N', 0x49, int(SizeofNvmePassthruCmd64)) } + +func NVME_URING_CMD_IO() int { return ioctl.IOWR('N', 0x80, int(SizeofNvmeUringCmd)) } +func NVME_URING_CMD_IO_VEC() int { return ioctl.IOWR('N', 0x81, int(SizeofNvmeUringCmd)) } +func NVME_URING_CMD_ADMIN() int { return ioctl.IOWR('N', 0x82, int(SizeofNvmeUringCmd)) } +func NVME_URING_CMD_ADMIN_VEC() int { return ioctl.IOWR('N', 0x83, int(SizeofNvmeUringCmd)) } + +// nvme_admin_opcode +const ( + NVME_ADMIN_IDENTIFY = 0x06 +) + +// nvme_io_opcode +const ( + NVME_CMD_WRITE = 0x01 + NVME_CMD_READ = 0x02 +) + +type NvmeAdminCmd = NvmePassthruCmd + +type NvmeUserIo struct { + Opcode uint8 + Flags uint8 + Control uint16 + Nblocks uint16 + Rsvd uint16 + Metadata uint64 + Addr uint64 + Slba uint64 + Dsmgmt uint32 + Reftag uint32 + Apptag uint16 + Appmask uint16 + _pad [4]byte +} + +type NvmePassthruCmd struct { + Opcode uint8 + Flags uint8 + Rsvd1 uint16 + Nsid uint32 + Cdw2, + Cdw3 uint32 + Metadata uint64 + Addr uint64 + MetadataLen uint32 + DataLen uint32 + Cdw10, + Cdw11, + Cdw12, + Cdw13, + Cdw14, + Cdw15 uint32 + TimeoutMs uint32 + Result uint32 +} + +type NvmePassthruCmd64_Union1 uint32 + +func (u *NvmePassthruCmd64_Union1) SetDataLen(v uint32) { *u = NvmePassthruCmd64_Union1(v) } +func (u *NvmePassthruCmd64_Union1) SetVecCount(v uint32) { *u = NvmePassthruCmd64_Union1(v) } + +type NvmePassthruCmd64 struct { + Opcode uint8 + Flags uint8 + Rsvd1 uint16 + Nsid uint32 + Cdw2, + Cdw3 uint32 + Metadata uint64 + Addr uint64 + MetadataLen uint32 + // union { + // __u32 data_len; /* for non-vectored io */ + // __u32 vec_cnt; /* for vectored io */ + // }; + NvmePassthruCmd64_Union1 + Cdw10, + Cdw11, + Cdw12, + Cdw13, + Cdw14, + Cdw15 uint32 + TimeoutMs uint32 + Rsvd2 uint32 + Result uint64 +} + +type NvmeUringCmd struct { + Opcode uint8 + Flags uint8 + Rsvd1 uint16 + Nsid uint32 + Cdw2, Cdw3 uint32 + Metadata uint64 + Addr uint64 + MetadataLen uint32 + DataLen uint32 + + Cdw10, Cdw11, Cdw12, Cdw13, Cdw14, Cdw15 uint32 + + TimeoutMs uint32 + Rsvd2 uint32 +} + +type NvmeLbaf struct { + Ms uint16 // bo: Little + Ds uint8 + Rp uint8 +} + +type NvmeIdNs struct { + Nsze, + Ncap, + Nuse uint64 // bo: Little + Nsfeat, + Nlbaf, + Flbas, + Mc, + Dpc, + Dps, + Nmic, + Rescap, + Fpi, + Dlfeat uint8 + Nawun, + Nawupf, + Nacwu, + Nabsn, + Nabo, + Nabspf, + Noiob uint16 // bo: Little + Nvmcap [16]byte + Npwg, + Npwa, + Npdg, + Npda, + Nows uint16 // bo: Little + Msrl uint16 // bo: Little + Mcl uint32 // bo: Little + Msrc uint8 + Resvd81 [11]byte + Anagrpid uint32 // bo: Little + Rsvd96 [3]byte + Nsattr uint8 + Nvmsetid uint16 // bo: Little + Endgid uint16 // bo: Little + Nguid [16]byte + Eui64 [8]byte + Lbaf [16]NvmeLbaf + Rsvd192 [192]byte + Vs [3712]byte +} diff --git a/prep.go b/prep.go index 4fa9067..967cbb6 100644 --- a/prep.go +++ b/prep.go @@ -3,8 +3,11 @@ package gouring import ( "syscall" "unsafe" + + "golang.org/x/sys/unix" ) +//go:nosplit func PrepRW(op IoUringOp, sqe *IoUringSqe, fd int, addr unsafe.Pointer, len int, offset uint64) { sqe.Opcode = op @@ -18,8 +21,7 @@ func PrepRW(op IoUringOp, sqe *IoUringSqe, fd int, sqe.IoUringSqe_Union4 = 0 // sqe.SetBufIndex(0) // union4 sqe.Personality = 0 sqe.IoUringSqe_Union5 = 0 // sqe.SetFileIndex(0) // union5 - sqe.Addr3 = 0 - sqe.__pad2[0] = 0 + sqe.IoUringSqe_Union6 = IoUringSqe_Union6{} } func PrepNop(sqe *IoUringSqe) { @@ -43,7 +45,23 @@ func PrepTimeoutUpdate(sqe *IoUringSqe, ts *syscall.Timespec, userData uint64, f sqe.SetTimeoutFlags(flags | IORING_TIMEOUT_UPDATE) } -// ** "Syscall" OP +/* + "Syscall" OP +*/ + +func PrepSplice(sqe *IoUringSqe, fdIn int, offIn uint64, fdOut int, offOut uint64, nb int, spliceFlags uint32) { + PrepRW(IORING_OP_SPLICE, sqe, fdOut, nil, nb, offOut) + sqe.SetSpliceOffsetIn(offIn) + sqe.SetSpliceFdIn(int32(fdIn)) + sqe.SetSpliceFlags(spliceFlags) +} + +func PrepTee(sqe *IoUringSqe, fdIn int, fdOut int, nb int, spliceFlags uint32) { + PrepRW(IORING_OP_TEE, sqe, fdOut, nil, nb, 0) + sqe.SetSpliceOffsetIn(0) + sqe.SetSpliceFdIn(int32(fdIn)) + sqe.SetSpliceFlags(spliceFlags) +} func PrepRead(sqe *IoUringSqe, fd int, buf *byte, nb int, offset uint64) { PrepRW(IORING_OP_READ, sqe, fd, unsafe.Pointer(buf), nb, offset) @@ -59,6 +77,12 @@ func PrepReadv2(sqe *IoUringSqe, fd int, PrepReadv(sqe, fd, iov, nrVecs, offset) sqe.SetRwFlags(flags) } +func PrepReadFixed(sqe *IoUringSqe, fd int, + buf *byte, nb int, + offset uint64, bufIndex uint16) { + PrepRW(IORING_OP_READ_FIXED, sqe, fd, unsafe.Pointer(buf), nb, offset) + sqe.SetBufIndex(bufIndex) +} func PrepWrite(sqe *IoUringSqe, fd int, buf *byte, nb int, offset uint64) { PrepRW(IORING_OP_WRITE, sqe, fd, unsafe.Pointer(buf), nb, offset) @@ -74,30 +98,303 @@ func PrepWritev2(sqe *IoUringSqe, fd int, PrepWritev(sqe, fd, iov, nrVecs, offset) sqe.SetRwFlags(flags) } +func PrepWriteFixed(sqe *IoUringSqe, fd int, + buf *byte, nb int, + offset uint64, bufIndex uint16) { + PrepRW(IORING_OP_WRITE_FIXED, sqe, fd, unsafe.Pointer(buf), nb, offset) + sqe.SetBufIndex(bufIndex) +} -func PrepAccept(sqe *IoUringSqe, fd int, rsa *syscall.RawSockaddrAny, rsaSz *uintptr, flags uint) { - // *rsaSz = syscall.SizeofSockaddrAny // leave this out to caller? +func PrepAccept(sqe *IoUringSqe, fd int, rsa *syscall.RawSockaddrAny, rsaSz *uintptr, flags uint32) { PrepRW(IORING_OP_ACCEPT, sqe, fd, unsafe.Pointer(rsa), 0, uint64(uintptr(unsafe.Pointer(rsaSz)))) sqe.SetAcceptFlags(uint32(flags)) } +func PrepAcceptDirect(sqe *IoUringSqe, fd int, rsa *syscall.RawSockaddrAny, rsaSz *uintptr, flags uint32, fileIndex int) { + PrepAccept(sqe, fd, rsa, rsaSz, flags) + __io_uring_set_target_fixed_file(sqe, uint32(fileIndex)) +} +func PrepAcceptMultishot(sqe *IoUringSqe, fd int, rsa *syscall.RawSockaddrAny, rsaSz *uintptr, flags uint32) { + PrepAccept(sqe, fd, rsa, rsaSz, flags) + sqe.IoPrio |= IORING_ACCEPT_MULTISHOT +} +func PrepAcceptMultishotDirect(sqe *IoUringSqe, fd int, rsa *syscall.RawSockaddrAny, rsaSz *uintptr, flags uint32) { + PrepAcceptMultishot(sqe, fd, rsa, rsaSz, flags) + __io_uring_set_target_fixed_file(sqe, IORING_FILE_INDEX_ALLOC-1) +} -func PrepClose(sqe *IoUringSqe, fd int) { - PrepRW(IORING_OP_CLOSE, sqe, fd, nil, 0, 0) +func PrepConnect(sqe *IoUringSqe, fd int, rsa *syscall.RawSockaddrAny, rsaSz uintptr) { + PrepRW(IORING_OP_CONNECT, sqe, fd, unsafe.Pointer(rsa), 0, uint64(rsaSz)) } func PrepRecvmsg(sqe *IoUringSqe, fd int, msg *syscall.Msghdr, flags uint) { PrepRW(IORING_OP_RECVMSG, sqe, fd, unsafe.Pointer(msg), 1, 0) sqe.SetMsgFlags(uint32(flags)) } +func PrepRecvmsgMultishot(sqe *IoUringSqe, fd int, msg *syscall.Msghdr, flags uint) { + PrepRecvmsg(sqe, fd, msg, flags) + sqe.IoPrio |= IORING_RECV_MULTISHOT +} -func PrepSendmsg(sqe *IoUringSqe, fd int, msg *syscall.Msghdr, flags uint) { +func PrepSendmsg(sqe *IoUringSqe, fd int, msg *syscall.Msghdr, flags uint32) { PrepRW(IORING_OP_SENDMSG, sqe, fd, unsafe.Pointer(msg), 1, 0) + sqe.SetMsgFlags(flags) +} +func PrepSendmsgZc(sqe *IoUringSqe, fd int, msg *syscall.Msghdr, flags uint32) { + PrepSendmsg(sqe, fd, msg, flags) + sqe.Opcode |= IORING_OP_SENDMSG_ZC +} + +func PrepSendSetAddr(sqe *IoUringSqe, destAddr *syscall.RawSockaddrAny, addrLen uint16) { + sqe.SetAddr2_RawPtr(unsafe.Pointer(destAddr)) + sqe.SetAddrLen(addrLen) +} + +func PrepClose(sqe *IoUringSqe, fd int) { + PrepRW(IORING_OP_CLOSE, sqe, fd, nil, 0, 0) +} +func PrepCloseDirect(sqe *IoUringSqe, fileIndex uint32) { + PrepClose(sqe, 0) + __io_uring_set_target_fixed_file(sqe, fileIndex) +} + +func PrepFilesUpdate(sqe *IoUringSqe, fds []int32, offset int) { + PrepRW(IORING_OP_FILES_UPDATE, sqe, -1, unsafe.Pointer(&fds[0]), len(fds), uint64(offset)) +} + +func PrepFallocate(sqe *IoUringSqe, fd int, mode int, offset uint64, length int) { + PrepRW(IORING_OP_FALLOCATE, sqe, fd, nil, mode, offset) + sqe.SetAddr_Value(uint64(length)) +} + +func PrepOpenat(sqe *IoUringSqe, dfd int, path *byte, flags uint32, mode int) { + PrepRW(IORING_OP_OPENAT, sqe, dfd, unsafe.Pointer(path), mode, 0) + sqe.SetOpenFlags(flags) +} + +func PrepOpenatDirect(sqe *IoUringSqe, dfd int, path *byte, flags uint32, mode int, fileIndex uint32) { + PrepOpenat(sqe, dfd, path, flags, mode) + __io_uring_set_target_fixed_file(sqe, fileIndex) +} + +func PrepOpenat2(sqe *IoUringSqe, dfd int, path *byte, how *unix.OpenHow) { + PrepRW(IORING_OP_OPENAT2, sqe, dfd, unsafe.Pointer(path), int(unsafe.Sizeof(*how)), 0) + sqe.SetOffset_RawPtr(unsafe.Pointer(how)) +} + +func PrepOpenat2Direct(sqe *IoUringSqe, dfd int, path *byte, how *unix.OpenHow, fileIndex uint32) { + PrepOpenat2(sqe, dfd, path, how) + __io_uring_set_target_fixed_file(sqe, fileIndex) +} + +func PrepStatx(sqe *IoUringSqe, dfd int, path *byte, flags uint32, mask uint32, statxbuf *unix.Statx_t) { + PrepRW(IORING_OP_STATX, sqe, dfd, unsafe.Pointer(path), int(mask), 0) + sqe.SetOffset_RawPtr(unsafe.Pointer(statxbuf)) + sqe.SetStatxFlags(flags) +} + +func PrepFadvise(sqe *IoUringSqe, fd int, offset uint64, length int, advice uint32) { + PrepRW(IORING_OP_FADVISE, sqe, fd, nil, length, offset) + sqe.SetFadviseAdvice(advice) +} +func PrepMadvise(sqe *IoUringSqe, addr unsafe.Pointer, length int, advice uint32) { + PrepRW(IORING_OP_MADVISE, sqe, -1, addr, length, 0) + sqe.SetFadviseAdvice(advice) +} + +func PrepSendto(sqe *IoUringSqe, sockfd int, buf *byte, length int, flags uint32, + addr *syscall.RawSockaddrAny, addrLen uint16) { + PrepSend(sqe, sockfd, buf, length, flags) + PrepSendSetAddr(sqe, addr, addrLen) +} + +func PrepSend(sqe *IoUringSqe, sockfd int, buf *byte, length int, flags uint32) { + PrepRW(IORING_OP_SEND, sqe, sockfd, unsafe.Pointer(buf), length, 0) + sqe.SetMsgFlags(flags) +} +func PrepSendZc(sqe *IoUringSqe, sockfd int, buf *byte, length int, flags uint32, zcFlags uint16) { + PrepRW(IORING_OP_SEND_ZC, sqe, sockfd, unsafe.Pointer(buf), length, 0) + sqe.SetMsgFlags(flags) + sqe.IoPrio = uint16(zcFlags) +} +func PrepSendZcFixed(sqe *IoUringSqe, sockfd int, buf *byte, length int, flags uint32, zcFlags uint16, bufIndex uint16) { + PrepSendZc(sqe, sockfd, buf, length, flags, zcFlags) + sqe.IoPrio |= IORING_RECVSEND_FIXED_BUF + sqe.SetBufIndex(bufIndex) +} + +func PrepRecv(sqe *IoUringSqe, sockfd int, buf *byte, length int, flags int) { + PrepRW(IORING_OP_RECV, sqe, sockfd, unsafe.Pointer(buf), length, 0) sqe.SetMsgFlags(uint32(flags)) } -// ** Multishot - -func PrepMultishotAccept(sqe *IoUringSqe, fd int, rsa *syscall.RawSockaddrAny, rsaSz *uintptr, flags uint) { - PrepAccept(sqe, fd, rsa, rsaSz, flags) - sqe.IoPrio |= IORING_ACCEPT_MULTISHOT +func PrepRecvMultishot(sqe *IoUringSqe, sockfd int, buf *byte, length int, flags int) { + PrepRecv(sqe, sockfd, buf, length, flags) + sqe.IoPrio |= IORING_RECV_MULTISHOT +} + +func PrepSocket(sqe *IoUringSqe, domain int, _type int, protocol int, flags uint32) { + PrepRW(IORING_OP_SOCKET, sqe, domain, nil, protocol, uint64(_type)) + sqe.SetRwFlags(flags) +} +func PrepSocketDirect(sqe *IoUringSqe, domain int, _type int, protocol int, fileIndex uint32, flags uint32) { + PrepRW(IORING_OP_SOCKET, sqe, domain, nil, protocol, uint64(_type)) + sqe.SetRwFlags(flags) + __io_uring_set_target_fixed_file(sqe, fileIndex) +} +func PrepSocketDirectAlloc(sqe *IoUringSqe, domain int, _type int, protocol int, flags uint32) { + PrepRW(IORING_OP_SOCKET, sqe, domain, nil, protocol, uint64(_type)) + sqe.SetRwFlags(flags) + __io_uring_set_target_fixed_file(sqe, IORING_FILE_INDEX_ALLOC-1) +} + +/* + Poll +*/ + +// PrepEpollCtl syscall.EpollCtl look-alike +func PrepEpollCtl(sqe *IoUringSqe, epfd int, op int, fd int, ev *syscall.EpollEvent) { + PrepRW(IORING_OP_EPOLL_CTL, sqe, epfd, unsafe.Pointer(ev), op, uint64(fd)) +} + +func PrepPollAdd(sqe *IoUringSqe, fd int, pollMask uint32) { + PrepRW(IORING_OP_POLL_ADD, sqe, fd, nil, 0, 0) + sqe.SetPoll32Events(pollMask) // TODO: check endiannes +} +func PrepPollMultishot(sqe *IoUringSqe, fd int, pollMask uint32) { + PrepPollAdd(sqe, fd, pollMask) + sqe.Len = IORING_POLL_ADD_MULTI +} +func PrepPollRemove(sqe *IoUringSqe, userdata UserData) { + PrepRW(IORING_OP_POLL_REMOVE, sqe, -1, nil, 0, 0) + sqe.SetAddr(userdata.GetUnsafe()) +} +func PrepPollUpdate(sqe *IoUringSqe, oldUserdata UserData, newUserdata UserData, pollMask uint32, flags int) { + PrepRW(IORING_OP_POLL_REMOVE, sqe, -1, nil, flags, newUserdata.GetUint64()) + sqe.SetAddr(oldUserdata.GetUnsafe()) + sqe.SetPoll32Events(pollMask) // TODO: check endiannes +} + +func PrepFsync(sqe *IoUringSqe, fd int, fsyncFlags uint32) { + PrepRW(IORING_OP_FSYNC, sqe, fd, nil, 0, 0) + sqe.SetFsyncFlags(fsyncFlags) +} + +/* + Extra +*/ + +func PrepCancel64(sqe *IoUringSqe, ud UserData, flags uint32) { + PrepRW(IORING_OP_ASYNC_CANCEL, sqe, -1, nil, 0, 0) + sqe.SetAddr(ud.GetUnsafe()) + sqe.SetCancelFlags(flags) +} +func PrepCancel(sqe *IoUringSqe, ud UserData, flags uint32) { + PrepCancel64(sqe, UserData(ud.GetUintptr()), flags) +} +func PrepCancelFd(sqe *IoUringSqe, fd int, flags uint32) { + PrepRW(IORING_OP_ASYNC_CANCEL, sqe, fd, nil, 0, 0) + sqe.SetCancelFlags(flags | IORING_ASYNC_CANCEL_FD) +} + +func PrepLinkTimeout(sqe *IoUringSqe, ts *syscall.Timespec, flags uint32) { + PrepRW(IORING_OP_LINK_TIMEOUT, sqe, -1, unsafe.Pointer(ts), 1, 0) + sqe.SetTimeoutFlags(flags) +} + +func PrepProvideBuffers(sqe *IoUringSqe, addr unsafe.Pointer, length int, nr int, bGid uint16, bId int) { + PrepRW(IORING_OP_PROVIDE_BUFFERS, sqe, nr, addr, length, uint64(bId)) + sqe.SetBufGroup(bGid) +} + +func PrepRemoveBuffers(sqe *IoUringSqe, nr int, bGid uint16) { + PrepRW(IORING_OP_REMOVE_BUFFERS, sqe, nr, nil, 0, 0) + sqe.SetBufGroup(bGid) +} + +func PrepShutdown(sqe *IoUringSqe, fd int, how int) { + PrepRW(IORING_OP_SHUTDOWN, sqe, fd, nil, how, 0) +} + +func PrepUnlinkat(sqe *IoUringSqe, dfd int, path *byte, flags uint32) { + PrepRW(IORING_OP_UNLINKAT, sqe, dfd, unsafe.Pointer(path), 0, 0) + sqe.SetUnlinkFlags(flags) +} + +func PrepUnlink(sqe *IoUringSqe, path *byte, flags uint32) { + PrepUnlinkat(sqe, unix.AT_FDCWD, path, flags) +} + +func PrepRenameat(sqe *IoUringSqe, oldDfd int, oldPath *byte, newDfd int, newPath *byte, flags uint32) { + PrepRW(IORING_OP_RENAMEAT, sqe, oldDfd, unsafe.Pointer(oldPath), newDfd, 0) + sqe.SetOffset_RawPtr(unsafe.Pointer(newPath)) + sqe.SetRenameFlags(flags) +} + +func PrepRename(sqe *IoUringSqe, oldPath *byte, newPath *byte) { + PrepRenameat(sqe, unix.AT_FDCWD, oldPath, unix.AT_FDCWD, newPath, 0) +} + +func PrepSyncFileRange(sqe *IoUringSqe, fd int, length int, offset uint64, flags uint32) { + PrepRW(IORING_OP_SYNC_FILE_RANGE, sqe, fd, nil, length, offset) + sqe.SetSyncRangeFlags(flags) +} + +func PrepMkdirat(sqe *IoUringSqe, dfd int, path *byte, mode int) { + PrepRW(IORING_OP_MKDIRAT, sqe, dfd, unsafe.Pointer(path), mode, 0) +} + +func PrepMkdir(sqe *IoUringSqe, dfd int, path *byte, mode int) { + PrepMkdirat(sqe, unix.AT_FDCWD, path, mode) +} + +func PrepSymlinkat(sqe *IoUringSqe, target *byte, newDirfd int, linkpath *byte) { + PrepRW(IORING_OP_SYMLINKAT, sqe, newDirfd, unsafe.Pointer(target), 0, 0) + sqe.SetOffset_RawPtr(unsafe.Pointer(linkpath)) +} + +func PrepSymlink(sqe *IoUringSqe, target *byte, linkpath *byte) { + PrepSymlinkat(sqe, target, unix.AT_FDCWD, linkpath) +} + +func PrepLinkat(sqe *IoUringSqe, oldDfd int, oldPath *byte, newDfd int, newPath *byte, flags uint32) { + PrepRW(IORING_OP_LINKAT, sqe, oldDfd, unsafe.Pointer(oldPath), newDfd, 0) + sqe.SetOffset_RawPtr(unsafe.Pointer(newPath)) +} + +func PrepLink(sqe *IoUringSqe, oldPath *byte, newPath *byte, flags uint32) { + PrepLinkat(sqe, unix.AT_FDCWD, oldPath, unix.AT_FDCWD, newPath, flags) +} + +func PrepMsgRing(sqe *IoUringSqe, fd int, length int, data uint64, flags uint32) { + PrepRW(IORING_OP_MSG_RING, sqe, fd, nil, length, data) + sqe.SetRwFlags(flags) +} + +func PrepGetxattr(sqe *IoUringSqe, name *byte, value *byte, path *byte, length int) { + PrepRW(IORING_OP_GETXATTR, sqe, 0, unsafe.Pointer(name), length, 0) + sqe.SetOffset_RawPtr(unsafe.Pointer(path)) + sqe.SetXattrFlags(0) +} + +func PrepSetxattr(sqe *IoUringSqe, name *byte, value *byte, path *byte, flags uint32, length int) { + PrepRW(IORING_OP_SETXATTR, sqe, 0, unsafe.Pointer(name), length, 0) + sqe.SetOffset_RawPtr(unsafe.Pointer(value)) + sqe.SetXattrFlags(flags) +} + +func PrepFgetxattr(sqe *IoUringSqe, fd int, name *byte, value *byte, length uint) { + PrepRW(IORING_OP_FGETXATTR, sqe, fd, unsafe.Pointer(name), int(length), 0) + sqe.SetOffset_RawPtr(unsafe.Pointer(value)) + sqe.SetXattrFlags(0) +} + +func PrepFsetxattr(sqe *IoUringSqe, fd int, name *byte, value *byte, flags uint32, length uint) { + PrepRW(IORING_OP_FSETXATTR, sqe, fd, unsafe.Pointer(name), int(length), 0) + sqe.SetOffset_RawPtr(unsafe.Pointer(value)) + sqe.SetXattrFlags(flags) +} + +//go:nosplit +func __io_uring_set_target_fixed_file(sqe *IoUringSqe, fileIndex uint32) { + sqe.SetFileIndex(fileIndex) } diff --git a/queue.go b/queue.go index 42cd98f..7ede4d9 100644 --- a/queue.go +++ b/queue.go @@ -14,14 +14,22 @@ const LIBURING_UDATA_TIMEOUT uint64 = ^uint64(0) * or if IORING_SQ_NEED_WAKEUP is set, so submit thread must be explicitly * awakened. For the latter case, we set the thread wakeup flag. */ -func (ring *IoUring) sq_ring_needs_enter(flags *uint32) bool { +func (ring *IoUring) sq_ring_needs_enter(submitted uint32, flags *uint32) bool { + if submitted == 0 { + return false + } if ring.Flags&IORING_SETUP_SQPOLL == 0 { return true } - // FIXME: io_uring_smp_mb + /* + * Ensure the kernel can see the store to the SQ tail before we read + * the flags. + */ + // FIXME: Extra call - no inline asm. + io_uring_smp_mb() - if atomic.LoadUint32(ring.Sq._Flags())&IORING_SQ_NEED_WAKEUP != 0 { + if atomic.LoadUint32(ring.Sq._KFlags())&IORING_SQ_NEED_WAKEUP != 0 { *flags |= IORING_ENTER_SQ_WAKEUP return true } @@ -29,7 +37,7 @@ func (ring *IoUring) sq_ring_needs_enter(flags *uint32) bool { } func (ring *IoUring) cq_ring_needs_flush() bool { - return atomic.LoadUint32(ring.Sq._Flags())&(IORING_SQ_CQ_OVERFLOW|IORING_SQ_TASKRUN) != 0 + return atomic.LoadUint32(ring.Sq._KFlags())&(IORING_SQ_CQ_OVERFLOW|IORING_SQ_TASKRUN) != 0 } func (ring *IoUring) cq_ring_needs_enter() bool { @@ -42,6 +50,7 @@ type get_data struct { getFlags uint32 sz int32 arg unsafe.Pointer + hasTs bool } func (ring *IoUring) _io_uring_get_cqe(cqePtr **IoUringCqe, data *get_data) (err error) { @@ -57,6 +66,11 @@ func (ring *IoUring) _io_uring_get_cqe(cqePtr **IoUringCqe, data *get_data) (err break } if cqe != nil && data.waitNr == 0 && data.submit == 0 { + /* + * If we already looped once, we already entererd + * the kernel. Since there's nothing to submit or + * wait for, don't keep retrying. + */ if looped || !ring.cq_ring_needs_enter() { err = syscall.EAGAIN break @@ -67,12 +81,19 @@ func (ring *IoUring) _io_uring_get_cqe(cqePtr **IoUringCqe, data *get_data) (err flags = IORING_ENTER_GETEVENTS | data.getFlags needEnter = true } - if data.submit > 0 && ring.sq_ring_needs_enter(&flags) { + if data.submit > 0 && ring.sq_ring_needs_enter(data.submit, &flags) { needEnter = true } if !needEnter { break } + if looped && data.hasTs { + arg := (*IoUringGeteventsArg)(data.arg) + if cqe == nil && arg.Ts != 0 && err == nil { + err = syscall.ETIME + } + break + } if ring.IntFlags&INT_FLAG_REG_RING != 0 { flags |= IORING_ENTER_REGISTERED_RING @@ -118,8 +139,8 @@ func (ring *IoUring) io_uring_peek_batch_cqe(cqes []*IoUringCqe, count uint32) u again: ready = ring.io_uring_cq_ready() if ready > 0 { - var head = *ring.Cq._Head() - var mask = *ring.Cq._RingMask() + var head = *ring.Cq._KHead() + var mask = *ring.Cq._KRingMask() var last uint32 if count > ready { count = ready @@ -158,30 +179,22 @@ done: */ func (ring *IoUring) __io_uring_flush_sq() uint32 { sq := &ring.Sq - var mask = *sq._RingMask() - var ktail = *sq._Tail() - var toSubmit = sq.SqeTail - sq.SqeHead + tail := sq.SqeTail - if toSubmit < 1 { - goto out + if sq.SqeHead != tail { + sq.SqeHead = tail + + /* + * Ensure kernel sees the SQE updates before the tail update. + */ + atomic.StoreUint32(sq._KTail(), tail) + // if !(ring.Flags&IORING_SETUP_SQPOLL != 0) { + // IO_URING_WRITE_ONCE(*sq.ktail, tail) + // } else { + // io_uring_smp_store_release(sq.ktail, tail) + // } } - /* - * Fill in sqes that we have queued up, adding them to the kernel ring - */ - for ; toSubmit > 0; toSubmit-- { - *uint32Array_Index(sq.Array, uintptr(ktail&mask)) = sq.SqeHead & mask - ktail++ - sq.SqeHead++ - } - - /* - * Ensure that the kernel sees the SQE updates before it sees the tail - * update. - */ - atomic.StoreUint32(sq._Tail(), ktail) - -out: /* * This _may_ look problematic, as we're not supposed to be reading * SQ->head without acquire semantics. When we're in SQPOLL mode, the @@ -193,7 +206,7 @@ out: * we can submit. The point is, we need to be able to deal with this * situation regardless of any perceived atomicity. */ - return ktail - *sq._Head() + return tail - *sq._KHead() } /* @@ -232,6 +245,9 @@ func (ring *IoUring) io_uring_wait_cqes_new(cqePtr **IoUringCqe, waitNtr uint32, * handling between two threads. */ func (ring *IoUring) __io_uring_submit_timeout(waitNr uint32, ts *syscall.Timespec) (ret int, err error) { + /* + * If the SQ ring is full, we may need to submit IO first + */ sqe := ring.io_uring_get_sqe() if sqe == nil { ret, err = ring.io_uring_submit() @@ -267,7 +283,7 @@ func (ring *IoUring) io_uring_wait_cqes(cqePtr **IoUringCqe, waitNtr uint32, ts return } -func (ring *IoUring) io_uring_submit_and_wait_timeout(cqePtr **IoUringCqe, waitNtr uint32, ts *syscall.Timespec, sigmask *Sigset_t) (err error) { +func (ring *IoUring) io_uring_submit_and_wait_timeout(cqePtr **IoUringCqe, waitNr uint32, ts *syscall.Timespec, sigmask *Sigset_t) (err error) { var toSubmit int if ts != nil { if ring.Features&IORING_FEAT_EXT_ARG != 0 { @@ -278,21 +294,22 @@ func (ring *IoUring) io_uring_submit_and_wait_timeout(cqePtr **IoUringCqe, waitN } data := &get_data{ submit: ring.__io_uring_flush_sq(), - waitNr: waitNtr, + waitNr: waitNr, getFlags: IORING_ENTER_EXT_ARG, sz: int32(unsafe.Sizeof(arg)), arg: unsafe.Pointer(&arg), + hasTs: ts != nil, } return ring._io_uring_get_cqe(cqePtr, data) } - toSubmit, err = ring.__io_uring_submit_timeout(waitNtr, ts) + toSubmit, err = ring.__io_uring_submit_timeout(waitNr, ts) if err != nil { return } } else { toSubmit = int(ring.__io_uring_flush_sq()) } - err = ring.__io_uring_get_cqe(cqePtr, uint32(toSubmit), waitNtr, sigmask) + err = ring.__io_uring_get_cqe(cqePtr, uint32(toSubmit), waitNr, sigmask) return } @@ -328,9 +345,10 @@ func (ring *IoUring) __io_uring_submit_and_wait(waitNr uint32) (int, error) { func (ring *IoUring) __io_uring_submit(submitted uint32, waitNr uint32) (ret int, err error) { var flags uint32 = 0 + var cq_needs_enter = ring.cq_ring_needs_enter() || waitNr != 0 - if ring.sq_ring_needs_enter(&flags) || waitNr != 0 { - if waitNr != 0 || ring.Flags&IORING_SETUP_IOPOLL != 0 { + if ring.sq_ring_needs_enter(submitted, &flags) || cq_needs_enter { + if cq_needs_enter { flags |= IORING_ENTER_GETEVENTS } if ring.IntFlags&INT_FLAG_REG_RING != 0 { @@ -353,10 +371,12 @@ func (ring *IoUring) io_uring_get_sqe() *IoUringSqe { * function multiple times before calling io_uring_submit(). * * Returns a vacant sqe, or NULL if we're full. + * + * SAFETY: NO CONCURRENT ACCESS */ func (ring *IoUring) _io_uring_get_sqe() (sqe *IoUringSqe) { sq := &ring.Sq - var head = atomic.LoadUint32(sq._Head()) + var head = atomic.LoadUint32(sq._KHead()) var next = sq.SqeTail + 1 var shift uint32 = 0 @@ -364,8 +384,8 @@ func (ring *IoUring) _io_uring_get_sqe() (sqe *IoUringSqe) { shift = 1 } - if next-head <= *sq._RingEntries() { - sqe = ioUringSqeArray_Index(sq.Sqes, uintptr((sq.SqeTail&*sq._RingMask())<<shift)) + if next-head <= *sq._KRingEntries() { + sqe = ioUringSqeArray_Index(sq.Sqes, uintptr((sq.SqeTail&*sq._KRingMask())<<shift)) sq.SqeTail = next return } @@ -375,7 +395,7 @@ func (ring *IoUring) _io_uring_get_sqe() (sqe *IoUringSqe) { } func (ring *IoUring) io_uring_cq_ready() uint32 { - return atomic.LoadUint32(ring.Cq._Tail()) - *ring.Cq._Head() + return atomic.LoadUint32(ring.Cq._KTail()) - *ring.Cq._KHead() } func (ring *IoUring) __io_uring_peek_cqe(cqePtr **IoUringCqe, nrAvail *uint32) error { @@ -383,7 +403,7 @@ func (ring *IoUring) __io_uring_peek_cqe(cqePtr **IoUringCqe, nrAvail *uint32) e var err int32 = 0 var avail int - var mask = *ring.Cq._RingMask() + var mask = *ring.Cq._KRingMask() var shift uint32 = 0 if ring.Flags&IORING_SETUP_CQE32 != 0 { @@ -391,12 +411,12 @@ func (ring *IoUring) __io_uring_peek_cqe(cqePtr **IoUringCqe, nrAvail *uint32) e } for { - var tail = atomic.LoadUint32(ring.Cq._Tail()) - var head = *ring.Cq._Head() + var tail = atomic.LoadUint32(ring.Cq._KTail()) + var head = *ring.Cq._KHead() cqe = nil avail = int(tail - head) - if avail < 1 { + if avail <= 0 { break } @@ -422,15 +442,15 @@ func (ring *IoUring) __io_uring_peek_cqe(cqePtr **IoUringCqe, nrAvail *uint32) e if nrAvail != nil { *nrAvail = uint32(avail) } - if err == 0 { - return nil + if err < 0 { + return syscall.Errno(-err) } - return syscall.Errno(-err) + return nil } func (ring *IoUring) io_uring_cq_advance(nr uint32) { if nr > 0 { - atomic.StoreUint32(ring.Cq._Head(), *ring.Cq._Head()+nr) + atomic.StoreUint32(ring.Cq._KHead(), *ring.Cq._KHead()+nr) } } diff --git a/queue_test.go b/queue_test.go index dbe5053..b960d97 100644 --- a/queue_test.go +++ b/queue_test.go @@ -121,7 +121,7 @@ func TestRingQueueSubmitSingleConsumer(t *testing.T) { } }() for ctx.Err() == nil { - err = h.io_uring_wait_cqe(&cqe) + err = h.WaitCqe(&cqe) if err == syscall.EINTR { // ignore INTR continue @@ -145,7 +145,7 @@ func TestRingQueueSubmitSingleConsumer(t *testing.T) { _ = buf // fmt.Printf("%+#v %s", buf, buf) - h.io_uring_cqe_seen(cqe) // necessary + h.SeenCqe(cqe) // necessary wg.Done() } } @@ -172,7 +172,7 @@ func TestRingQueueSubmitSingleConsumer(t *testing.T) { for i := 0; i < tc.jobCount; i++ { var sqe *IoUringSqe for { // sqe could be nil if SQ is already full so we spin until we got one - sqe = h.io_uring_get_sqe() + sqe = h.GetSqe() if sqe != nil { break } @@ -205,7 +205,7 @@ func TestRingQueueSubmitSingleConsumer(t *testing.T) { go consumer(h, ctx, &wg) for i := 0; i < tc.jobCount; i++ { - sqe := h.io_uring_get_sqe() + sqe := h.GetSqe() if sqe == nil { // spin until we got one continue diff --git a/setup.go b/setup.go index fbbc472..60a56c9 100644 --- a/setup.go +++ b/setup.go @@ -20,6 +20,14 @@ func io_uring_queue_init_params(entries uint32, ring *IoUring, p *IoUringParams) if err != nil { return err } + + // Directly map SQ slots to SQEs + sqArray := ring.Sq.Array + sqEntries := *ring.Sq._KRingEntries() + var index uint32 + for index = 0; index < sqEntries; index++ { + *uint32Array_Index(sqArray, uintptr(index)) = index + } ring.Features = p.Features return nil } @@ -29,9 +37,9 @@ func (ring *IoUring) io_uring_queue_exit() { cq := &ring.Cq sqeSize := SizeofIoUringSqe if ring.Flags&IORING_SETUP_SQE128 != 0 { - sqeSize += 64 + sqeSize += Align128IoUringSqe } - munmap(unsafe.Pointer(sq.Sqes), sqeSize*uintptr(*sq._RingEntries())) + munmap(unsafe.Pointer(sq.Sqes), sqeSize*uintptr(*sq._KRingEntries())) io_uring_unmap_rings(sq, cq) /* * Not strictly required, but frees up the slot we used now rather @@ -67,7 +75,7 @@ func io_uring_mmap(fd int, p *IoUringParams, sq *IoUringSq, cq *IoUringCq) (err if cq.RingSz > sq.RingSz { sq.RingSz = cq.RingSz } - // cq.RingSz = sq.RingSz + cq.RingSz = sq.RingSz } // alloc sq ring sq.RingPtr, err = mmap(nil, uintptr(sq.RingSz), @@ -94,17 +102,17 @@ func io_uring_mmap(fd int, p *IoUringParams, sq *IoUringSq, cq *IoUringCq) (err } //sq - sq.head = (unsafe.Pointer(uintptr(sq.RingPtr) + uintptr(p.SqOff.Head))) - sq.tail = (unsafe.Pointer(uintptr(sq.RingPtr) + uintptr(p.SqOff.Tail))) - sq.ringMask = (unsafe.Pointer(uintptr(sq.RingPtr) + uintptr(p.SqOff.RingMask))) - sq.ringEntries = (unsafe.Pointer(uintptr(sq.RingPtr) + uintptr(p.SqOff.RingEntries))) - sq.flags = (unsafe.Pointer(uintptr(sq.RingPtr) + uintptr(p.SqOff.Flags))) - sq.dropped = (unsafe.Pointer(uintptr(sq.RingPtr) + uintptr(p.SqOff.Dropped))) - sq.Array = (uint32Array)(unsafe.Pointer(uintptr(sq.RingPtr) + uintptr(p.SqOff.Array))) + sq.khead = unsafe.Add(sq.RingPtr, p.SqOff.Head) + sq.ktail = unsafe.Add(sq.RingPtr, p.SqOff.Tail) + sq.kringMask = unsafe.Add(sq.RingPtr, p.SqOff.RingMask) + sq.kringEntries = unsafe.Add(sq.RingPtr, p.SqOff.RingEntries) + sq.kflags = unsafe.Add(sq.RingPtr, p.SqOff.Flags) + sq.kdropped = unsafe.Add(sq.RingPtr, p.SqOff.Dropped) + sq.Array = (uint32Array)(unsafe.Add(sq.RingPtr, p.SqOff.Array)) size = SizeofIoUringSqe if p.Flags&IORING_SETUP_SQE128 != 0 { - size += 64 + size += Align128IoUringSqe } var sqeAddr unsafe.Pointer sqeAddr, err = mmap(nil, size*uintptr(p.SqEntries), @@ -119,15 +127,21 @@ func io_uring_mmap(fd int, p *IoUringParams, sq *IoUringSq, cq *IoUringCq) (err sq.Sqes = (ioUringSqeArray)(sqeAddr) //cq - cq.head = (unsafe.Pointer(uintptr(cq.RingPtr) + uintptr(p.CqOff.Head))) - cq.tail = (unsafe.Pointer(uintptr(cq.RingPtr) + uintptr(p.CqOff.Tail))) - cq.ringMask = (unsafe.Pointer(uintptr(cq.RingPtr) + uintptr(p.CqOff.RingMask))) - cq.ringEntries = (unsafe.Pointer(uintptr(cq.RingPtr) + uintptr(p.CqOff.RingEntries))) - cq.overflow = (unsafe.Pointer(uintptr(cq.RingPtr) + uintptr(p.CqOff.Overflow))) - cq.Cqes = (ioUringCqeArray)(unsafe.Pointer(uintptr(cq.RingPtr) + uintptr(p.CqOff.Cqes))) + cq.khead = unsafe.Add(cq.RingPtr, p.CqOff.Head) + cq.ktail = unsafe.Add(cq.RingPtr, p.CqOff.Tail) + cq.kringMask = unsafe.Add(cq.RingPtr, p.CqOff.RingMask) + cq.kringEntries = unsafe.Add(cq.RingPtr, p.CqOff.RingEntries) + cq.koverflow = unsafe.Add(cq.RingPtr, p.CqOff.Overflow) + cq.Cqes = (ioUringCqeArray)(unsafe.Add(cq.RingPtr, p.CqOff.Cqes)) + if p.CqOff.Flags != 0 { - cq.flags = (unsafe.Pointer(uintptr(cq.RingPtr) + uintptr(p.CqOff.Flags))) + cq.kflags = (unsafe.Pointer(uintptr(cq.RingPtr) + uintptr(p.CqOff.Flags))) } + + sq.RingMask = *sq._KRingMask() + sq.RingEntries = *sq._KRingEntries() + cq.RingMask = *cq._KRingMask() + cq.RingEntries = *cq._KRingEntries() return nil } @@ -138,3 +152,17 @@ func io_uring_unmap_rings(sq *IoUringSq, cq *IoUringCq) error { } return nil } + +func io_uring_get_probe_ring(ring *IoUring) (probe *IoUringProbe) { + // len := SizeofIoUringProbe + 256*SizeofIouringProbeOp + probe = new(IoUringProbe) + r := ring.io_uring_register_probe(probe, 256) + if r >= 0 { + return + } + return nil +} + +func (ring *IoUring) io_uring_get_probe_ring() (probe *IoUringProbe) { + return io_uring_get_probe_ring(ring) +} diff --git a/sigset.go b/sigset.go index 0ad7376..6712062 100644 --- a/sigset.go +++ b/sigset.go @@ -2,6 +2,8 @@ package gouring import ( "unsafe" + + "golang.org/x/sys/unix" ) const ( @@ -12,8 +14,4 @@ const ( NSIG = (SIGTMAX + 1) ) -type Sigset_t struct { - Val [SIGSET_NWORDS]uint64 -} - -// https://baike.baidu.com/item/sigset_t/4481187 +type Sigset_t = unix.Sigset_t diff --git a/syscall_nr_amd64.go b/syscall_nr.go similarity index 100% rename from syscall_nr_amd64.go rename to syscall_nr.go diff --git a/uring.go b/uring.go index c94aac4..ccd8278 100644 --- a/uring.go +++ b/uring.go @@ -46,3 +46,7 @@ func (h *IoUring) Submit() (int, error) { func (h *IoUring) SubmitAndWait(waitNr uint32) (int, error) { return h.io_uring_submit_and_wait(waitNr) } + +func (h *IoUring) GetProbeRing() *IoUringProbe { + return h.io_uring_get_probe_ring() +} diff --git a/util_ptr_arith.go b/util_ptr_arith.go index 7192fa8..11ae0b2 100644 --- a/util_ptr_arith.go +++ b/util_ptr_arith.go @@ -7,34 +7,42 @@ import ( type uint32Array = unsafe.Pointer // *uint32 func uint32Array_Index(u uint32Array, i uintptr) *uint32 { - return (*uint32)(unsafe.Pointer(uintptr(unsafe.Pointer(u)) + SizeofUint32*i)) + + return (*uint32)(unsafe.Add(u, SizeofUint32*i)) } type ioUringSqeArray = unsafe.Pointer // *IoUringSqe +// ioUringSqeArray_Index OR SQE64 func ioUringSqeArray_Index(u ioUringSqeArray, i uintptr) *IoUringSqe { - return (*IoUringSqe)(unsafe.Pointer(uintptr(unsafe.Pointer(u)) + SizeofIoUringSqe*i)) + + return (*IoUringSqe)(unsafe.Add(u, SizeofIoUringSqe*i)) } +// ioUringSqe128Array_Index OR SQE128 func ioUringSqe128Array_Index(u ioUringSqeArray, i uintptr) *IoUringSqe { - return (*IoUringSqe)(unsafe.Pointer(uintptr(unsafe.Pointer(u)) + (SizeofIoUringSqe+64)*i)) + + return (*IoUringSqe)(unsafe.Add(u, (SizeofIoUringSqe+Align128IoUringSqe)*i)) } // type ioUringCqeArray = unsafe.Pointer // *IoUringCqe +// ioUringCqeArray_Index OR CQE16 func ioUringCqeArray_Index(u ioUringCqeArray, i uintptr) *IoUringCqe { - return (*IoUringCqe)(unsafe.Pointer(uintptr(unsafe.Pointer(u)) + SizeofIoUringCqe*i)) + + return (*IoUringCqe)(unsafe.Add(u, SizeofIoUringCqe*i)) } +// ioUringCqe32Array_Index OR CQE32 func ioUringCqe32Array_Index(u ioUringCqeArray, i uintptr) *IoUringCqe { - return (*IoUringCqe)(unsafe.Pointer(uintptr(unsafe.Pointer(u)) + (SizeofIoUringCqe+SizeofIoUringCqe)*i)) + return (*IoUringCqe)(unsafe.Add(u, (SizeofIoUringCqe+Align32IoUringCqe)*i)) } // -type UserData [8]byte // uint64 +type UserData uint64 func (u *UserData) SetUint64(v uint64) { putUintptr(unsafe.Pointer(u), uintptr(v)) @@ -50,6 +58,9 @@ func (u *UserData) SetUnsafe(ptr unsafe.Pointer) { func (u UserData) GetUnsafe() unsafe.Pointer { return *(*unsafe.Pointer)(unsafe.Pointer(&u)) } +func (u UserData) GetBytes() [8]byte { + return *(*[8]byte)(u.GetUnsafe()) +} func (u UserData) GetUintptr() uintptr { return uintptr(u.GetUnsafe()) } diff --git a/util_ptr_arith_test.go b/util_ptr_arith_test.go index 27f50fb..b8c33c8 100644 --- a/util_ptr_arith_test.go +++ b/util_ptr_arith_test.go @@ -39,6 +39,7 @@ func TestUserdata(t *testing.T) { var exp [8]byte bo.PutUint64(exp[:], tc.exp) - assert.Equal(t, exp[:], u[:]) + // assert.Equal(t, exp[:], u[:]) + assert.Equal(t, tc.exp, u.GetUint64()) } }