Skip to content

fix(libkernel): use precise waits for select timeouts - #4754

Merged
oneandonlydean merged 1 commit into
boykopovar:mainfrom
Dripl1x:codex/select-precise-wait
Oct 14, 2026
Merged

oneandonlydean merged 1 commit into
boykopovar:mainfrom
Dripl1x:codex/select-precise-wait

Conversation

@Dripl1x

@Dripl1x Dripl1x commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

What

Use the existing PreciseSleepUntil helper for the timeout-only path of guest select(), capping each wait at the guest deadline. After the descriptor-group refactor in main, this path is groups.empty(). Descriptor dispatch, socket/host pollers, readiness reporting and error handling are preserved. No user configuration, dependencies or additional runtime tools are required.

Rebased onto main at 61b8742b6b4508db14e8d253e60cfaa7d105379b. The patch is three files, 85 additions and 2 deletions.

guest_select_wait now also runs twenty empty-set selects of 1 ms and requires their total to stay between 20 ms and 200 ms, as the guest_poll check in #4980 does for poll(). The earlier checks only required that a call did not return before its deadline, so they passed without the fix.

Related:

Tested

Windows 11, Ryzen 7 5800H, WinLibs MinGW-w64 GCC 15.2.0 r7, Release; Ubuntu 26.04 under WSL, GCC 15.2.0, Release. Head 6e9fbc0519a41dc58779dab878d38064b8d825e2 on main 61b8742b6. Raw test output, per-call wait measurements and the probe source are in this comment.

  • Built the upstream libc/libkernel CMake subdirectories and the socket/wait test targets through a local validation wrapper.
  • Negative control on Windows: with Socket.cpp from main and the new test, guest_select_wait fails 3 of 3 runs with twenty 1 ms selects did not stay close to their deadlines. With the fix it passes 21 of 21 runs.
  • Windows: 8/9 passed; guest_udp reached its existing 20 s limit. The earlier published baseline/patched comparison also recorded this Windows timeout. The limit was not raised.
  • Linux: 10/10 passed in 0.79 s. The new check also passes there with Socket.cpp from main, because the host wait is already precise on Linux; it is a Windows regression check.
  • guest_select_wait covers 20 scenarios: zero/short deadlines, the repeated 1 ms wait, invalid arguments, unready/ready devices, unchanged timeout and descriptor bits above nfds.
  • The convention checker passed on this commit, including the PR title/body; git diff --check passed.

Earlier measurements from the first publication base remain in the earlier evidence comment.

Not tested: macOS, retail titles, game FPS, a complete build of all project targets, or the full graphics suite. This corrects the wait duration of the call; no game-scene speed change is claimed and no performance traces were captured. Only the three implementation/test files belong to this PR; local validation scripts, snapshots and logs are not committed.

Checklist

  • Based on current main; no equivalent open PR implements this select() timeout-wait change
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths still throw; no silent stubs added
  • No notes, investigation files or images added to the repository
  • No new third-party code or dependencies
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Unblocks: none
  • GPUs tested: n/a
  • AI-assisted: yes (Codex, Claude Code); implementation and local validation under the author's direction

@Dripl1x

Dripl1x commented Oct 12, 2026

Copy link
Copy Markdown
Contributor Author

Local validation and measured timeout waits for this PR.

Publication base: 27873b0f7437dd4516ae1f35ab5b494e3ee5749d; tested/published commit: aee3971199b80b6624dde0818fed96154de64bc5. Windows 11, Ryzen 7 5800H, WinLibs MinGW-w64 GCC 15.2.0 r7, Release; Ubuntu 26.04 under WSL, GCC 15.2.0, Release.

Windows used the full project CMake configuration, the original supported compiler/binutils and the pinned bundled dependency sources. Only libc/libkernel and the relevant test targets were built. Linux used the actual upstream libc/libkernel CMake subdirectories in a local validation wrapper. A complete build of all targets, graphics tests and game FPS were not run. The Windows UDP timeout also occurred in the earlier unchanged-main comparison. Local build and loaded-library paths are redacted from the public logs below; all timing samples, test results and library hashes are preserved.

Windows publication-base test output
Test project <local build directory>
    Start  51: precise_wait
1/8 Test  #51: precise_wait .....................   Passed    0.14 sec
    Start 866: guest_udp
2/8 Test #866: guest_udp ........................***Timeout  20.02 sec
[time] scheduler tick raised to 0.5 ms (was 0.50 ms, now 0.50 ms, timed waits fine)

    Start 867: guest_socket_read_write
3/8 Test #867: guest_socket_read_write ..........   Passed    0.06 sec
    Start 868: guest_poll
4/8 Test #868: guest_poll .......................   Passed    0.11 sec
    Start 869: guest_select_wait
5/8 Test #869: guest_select_wait ................   Passed    0.10 sec
    Start 870: guest_tcp
6/8 Test #870: guest_tcp ........................   Passed    0.06 sec
    Start 871: guest_socket_pair
7/8 Test #871: guest_socket_pair ................   Passed    0.06 sec
    Start 873: guest_socket_events
8/8 Test #873: guest_socket_events ..............   Passed    0.22 sec

88% tests passed, 1 tests failed out of 8

Total Test time (real) =  21.54 sec

The following tests FAILED:
	866 - guest_udp (Timeout)
Errors while running CTest
Linux publication-base test output
Test project <local build directory>
    Start   4: precise_wait
1/9 Test   #4: precise_wait .....................   Passed    0.00 sec
    Start 158: guest_udp
2/9 Test #158: guest_udp ........................   Passed    0.01 sec
    Start 159: guest_socket_read_write
3/9 Test #159: guest_socket_read_write ..........   Passed    0.05 sec
    Start 160: guest_poll
4/9 Test #160: guest_poll .......................   Passed    0.07 sec
    Start 161: guest_select_wait
5/9 Test #161: guest_select_wait ................   Passed    0.05 sec
    Start 162: guest_select
6/9 Test #162: guest_select .....................   Passed    0.31 sec
    Start 163: guest_tcp
7/9 Test #163: guest_tcp ........................   Passed    0.01 sec
    Start 164: guest_socket_pair
8/9 Test #164: guest_socket_pair ................   Passed    0.01 sec
    Start 166: guest_socket_events
9/9 Test #166: guest_socket_events ..............   Passed    0.15 sec

100% tests passed, 0 tests failed out of 9

Total Test time (real) =   0.66 sec

The official convention checker passes on the committed branch with the PR title/body; git diff --check passes. The patch contains exactly three files, 76 additions and 2 deletions.

Before/after wait measurements

Measurement base: 682ef0c17451e41c41e1b2008f982a700341b665. nine alternating-order pairs, one warmup and 40 samples per timeout per process. Each process checks that the absolute loaded libkernel path is the selected variant. Socket.cpp, SocketSelectDeadline.hpp, PreciseWait.hpp and kernel timer initialization are unchanged between the measurement and publication bases.

Timeout (us) Baseline median (us) Patched median (us)
0 0.1 0.1
50 15560.5 499.6
500 15568.5 1027.9
1000 15560.4 1507.9
2000 15576.9 2508.9
16667 31173.1 17059.6

The figures summarize elapsed waits through the guest ABI in the compiled PRX library; they are not FPS measurements or hard scheduling guarantees.

Compared library SHA-256 hashes
{
  "baseline": {
    "libkernel.prx": "5d435c4f6c7da210a2762a540c4dead3e27c3b14a3ecaf396b8eca0b42f4ea41",
    "libc.prx": "fac53d34db8259861fe28b7264f226c21d2436ad075edcf70193b672f6a2c81d"
  },
  "patched": {
    "libkernel.prx": "721220ce05a6c261590923e48e2061a8c6cc2c30e25a3bf6112113523e177bb4",
    "libc.prx": "fac53d34db8259861fe28b7264f226c21d2436ad075edcf70193b672f6a2c81d"
  }
}
Probe source used for the measurements
#include "prx/libc/include/general/VabiMacros.hpp"
#include <algorithm>
#include <chrono>
#include <cstdint>
#include <cstdio>
#include <vector>
#ifdef _WIN32
#include <windows.h>
#endif

extern "C" int APS5_VABI select_nid_postfix(int, void*, void*, void*, const void*);
struct Timeval { std::int64_t seconds; std::int64_t microseconds; };

int main() {
#ifdef _WIN32
    wchar_t kernelPath[32768]{};
    if (!GetModuleFileNameW(GetModuleHandleW(L"libkernel.prx"), kernelPath, 32768)) return 2;
    char utf8Path[131072]{};
    if (!WideCharToMultiByte(CP_UTF8, 0, kernelPath, -1, utf8Path, sizeof(utf8Path), nullptr, nullptr)) return 3;
    std::printf("loaded_kernel=%s\n", utf8Path);
#endif
    using Clock = std::chrono::steady_clock;
    for (const std::int64_t micros : {0, 50, 500, 1000, 2000, 16667}) {
        std::vector<double> samples;
        const Timeval limit{0, micros};
        for (int trial = 0; trial < 41; ++trial) {
            const auto begin = Clock::now();
            const int result = select_nid_postfix(0, nullptr, nullptr, nullptr, &limit);
            const auto elapsed = Clock::now() - begin;
            if (result != 0 || elapsed < std::chrono::microseconds(micros)) return 1;
            if (trial != 0) samples.push_back(std::chrono::duration<double, std::micro>(elapsed).count());
        }
        std::sort(samples.begin(), samples.end());
        std::printf("timeout_us=%lld median_us=%.3f p90_us=%.3f min_us=%.3f max_us=%.3f\n",
            static_cast<long long>(micros), samples[20], samples[36], samples.front(), samples.back());
        std::printf("samples_us=%lld", static_cast<long long>(micros));
        for (const auto value : samples) std::printf(" %.3f", value);
        std::puts("");
    }
}
Pair 1: baseline, raw samples and loaded library
loaded_kernel=<baseline directory>/libkernel.prx (absolute path verified locally)

timeout_us=0 median_us=0.100 p90_us=0.200 min_us=0.100 max_us=0.200

samples_us=0 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.200 0.200 0.200 0.200 0.200 0.200 0.200 0.200 0.200 0.200 0.200 0.200 0.200 0.200 0.200

timeout_us=50 median_us=15540.300 p90_us=16515.500 min_us=14531.200 max_us=17034.100

samples_us=50 14531.200 14997.800 14999.100 15008.200 15056.700 15093.600 15139.200 15139.400 15144.500 15161.600 15177.000 15263.700 15453.900 15497.700 15504.800 15506.800 15519.100 15535.200 15535.300 15540.200 15540.300 15562.600 15585.700 15588.000 15593.300 15640.700 15669.400 15687.700 15706.800 15719.300 15992.100 16015.600 16206.600 16284.500 16410.900 16497.800 16515.500 16533.200 16571.700 17034.100

timeout_us=500 median_us=15543.100 p90_us=16508.300 min_us=14493.300 max_us=16925.200

samples_us=500 14493.300 14566.000 14798.800 15015.200 15016.300 15024.700 15030.900 15051.600 15052.000 15096.100 15112.500 15116.500 15497.300 15506.200 15507.900 15517.000 15525.300 15525.600 15526.200 15530.400 15543.100 15543.300 15545.300 15591.800 15765.700 15875.300 15927.700 16001.100 16006.700 16010.100 16034.700 16038.100 16067.100 16090.200 16207.100 16276.800 16508.300 16529.200 16604.700 16925.200

timeout_us=1000 median_us=15547.200 p90_us=16592.200 min_us=13777.700 max_us=17065.700

samples_us=1000 13777.700 14545.900 14553.200 14579.300 14718.900 15023.300 15034.100 15034.500 15042.500 15054.600 15082.300 15110.200 15144.100 15432.500 15501.100 15503.200 15509.300 15511.600 15517.400 15538.800 15547.200 15551.600 15560.700 15571.800 15671.900 15981.900 16038.200 16039.600 16044.600 16047.100 16085.100 16100.900 16519.800 16524.800 16575.300 16580.100 16592.200 16625.500 17026.100 17065.700

timeout_us=2000 median_us=15694.100 p90_us=16628.100 min_us=13500.900 max_us=17545.700

