Repository navigation
Conversation
…s thread port nq_cost_begin / nq_cost_end read this thread's kernel time (thr_sys_ns) for every node the queue worker replays, and each reading called mach_thread_self and mach_port_deallocate around thread_info: two kernel calls more per reading, four per node. The port is now taken once per thread and kept. t_nvn (311 checks) passes unchanged.
|
Ran on an M2 MacBook Air with Ocarina of Time as part of a set with #2542 / #2543 (in-run A/B to frame 12000 at handheld 1440x810): no regressions, no red lines, unit tests pass. This change was on in both arms, so we didn't measure it on its own; by our count of its call sites on this route it's in the ~0.01-0.03 ms a frame range. |
iPhone 17, Kakariko Village: C-2 to C-5 together, before / afterUnattended runs with the batch's drive script (
What is left of the submit thread's cost per draw (C-1's ranking in #2542): argument blocks ( |
|
OoT-fps combined phone build, against the baseline (session A, A-2) iPhone 17, Ocarina of Time, Kakariko Village by day, unattended drive script, 7 minutes each, back to back (2026-11-13, 22:20 and 22:36). Medians over the gameplay windows (more than 1,000 draws a frame).
Against A-1's targets:
An earlier pair that cannot be compared: the first pair (21:04-21:19) gave 11.4 fps for the baseline and 29.2 fps for the combined build. That gap is the time of day, not the change: the baseline's save loaded Kakariko at night (GPU p50 60 ms) and the combined build's by day, as B found (#2582). Every run's The combined build is the one installed on the phone. |
OoT-fps batch, session C (submit-thread CPU per draw), item C-5. The ranked list of where the submit thread's time goes (C-1) is in #2542.
The queue worker reads its thread's kernel time (
thr_sys_ns) at the start and end of every node it replays (nq_cost_begin/nq_cost_end), for thetranslation detailline. Each reading calledmach_thread_selfandmach_port_deallocatearoundthread_info: two more kernel calls per reading, four per node. The port is now taken once per thread and kept (one send right per thread that reads it). For every game. In the ranked list the cost readings were 3–5 % of the submit thread's busy time; this removes two of their three kernel calls. With C-4 the standing scene moved from 38.7–39.3k to 38.6–38.8k instructions per draw (M4 Pro), within noise.Checks
t_nvn(311 checks) passes unchanged;test_docsOK.scripts/regress.py check --baseline upstream/main --games 0400486024DEC000on the stack of C-2 to C-5 (Apple M4, macOS 27.2; Ocarina of Time's title route from the unmerged ed769e9smoke.tsv, as main has no route for it): shaders PASS (42848/42848, no MSL change), boot ok, fps p50 59.5 → 59.5, frame p99 17.82 → 17.81 ms, peak 2879 → 2872 MB, no new RED line. The check's status is REGRESSION because of its two screenshots (350 s, 385 s). They show different title backdrops (a forest at night vs Gerudo Desert; Lon Lon Ranch vs Lake Hylia), i.e. the backdrop rotation's timing, not a rendering difference. The same two screenshots were flagged between unrelated revisions on 2026-11-12 (0c07813 vs b8cb0bd), and with one run per revision the harness has no noise to compare against. A bit-exact replay check is not available for this game:DM_NVN_CAPTUREcannot capture its multiple NVN queues. Gameplay on the Kokiri Forest deck renders correctly in the bench runs. Other local NVN games (Echoes of Wisdom, Super Mario 3D All-Stars) were not run: pending.