samples_us=2000 13500.900 13573.500 14034.600 14453.900 14562.700 14564.800 14885.400 14903.000 14986.700 15012.400 15024.600 15041.500 15064.500 15087.700 15512.500 15517.000 15518.800 15519.600 15523.600 15535.800 15694.100 16010.300 16018.400 16020.300 16023.300 16048.900 16048.900 16057.600 16074.800 16084.400 16102.900 16387.000 16398.800 16500.400 16573.700 16583.900 16628.100 17054.300 17527.400 17545.700

timeout_us=16667 median_us=31220.800 p90_us=32156.000 min_us=28985.200 max_us=33552.800

samples_us=16667 28985.200 29109.300 30006.800 30064.900 30388.700 30476.400 30510.900 30554.800 30564.900 30573.700 30618.400 30635.600 30719.900 30771.000 31033.500 31077.800 31096.900 31103.400 31184.600 31197.800 31220.800 31240.700 31248.900 31411.300 31519.700 31524.900 31575.900 31579.900 31614.200 31649.700 31893.600 32024.100 32033.800 32096.500 32120.700 32120.800 32156.000 32635.600 33459.500 33552.800
Pair 1: patched, raw samples and loaded library
loaded_kernel=<patched directory>/libkernel.prx (absolute path verified locally)

timeout_us=0 median_us=0.100 p90_us=0.200 min_us=0.100 max_us=0.200

samples_us=0 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.200 0.200 0.200 0.200 0.200 0.200 0.200 0.200 0.200 0.200 0.200 0.200 0.200 0.200 0.200 0.200 0.200 0.200 0.200

timeout_us=50 median_us=499.600 p90_us=513.500 min_us=424.500 max_us=576.600

samples_us=50 424.500 452.400 482.100 486.900 488.500 490.400 491.000 491.300 492.300 492.600 493.000 493.800 496.200 496.500 497.100 497.100 497.600 497.700 498.400 499.300 499.600 499.600 499.800 501.800 502.100 502.600 503.000 503.200 503.400 506.000 506.400 506.700 507.100 508.700 508.800 509.300 513.500 516.800 552.500 576.600

timeout_us=500 median_us=1033.300 p90_us=1131.100 min_us=922.500 max_us=1364.400

samples_us=500 922.500 956.400 993.600 995.400 1001.100 1002.000 1002.800 1005.700 1013.900 1018.500 1022.000 1022.400 1025.900 1028.600 1028.900 1029.000 1031.300 1031.400 1032.100 1032.200 1033.300 1034.200 1035.900 1036.000 1036.200 1036.300 1037.100 1039.100 1039.200 1042.300 1048.000 1051.000 1100.700 1101.700 1110.600 1125.700 1131.100 1138.400 1310.800 1364.400

timeout_us=1000 median_us=1511.100 p90_us=1576.000 min_us=1420.800 max_us=1897.500

samples_us=1000 1420.800 1426.100 1439.300 1463.400 1465.200 1493.100 1493.300 1497.300 1500.200 1501.700 1502.700 1503.800 1504.200 1504.500 1507.300 1509.000 1509.400 1509.700 1510.400 1510.800 1511.100 1512.100 1512.600 1513.300 1514.300 1515.900 1516.200 1516.800 1519.500 1521.200 1521.800 1532.000 1534.700 1545.700 1557.100 1574.000 1576.000 1601.900 1607.700 1897.500

timeout_us=2000 median_us=2511.600 p90_us=2531.100 min_us=2026.100 max_us=2623.300

samples_us=2000 2026.100 2138.200 2452.600 2456.100 2495.400 2497.800 2499.300 2499.700 2500.500 2501.600 2502.700 2503.400 2505.100 2507.100 2507.500 2508.300 2510.100 2511.000 2511.100 2511.400 2511.600 2511.600 2512.200 2513.900 2515.900 2516.300 2516.600 2517.700 2518.200 2518.400 2520.700 2522.500 2523.300 2528.500 2528.800 2529.500 2531.100 2562.200 2569.900 2623.300

timeout_us=16667 median_us=17054.100 p90_us=17146.700 min_us=16730.500 max_us=17179.300

samples_us=16667 16730.500 16759.900 16836.000 16883.100 16884.500 16922.300 16975.000 16985.100 16987.600 17013.600 17018.800 17021.000 17022.900 17027.700 17031.200 17037.900 17039.400 17039.900 17044.100 17044.800 17054.100 17056.100 17057.700 17058.000 17064.400 17065.900 17070.700 17080.000 17081.800 17086.100 17112.900 17120.300 17120.500 17127.700 17129.400 17137.300 17146.700 17151.000 17178.500 17179.300
Pair 2: patched, raw samples and loaded library
loaded_kernel=<patched directory>/libkernel.prx (absolute path verified locally)

timeout_us=0 median_us=0.100 p90_us=0.200 min_us=0.100 max_us=0.200

samples_us=0 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.200 0.200 0.200 0.200 0.200 0.200 0.200 0.200 0.200 0.200 0.200 0.200 0.200 0.200

timeout_us=50 median_us=500.500 p90_us=510.500 min_us=393.400 max_us=608.700

samples_us=50 393.400 480.700 486.000 486.600 491.900 493.400 495.700 496.100 496.200 497.100 497.900 498.100 498.200 498.500 498.600 498.700 499.000 499.700 500.000 500.300 500.500 501.100 501.200 501.500 502.300 502.600 502.800 503.100 503.200 503.300 503.900 505.800 506.600 508.400 509.100 510.300 510.500 512.000 527.600 608.700

timeout_us=500 median_us=1001.800 p90_us=1090.900 min_us=523.200 max_us=1377.700

samples_us=500 523.200 818.900 916.300 936.700 982.300 989.000 991.300 994.500 994.900 995.200 996.000 996.400 996.800 997.400 997.600 998.000 999.900 1000.300 1000.300 1000.400 1001.800 1002.800 1002.900 1003.400 1004.500 1004.500 1012.900 1014.100 1024.300 1026.300 1034.700 1035.300 1037.200 1048.100 1050.400 1082.400 1090.900 1119.200 1208.000 1377.700

timeout_us=1000 median_us=1507.900 p90_us=1550.500 min_us=1020.000 max_us=1670.100

samples_us=1000 1020.000 1056.200 1379.300 1380.300 1438.300 1484.100 1492.200 1497.000 1497.900 1499.300 1499.700 1499.900 1501.900 1504.300 1504.500 1504.800 1506.300 1507.100 1507.300 1507.800 1507.900 1509.100 1509.200 1509.700 1510.600 1511.100 1511.600 1513.300 1513.300 1513.400 1513.800 1515.600 1518.600 1521.700 1523.300 1523.900 1550.500 1605.200 1611.200 1670.100

timeout_us=2000 median_us=2509.500 p90_us=2583.800 min_us=2055.400 max_us=2628.500

samples_us=2000 2055.400 2112.600 2446.200 2447.100 2448.500 2481.300 2481.400 2490.900 2492.300 2501.000 2502.600 2504.200 2505.000 2505.400 2505.700 2506.400 2506.600 2509.000 2509.000 2509.400 2509.500 2510.800 2511.300 2512.200 2512.500 2512.700 2518.000 2519.600 2520.200 2521.000 2527.500 2527.800 2528.600 2535.600 2536.100 2546.700 2583.800 2593.400 2596.600 2628.500

timeout_us=16667 median_us=17053.200 p90_us=17184.700 min_us=16711.000 max_us=17232.400

samples_us=16667 16711.000 16733.900 16875.200 16881.500 16895.200 16908.200 16943.700 16959.500 16985.600 16997.000 16997.200 17000.200 17013.800 17017.400 17021.500 17028.400 17028.500 17030.300 17034.900 17037.000 17053.200 17067.200 17070.100 17074.600 17074.700 17075.300 17082.700 17084.200 17087.000 17087.400 17087.900 17097.400 17112.300 17114.100 17126.300 17129.300 17184.700 17186.800 17203.900 17232.400
Pair 2: baseline, raw samples and loaded library
loaded_kernel=<baseline directory>/libkernel.prx (absolute path verified locally)

timeout_us=0 median_us=0.100 p90_us=0.200 min_us=0.100 max_us=0.200

samples_us=0 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.200 0.200 0.200 0.200 0.200 0.200 0.200 0.200 0.200 0.200 0.200 0.200 0.200 0.200 0.200

timeout_us=50 median_us=15565.100 p90_us=16493.000 min_us=14333.300 max_us=17006.700

samples_us=50 14333.300 14578.600 14998.500 15008.900 15018.400 15021.000 15032.500 15037.000 15038.600 15043.100 15057.700 15060.300 15091.500 15323.600 15331.900 15368.300 15491.600 15496.500 15501.200 15528.600 15565.100 15566.100 15692.500 15862.800 15880.400 15897.500 15997.900 16005.100 16033.700 16059.500 16077.900 16125.800 16129.100 16175.600 16199.900 16366.800 16493.000 16515.900 16549.300 17006.700

timeout_us=500 median_us=15568.500 p90_us=16218.200 min_us=14585.000 max_us=16604.100

samples_us=500 14585.000 14737.600 14808.000 14861.100 14996.500 14996.800 15013.500 15048.700 15066.200 15074.300 15146.100 15376.100 15432.600 15500.900 15522.100 15525.000 15551.200 15554.300 15554.600 15564.300 15568.500 15597.000 15807.700 15912.000 15923.000 15951.000 16012.700 16017.400 16023.000 16033.700 16036.300 16062.300 16065.500 16070.400 16082.200 16089.000 16218.200 16522.000 16526.400 16604.100

timeout_us=1000 median_us=15550.000 p90_us=16172.000 min_us=15030.400 max_us=16575.600

samples_us=1000 15030.400 15038.100 15044.200 15049.200 15050.900 15051.500 15053.900 15054.300 15057.900 15061.400 15069.700 15078.000 15252.900 15466.100 15505.700 15521.600 15541.500 15545.400 15549.400 15549.800 15550.000 15562.000 15562.700 15577.400 15607.500 16006.700 16041.200 16051.500 16054.900 16056.900 16080.900 16092.200 16095.800 16101.900 16116.800 16122.200 16172.000 16479.400 16518.800 16575.600

timeout_us=2000 median_us=15953.200 p90_us=16942.300 min_us=13542.800 max_us=17170.100

samples_us=2000 13542.800 13635.000 14055.100 14126.300 14396.400 14403.700 14537.500 14558.900 14666.800 15028.500 15046.000 15072.800 15106.500 15141.500 15174.600 15511.900 15535.100 15544.200 15574.100 15861.100 15953.200 15976.500 16003.000 16025.400 16033.200 16041.100 16042.200 16065.900 16498.900 16514.500 16539.800 16558.700 16571.800 16573.100 16624.300 16766.300 16942.300 17018.800 17060.400 17170.100

timeout_us=16667 median_us=31173.100 p90_us=32487.000 min_us=28975.000 max_us=33033.100

samples_us=16667 28975.000 30061.100 30071.500 30127.400 30133.200 30189.700 30277.000 30588.100 30588.700 30726.600 30828.900 30921.900 30931.900 31030.400 31054.800 31090.200 31090.200 31090.400 31096.000 31152.900 31173.100 31201.200 31297.000 31564.900 31565.900 31577.000 31580.100 31632.700 31658.200 31658.400 31695.400 31746.400 31769.800 32079.200 32088.500 32174.000 32487.000 32549.100 32620.200 33033.100
Pair 3: baseline, raw samples and loaded library
loaded_kernel=<baseline directory>/libkernel.prx (absolute path verified locally)

timeout_us=0 median_us=0.100 p90_us=0.200 min_us=0.100 max_us=0.200

samples_us=0 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.200 0.200 0.200 0.200 0.200 0.200 0.200 0.200 0.200 0.200 0.200 0.200 0.200 0.200 0.200 0.200 0.200 0.200

timeout_us=50 median_us=15560.700 p90_us=16537.700 min_us=14580.700 max_us=17017.300

samples_us=50 14580.700 14597.000 14644.900 15019.400 15023.200 15039.100 15045.300 15046.200 15050.200 15052.200 15052.500 15054.300 15061.200 15070.500 15097.600 15111.100 15359.800 15443.900 15537.000 15550.700 15560.700 15564.000 15569.400 15586.100 15856.500 16009.600 16017.900 16025.700 16067.300 16068.600 16074.500 16074.900 16095.100 16106.800 16168.200 16507.000 16537.700 16557.300 16667.200 17017.300

timeout_us=500 median_us=15556.000 p90_us=16189.200 min_us=14534.800 max_us=16676.000

samples_us=500 14534.800 14555.000 14720.700 15033.300 15048.100 15059.700 15067.100 15067.400 15075.100 15134.000 15181.900 15360.700 15501.600 15518.100 15526.700 15527.100 15529.600 15539.200 15542.100 15547.200 15556.000 15559.200 15566.500 15604.000 15632.900 15690.200 15789.900 16006.000 16042.400 16057.800 16060.600 16061.300 16064.300 16064.500 16066.100 16072.700 16189.200 16543.100 16568.500 16676.000

timeout_us=1000 median_us=15533.400 p90_us=16530.700 min_us=14691.600 max_us=17011.000

samples_us=1000 14691.600 14736.500 14759.400 15004.600 15006.100 15032.100 15037.800 15043.900 15095.300 15122.700 15146.400 15240.400 15279.700 15429.500 15498.200 15498.700 15518.000 15522.900 15530.300 15533.300 15533.400 15547.200 15549.200 15556.700 15634.700 15650.400 15676.900 15966.500 15992.200 15992.200 15997.700 16018.600 16020.400 16396.700 16495.400 16523.700 16530.700 16544.600 17008.200 17011.000

timeout_us=2000 median_us=15522.300 p90_us=17198.300 min_us=14006.400 max_us=18010.400

samples_us=2000 14006.400 14507.200 14507.800 14546.200 14618.900 14873.000 14916.100 14944.800 15007.500 15012.900 15014.400 15044.900 15052.500 15078.600 15176.600 15187.600 15511.500 15513.100 15513.600 15516.200 15522.300 15523.300 15536.700 15545.400 15557.800 15583.400 16011.500 16021.100 16024.500 16041.100 16058.900 16067.800 16089.700 16506.700 16522.300 17050.300 17198.300 17548.100 17574.100 18010.400

timeout_us=16667 median_us=31171.900 p90_us=32322.000 min_us=29601.200 max_us=32606.700

samples_us=16667 29601.200 29673.000 30111.100 30339.800 30459.400 30572.000 30581.200 30603.900 30604.100 30618.000 30659.000 30659.000 30661.100 30669.000 30724.600 30781.100 31033.200 31092.900 31111.100 31117.200 31171.900 31515.900 31570.700 31585.800 31599.500 31614.000 31638.100 31650.500 31677.500 32008.400 32074.200 32092.500 32102.900 32113.700 32133.300 32177.400 32322.000 32353.800 32605.200 32606.700
Pair 3: patched, raw samples and loaded library
loaded_kernel=<patched directory>/libkernel.prx (absolute path verified locally)

timeout_us=0 median_us=0.100 p90_us=0.200 min_us=0.100 max_us=0.200

samples_us=0 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.200 0.200 0.200 0.200 0.200 0.200 0.200 0.200 0.200 0.200 0.200 0.200 0.200

timeout_us=50 median_us=499.800 p90_us=508.500 min_us=431.300 max_us=572.300

samples_us=50 431.300 445.800 484.800 487.800 488.200 488.400 489.600 493.900 495.600 496.200 496.400 496.500 497.100 497.200 497.600 497.800 499.400 499.400 499.700 499.700 499.800 500.000 500.200 500.700 501.000 501.000 501.000 501.000 501.000 502.100 502.200 504.200 506.000 506.600 506.800 507.600 508.500 522.100 554.900 572.300

timeout_us=500 median_us=1028.100 p90_us=1077.500 min_us=523.300 max_us=1127.000

samples_us=500 523.300 861.400 942.100 993.800 994.200 995.100 999.700 1003.900 1005.600 1007.600 1009.300 1010.500 1010.800 1013.000 1017.900 1019.200 1021.500 1025.000 1025.700 1026.100 1028.100 1028.700 1030.700 1031.500 1031.900 1032.900 1033.100 1033.200 1033.800 1035.700 1036.000 1037.200 1038.500 1038.700 1048.800 1050.700 1077.500 1085.100 1114.700 1127.000

timeout_us=1000 median_us=1505.100 p90_us=1560.300 min_us=1038.400 max_us=1997.200

samples_us=1000 1038.400 1060.100 1086.500 1431.900 1483.700 1494.400 1495.500 1496.800 1500.200 1500.600 1500.600 1500.600 1500.900 1501.500 1501.700 1502.600 1503.500 1503.700 1503.900 1504.900 1505.100 1505.400 1505.800 1506.700 1506.800 1509.300 1509.900 1510.300 1513.900 1514.800 1515.300 1518.500 1519.600 1523.400 1524.300 1525.800 1560.300 1563.000 1596.100 1997.200

timeout_us=2000 median_us=2509.700 p90_us=2559.800 min_us=2027.300 max_us=2626.900

samples_us=2000 2027.300 2030.000 2144.600 2384.200 2401.300 2460.200 2494.100 2494.700 2495.100 2495.500 2496.900 2497.100 2498.000 2500.700 2501.200 2501.400 2501.400 2502.800 2503.400 2504.800 2509.700 2510.600 2511.700 2513.400 2514.600 2515.700 2516.400 2516.900 2518.000 2521.200 2521.700 2521.900 2522.900 2528.400 2538.300 2541.800 2559.800 2591.000 2597.400 2626.900

timeout_us=16667 median_us=17075.900 p90_us=17186.700 min_us=16699.300 max_us=17281.300

samples_us=16667 16699.300 16737.000 16897.900 16951.200 17008.200 17008.900 17026.700 17028.500 17038.500 17040.500 17041.500 17044.200 17046.100 17048.000 17050.300 17050.500 17051.200 17054.200 17056.900 17058.900 17075.900 17082.000 17082.400 17097.700 17105.100 17106.200 17107.700 17111.000 17114.500 17116.500 17120.800 17127.000 17131.000 17135.900 17137.900 17164.200 17186.700 17248.500 17262.800 17281.300
Pair 4: patched, raw samples and loaded library
loaded_kernel=<patched directory>/libkernel.prx (absolute path verified locally)

timeout_us=0 median_us=0.100 p90_us=0.200 min_us=0.100 max_us=0.200

samples_us=0 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.200 0.200 0.200 0.200 0.200 0.200 0.200 0.200 0.200 0.200 0.200 0.200 0.200 0.200

timeout_us=50 median_us=500.000 p90_us=510.600 min_us=443.200 max_us=572.000

samples_us=50 443.200 487.600 488.800 489.100 490.500 490.700 491.800 492.800 493.400 494.500 495.000 495.500 496.200 498.000 498.800 499.500 499.600 499.600 499.700 499.700 500.000 500.200 500.200 500.300 500.300 500.400 500.500 501.100 501.900 501.900 503.800 504.500 506.300 506.400 508.100 509.400 510.600 510.700 511.800 572.000

timeout_us=500 median_us=1027.900 p90_us=1068.200 min_us=940.400 max_us=1282.900

samples_us=500 940.400 942.700 986.200 989.200 989.900 992.000 992.500 997.200 1001.700 1003.300 1007.800 1008.400 1011.700 1011.800 1015.300 1021.500 1022.700 1025.500 1026.400 1027.800 1027.900 1028.300 1029.100 1029.400 1029.600 1029.900 1030.200 1030.500 1030.600 1031.900 1034.300 1035.700 1036.600 1037.000 1037.800 1041.200 1068.200 1096.500 1104.800 1282.900

timeout_us=1000 median_us=1509.600 p90_us=1582.700 min_us=1029.000 max_us=1609.700

samples_us=1000 1029.000 1417.800 1436.200 1442.600 1495.700 1499.900 1500.300 1500.900 1502.200 1502.200 1503.600 1504.300 1505.100 1505.200 1505.500 1505.800 1506.300 1506.400 1508.600 1509.200 1509.600 1511.200 1512.000 1512.100 1514.300 1515.000 1516.100 1517.100 1518.700 1518.900 1519.200 1519.400 1522.500 1532.400 1535.800 1549.000 1582.700 1596.200 1596.600 1609.700

timeout_us=2000 median_us=2508.900 p90_us=2527.600 min_us=2017.700 max_us=2586.700

samples_us=2000 2017.700 2043.700 2441.200 2442.400 2490.300 2492.700 2497.800 2498.900 2499.200 2499.900 2501.000 2501.200 2501.300 2501.300 2502.400 2504.200 2504.900 2506.600 2507.500 2508.200 2508.900 2509.700 2509.700 2510.100 2510.500 2514.100 2514.200 2515.700 2516.000 2516.200 2517.200 2520.300 2520.800 2523.100 2523.700 2526.300 2527.600 2532.600 2579.800 2586.700

timeout_us=16667 median_us=17062.100 p90_us=17166.700 min_us=16717.400 max_us=17187.100

samples_us=16667 16717.400 16747.000 16895.600 16896.400 16943.100 16981.600 17001.800 17006.800 17011.700 17021.100 17022.200 17022.600 17035.000 17035.400 17043.000 17047.200 17051.500 17053.600 17058.700 17061.700 17062.100 17063.600 17064.100 17068.400 17069.200 17072.000 17072.600 17075.700 17080.800 17094.500 17095.300 17095.400 17099.100 17102.900 17106.600 17143.800 17166.700 17183.900 17184.900 17187.100
Pair 4: baseline, raw samples and loaded library
loaded_kernel=<baseline directory>/libkernel.prx (absolute path verified locally)

timeout_us=0 median_us=0.100 p90_us=0.200 min_us=0.100 max_us=0.200

samples_us=0 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.200 0.200 0.200 0.200 0.200 0.200 0.200 0.200 0.200 0.200 0.200 0.200 0.200 0.200 0.200 0.200 0.200 0.200 0.200

timeout_us=50 median_us=15559.200 p90_us=16225.500 min_us=14374.000 max_us=17038.600

samples_us=50 14374.000 14534.600 14540.600 14694.700 14983.100 15042.700 15047.300 15049.800 15053.200 15085.400 15479.400 15519.100 15521.500 15530.600 15533.700 15549.300 15550.300 15552.100 15557.100 15557.900 15559.200 15568.400 15568.800 15571.400 15571.500 16012.700 16022.600 16030.400 16038.600 16048.900 16054.400 16069.300 16072.500 16076.800 16182.200 16204.800 16225.500 16558.300 17038.300 17038.600

timeout_us=500 median_us=15538.700 p90_us=16498.800 min_us=14513.600 max_us=17028.000

samples_us=500 14513.600 14523.900 14615.800 14985.000 14994.100 15037.800 15039.500 15076.800 15129.000 15137.300 15190.700 15401.100 15493.900 15500.400 15502.100 15502.300 15503.900 15505.300 15506.800 15516.300 15538.700 15539.800 15541.500 15547.300 15569.000 15627.500 15946.700 16002.800 16008.300 16019.600 16049.500 16063.600 16114.800 16286.800 16488.900 16492.200 16498.800 16516.400 16582.500 17028.000

timeout_us=1000 median_us=15557.800 p90_us=16523.100 min_us=14535.300 max_us=16533.600

samples_us=1000 14535.300 14555.400 14742.300 14884.600 15021.000 15021.400 15025.100 15030.800 15046.100 15060.500 15064.700 15120.600 15497.500 15508.800 15519.000 15521.200 15527.500 15532.300 15544.700 15550.300 15557.800 15559.600 15562.400 15567.800 15630.700 16017.400 16020.600 16035.700 16053.700 16059.000 16064.300 16069.900 16074.700 16099.300 16150.000 16194.900 16523.100 16528.500 16529.200 16533.600

timeout_us=2000 median_us=15503.400 p90_us=17359.500 min_us=14014.500 max_us=18061.900

samples_us=2000 14014.500 14019.000 14027.900 14146.500 14436.500 14589.200 14661.400 14749.700 14973.700 15022.100 15026.300 15035.300 15049.500 15068.700 15070.900 15125.900 15161.600 15185.200 15437.600 15500.000 15503.400 15529.800 15531.300 15540.100 15545.500 15546.200 15599.400 15605.300 15754.400 16094.600 16112.000 16537.700 16564.200 16707.700 16980.500 17052.000 17359.500 17537.300 17553.500 18061.900

timeout_us=16667 median_us=31139.000 p90_us=32200.900 min_us=29648.600 max_us=32768.000

samples_us=16667 29648.600 30065.400 30108.600 30209.400 30255.000 30500.400 30512.100 30565.400 30582.300 30586.500 30587.600 30605.500 30818.100 31055.000 31076.300 31082.100 31088.400 31098.400 31107.100 31134.000 31139.000 31140.000 31240.800 31434.500 31503.800 31581.500 31593.500 31622.300 31629.700 31718.800 31772.800 31898.600 31968.000 32064.500 32092.300 32138.700 32200.900 32601.100 32702.300 32768.000
Pair 5: baseline, raw samples and loaded library
loaded_kernel=<baseline directory>/libkernel.prx (absolute path verified locally)

timeout_us=0 median_us=0.100 p90_us=0.200 min_us=0.100 max_us=0.200

samples_us=0 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.200 0.200 0.200 0.200 0.200 0.200 0.200 0.200 0.200 0.200 0.200 0.200 0.200 0.200

timeout_us=50 median_us=15560.500 p90_us=16456.500 min_us=14559.600 max_us=16834.200

samples_us=50 14559.600 14614.700 14690.300 14705.700 14937.100 15025.100 15027.100 15071.400 15073.600 15174.900 15489.900 15541.400 15544.100 15547.500 15547.800 15554.700 15556.400 15557.000 15558.500 15560.300 15560.500 15597.600 15598.300 15647.300 15667.300 15750.700 15959.500 16003.800 16019.800 16028.300 16033.600 16089.000 16091.900 16109.000 16159.100 16190.100 16456.500 16568.500 16584.900 16834.200

timeout_us=500 median_us=15588.000 p90_us=16501.100 min_us=14444.800 max_us=16684.100

samples_us=500 14444.800 14628.500 15016.000 15022.200 15035.300 15051.600 15075.900 15076.100 15115.600 15140.300 15446.400 15473.400 15493.000 15498.200 15501.400 15522.500 15534.200 15541.200 15549.200 15559.100 15588.000 15642.000 15659.900 15687.500 15687.900 15706.200 15747.200 15861.600 15982.200 16041.100 16041.900 16062.000 16066.000 16073.100 16078.600 16225.000 16501.100 16575.400 16626.300 16684.100

timeout_us=1000 median_us=15560.400 p90_us=16534.900 min_us=14547.700 max_us=16657.900

samples_us=1000 14547.700 14561.000 14586.000 15005.800 15017.500 15027.800 15029.500 15049.000 15050.600 15057.800 15072.600 15090.600 15140.500 15422.900 15521.600 15530.600 15535.500 15536.800 15552.300 15556.900 15560.400 15561.500 15576.000 15586.300 15850.400 15992.200 16044.800 16047.200 16051.600 16053.400 16061.400 16072.000 16133.600 16191.100 16370.400 16445.000 16534.900 16578.800 16600.300 16657.900

timeout_us=2000 median_us=15661.100 p90_us=16574.100 min_us=13549.900 max_us=17578.400

samples_us=2000 13549.900 13992.400 14002.900 14159.000 14500.700 14556.100 14643.200 15038.000 15043.600 15062.300 15254.600 15497.900 15501.100 15503.200 15506.100 15515.800 15518.900 15519.300 15552.900 15566.700 15661.100 15663.600 15837.200 15880.800 15994.300 15997.300 15997.800 15999.800 16005.000 16030.900 16034.500 16035.200 16056.300 16102.700 16487.900 16534.500 16574.100 17025.100 17093.900 17578.400

timeout_us=16667 median_us=31211.600 p90_us=33006.200 min_us=29627.400 max_us=33047.800

samples_us=16667 29627.400 29633.400 29761.400 29870.200 30129.400 30454.200 30470.500 30566.000 30660.500 30695.400 30698.500 30779.400 30863.400 30997.800 31113.400 31125.000 31129.200 31147.300 31152.600 31163.400 31211.600 31229.700 31251.800 31551.200 31572.500 31605.700 31635.700 31639.000 31652.400 31665.500 31719.600 31730.200 32019.700 32082.800 32132.200 32169.800 33006.200 33022.000 33031.400 33047.800
Pair 5: patched, raw samples and loaded library
loaded_kernel=<patched directory>/libkernel.prx (absolute path verified locally)

timeout_us=0 median_us=0.100 p90_us=0.200 min_us=0.100 max_us=0.200

samples_us=0 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.200 0.200 0.200 0.200 0.200 0.200 0.200 0.200 0.200 0.200 0.200 0.200 0.200 0.200 0.200 0.200

timeout_us=50 median_us=500.400 p90_us=505.800 min_us=351.300 max_us=653.200

samples_us=50 351.300 487.500 491.000 491.600 492.100 492.700 492.900 493.000 495.400 495.700 496.600 498.000 498.100 498.600 498.700 499.100 499.200 499.600 500.100 500.200 500.400 500.400 500.700 501.000 501.000 501.500 501.600 501.800 501.800 502.600 504.100 504.400 504.400 504.700 505.100 505.800 505.800 505.900 511.700 653.200

timeout_us=500 median_us=1029.800 p90_us=1074.700 min_us=1003.900 max_us=1103.700

samples_us=500 1003.900 1011.200 1013.600 1014.300 1016.000 1017.100 1017.300 1023.700 1024.500 1025.300 1025.500 1025.600 1025.900 1027.100 1027.700 1027.700 1027.900 1028.700 1029.100 1029.500 1029.800 1029.900 1030.300 1030.400 1030.400 1030.600 1032.000 1032.000 1032.200 1032.600 1032.900 1033.300 1033.400 1034.400 1034.600 1062.000 1074.700 1086.700 1087.700 1103.700

timeout_us=1000 median_us=1509.400 p90_us=1546.100 min_us=1048.600 max_us=1590.400

samples_us=1000 1048.600 1435.400 1490.000 1493.600 1497.900 1499.900 1500.000 1501.100 1502.100 1504.600 1505.500 1505.700 1505.900 1506.800 1506.900 1507.000 1507.100 1508.800 1508.900 1509.300 1509.400 1510.000 1510.400 1511.700 1511.900 1512.600 1513.400 1516.100 1517.800 1519.900 1523.900 1525.000 1526.700 1526.900 1527.300 1540.400 1546.100 1561.800 1583.200 1590.400

timeout_us=2000 median_us=2501.600 p90_us=2549.900 min_us=2016.800 max_us=2677.400

samples_us=2000 2016.800 2024.800 2042.400 2164.400 2198.800 2213.600 2219.700 2424.500 2491.500 2493.000 2495.200 2497.300 2498.100 2498.600 2498.700 2498.900 2499.200 2500.100 2500.300 2501.300 2501.600 2501.700 2502.100 2506.900 2507.400 2508.500 2512.000 2512.200 2513.100 2515.800 2516.500 2517.100 2517.100 2518.000 2519.300 2523.800 2549.900 2585.700 2587.300 2677.400

timeout_us=16667 median_us=17084.900 p90_us=17174.400 min_us=16703.700 max_us=17192.100

samples_us=16667 16703.700 16710.800 16804.800 16813.600 17033.700 17037.900 17039.700 17041.400 17046.900 17048.600 17049.200 17056.200 17061.300 17063.200 17064.500 17070.200 17073.800 17076.300 17082.600 17084.600 17084.900 17085.200 17086.100 17086.700 17088.100 17088.500 17092.600 17096.500 17098.100 17119.100 17120.300 17122.900 17144.400 17157.900 17166.900 17170.200 17174.400 17179.900 17181.900 17192.100
Pair 6: patched, raw samples and loaded library
loaded_kernel=<patched directory>/libkernel.prx (absolute path verified locally)

timeout_us=0 median_us=0.100 p90_us=0.200 min_us=0.100 max_us=0.200

samples_us=0 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.200 0.200 0.200 0.200 0.200 0.200 0.200 0.200 0.200 0.200 0.200 0.200 0.200 0.200 0.200 0.200

timeout_us=50 median_us=499.000 p90_us=515.500 min_us=423.700 max_us=583.200

samples_us=50 423.700 430.400 468.100 485.000 487.300 489.100 489.700 493.700 495.200 495.800 495.800 496.000 496.200 496.300 496.600 497.700 497.900 498.300 498.700 498.900 499.000 500.400 501.200 501.600 501.700 502.100 502.300 502.800 503.000 503.500 504.300 505.800 505.900 506.800 508.300 508.500 515.500 526.300 578.300 583.200

timeout_us=500 median_us=1024.100 p90_us=1066.000 min_us=892.500 max_us=1212.200

samples_us=500 892.500 988.200 991.700 995.100 995.300 996.200 997.200 997.400 997.600 1000.900 1001.100 1004.600 1005.600 1006.200 1007.100 1007.600 1010.600 1015.300 1017.200 1018.500 1024.100 1027.000 1028.600 1028.700 1029.000 1029.700 1030.100 1030.600 1030.700 1031.800 1032.600 1033.100 1034.600 1036.000 1036.200 1044.500 1066.000 1117.500 1147.900 1212.200

timeout_us=1000 median_us=1509.900 p90_us=1523.600 min_us=1027.200 max_us=1844.100

samples_us=1000 1027.200 1038.800 1194.100 1486.800 1494.500 1497.400 1499.000 1500.100 1500.700 1501.000 1501.100 1501.800 1502.200 1502.800 1505.800 1506.800 1507.500 1508.000 1508.000 1509.200 1509.900 1510.000 1510.200 1510.500 1511.400 1512.600 1513.200 1514.300 1515.100 1516.500 1517.100 1517.100 1517.200 1519.600 1522.600 1523.100 1523.600 1533.300 1695.800 1844.100

timeout_us=2000 median_us=2513.200 p90_us=2534.200 min_us=2029.000 max_us=2618.300

samples_us=2000 2029.000 2060.600 2409.000 2435.200 2483.800 2488.500 2496.500 2497.100 2497.200 2497.600 2500.800 2501.300 2501.700 2505.600 2505.600 2507.000 2507.100 2508.900 2512.000 2512.800 2513.200 2513.600 2513.700 2514.100 2514.800 2515.100 2515.400 2516.400 2517.300 2518.000 2518.200 2518.500 2519.700 2520.200 2526.900 2527.200 2534.200 2537.000 2612.100 2618.300

timeout_us=16667 median_us=17052.100 p90_us=17109.800 min_us=16714.100 max_us=17193.400

samples_us=16667 16714.100 16718.300 16721.300 16742.100 16799.800 16862.900 16878.700 16928.500 16968.500 16969.600 16984.100 16993.600 16995.100 17007.900 17022.500 17025.000 17032.600 17037.400 17047.400 17052.100 17052.100 17054.900 17058.800 17062.600 17066.300 17068.500 17070.000 17071.500 17072.900 17075.300 17079.000 17079.400 17081.500 17095.900 17101.900 17106.700 17109.800 17130.800 17171.800 17193.400
Pair 6: baseline, raw samples and loaded library
loaded_kernel=<baseline directory>/libkernel.prx (absolute path verified locally)

timeout_us=0 median_us=0.200 p90_us=0.200 min_us=0.100 max_us=0.200

samples_us=0 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.200 0.200 0.200 0.200 0.200 0.200 0.200 0.200 0.200 0.200 0.200 0.200 0.200 0.200 0.200 0.200 0.200 0.200 0.200 0.200 0.200 0.200 0.200 0.200 0.200 0.200 0.200 0.200 0.200 0.200 0.200

timeout_us=50 median_us=15578.300 p90_us=16487.300 min_us=14312.200 max_us=16582.800

samples_us=50 14312.200 14502.000 14569.600 14908.500 15007.400 15039.700 15054.100 15064.100 15069.500 15076.000 15097.100 15143.600 15189.200 15199.100 15544.000 15549.600 15554.400 15556.400 15560.200 15576.000 15578.300 15592.000 15596.900 15659.800 15692.100 16012.900 16033.400 16040.000 16046.000 16047.100 16082.400 16098.400 16107.900 16164.300 16284.400 16423.900 16487.300 16520.700 16545.900 16582.800

timeout_us=500 median_us=15569.800 p90_us=16236.700 min_us=14067.600 max_us=17049.700

samples_us=500 14067.600 14591.000 14592.800 14597.200 14702.000 15013.000 15024.300 15035.800 15046.600 15052.700 15074.100 15147.900 15442.100 15509.200 15528.200 15530.500 15544.500 15554.900 15558.400 15569.700 15569.800 15647.700 15937.200 16043.100 16043.600 16044.700 16046.100 16051.600 16058.900 16078.200 16090.400 16107.100 16110.000 16134.400 16195.900 16216.200 16236.700 16507.300 16539.000 17049.700

timeout_us=1000 median_us=15568.500 p90_us=16144.600 min_us=14554.000 max_us=17039.900

samples_us=1000 14554.000 15024.500 15027.500 15028.200 15063.100 15068.600 15080.000 15103.200 15126.200 15228.700 15265.500 15422.700 15505.300 15509.400 15521.500 15523.300 15557.400 15560.900 15565.200 15566.200 15568.500 15590.400 15591.600 15596.400 15651.400 15666.500 15733.200 15772.300 16007.700 16010.200 16022.500 16046.400 16051.000 16066.700 16112.300 16116.600 16144.600 16535.900 16597.800 17039.900

timeout_us=2000 median_us=15557.100 p90_us=17031.100 min_us=13515.700 max_us=17102.000

samples_us=2000 13515.700 14003.000 14487.800 14542.200 14560.400 14566.300 15009.000 15015.400 15029.100 15038.200 15074.100 15090.700 15207.800 15289.800 15302.300 15489.100 15491.000 15491.100 15510.200 15536.400 15557.100 15560.900 15586.100 15669.200 15681.100 15930.400 15988.400 15991.500 16010.800 16043.000 16052.500 16488.400 16533.600 16586.000 16594.000 16602.800 17031.100 17042.500 17078.600 17102.000

timeout_us=16667 median_us=31166.500 p90_us=32144.400 min_us=29132.100 max_us=33212.800

samples_us=16667 29132.100 29233.000 30076.600 30135.500 30526.900 30569.300 30627.600 30642.200 30655.200 30756.200 30799.700 30830.900 31040.400 31086.400 31087.900 31106.600 31118.300 31118.500 31138.100 31155.500 31166.500 31225.900 31535.400 31595.300 31603.800 31627.700 31627.900 31639.200 31651.500 31708.700 31712.500 31770.400 31807.300 32088.200 32112.200 32117.200 32144.400 32291.000 32686.000 33212.800
Pair 7: baseline, raw samples and loaded library
loaded_kernel=<baseline directory>/libkernel.prx (absolute path verified locally)

timeout_us=0 median_us=0.100 p90_us=0.200 min_us=0.100 max_us=0.200

samples_us=0 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.200 0.200 0.200 0.200 0.200 0.200 0.200 0.200 0.200 0.200 0.200 0.200 0.200 0.200

timeout_us=50 median_us=15576.300 p90_us=16219.800 min_us=14279.500 max_us=16990.300

samples_us=50 14279.500 14544.500 15013.600 15023.600 15029.000 15058.100 15060.200 15074.700 15078.600 15091.300 15096.900 15146.800 15525.900 15539.000 15552.300 15555.300 15563.900 15568.500 15573.600 15575.500 15576.300 15590.200 15597.100 16017.100 16038.000 16047.800 16053.400 16059.900 16061.400 16064.000 16067.300 16074.900 16079.000 16101.700 16111.900 16154.600 16219.800 16314.600 16591.100 16990.300

timeout_us=500 median_us=15581.700 p90_us=16578.100 min_us=14002.200 max_us=17018.400

samples_us=500 14002.200 14594.100 14769.600 15009.700 15018.900 15023.600 15025.400 15029.300 15057.700 15058.100 15068.900 15339.200 15503.300 15514.400 15539.700 15540.000 15561.600 15563.300 15567.700 15580.800 15581.700 15587.000 15596.100 15628.200 15654.900 15675.200 15993.500 15996.000 16011.700 16013.000 16013.600 16065.700 16074.300 16092.200 16206.100 16560.500 16578.100 16609.200 16611.300 17018.400

timeout_us=1000 median_us=15605.300 p90_us=16553.400 min_us=14501.700 max_us=17029.600

samples_us=1000 14501.700 14504.800 14548.100 14580.700 14586.800 15009.100 15010.000 15039.000 15047.400 15057.300 15110.900 15405.300 15517.000 15525.300 15545.700 15548.500 15554.500 15564.500 15575.300 15575.700 15605.300 15684.500 15709.100 15777.400 15995.000 16007.200 16020.000 16033.500 16048.600 16054.200 16067.500 16070.400 16071.400 16072.800 16201.000 16535.700 16553.400 16581.700 16667.500 17029.600

timeout_us=2000 median_us=15555.900 p90_us=17137.800 min_us=13550.100 max_us=17560.700

samples_us=2000 13550.100 13626.400 14050.000 14228.100 14545.600 14572.500 14579.700 14613.800 14964.100 15016.200 15029.300 15033.400 15040.900 15043.400 15058.900 15063.900 15067.900 15070.600 15211.100 15507.000 15555.900 15605.800 15643.100 15658.600 15737.300 16101.000 16209.400 16402.300 16488.200 16530.100 16538.200 16620.500 17029.600 17044.900 17069.600 17076.800 17137.800 17497.900 17505.900 17560.700

timeout_us=16667 median_us=31010.000 p90_us=32648.600 min_us=29649.600 max_us=33193.300

samples_us=16667 29649.600 30038.600 30073.100 30101.900 30112.500 30254.500 30296.600 30433.200 30588.400 30606.500 30607.100 30615.100 30644.100 30654.000 30705.700 30728.500 30730.600 30735.000 30800.600 30940.800 31010.000 31062.000 31086.200 31138.900 31169.900 31482.000 31560.700 31596.300 31684.600 31735.500 31832.000 32101.200 32148.200 32531.300 32562.400 32595.800 32648.600 33025.400 33066.000 33193.300
Pair 7: patched, raw samples and loaded library
loaded_kernel=<patched directory>/libkernel.prx (absolute path verified locally)

timeout_us=0 median_us=0.100 p90_us=0.200 min_us=0.100 max_us=0.200

samples_us=0 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.200 0.200 0.200 0.200 0.200 0.200 0.200 0.200 0.200 0.200 0.200 0.200 0.200 0.200 0.200

timeout_us=50 median_us=499.200 p90_us=508.600 min_us=433.200 max_us=581.800

samples_us=50 433.200 436.300 491.700 491.800 492.400 493.000 493.000 493.600 493.800 493.900 494.300 494.600 495.900 497.500 497.600 497.800 498.100 498.300 498.900 498.900 499.200 499.400 500.000 500.100 500.700 501.200 502.100 502.200 503.600 503.800 504.200 504.800 504.900 505.000 505.900 506.700 508.600 513.100 559.800 581.800

timeout_us=500 median_us=1028.100 p90_us=1039.500 min_us=947.800 max_us=1101.100

samples_us=500 947.800 999.900 1002.100 1003.700 1004.400 1005.500 1010.100 1012.000 1016.200 1017.000 1019.200 1019.600 1021.400 1022.900 1022.900 1022.900 1024.000 1026.700 1026.800 1027.100 1028.100 1028.700 1029.700 1029.700 1030.200 1030.200 1031.300 1031.600 1032.300 1034.100 1034.600 1035.600 1036.000 1036.000 1036.000 1037.600 1039.500 1044.800 1081.800 1101.100

timeout_us=1000 median_us=1507.500 p90_us=1521.800 min_us=1079.700 max_us=1648.200

samples_us=1000 1079.700 1173.700 1420.300 1452.900 1479.200 1493.800 1494.500 1495.600 1499.600 1500.000 1500.800 1501.400 1503.300 1503.900 1504.200 1504.800 1505.000 1505.200 1505.900 1506.600 1507.500 1507.700 1510.100 1511.000 1511.500 1511.600 1512.000 1512.100 1512.200 1514.800 1515.200 1515.600 1517.000 1520.100 1520.900 1521.200 1521.800 1537.900 1609.200 1648.200

timeout_us=2000 median_us=2503.700 p90_us=2532.700 min_us=2030.600 max_us=2684.100

samples_us=2000 2030.600 2046.300 2093.100 2111.500 2125.100 2341.800 2380.400 2407.900 2491.700 2493.100 2493.200 2495.200 2495.200 2496.500 2498.100 2499.800 2500.700 2502.700 2502.800 2503.000 2503.700 2504.600 2505.700 2506.200 2509.300 2511.300 2512.100 2515.800 2516.700 2520.100 2520.600 2521.500 2521.700 2521.900 2527.200 2529.800 2532.700 2535.800 2583.700 2684.100

timeout_us=16667 median_us=17070.500 p90_us=17153.500 min_us=16832.600 max_us=17214.700

samples_us=16667 16832.600 16868.100 16873.300 16995.800 16998.300 17000.800 17012.200 17025.900 17037.800 17038.400 17053.400 17054.900 17055.700 17059.300 17061.100 17061.500 17062.900 17063.900 17065.300 17069.100 17070.500 17071.600 17079.600 17084.400 17087.300 17088.200 17089.300 17092.600 17099.900 17100.300 17101.700 17103.200 17122.200 17127.800 17128.900 17140.400 17153.500 17168.200 17184.500 17214.700
Pair 8: patched, raw samples and loaded library
loaded_kernel=<patched directory>/libkernel.prx (absolute path verified locally)

timeout_us=0 median_us=0.100 p90_us=0.200 min_us=0.100 max_us=0.500

samples_us=0 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.200 0.200 0.200 0.200 0.200 0.200 0.200 0.200 0.200 0.200 0.200 0.200 0.200 0.200 0.200 0.500

timeout_us=50 median_us=499.500 p90_us=507.400 min_us=428.700 max_us=572.500

samples_us=50 428.700 476.100 480.800 487.300 487.900 489.000 492.500 493.500 494.700 494.800 495.100 495.300 496.000 496.400 496.700 497.100 497.800 497.900 498.600 499.300 499.500 499.700 499.800 499.800 500.000 500.500 501.000 502.000 502.300 503.000 504.100 505.100 505.500 505.600 506.700 507.000 507.400 516.400 521.900 572.500

timeout_us=500 median_us=1025.400 p90_us=1039.800 min_us=880.700 max_us=1156.300

samples_us=500 880.700 963.300 986.500 988.000 991.800 992.000 994.800 994.800 998.400 1000.000 1000.400 1000.600 1002.000 1004.000 1007.100 1008.100 1008.400 1010.600 1012.600 1024.600 1025.400 1026.400 1026.500 1028.200 1028.200 1030.500 1030.700 1031.300 1031.600 1032.800 1034.200 1034.200 1036.100 1036.100 1036.400 1037.200 1039.800 1044.600 1113.800 1156.300

timeout_us=1000 median_us=1507.700 p90_us=1601.600 min_us=1022.500 max_us=1979.200

samples_us=1000 1022.500 1417.000 1431.200 1484.900 1492.300 1495.800 1496.600 1497.200 1498.600 1499.800 1502.600 1503.400 1503.900 1504.300 1504.900 1505.400 1506.300 1506.300 1506.600 1507.400 1507.700 1509.400 1509.500 1509.500 1510.700 1512.000 1514.100 1514.500 1515.500 1516.000 1516.000 1516.600 1517.300 1527.600 1531.500 1543.400 1601.600 1608.400 1835.800 1979.200

timeout_us=2000 median_us=2506.000 p90_us=2567.500 min_us=2035.700 max_us=2813.600

samples_us=2000 2035.700 2036.800 2052.800 2167.600 2432.300 2484.400 2487.400 2488.100 2489.100 2493.200 2495.600 2498.700 2500.000 2500.500 2502.000 2502.800 2503.000 2503.000 2503.100 2505.200 2506.000 2506.000 2506.800 2506.900 2509.300 2509.800 2510.100 2511.400 2514.300 2516.200 2522.400 2523.300 2523.300 2523.900 2525.500 2537.000 2567.500 2644.700 2810.800 2813.600

timeout_us=16667 median_us=17050.100 p90_us=17111.000 min_us=16698.500 max_us=17195.900

samples_us=16667 16698.500 16740.800 16750.800 16782.400 16954.500 16973.900 16979.100 16981.400 16998.500 16999.400 17007.500 17009.000 17014.300 17017.200 17029.200 17039.900 17043.800 17045.000 17048.700 17048.900 17050.100 17058.300 17062.400 17068.000 17074.100 17074.300 17076.500 17085.900 17086.800 17088.300 17088.600 17091.800 17093.100 17093.200 17096.100 17109.500 17111.000 17129.500 17185.900 17195.900
Pair 8: baseline, raw samples and loaded library
loaded_kernel=<baseline directory>/libkernel.prx (absolute path verified locally)

timeout_us=0 median_us=0.100 p90_us=0.200 min_us=0.100 max_us=0.200

samples_us=0 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.200 0.200 0.200 0.200 0.200 0.200 0.200 0.200 0.200 0.200 0.200 0.200 0.200 0.200 0.200 0.200

timeout_us=50 median_us=15555.200 p90_us=16503.200 min_us=14380.000 max_us=16589.800

samples_us=50 14380.000 14561.000 14568.800 14990.400 15012.300 15029.600 15031.500 15050.000 15070.100 15143.300 15156.700 15342.000 15507.700 15515.800 15533.500 15533.600 15533.700 15535.600 15537.100 15541.200 15555.200 15565.500 15566.300 15754.600 15938.700 16023.900 16025.700 16038.700 16045.800 16048.900 16055.800 16110.100 16119.300 16169.900 16225.200 16336.500 16503.200 16514.800 16562.300 16589.800

timeout_us=500 median_us=15795.200 p90_us=16547.300 min_us=14544.400 max_us=16584.600

samples_us=500 14544.400 14554.600 14558.700 14567.800 14570.700 14572.800 14592.100 14926.500 15030.200 15061.700 15069.400 15085.300 15139.900 15434.600 15466.900 15530.500 15561.500 15564.200 15569.100 15569.500 15795.200 15810.200 15846.500 16023.100 16030.000 16044.100 16057.200 16068.000 16075.300 16098.100 16100.800 16121.400 16183.800 16258.200 16454.600 16512.500 16547.300 16551.600 16577.300 16584.600

timeout_us=1000 median_us=15563.600 p90_us=16588.900 min_us=14398.100 max_us=17050.500

samples_us=1000 14398.100 14550.400 14663.100 14837.100 15005.300 15016.300 15041.300 15048.100 15065.900 15069.900 15073.200 15083.100 15501.600 15508.800 15519.100 15525.800 15532.600 15533.300 15545.400 15547.500 15563.600 15563.800 15572.400 15651.500 15743.800 15955.500 15995.700 16003.100 16014.200 16029.100 16036.900 16042.400 16056.300 16073.000 16234.200 16521.900 16588.900 16656.600 16993.000 17050.500

timeout_us=2000 median_us=15606.300 p90_us=17005.700 min_us=13571.000 max_us=17082.200

samples_us=2000 13571.000 14000.800 14012.600 14060.500 14589.000 14845.300 15029.200 15029.400 15102.400 15177.800 15210.200 15414.000 15504.500 15509.400 15511.600 15519.900 15520.400 15559.200 15562.000 15578.400 15606.300 15667.400 15744.800 15992.500 16001.000 16001.600 16001.800 16002.200 16004.700 16030.200 16079.200 16109.100 16325.000 16489.200 16547.000 16569.300 17005.700 17030.800 17057.800 17082.200

timeout_us=16667 median_us=31227.000 p90_us=32518.000 min_us=29644.000 max_us=33500.700

samples_us=16667 29644.000 29966.500 30000.200 30005.600 30011.100 30050.300 30155.000 30339.200 30396.600 30447.200 30563.400 30614.000 30618.800 30647.600 30884.700 30919.200 31049.800 31065.400 31074.100 31105.700 31227.000 31312.700 31326.500 31413.700 31487.900 31546.500 31553.000 31570.800 31601.900 31937.900 31947.000 32060.500 32107.300 32139.300 32198.100 32410.400 32518.000 32546.000 32894.600 33500.700
Pair 9: baseline, raw samples and loaded library
loaded_kernel=<baseline directory>/libkernel.prx (absolute path verified locally)

timeout_us=0 median_us=0.100 p90_us=0.200 min_us=0.100 max_us=0.200

samples_us=0 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.200 0.200 0.200 0.200 0.200 0.200 0.200 0.200 0.200 0.200 0.200 0.200 0.200 0.200 0.200 0.200

timeout_us=50 median_us=15557.100 p90_us=16190.300 min_us=14733.300 max_us=16553.500

samples_us=50 14733.300 15006.100 15020.900 15057.800 15077.400 15104.400 15105.200 15330.800 15364.900 15484.400 15489.100 15507.600 15514.800 15524.700 15537.800 15539.300 15540.900 15541.600 15547.600 15551.400 15557.100 15568.900 15577.500 15606.300 15640.400 15661.700 15662.900 15811.000 15814.000 15993.600 16007.800 16034.700 16067.100 16089.400 16099.500 16151.700 16190.300 16327.700 16506.200 16553.500

timeout_us=500 median_us=15545.700 p90_us=16548.200 min_us=14160.400 max_us=17507.200

samples_us=500 14160.400 14540.700 14677.100 14710.600 14724.700 14859.700 14958.000 15007.300 15021.000 15028.300 15042.000 15062.400 15215.800 15501.800 15503.400 15514.700 15515.800 15528.800 15536.700 15544.000 15545.700 15547.000 15551.600 15564.800 15602.700 15617.400 15625.600 15652.200 15754.500 15835.800 16004.600 16025.900 16330.600 16494.400 16502.500 16532.500 16548.200 16552.800 17016.500 17507.200

timeout_us=1000 median_us=15594.400 p90_us=16549.600 min_us=14567.800 max_us=16644.300

samples_us=1000 14567.800 14585.600 14594.100 15030.500 15051.200 15071.200 15075.300 15078.800 15090.800 15100.600 15183.600 15188.400 15261.300 15430.800 15519.600 15526.300 15529.400 15540.200 15558.100 15583.800 15594.400 15599.700 15602.300 15606.800 15634.800 15899.600 16013.900 16027.800 16036.400 16047.200 16059.400 16067.900 16081.200 16110.300 16256.000 16545.800 16549.600 16563.200 16565.800 16644.300

timeout_us=2000 median_us=15576.900 p90_us=16733.900 min_us=13993.500 max_us=17450.200

samples_us=2000 13993.500 14018.600 14554.000 14561.800 15026.100 15040.800 15046.900 15048.600 15060.200 15065.000 15065.100 15070.800 15076.300 15077.800 15095.100 15340.900 15495.700 15511.900 15524.300 15569.700 15576.900 15577.900 15602.300 15663.300 15874.400 15996.700 16000.900 16032.900 16042.100 16047.600 16047.600 16505.400 16522.100 16611.300 16625.100 16666.800 16733.900 17002.700 17077.200 17450.200

timeout_us=16667 median_us=31261.600 p90_us=32419.000 min_us=28559.000 max_us=32630.200

samples_us=16667 28559.000 29631.000 30164.200 30199.300 30272.500 30472.900 30583.100 30588.000 30716.500 30751.600 30779.200 30993.500 31037.800 31131.800 31137.500 31138.700 31154.300 31160.800 31177.800 31224.800 31261.600 31269.400 31317.900 31347.100 31411.900 31455.400 31614.200 31638.900 31643.300 31709.700 31723.000 31961.600 31994.800 32047.700 32137.200 32168.900 32419.000 32586.400 32595.400 32630.200
Pair 9: patched, raw samples and loaded library
loaded_kernel=<patched directory>/libkernel.prx (absolute path verified locally)

timeout_us=0 median_us=0.100 p90_us=0.200 min_us=0.100 max_us=0.200

samples_us=0 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.200 0.200 0.200 0.200 0.200 0.200 0.200 0.200 0.200 0.200 0.200 0.200 0.200 0.200 0.200 0.200 0.200

timeout_us=50 median_us=499.300 p90_us=509.300 min_us=417.100 max_us=585.900

samples_us=50 417.100 438.200 469.000 488.900 489.500 491.800 493.300 494.600 494.900 495.400 496.200 496.200 496.400 496.700 497.300 498.200 498.400 498.600 498.700 499.200 499.300 499.700 500.000 500.300 501.900 502.400 502.900 503.000 503.200 503.600 503.600 503.700 505.600 506.200 507.600 508.600 509.300 527.400 562.900 585.900

timeout_us=500 median_us=1008.100 p90_us=1073.700 min_us=922.000 max_us=1176.200

samples_us=500 922.000 943.100 984.800 985.300 986.200 987.500 990.500 991.200 995.600 995.600 996.600 998.500 998.800 1000.200 1002.100 1003.400 1003.700 1005.200 1006.000 1006.500 1008.100 1008.400 1009.400 1011.100 1012.200 1015.300 1017.400 1020.000 1026.700 1027.600 1032.900 1035.200 1035.600 1036.300 1057.300 1069.200 1073.700 1076.600 1112.400 1176.200

timeout_us=1000 median_us=1501.700 p90_us=1573.900 min_us=1047.300 max_us=1681.200

samples_us=1000 1047.300 1379.900 1415.200 1422.200 1483.800 1484.300 1485.200 1488.000 1491.000 1491.700 1491.800 1492.000 1496.500 1498.500 1498.700 1498.800 1499.800 1499.900 1500.700 1500.900 1501.700 1504.600 1506.200 1507.300 1509.000 1513.100 1513.800 1514.000 1514.000 1515.800 1517.100 1517.700 1518.800 1522.900 1527.700 1536.400 1573.900 1576.200 1640.100 1681.200

timeout_us=2000 median_us=2503.100 p90_us=2558.300 min_us=2035.500 max_us=2616.900

samples_us=2000 2035.500 2079.400 2170.200 2251.600 2433.600 2482.600 2482.900 2490.100 2490.400 2491.900 2494.200 2494.800 2495.500 2498.600 2498.800 2499.800 2500.700 2501.100 2501.800 2502.400 2503.100 2503.400 2504.000 2504.200 2504.400 2504.700 2505.300 2505.900 2506.600 2507.100 2510.500 2510.900 2512.900 2515.700 2518.900 2538.300 2558.300 2571.100 2611.800 2616.900

timeout_us=16667 median_us=17059.600 p90_us=17176.600 min_us=16757.300 max_us=17200.800

samples_us=16667 16757.300 16880.000 16926.300 16994.100 16997.300 17000.700 17003.500 17004.500 17006.000 17008.100 17009.600 17030.000 17032.300 17039.000 17048.400 17048.600 17050.200 17055.400 17055.500 17058.700 17059.600 17067.900 17071.500 17073.400 17078.200 17084.700 17100.000 17102.900 17108.100 17109.000 17111.100 17116.000 17151.200 17157.700 17164.300 17167.900 17176.600 17186.300 17195.000 17200.800

@github-actions

github-actions Bot commented Oct 13, 2026 •

Copy link
Copy Markdown

Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.

Pull request Conflicting files (lines on main) Same exports Same new files
#5013 core/libs/prx/libkernel/CMakeLists.txt L1058-1065
core/libs/prx/libkernel/Socket/src/Socket.cpp L4

@github-actions github-actions Bot mentioned this pull request Oct 13, 2026
10 tasks done
@github-actions github-actions Bot removed the needs rebase Conflicts with main, rebase needed label Oct 13, 2026

@adriadam10 adriadam10 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR. The change itself looks right (wait capped at the guest deadline, only the groups.empty() path).

One blocking issue:

  • core/libs/tests/GuestSelectWait.cpp passes without the fix. I reverted Socket.cpp to main and guest_select_wait still passes. Every wait check only asserts the call does not return before the deadline (Clock::now() - start >= micros); nothing bounds how late it returns, so the old sleep_for (which only overshoots) satisfies it too. Please add a repeated short wait (e.g. N empty-set selects of 1 ms) and assert the average/total stays well below the coarse ~15.6 ms Windows tick, as the guest_poll check in #4980 does, so the test fails on main on Windows.

The conflict with #5013 is only adjacent lines in libkernel/CMakeLists.txt and Socket.cpp; whoever merges second rebases.

@Dripl1x
Dripl1x force-pushed the codex/select-precise-wait branch from 8b296a8 to c6fe305 Compare October 13, 2026 17:24
@Dripl1x

Dripl1x commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor Author

@adriadam10 addressed in 6e9fbc051. guest_select_wait now also runs twenty empty-set selects of 1 ms and requires their total to stay between 20 ms and 200 ms, the same bounds as the guest_poll check in #4980.

Windows 11, Ryzen 7 5800H, WinLibs MinGW-w64 GCC 15.2.0 r7, Release, on main 61b8742b6:

  • With Socket.cpp from main and the new test, guest_select_wait fails 3 of 3 runs: twenty 1 ms selects did not stay close to their deadlines.
  • With the fix it passes 21 of 21 runs.

On Linux (Ubuntu 26.04 under WSL, GCC 15.2.0) the new check passes with and without the fix, because the host wait is already precise there.

To reproduce the control on this head: git checkout origin/main -- core/libs/prx/libkernel/Socket/src/Socket.cpp, rebuild guest_select_wait_tests, run ctest -R '^guest_select_wait$' --output-on-failure.

Wait per call on Windows, median of 40 calls of select_nid_postfix(0, nullptr, nullptr, nullptr, &timeout) from a local probe (source and raw samples below; the probe is not part of the PR):

Requested Socket.cpp from main This PR
50 us 15.58 ms 0.50 ms
500 us 15.58 ms 1.03 ms
1 ms 15.58 ms 1.50 ms
2 ms 15.58 ms 2.51 ms
16.667 ms 31.20 ms 17.05 ms

The type is now fix instead of perf, as in #4980: the change corrects the wait duration and claims no game-scene speed change. The branch is rebased onto main and the description is updated. Local build paths in the logs are replaced with <build>.

Windows control: Socket.cpp from main, new test (3 of 3 fail)
Test project <build>
    Start 189: guest_select_wait
1/1 Test #189: guest_select_wait ................Exit code 0xc0000409***Exception:   0.76 sec
[time] scheduler tick raised to 0.5 ms (was 0.50 ms, now 0.50 ms, timed waits fine)
twenty 1 ms selects did not stay close to their deadlines
FATAL: abort() (SIGABRT) on thread 29932
    #0 0x00007ffd464eb4b8 libc.prx+0xb4b8
    #1 0x00007ffd4658f5f1 libc.prx+0xaf5f1
    #2 0x00000097f23ff840
  stack return address candidates:
    [rsp+0x8] 0x00007ffdfc952139 ucrtbase.dll+0xc2139
    [rsp+0x88] 0x00007ffdfc935261 ucrtbase.dll+0xa5261
    [rsp+0xb8] 0x00007ff6024d178a guest_select_wait_tests.exe+0x178a
    [rsp+0xe8] 0x00007ff6024d946c guest_select_wait_tests.exe+0x946c
    [rsp+0x158] 0x00007ffdff615256 ntdll.dll+0xb5256
    [rsp+0x218] 0x00007ffdfc899341 ucrtbase.dll+0x9341
    [rsp+0x248] 0x00007ffdfc89983e ucrtbase.dll+0x983e
    [rsp+0x358] 0x00007ff6024d13ba guest_select_wait_tests.exe+0x13ba
    [rsp+0x3f8] 0x00007ff6024d1080 guest_select_wait_tests.exe+0x1080
    [rsp+0x438] 0x00007ffdfe77cdf7 KERNEL32.DLL+0x2cdf7
    [rsp+0x468] 0x00007ffdff5dee4c ntdll.dll+0x7ee4c
  all threads:
  thread 36376 '': rip 0x00007ffdff6c5894 ntdll.dll+0x165894 rsp 0x00000097f25ff498 rbp 0x0000000000000000
  thread 6348 '': rip 0x00007ffdff6c5894 ntdll.dll+0x165894 rsp 0x00000097f27ff7a8 rbp 0x0000000000000000
  thread 16324 '': rip 0x00007ffdff6c5894 ntdll.dll+0x165894 rsp 0x00000097f29ffb38 rbp 0x0000000000000000

    Start 189: guest_select_wait
    Test #189: guest_select_wait ................Exit code 0xc0000409***Exception:   0.66 sec
[time] scheduler tick raised to 0.5 ms (was 0.50 ms, now 0.50 ms, timed waits fine)
twenty 1 ms selects did not stay close to their deadlines
FATAL: abort() (SIGABRT) on thread 14976
    #0 0x00007ffd464eb4b8 libc.prx+0xb4b8
    #1 0x00007ffd4658f5f1 libc.prx+0xaf5f1
    #2 0x0000000ea29ffa60
  stack return address candidates:
    [rsp+0x8] 0x00007ffdfc952139 ucrtbase.dll+0xc2139
    [rsp+0x88] 0x00007ffdfc935261 ucrtbase.dll+0xa5261
    [rsp+0xb8] 0x00007ff6024d178a guest_select_wait_tests.exe+0x178a
    [rsp+0xe8] 0x00007ff6024d946c guest_select_wait_tests.exe+0x946c
    [rsp+0x158] 0x00007ffdff615256 ntdll.dll+0xb5256
    [rsp+0x218] 0x00007ffdfc899341 ucrtbase.dll+0x9341
    [rsp+0x248] 0x00007ffdfc89983e ucrtbase.dll+0x983e
    [rsp+0x358] 0x00007ff6024d13ba guest_select_wait_tests.exe+0x13ba
    [rsp+0x3f8] 0x00007ff6024d1080 guest_select_wait_tests.exe+0x1080
    [rsp+0x438] 0x00007ffdfe77cdf7 KERNEL32.DLL+0x2cdf7
    [rsp+0x468] 0x00007ffdff5dee4c ntdll.dll+0x7ee4c
  all threads:
  thread 34848 '': rip 0x00007ffdff6c5894 ntdll.dll+0x165894 rsp 0x0000000ea2bffb28 rbp 0x0000000000000000
  thread 34316 '': rip 0x00007ffdff6c5894 ntdll.dll+0x165894 rsp 0x0000000ea2dff5a8 rbp 0x0000000000000000
  thread 13264 '': rip 0x00007ffdff6c5894 ntdll.dll+0x165894 rsp 0x0000000ea2fffb98 rbp 0x0000000000000000

    Start 189: guest_select_wait
    Test #189: guest_select_wait ................Exit code 0xc0000409***Exception:   0.67 sec
[time] scheduler tick raised to 0.5 ms (was 0.50 ms, now 0.50 ms, timed waits fine)
twenty 1 ms selects did not stay close to their deadlines
FATAL: abort() (SIGABRT) on thread 20716
    #0 0x00007ffd464eb4b8 libc.prx+0xb4b8
    #1 0x00007ffd4658f5f1 libc.prx+0xaf5f1
    #2 0x000000765b1ff420
  stack return address candidates:
    [rsp+0x8] 0x00007ffdfc952139 ucrtbase.dll+0xc2139
    [rsp+0x88] 0x00007ffdfc935261 ucrtbase.dll+0xa5261
    [rsp+0xb8] 0x00007ff6024d178a guest_select_wait_tests.exe+0x178a
    [rsp+0xe8] 0x00007ff6024d946c guest_select_wait_tests.exe+0x946c
    [rsp+0x158] 0x00007ffdff615256 ntdll.dll+0xb5256
    [rsp+0x218] 0x00007ffdfc899341 ucrtbase.dll+0x9341
    [rsp+0x248] 0x00007ffdfc89983e ucrtbase.dll+0x983e
    [rsp+0x358] 0x00007ff6024d13ba guest_select_wait_tests.exe+0x13ba
    [rsp+0x3f8] 0x00007ff6024d1080 guest_select_wait_tests.exe+0x1080
    [rsp+0x438] 0x00007ffdfe77cdf7 KERNEL32.DLL+0x2cdf7
    [rsp+0x468] 0x00007ffdff5dee4c ntdll.dll+0x7ee4c
  all threads:
  thread 14492 '': rip 0x00007ffdff6c5894 ntdll.dll+0x165894 rsp 0x000000765b3ffb78 rbp 0x0000000000000000
  thread 36024 '': rip 0x00007ffdff6c5894 ntdll.dll+0x165894 rsp 0x000000765b5ff598 rbp 0x0000000000000000
  thread 34260 '': rip 0x00007ffdff6c5894 ntdll.dll+0x165894 rsp 0x000000765b7ff7d8 rbp 0x0000000000000000


0% tests passed, 1 tests failed out of 1

Total Test time (real) =   2.10 sec

The following tests FAILED:
	189 - guest_select_wait (Exit code 0xc0000409)
Errors while running CTest
Windows with the fix: guest_select_wait, 20 repeats
Test project <build>
    Start 189: guest_select_wait
    Test #189: guest_select_wait ................   Passed    0.10 sec
    Start 189: guest_select_wait
    Test #189: guest_select_wait ................   Passed    0.09 sec
    Start 189: guest_select_wait
    Test #189: guest_select_wait ................   Passed    0.09 sec
    Start 189: guest_select_wait
    Test #189: guest_select_wait ................   Passed    0.09 sec
    Start 189: guest_select_wait
    Test #189: guest_select_wait ................   Passed    0.10 sec
    Start 189: guest_select_wait
    Test #189: guest_select_wait ................   Passed    0.10 sec
    Start 189: guest_select_wait
    Test #189: guest_select_wait ................   Passed    0.09 sec
    Start 189: guest_select_wait
    Test #189: guest_select_wait ................   Passed    0.10 sec
    Start 189: guest_select_wait
    Test #189: guest_select_wait ................   Passed    0.09 sec
    Start 189: guest_select_wait
    Test #189: guest_select_wait ................   Passed    0.09 sec
    Start 189: guest_select_wait
    Test #189: guest_select_wait ................   Passed    0.10 sec
    Start 189: guest_select_wait
    Test #189: guest_select_wait ................   Passed    0.10 sec
    Start 189: guest_select_wait
    Test #189: guest_select_wait ................   Passed    0.10 sec
    Start 189: guest_select_wait
    Test #189: guest_select_wait ................   Passed    0.10 sec
    Start 189: guest_select_wait
    Test #189: guest_select_wait ................   Passed    0.10 sec
    Start 189: guest_select_wait
    Test #189: guest_select_wait ................   Passed    0.09 sec
    Start 189: guest_select_wait
    Test #189: guest_select_wait ................   Passed    0.09 sec
    Start 189: guest_select_wait
    Test #189: guest_select_wait ................   Passed    0.09 sec
    Start 189: guest_select_wait
    Test #189: guest_select_wait ................   Passed    0.09 sec
    Start 189: guest_select_wait
1/1 Test #189: guest_select_wait ................   Passed    0.09 sec

100% tests passed, 0 tests failed out of 1

Total Test time (real) =   1.92 sec
Windows with the fix: socket and wait tests (8 of 9; guest_udp reaches its existing 20 s limit)
Test project <build>
    Start   5: precise_wait
1/9 Test   #5: precise_wait .....................   Passed    0.02 sec
    Start 186: guest_udp
2/9 Test #186: guest_udp ........................***Timeout  20.01 sec
[time] scheduler tick raised to 0.5 ms (was 0.50 ms, now 0.50 ms, timed waits fine)

    Start 187: guest_socket_read_write
3/9 Test #187: guest_socket_read_write ..........   Passed    0.04 sec
    Start 188: guest_poll
4/9 Test #188: guest_poll .......................   Passed    0.21 sec
    Start 189: guest_select_wait
5/9 Test #189: guest_select_wait ................   Passed    0.13 sec
    Start 190: guest_tcp
6/9 Test #190: guest_tcp ........................   Passed    0.03 sec
    Start 191: guest_socket_pair
7/9 Test #191: guest_socket_pair ................   Passed    0.03 sec
    Start 194: guest_socket_descriptors
8/9 Test #194: guest_socket_descriptors .........   Passed    0.04 sec
    Start 195: guest_socket_events
9/9 Test #195: guest_socket_events ..............   Passed    0.19 sec

89% tests passed, 1 tests failed out of 9

Total Test time (real) =  20.72 sec

The following tests FAILED:
	186 - guest_udp (Timeout)
Errors while running CTest
Linux with the fix: socket and wait tests (10 of 10)
Test project <build>
      Start   5: precise_wait
 1/10 Test   #5: precise_wait .....................   Passed    0.00 sec
      Start 170: guest_udp
 2/10 Test #170: guest_udp ........................   Passed    0.01 sec
      Start 171: guest_socket_read_write
 3/10 Test #171: guest_socket_read_write ..........   Passed    0.05 sec
      Start 172: guest_poll
 4/10 Test #172: guest_poll .......................   Passed    0.18 sec
      Start 173: guest_select_wait
 5/10 Test #173: guest_select_wait ................   Passed    0.07 sec
      Start 174: guest_select
 6/10 Test #174: guest_select .....................   Passed    0.31 sec
      Start 175: guest_tcp
 7/10 Test #175: guest_tcp ........................   Passed    0.01 sec
      Start 176: guest_socket_pair
 8/10 Test #176: guest_socket_pair ................   Passed    0.01 sec
      Start 179: guest_socket_descriptors
 9/10 Test #179: guest_socket_descriptors .........   Passed    0.01 sec
      Start 180: guest_socket_events
10/10 Test #180: guest_socket_events ..............   Passed    0.15 sec

100% tests passed, 0 tests failed out of 10

Total Test time (real) =   0.79 sec
Linux control: Socket.cpp from main, new test (5 of 5 pass)
Test project <build>
    Start 173: guest_select_wait
    Test #173: guest_select_wait ................   Passed    0.07 sec
    Start 173: guest_select_wait
    Test #173: guest_select_wait ................   Passed    0.07 sec
    Start 173: guest_select_wait
    Test #173: guest_select_wait ................   Passed    0.07 sec
    Start 173: guest_select_wait
    Test #173: guest_select_wait ................   Passed    0.07 sec
    Start 173: guest_select_wait
1/1 Test #173: guest_select_wait ................   Passed    0.07 sec

100% tests passed, 0 tests failed out of 1

Total Test time (real) =   0.37 sec
Windows probe output with the fix
[time] scheduler tick raised to 0.5 ms (was 0.50 ms, now 0.50 ms, timed waits fine)
loaded_kernel=<build>\libraries\libkernel.prx
timeout_us=0 median_us=0.200 p90_us=0.200 min_us=0.100 max_us=0.200
samples_us=0 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.200 0.200 0.200 0.200 0.200 0.200 0.200 0.200 0.200 0.200 0.200 0.200 0.200 0.200 0.200 0.200 0.200 0.200 0.200 0.200
timeout_us=50 median_us=500.500 p90_us=563.400 min_us=382.100 max_us=679.300
samples_us=50 382.100 410.600 419.400 432.700 432.700 489.700 490.000 492.100 493.200 493.900 494.400 494.700 495.300 496.900 497.600 497.700 497.800 498.400 498.600 499.600 500.500 500.600 502.700 502.900 503.100 503.100 503.200 503.200 505.300 506.000 506.100 506.300 508.400 508.700 508.700 508.900 563.400 577.300 583.200 679.300
timeout_us=500 median_us=1033.600 p90_us=1116.200 min_us=986.200 max_us=1195.900
samples_us=500 986.200 988.300 997.500 1002.300 1008.500 1018.000 1018.900 1025.300 1027.000 1027.700 1028.000 1029.100 1030.500 1031.400 1031.500 1032.000 1032.200 1033.000 1033.200 1033.400 1033.600 1033.900 1035.700 1036.000 1036.900 1037.500 1037.700 1037.700 1038.200 1041.100 1041.900 1044.900 1047.400 1047.900 1048.800 1062.900 1116.200 1127.100 1143.500 1195.900
timeout_us=1000 median_us=1502.400 p90_us=1639.000 min_us=1102.500 max_us=1978.900
samples_us=1000 1102.500 1257.000 1380.100 1417.200 1421.500 1444.700 1450.500 1460.800 1489.000 1491.000 1495.000 1495.600 1496.300 1497.900 1498.100 1500.000 1500.000 1500.800 1501.000 1501.800 1502.400 1504.000 1504.400 1505.400 1506.100 1506.200 1510.200 1512.900 1513.600 1520.300 1522.600 1522.800 1537.300 1577.200 1592.600 1603.100 1639.000 1672.200 1766.200 1978.900
timeout_us=2000 median_us=2510.700 p90_us=2573.800 min_us=2014.200 max_us=2622.000
samples_us=2000 2014.200 2040.400 2063.200 2066.400 2306.700 2402.500 2418.200 2430.900 2463.200 2479.200 2481.000 2484.500 2491.600 2491.900 2495.400 2498.100 2503.100 2504.600 2507.000 2510.000 2510.700 2511.200 2512.000 2512.700 2513.100 2513.800 2513.900 2515.700 2516.800 2519.200 2519.700 2525.400 2529.000 2530.200 2541.200 2542.900 2573.800 2594.200 2595.000 2622.000
timeout_us=16667 median_us=17053.200 p90_us=17161.000 min_us=16723.900 max_us=17396.600
samples_us=16667 16723.900 16748.800 16796.200 16846.900 16876.700 16948.800 16984.400 16992.200 16998.800 16998.900 17012.500 17018.400 17018.900 17020.900 17021.900 17027.100 17029.800 17034.600 17034.700 17044.400 17053.200 17055.600 17055.800 17056.100 17059.500 17068.600 17070.500 17089.100 17090.300 17091.600 17097.400 17101.000 17123.300 17135.400 17136.100 17142.500 17161.000 17195.500 17369.100 17396.600
Windows probe output with Socket.cpp from main
[time] scheduler tick raised to 0.5 ms (was 0.50 ms, now 0.50 ms, timed waits fine)
loaded_kernel=<build>\libraries\libkernel.prx
timeout_us=0 median_us=0.200 p90_us=0.200 min_us=0.100 max_us=0.200
samples_us=0 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.100 0.200 0.200 0.200 0.200 0.200 0.200 0.200 0.200 0.200 0.200 0.200 0.200 0.200 0.200 0.200 0.200 0.200 0.200 0.200 0.200 0.200 0.200 0.200 0.200 0.200 0.200 0.200 0.200 0.200 0.200 0.200
timeout_us=50 median_us=15575.500 p90_us=16502.600 min_us=14484.300 max_us=16534.700
samples_us=50 14484.300 14505.200 15019.000 15025.000 15036.800 15038.200 15122.400 15139.300 15163.400 15489.700 15492.800 15505.800 15507.200 15518.400 15542.800 15546.700 15548.000 15558.000 15565.200 15571.100 15575.500 15575.900 15590.300 15608.600 15611.400 15630.700 15635.500 15707.800 15995.700 16007.500 16014.800 16028.600 16030.200 16045.800 16057.500 16161.300 16502.600 16511.500 16518.200 16534.700
timeout_us=500 median_us=15583.800 p90_us=16560.800 min_us=14495.700 max_us=17049.700
samples_us=500 14495.700 14524.800 14557.300 15001.000 15014.900 15016.800 15020.300 15030.000 15031.200 15040.700 15049.400 15054.100 15055.200 15073.800 15502.000 15527.700 15554.000 15560.000 15575.400 15580.200 15583.800 15620.700 15684.100 15694.700 15716.100 15889.300 15926.500 15997.000 16026.100 16036.100 16047.300 16053.600 16086.000 16101.000 16515.600 16538.200 16560.800 16574.400 17014.000 17049.700
timeout_us=1000 median_us=15579.300 p90_us=16513.700 min_us=14028.600 max_us=16534.300
samples_us=1000 14028.600 14525.900 15005.600 15036.600 15040.900 15049.300 15050.900 15143.800 15148.700 15189.800 15213.300 15509.400 15513.400 15514.800 15540.700 15544.300 15547.300 15553.300 15556.700 15558.000 15579.300 15589.400 15606.000 15626.000 15639.700 15903.900 15994.500 16015.600 16019.600 16022.400 16025.400 16027.200 16051.600 16056.600 16065.200 16087.700 16513.700 16518.900 16519.800 16534.300
timeout_us=2000 median_us=15577.000 p90_us=17007.000 min_us=13596.500 max_us=17804.800
samples_us=2000 13596.500 14139.800 14529.900 14541.000 14578.400 14586.900 15019.900 15047.600 15047.700 15096.800 15112.800 15125.400 15137.400 15160.500 15469.200 15535.100 15538.100 15540.200 15540.400 15561.500 15577.000 15577.600 15583.200 15606.300 15610.400 15793.300 16013.300 16025.900 16037.100 16054.900 16094.900 16095.400 16149.700 16586.300 16624.600 16719.000 17007.000 17159.000 17214.400 17804.800
timeout_us=16667 median_us=31199.500 p90_us=32636.500 min_us=29873.300 max_us=33005.500
samples_us=16667 29873.300 30013.200 30103.200 30116.200 30124.300 30137.400 30333.800 30432.500 30483.000 30519.800 30567.000 30589.600 30590.400 30627.800 30629.800 30672.600 30679.700 30788.400 31035.100 31180.700 31199.500 31208.100 31441.300 31521.400 31539.900 31598.500 31608.500 31698.400 31937.700 32054.900 32078.800 32146.300 32157.800 32169.600 32247.700 32600.200 32636.500 32695.300 32748.700 33005.500
Probe source
#include "prx/libc/include/general/VabiMacros.hpp"
#include <algorithm>
#include <chrono>
#include <cstdint>
#include <cstdio>
#include <vector>
#ifdef _WIN32
#include <windows.h>
#endif

extern "C" int APS5_VABI select_nid_postfix(int, void*, void*, void*, const void*);
struct Timeval { std::int64_t seconds; std::int64_t microseconds; };

int main() {
#ifdef _WIN32
    wchar_t kernelPath[32768]{};
    if (!GetModuleFileNameW(GetModuleHandleW(L"libkernel.prx"), kernelPath, 32768)) return 2;
    char utf8Path[131072]{};
    if (!WideCharToMultiByte(CP_UTF8, 0, kernelPath, -1, utf8Path, sizeof(utf8Path), nullptr, nullptr)) return 3;
    std::printf("loaded_kernel=%s\n", utf8Path);
#endif
    using Clock = std::chrono::steady_clock;
    for (const std::int64_t micros : {0, 50, 500, 1000, 2000, 16667}) {
        std::vector<double> samples;
        const Timeval limit{0, micros};
        for (int trial = 0; trial < 41; ++trial) {
            const auto begin = Clock::now();
            const int result = select_nid_postfix(0, nullptr, nullptr, nullptr, &limit);
            const auto elapsed = Clock::now() - begin;
            if (result != 0 || elapsed < std::chrono::microseconds(micros)) return 1;
            if (trial != 0) samples.push_back(std::chrono::duration<double, std::micro>(elapsed).count());
        }
        std::sort(samples.begin(), samples.end());
        std::printf("timeout_us=%lld median_us=%.3f p90_us=%.3f min_us=%.3f max_us=%.3f\n",
            static_cast<long long>(micros), samples[20], samples[36], samples.front(), samples.back());
        std::printf("samples_us=%lld", static_cast<long long>(micros));
        for (const auto value : samples) std::printf(" %.3f", value);
        std::puts("");
    }
}

AI-assisted (Claude Code).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Dripl1x
Dripl1x force-pushed the codex/select-precise-wait branch from c6fe305 to 6e9fbc0 Compare October 13, 2026 17:29
@Dripl1x Dripl1x changed the title perf(libkernel): use precise waits for select timeouts fix(libkernel): use precise waits for select timeouts Oct 13, 2026
@Dripl1x
Dripl1x requested a review from adriadam10 October 13, 2026 18:25
@Dripl1x

Dripl1x commented Oct 13, 2026

Copy link
Copy Markdown
Contributor Author

@p3n1cillin the PR overlap report lists #5013 against this PR. A trial git merge-tree of 6e9fbc051 with 76a168fcc conflicts in two places, and keeping both sides resolves each:

  • core/libs/prx/libkernel/Socket/src/Socket.cpp: the two added #include lines (PreciseWait.hpp here, File/include/File.hpp in yours).
  • core/libs/prx/libkernel/CMakeLists.txt: this PR adds the guest_select_wait registration right before the guest_select block that yours makes unconditional.

Neither change builds on the other. Proposed order: this PR first, since it is older and already reviewed, and #5013 rebases with that resolution and lists this PR as its dependency, so the report stops listing the pair. If you prefer the opposite order, say so and I will list #5013 here and rebase after it.

AI-assisted (Claude Code).

oneandonlydean pushed a commit that referenced this pull request Oct 14, 2026
Carry the poll-only portion of Doston Abdullayev’s public #1471 fix, preserving its original authorship. The select timeout change is already covered separately by #4754.
@oneandonlydean
oneandonlydean dismissed adriadam10’s stale review October 14, 2026 06:29

Addressed in 6e9fbc0: the new 20 x 1 ms check fails on main on Windows (author 3/3) and passes with the fix; full build green.

@oneandonlydean
oneandonlydean merged commit 1e72721 into boykopovar:main Oct 14, 2026
8 of 9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants