perf(libc): collect resident writes directly into the output buffer #7471

Merged
Dripl1x merged 1 commit from upstream-pr/7471 into main 2026-10-21 01:55:12 +00:00
Dripl1x commented 2026-10-18 08:47:31 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Dripl1x on 2026-10-18T08:47:31Z.


What

This PR is part of a series of graphics and memory-management performance improvements for AnyPS5, with SuperTuxKart as the main profiling workload. This is item 08/10; the UI Lab startup/cache fix follows as a separate eleventh PR. Each topic's measurements are distinguished from the combined result.

Collect writes from a stable resident mapping directly into the caller's output buffer. Preserve capacity, fresh-page accounting, unaligned starts and reset behavior while avoiding two temporary collections.

Tested

Rebased onto main 2185dbf92e on 2026-10-21; head 9d5f8326bf (published head 2f59a758d; the metadata-only commit is dropped). One conflict, at a test insertion point in core/libs/tests/GuestMemory.cpp, where main's two #7448 release tests and this PR's test now both stay. Windows 11 Pro build 26300, Ryzen 7 5800H, RTX 3070 Laptop GPU, NVIDIA 617.42, WinLibs GCC 15.2.0 r7, Release. guest_memory and guest_mmap_fixed_anonymous 3/3 each; conventions pass.

3/3 memory/write-watch cases passed. The behavioral test also passes on main. Coverage includes capacities zero and one, output sentinels, unaligned starts, clear=false, retention of unreported dirty pages and a 2-MiB resident-run boundary.

SuperTuxKart captures: Windows 11 Pro build 26300, Ryzen 7 5800H, RTX 3070 Laptop GPU, NVIDIA 617.42, WinLibs GCC 15.2.0 r7, Release; SuperTuxKart (PPSA69421) tutorial prompt over the main menu, 1920x1080 internal rendering in a maximized 2560x1369 window, warm shader caches, audio muted, no input; APS5_TRACE_SECONDS=20:8 with APS5_TRACE_EVENTS=1048576, console output not redirected, no profiling switches; 2026-10-21, order main, ..., this PR, ..., this PR, ..., main.

Capture Build Commit FPS p50 / p90 / p99 ms
rv21-b01-main main 2185dbf92e 2185dbf92e8d 9.238 108.1 / 112.9 / 124.4
rv21-b10-main main 2185dbf92e 2185dbf92e8d 9.302 105.0 / 119.9 / 129.7
rv21-b04-7471 this PR 9d5f8326bfc6 9.458 104.2 / 112.7 / 126.7
rv21-b07-7471 this PR 9d5f8326bfc6 9.415 105.2 / 112.0 / 119.8

No FPS change is claimed (9.46 / 9.41 against main 9.24 / 9.30).

Summary lines (main first, then this PR)
{"commit":"2185dbf92e8d","dirty":false,"env":{"APS5_TRACE_EVENTS":"1048576","APS5_TRACE_SECONDS":"20:8"},"gpu":"NVIDIA GeForce RTX 3070 Laptop GPU","driver":"NVIDIA 617.42","os":"Windows 10.0.26300","cpu":"AMD Ryzen 7 5800H with Radeon Graphics","cpu_threads":16,"memory_mib":64863,"title_id":"PPSA69421","title":"SuperTuxKart","content_version":"00.001.000","resolution":"1920x1080","window":{"spec":"seconds 20:8","first_present":29,"ms":8010.110},"presents":74,"frame_ms":{"p50":108.090,"p90":112.897,"p99":124.353,"max":124.353},"gpu_busy_ms_per_present":5.636,"worker_busy_pct":{"queue worker 0x0":2.746},"top_phases_ms_per_frame":{"Graphics.Draw":10.680,"Graphics.Draw.draw_and_resource_release":10.368,"Vulkan.DrawFromRecipe":8.398,"Graphics.DrawWithRecipe":8.370,"Graphics.DrawWithRecipe.draw_and_resource_release":8.357,"Driver.Packet":2.928,"Recorder.Submit":2.900,"Driver.Packet.draw":2.337},"trace_dropped":false,"trace":"aps5-trace-2185dbf92e8d-7560.json.gz"}
{"commit":"2185dbf92e8d","dirty":false,"env":{"APS5_TRACE_EVENTS":"1048576","APS5_TRACE_SECONDS":"20:8"},"gpu":"NVIDIA GeForce RTX 3070 Laptop GPU","driver":"NVIDIA 617.42","os":"Windows 10.0.26300","cpu":"AMD Ryzen 7 5800H with Radeon Graphics","cpu_threads":16,"memory_mib":64863,"title_id":"PPSA69421","title":"SuperTuxKart","content_version":"00.001.000","resolution":"1920x1080","window":{"spec":"seconds 20:8","first_present":30,"ms":8062.500},"presents":75,"frame_ms":{"p50":104.995,"p90":119.916,"p99":129.746,"max":129.746},"gpu_busy_ms_per_present":5.551,"worker_busy_pct":{"queue worker 0x0":2.786},"top_phases_ms_per_frame":{"Graphics.Draw":10.928,"Graphics.Draw.draw_and_resource_release":10.606,"Vulkan.DrawFromRecipe":8.516,"Graphics.DrawWithRecipe":8.487,"Graphics.DrawWithRecipe.draw_and_resource_release":8.473,"Driver.Packet":2.954,"Recorder.Submit":2.930,"Driver.Packet.draw":2.376},"trace_dropped":false,"trace":"aps5-trace-2185dbf92e8d-46644.json.gz"}
{"commit":"9d5f8326bfc6","dirty":false,"env":{"APS5_TRACE_EVENTS":"1048576","APS5_TRACE_SECONDS":"20:8"},"gpu":"NVIDIA GeForce RTX 3070 Laptop GPU","driver":"NVIDIA 617.42","os":"Windows 10.0.26300","cpu":"AMD Ryzen 7 5800H with Radeon Graphics","cpu_threads":16,"memory_mib":64863,"title_id":"PPSA69421","title":"SuperTuxKart","content_version":"00.001.000","resolution":"1920x1080","window":{"spec":"seconds 20:8","first_present":32,"ms":8035.594},"presents":76,"frame_ms":{"p50":104.207,"p90":112.738,"p99":126.658,"max":126.658},"gpu_busy_ms_per_present":5.540,"worker_busy_pct":{"queue worker 0x0":2.857},"top_phases_ms_per_frame":{"Graphics.Draw":10.084,"Graphics.Draw.draw_and_resource_release":9.769,"Vulkan.DrawFromRecipe":7.869,"Graphics.DrawWithRecipe":7.842,"Graphics.DrawWithRecipe.draw_and_resource_release":7.828,"Driver.Packet":2.978,"Recorder.Submit":2.906,"Driver.Packet.draw":2.414},"trace_dropped":false,"trace":"aps5-trace-9d5f8326bfc6-47024.json.gz"}
{"commit":"9d5f8326bfc6","dirty":false,"env":{"APS5_TRACE_EVENTS":"1048576","APS5_TRACE_SECONDS":"20:8"},"gpu":"NVIDIA GeForce RTX 3070 Laptop GPU","driver":"NVIDIA 617.42","os":"Windows 10.0.26300","cpu":"AMD Ryzen 7 5800H with Radeon Graphics","cpu_threads":16,"memory_mib":64863,"title_id":"PPSA69421","title":"SuperTuxKart","content_version":"00.001.000","resolution":"1920x1080","window":{"spec":"seconds 20:8","first_present":30,"ms":8071.984},"presents":76,"frame_ms":{"p50":105.237,"p90":111.993,"p99":119.844,"max":119.844},"gpu_busy_ms_per_present":5.532,"worker_busy_pct":{"queue worker 0x0":2.792},"top_phases_ms_per_frame":{"Graphics.Draw":9.955,"Graphics.Draw.draw_and_resource_release":9.651,"Vulkan.DrawFromRecipe":7.596,"Graphics.DrawWithRecipe":7.566,"Graphics.DrawWithRecipe.draw_and_resource_release":7.554,"Driver.Packet":2.917,"Recorder.Submit":2.899,"Driver.Packet.draw":2.329},"trace_dropped":false,"trace":"aps5-trace-9d5f8326bfc6-42900.json.gz"}
tools/performance_compare.py (first capture of each side)

Performance comparison

Capture Commit Trace Presents Window (ms)
baseline 2185dbf92e aps5-trace-2185dbf92e8d-7560.json.gz 74 8010.110
candidate 9d5f8326bf aps5-trace-9d5f8326bfc6-47024.json.gz 76 8035.594
  • Compare captures from the same machine, title and scene; summaries do not record the CPU, title or scene.
  • Changes are candidate minus baseline. A negative frame-time change means a shorter frame interval.
  • A missing top phase is unreported, not zero; its change is unavailable.
  • Recorded configuration differs; these measurements do not isolate the code change.

Configuration differences

Setting Baseline Candidate
window.first_present 29 32

Frame and GPU times (ms)

Metric Baseline Candidate Change Change (%)
frame_ms.p50 108.090 104.207 -3.883 -3.592
frame_ms.p90 112.897 112.738 -0.159 -0.141
frame_ms.p99 124.353 126.658 +2.305 +1.854
frame_ms.max 124.353 126.658 +2.305 +1.854
mean_frame_ms 108.245 105.731 -2.513 -2.322
gpu_busy_ms_per_present 5.636 5.540 -0.096 -1.703

Top phases (ms per frame)

Metric Baseline Candidate Change Change (%)
Driver.Packet 2.928 2.978 +0.050 +1.708
Driver.Packet.draw 2.337 2.414 +0.077 +3.295
Graphics.Draw 10.680 10.084 -0.596 -5.581
Graphics.Draw.draw_and_resource_release 10.368 9.769 -0.599 -5.777
Graphics.DrawWithRecipe 8.370 7.842 -0.528 -6.308
Graphics.DrawWithRecipe.draw_and_resource_release 8.357 7.828 -0.529 -6.330
Recorder.Submit 2.900 2.906 +0.006 +0.207
Vulkan.DrawFromRecipe 8.398 7.869 -0.529 -6.299
tools/trace_digest.py output (first capture of each side; all digests are in the evidence archive)

rv21-b01-main

seconds 20:8 from present 29: 74 presents, frame p50 108.1 / p90 112.9 / p99 124.4 / max 124.4 ms, GPU busy 5.6 ms per present
NVIDIA GeForce RTX 3070 Laptop GPU, NVIDIA 617.42, Windows 10.0.26300, 1920x1080, commit 2185dbf92e, dropped: no

{"commit":"2185dbf92e8d","dirty":false,"env":{"APS5_TRACE_EVENTS":"1048576","APS5_TRACE_SECONDS":"20:8"},"gpu":"NVIDIA GeForce RTX 3070 Laptop GPU","driver":"NVIDIA 617.42","os":"Windows 10.0.26300","cpu":"AMD Ryzen 7 5800H with Radeon Graphics","cpu_threads":16,"memory_mib":64863,"title_id":"PPSA69421","title":"SuperTuxKart","content_version":"00.001.000","resolution":"1920x1080","window":{"spec":"seconds 20:8","first_present":29,"ms":8010.11},"presents":74,"frame_ms":{"p50":108.09,"p90":112.897,"p99":124.353,"max":124.353},"gpu_busy_ms_per_present":5.636,"worker_busy_pct":{"queue worker 0x0":2.746},"top_phases_ms_per_frame":{"Graphics.Draw":10.68,"Graphics.Draw.draw_and_resource_release":10.368,"Vulkan.DrawFromRecipe":8.398,"Graphics.DrawWithRecipe":8.37,"Graphics.DrawWithRecipe.draw_and_resource_release":8.357,"Driver.Packet":2.928,"Recorder.Submit":2.9,"Driver.Packet.draw":2.337},"trace_dropped":false,"trace":"aps5-trace-2185dbf92e8d-7560.json.gz"}

Slowest frames (largest slices inside each, inclusive)

  • present 45: 124.4 ms at 1783 ms: Driver.WorkerWait (queue worker 0x0) 120.2, Driver.WorkerWait.idle_and_completion_poll (queue worker 0x0) 120.1, Graphics.Draw (draw committer) 13.1, Graphics.Draw.draw_and_resource_release (draw committer) 12.7
  • present 46: 118.3 ms at 1907 ms: Driver.WorkerWait (queue worker 0x0) 114.6, Driver.WorkerWait.idle_and_completion_poll (queue worker 0x0) 114.5, Graphics.Draw (draw committer) 12.7, Graphics.Draw.draw_and_resource_release (draw committer) 12.3
  • present 38: 117.4 ms at 999 ms: Driver.WorkerWait (queue worker 0x0) 113.8, Driver.WorkerWait.idle_and_completion_poll (queue worker 0x0) 113.7, Graphics.Draw (draw committer) 11.6, Graphics.Draw.draw_and_resource_release (draw committer) 11.3

Threads (ms per frame)

thread busy wait untraced in slices < 20 us largest
title 0.0 (0 %) 0.0 (0 %) 108.2 0.4 Recorder.Sync 0.0
queue worker 0x0 2.2 (2 %) 104.9 (97 %) 1.1 3.9 Driver.Packet 2.2
draw committer 22.0 (20 %) 0.7 (1 %) 85.6 0.2 Graphics.Draw 10.7, Vulkan.DrawFromRecipe 8.4
presenter 1.0 (1 %) 0.0 (0 %) 107.3 0.1 VideoOut.Flip 1.0, Driver.Present 0.0
gpu 5.6 (5 %) 0.0 (0 %) 102.6 0.0 batch 5.6

rv21-b04-7471

seconds 20:8 from present 32: 76 presents, frame p50 104.2 / p90 112.7 / p99 126.7 / max 126.7 ms, GPU busy 5.5 ms per present
NVIDIA GeForce RTX 3070 Laptop GPU, NVIDIA 617.42, Windows 10.0.26300, 1920x1080, commit 9d5f8326bf, dropped: no

{"commit":"9d5f8326bfc6","dirty":false,"env":{"APS5_TRACE_EVENTS":"1048576","APS5_TRACE_SECONDS":"20:8"},"gpu":"NVIDIA GeForce RTX 3070 Laptop GPU","driver":"NVIDIA 617.42","os":"Windows 10.0.26300","cpu":"AMD Ryzen 7 5800H with Radeon Graphics","cpu_threads":16,"memory_mib":64863,"title_id":"PPSA69421","title":"SuperTuxKart","content_version":"00.001.000","resolution":"1920x1080","window":{"spec":"seconds 20:8","first_present":32,"ms":8035.594},"presents":76,"frame_ms":{"p50":104.207,"p90":112.738,"p99":126.658,"max":126.658},"gpu_busy_ms_per_present":5.54,"worker_busy_pct":{"queue worker 0x0":2.857},"top_phases_ms_per_frame":{"Graphics.Draw":10.084,"Graphics.Draw.draw_and_resource_release":9.769,"Vulkan.DrawFromRecipe":7.869,"Graphics.DrawWithRecipe":7.842,"Graphics.DrawWithRecipe.draw_and_resource_release":7.828,"Driver.Packet":2.978,"Recorder.Submit":2.906,"Driver.Packet.draw":2.414},"trace_dropped":false,"trace":"aps5-trace-9d5f8326bfc6-47024.json.gz"}

Slowest frames (largest slices inside each, inclusive)

  • present 86: 126.7 ms at 5642 ms: Driver.WorkerWait (queue worker 0x0) 122.5, Driver.WorkerWait.idle_and_completion_poll (queue worker 0x0) 122.4, Graphics.Draw (draw committer) 12.9, Graphics.Draw.draw_and_resource_release (draw committer) 12.5
  • present 105: 119.4 ms at 7686 ms: Driver.WorkerWait (queue worker 0x0) 115.6, Driver.WorkerWait.idle_and_completion_poll (queue worker 0x0) 115.5, Graphics.Draw (draw committer) 12.9, Graphics.Draw.draw_and_resource_release (draw committer) 12.4
  • present 78: 119.2 ms at 4778 ms: Driver.WorkerWait (queue worker 0x0) 115.1, Driver.WorkerWait.idle_and_completion_poll (queue worker 0x0) 115.0, Graphics.Draw (draw committer) 12.6, Graphics.Draw.draw_and_resource_release (draw committer) 12.2

Threads (ms per frame)

thread busy wait untraced in slices < 20 us largest
title 0.0 (0 %) 0.0 (0 %) 105.7 0.4 Recorder.Sync 0.0
queue worker 0x0 2.4 (2 %) 102.4 (97 %) 1.0 3.7 Driver.Packet 2.4, Driver.EndSubmission 0.0
draw committer 20.9 (20 %) 0.6 (1 %) 84.3 0.2 Graphics.Draw 10.1, Vulkan.DrawFromRecipe 7.9
presenter 0.9 (1 %) 0.0 (0 %) 104.8 0.1 VideoOut.Flip 0.9, Driver.Present 0.0
gpu 5.6 (5 %) 0.0 (0 %) 100.1 0.0 batch 5.6

Where it helps

Resident write collection in the SuperTuxKart scene (the series includes #7473, which skips clean resident runs; the counters below show the two together and do not separate this PR's direct output from #7473's skipped queries):

Measured main 2185dbf92e main + series
collectResident calls per frame 1,138 270.7
collectResident µs per call 4.28 3.17
collectResident ms per frame 4.87 0.86
GetWriteWatch calls per frame 1,138 270.7
bytes scanned by collectResident per frame 1,670 MiB 79.1 MiB

Counters come from a local probe build that is not part of this PR (review-probe.patch in the evidence archive): the same counters and timers were inserted into main 2185dbf92e and into main with all eleven series PRs merged (#7464 in its rebased form), anchored on function definitions present in both trees. Runs were in the mirrored order main, series with #7464 reduced to its wake only, series, series, reduced series, main, in the scene above with APS5_PROFILE_DRAW=1; values are medians of two runs over the same 8-second window as the trace, starting 20 s after the first flip, per flip. These runs carry profiling overhead and are not used for FPS. Each optimised function below is changed by this PR only; counters show where the work goes, not an isolated FPS gain.

Other homebrew checks

Workload Control FPS This topic FPS Scope
vkQuake 54.590 56.628 Moving demo; small differences need matched camera repeats
Syobon Action 30.276 30.280 Approximately 30-FPS cap
Middle Ages Ping Pong 59.940 59.939 Approximately 60-FPS cap

UI Lab: the 21 default concepts were rendered and visually reviewed in a navigation cycle for this topic. Artwork was present; this covers default navigation, not all themes or every widget interaction.

Known baseline rendering issue: vkQuake still has intermittent flickering and an intermittently black floor on main and the tested performance branches. These changes do not fix it. Yamagi Quake II gameplay stops at unsupported last-provoking-vertex flat interpolation, and UZDoom at unsupported clip/cull-distance handling on the baseline; neither supplies a valid gameplay FPS comparison.

Dependencies, series and overlap

#7448 adds a physical-release lifetime test at the same GuestMemory.cpp insertion sites. Keep both independent tests when rebasing. Series item 10 builds on this direct-output collector.

The project overlap scan compared the local topics against 785 open PRs and checked merges into main e5c2b3c325e485ba7fd417c47c46f48aa2c89115. This topic merges cleanly in that snapshot. Some other PRs already conflict with main, so the tool cannot compare all their shared-file hunks; the full report is retained with the common series evidence package. No exact duplicate was identified in the inspected implementations. This is not a certification that every conflicting foreign branch is composition-tested.

Conventions and whitespace checks passed for the tested topic range. The benchmark base remains pinned for comparability; this is not a fresh-current-main build/test claim. Measurements and focused tests refer to the pinned source revisions above; no full-suite CI run is claimed.

Re-checked on 2026-10-21: this head still merges cleanly into main 2185dbf92e. #6658, which the earlier combined runs carried, merged into main on 2026-10-20.

Combined series result

Re-measured on 2026-10-21 on current main 2185dbf92e (Windows 11 Pro build 26300, Ryzen 7 5800H, RTX 3070 Laptop GPU, NVIDIA 617.42, WinLibs GCC 15.2.0 r7, Release; SuperTuxKart (PPSA69421) tutorial prompt over the main menu, 1920x1080 internal rendering in a maximized 2560x1369 window, warm shader caches, audio muted, no input; APS5_TRACE_SECONDS=20:8 with APS5_TRACE_EVENTS=1048576, console output not redirected, no profiling switches). Runs in the order A-B-C-D-D-C-B-A, two per configuration; FPS is presents over the 8-s window.

Configuration FPS, run 1 / run 2
main 2185dbf92e 9.18 / 9.03
main + #7464 + #7465 20.85 / 22.02
main + all eleven PRs of the series 29.01 / 28.70

#7464 and #7465 make the largest step together: the title's per-frame host imports disappear (see their PRs). With #7464 reduced to its CPU-label wake only, the whole series measured 10.07 / 9.01 FPS against main 9.24 / 9.30 in a separate block of the same session. Combined numbers are not the gain of any single PR. The combined builds are local merges of the published (#7465-#7470, #7472, #7474) and rebased (#7464, #7471, #7473) heads into main 2185dbf92e; the commits in their summary lines are those merges, not pushed. Summary lines, traces and digests: series-evidence.zip.

Checklist

  • Based on current main (2185dbf92e, rebased 2026-10-21); related overlaps are listed above
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Fixes: none
  • Unblocks: none
  • GPUs tested: n/a (library-only change; game test hardware above)
  • AI-assisted: yes

The published head adds publication metadata only; its complete source tree is identical to the tested snapshot above.

Series index

These are the ten performance topics from the same profiling effort, followed by a separate UI Lab cache-preservation fix. Membership in the series does not imply a dependency.

Item Pull request Required dependency
01 #7464: perf(agc): keep unimported label stores on the CPU #6658
02 #7465: perf(agc): defer small host imports until first GPU use none
03 #7466: perf(agc): validate host imports through their registered owner none
04 #7467: perf(libc): avoid repeated Windows path component scans none
05 #7468: perf(libkernel): find direct-memory aliases through the physical index none
06 #7469: perf(libkernel): find free direct-memory ranges in allocation order none
07 #7470: perf(libc): release exact resident mappings without repeated queries none
08 #7471: perf(libc): collect resident writes directly into the output buffer none
09 #7472: perf(libc): reuse saved direct-memory buffers when unreferenced none
10 #7473: perf(libc): skip write-watch queries for proven clean resident ranges #7471
11 #7474: fix(agc): preserve pipeline caches on immediate guest exit none

Reproduction evidence

Series traces, summary lines, module hashes, focused-test logs and UI contact sheets. Game measurements use the pinned base and source revisions described above; assets contain no game binaries.

Update of 2026-10-21: 7471-evidence.zip (traces, summary lines, trace_digest.py and performance_compare.py output, loaded-module hashes), counters where.json and the probe review-probe.patch with probe_window.py.

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4907703668 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7471). Originally posted by [Dripl1x](https://github.com/Dripl1x) on 2026-10-18T08:47:31Z. --- ### What This PR is part of a series of graphics and memory-management performance improvements for AnyPS5, with SuperTuxKart as the main profiling workload. This is **item 08/10**; the UI Lab startup/cache fix follows as a separate eleventh PR. Each topic's measurements are distinguished from the combined result. Collect writes from a stable resident mapping directly into the caller's output buffer. Preserve capacity, fresh-page accounting, unaligned starts and reset behavior while avoiding two temporary collections. ### Tested Rebased onto main `2185dbf92e` on 2026-10-21; head `9d5f8326bf` (published head `2f59a758d`; the metadata-only commit is dropped). One conflict, at a test insertion point in `core/libs/tests/GuestMemory.cpp`, where main's two #7448 release tests and this PR's test now both stay. Windows 11 Pro build 26300, Ryzen 7 5800H, RTX 3070 Laptop GPU, NVIDIA 617.42, WinLibs GCC 15.2.0 r7, Release. `guest_memory` and `guest_mmap_fixed_anonymous` 3/3 each; conventions pass. 3/3 memory/write-watch cases passed. The behavioral test also passes on main. Coverage includes capacities zero and one, output sentinels, unaligned starts, clear=false, retention of unreported dirty pages and a 2-MiB resident-run boundary. SuperTuxKart captures: Windows 11 Pro build 26300, Ryzen 7 5800H, RTX 3070 Laptop GPU, NVIDIA 617.42, WinLibs GCC 15.2.0 r7, Release; SuperTuxKart (PPSA69421) tutorial prompt over the main menu, 1920x1080 internal rendering in a maximized 2560x1369 window, warm shader caches, audio muted, no input; `APS5_TRACE_SECONDS=20:8` with `APS5_TRACE_EVENTS=1048576`, console output not redirected, no profiling switches; 2026-10-21, order main, ..., this PR, ..., this PR, ..., main. | Capture | Build | Commit | FPS | p50 / p90 / p99 ms | |---|---|---|---:|---| | `rv21-b01-main` | main `2185dbf92e` | `2185dbf92e8d` | 9.238 | 108.1 / 112.9 / 124.4 | | `rv21-b10-main` | main `2185dbf92e` | `2185dbf92e8d` | 9.302 | 105.0 / 119.9 / 129.7 | | `rv21-b04-7471` | this PR | `9d5f8326bfc6` | 9.458 | 104.2 / 112.7 / 126.7 | | `rv21-b07-7471` | this PR | `9d5f8326bfc6` | 9.415 | 105.2 / 112.0 / 119.8 | No FPS change is claimed (9.46 / 9.41 against main 9.24 / 9.30). <details> <summary>Summary lines (main first, then this PR)</summary> ```json {"commit":"2185dbf92e8d","dirty":false,"env":{"APS5_TRACE_EVENTS":"1048576","APS5_TRACE_SECONDS":"20:8"},"gpu":"NVIDIA GeForce RTX 3070 Laptop GPU","driver":"NVIDIA 617.42","os":"Windows 10.0.26300","cpu":"AMD Ryzen 7 5800H with Radeon Graphics","cpu_threads":16,"memory_mib":64863,"title_id":"PPSA69421","title":"SuperTuxKart","content_version":"00.001.000","resolution":"1920x1080","window":{"spec":"seconds 20:8","first_present":29,"ms":8010.110},"presents":74,"frame_ms":{"p50":108.090,"p90":112.897,"p99":124.353,"max":124.353},"gpu_busy_ms_per_present":5.636,"worker_busy_pct":{"queue worker 0x0":2.746},"top_phases_ms_per_frame":{"Graphics.Draw":10.680,"Graphics.Draw.draw_and_resource_release":10.368,"Vulkan.DrawFromRecipe":8.398,"Graphics.DrawWithRecipe":8.370,"Graphics.DrawWithRecipe.draw_and_resource_release":8.357,"Driver.Packet":2.928,"Recorder.Submit":2.900,"Driver.Packet.draw":2.337},"trace_dropped":false,"trace":"aps5-trace-2185dbf92e8d-7560.json.gz"} {"commit":"2185dbf92e8d","dirty":false,"env":{"APS5_TRACE_EVENTS":"1048576","APS5_TRACE_SECONDS":"20:8"},"gpu":"NVIDIA GeForce RTX 3070 Laptop GPU","driver":"NVIDIA 617.42","os":"Windows 10.0.26300","cpu":"AMD Ryzen 7 5800H with Radeon Graphics","cpu_threads":16,"memory_mib":64863,"title_id":"PPSA69421","title":"SuperTuxKart","content_version":"00.001.000","resolution":"1920x1080","window":{"spec":"seconds 20:8","first_present":30,"ms":8062.500},"presents":75,"frame_ms":{"p50":104.995,"p90":119.916,"p99":129.746,"max":129.746},"gpu_busy_ms_per_present":5.551,"worker_busy_pct":{"queue worker 0x0":2.786},"top_phases_ms_per_frame":{"Graphics.Draw":10.928,"Graphics.Draw.draw_and_resource_release":10.606,"Vulkan.DrawFromRecipe":8.516,"Graphics.DrawWithRecipe":8.487,"Graphics.DrawWithRecipe.draw_and_resource_release":8.473,"Driver.Packet":2.954,"Recorder.Submit":2.930,"Driver.Packet.draw":2.376},"trace_dropped":false,"trace":"aps5-trace-2185dbf92e8d-46644.json.gz"} {"commit":"9d5f8326bfc6","dirty":false,"env":{"APS5_TRACE_EVENTS":"1048576","APS5_TRACE_SECONDS":"20:8"},"gpu":"NVIDIA GeForce RTX 3070 Laptop GPU","driver":"NVIDIA 617.42","os":"Windows 10.0.26300","cpu":"AMD Ryzen 7 5800H with Radeon Graphics","cpu_threads":16,"memory_mib":64863,"title_id":"PPSA69421","title":"SuperTuxKart","content_version":"00.001.000","resolution":"1920x1080","window":{"spec":"seconds 20:8","first_present":32,"ms":8035.594},"presents":76,"frame_ms":{"p50":104.207,"p90":112.738,"p99":126.658,"max":126.658},"gpu_busy_ms_per_present":5.540,"worker_busy_pct":{"queue worker 0x0":2.857},"top_phases_ms_per_frame":{"Graphics.Draw":10.084,"Graphics.Draw.draw_and_resource_release":9.769,"Vulkan.DrawFromRecipe":7.869,"Graphics.DrawWithRecipe":7.842,"Graphics.DrawWithRecipe.draw_and_resource_release":7.828,"Driver.Packet":2.978,"Recorder.Submit":2.906,"Driver.Packet.draw":2.414},"trace_dropped":false,"trace":"aps5-trace-9d5f8326bfc6-47024.json.gz"} {"commit":"9d5f8326bfc6","dirty":false,"env":{"APS5_TRACE_EVENTS":"1048576","APS5_TRACE_SECONDS":"20:8"},"gpu":"NVIDIA GeForce RTX 3070 Laptop GPU","driver":"NVIDIA 617.42","os":"Windows 10.0.26300","cpu":"AMD Ryzen 7 5800H with Radeon Graphics","cpu_threads":16,"memory_mib":64863,"title_id":"PPSA69421","title":"SuperTuxKart","content_version":"00.001.000","resolution":"1920x1080","window":{"spec":"seconds 20:8","first_present":30,"ms":8071.984},"presents":76,"frame_ms":{"p50":105.237,"p90":111.993,"p99":119.844,"max":119.844},"gpu_busy_ms_per_present":5.532,"worker_busy_pct":{"queue worker 0x0":2.792},"top_phases_ms_per_frame":{"Graphics.Draw":9.955,"Graphics.Draw.draw_and_resource_release":9.651,"Vulkan.DrawFromRecipe":7.596,"Graphics.DrawWithRecipe":7.566,"Graphics.DrawWithRecipe.draw_and_resource_release":7.554,"Driver.Packet":2.917,"Recorder.Submit":2.899,"Driver.Packet.draw":2.329},"trace_dropped":false,"trace":"aps5-trace-9d5f8326bfc6-42900.json.gz"} ``` </details> <details> <summary><code>tools/performance_compare.py</code> (first capture of each side)</summary> **Performance comparison** | Capture | Commit | Trace | Presents | Window (ms) | | --- | --- | --- | ---: | ---: | | baseline | 2185dbf92e8d | aps5-trace-2185dbf92e8d-7560.json.gz | 74 | 8010.110 | | candidate | 9d5f8326bfc6 | aps5-trace-9d5f8326bfc6-47024.json.gz | 76 | 8035.594 | - Compare captures from the same machine, title and scene; summaries do not record the CPU, title or scene. - Changes are candidate minus baseline. A negative frame-time change means a shorter frame interval. - A missing top phase is unreported, not zero; its change is unavailable. - Recorded configuration differs; these measurements do not isolate the code change. **Configuration differences** | Setting | Baseline | Candidate | | --- | --- | --- | | window.first_present | 29 | 32 | **Frame and GPU times (ms)** | Metric | Baseline | Candidate | Change | Change (%) | | --- | ---: | ---: | ---: | ---: | | frame_ms.p50 | 108.090 | 104.207 | -3.883 | -3.592 | | frame_ms.p90 | 112.897 | 112.738 | -0.159 | -0.141 | | frame_ms.p99 | 124.353 | 126.658 | +2.305 | +1.854 | | frame_ms.max | 124.353 | 126.658 | +2.305 | +1.854 | | mean_frame_ms | 108.245 | 105.731 | -2.513 | -2.322 | | gpu_busy_ms_per_present | 5.636 | 5.540 | -0.096 | -1.703 | **Top phases (ms per frame)** | Metric | Baseline | Candidate | Change | Change (%) | | --- | ---: | ---: | ---: | ---: | | Driver.Packet | 2.928 | 2.978 | +0.050 | +1.708 | | Driver.Packet.draw | 2.337 | 2.414 | +0.077 | +3.295 | | Graphics.Draw | 10.680 | 10.084 | -0.596 | -5.581 | | Graphics.Draw.draw_and_resource_release | 10.368 | 9.769 | -0.599 | -5.777 | | Graphics.DrawWithRecipe | 8.370 | 7.842 | -0.528 | -6.308 | | Graphics.DrawWithRecipe.draw_and_resource_release | 8.357 | 7.828 | -0.529 | -6.330 | | Recorder.Submit | 2.900 | 2.906 | +0.006 | +0.207 | | Vulkan.DrawFromRecipe | 8.398 | 7.869 | -0.529 | -6.299 | </details> <details> <summary><code>tools/trace_digest.py</code> output (first capture of each side; all digests are in the evidence archive)</summary> `rv21-b01-main` **seconds 20:8** from present 29: 74 presents, frame p50 108.1 / p90 112.9 / p99 124.4 / max 124.4 ms, GPU busy 5.6 ms per present NVIDIA GeForce RTX 3070 Laptop GPU, NVIDIA 617.42, Windows 10.0.26300, 1920x1080, commit 2185dbf92e8d, dropped: no ```json {"commit":"2185dbf92e8d","dirty":false,"env":{"APS5_TRACE_EVENTS":"1048576","APS5_TRACE_SECONDS":"20:8"},"gpu":"NVIDIA GeForce RTX 3070 Laptop GPU","driver":"NVIDIA 617.42","os":"Windows 10.0.26300","cpu":"AMD Ryzen 7 5800H with Radeon Graphics","cpu_threads":16,"memory_mib":64863,"title_id":"PPSA69421","title":"SuperTuxKart","content_version":"00.001.000","resolution":"1920x1080","window":{"spec":"seconds 20:8","first_present":29,"ms":8010.11},"presents":74,"frame_ms":{"p50":108.09,"p90":112.897,"p99":124.353,"max":124.353},"gpu_busy_ms_per_present":5.636,"worker_busy_pct":{"queue worker 0x0":2.746},"top_phases_ms_per_frame":{"Graphics.Draw":10.68,"Graphics.Draw.draw_and_resource_release":10.368,"Vulkan.DrawFromRecipe":8.398,"Graphics.DrawWithRecipe":8.37,"Graphics.DrawWithRecipe.draw_and_resource_release":8.357,"Driver.Packet":2.928,"Recorder.Submit":2.9,"Driver.Packet.draw":2.337},"trace_dropped":false,"trace":"aps5-trace-2185dbf92e8d-7560.json.gz"} ``` **Slowest frames** (largest slices inside each, inclusive) - present 45: 124.4 ms at 1783 ms: Driver.WorkerWait (queue worker 0x0) 120.2, Driver.WorkerWait.idle_and_completion_poll (queue worker 0x0) 120.1, Graphics.Draw (draw committer) 13.1, Graphics.Draw.draw_and_resource_release (draw committer) 12.7 - present 46: 118.3 ms at 1907 ms: Driver.WorkerWait (queue worker 0x0) 114.6, Driver.WorkerWait.idle_and_completion_poll (queue worker 0x0) 114.5, Graphics.Draw (draw committer) 12.7, Graphics.Draw.draw_and_resource_release (draw committer) 12.3 - present 38: 117.4 ms at 999 ms: Driver.WorkerWait (queue worker 0x0) 113.8, Driver.WorkerWait.idle_and_completion_poll (queue worker 0x0) 113.7, Graphics.Draw (draw committer) 11.6, Graphics.Draw.draw_and_resource_release (draw committer) 11.3 **Threads** (ms per frame) | thread | busy | wait | untraced | in slices < 20 us | largest | |---|---|---|---|---|---| | title | 0.0 (0 %) | 0.0 (0 %) | 108.2 | 0.4 | Recorder.Sync 0.0 | | queue worker 0x0 | 2.2 (2 %) | 104.9 (97 %) | 1.1 | 3.9 | Driver.Packet 2.2 | | draw committer | 22.0 (20 %) | 0.7 (1 %) | 85.6 | 0.2 | Graphics.Draw 10.7, Vulkan.DrawFromRecipe 8.4 | | presenter | 1.0 (1 %) | 0.0 (0 %) | 107.3 | 0.1 | VideoOut.Flip 1.0, Driver.Present 0.0 | | gpu | 5.6 (5 %) | 0.0 (0 %) | 102.6 | 0.0 | batch 5.6 | `rv21-b04-7471` **seconds 20:8** from present 32: 76 presents, frame p50 104.2 / p90 112.7 / p99 126.7 / max 126.7 ms, GPU busy 5.5 ms per present NVIDIA GeForce RTX 3070 Laptop GPU, NVIDIA 617.42, Windows 10.0.26300, 1920x1080, commit 9d5f8326bfc6, dropped: no ```json {"commit":"9d5f8326bfc6","dirty":false,"env":{"APS5_TRACE_EVENTS":"1048576","APS5_TRACE_SECONDS":"20:8"},"gpu":"NVIDIA GeForce RTX 3070 Laptop GPU","driver":"NVIDIA 617.42","os":"Windows 10.0.26300","cpu":"AMD Ryzen 7 5800H with Radeon Graphics","cpu_threads":16,"memory_mib":64863,"title_id":"PPSA69421","title":"SuperTuxKart","content_version":"00.001.000","resolution":"1920x1080","window":{"spec":"seconds 20:8","first_present":32,"ms":8035.594},"presents":76,"frame_ms":{"p50":104.207,"p90":112.738,"p99":126.658,"max":126.658},"gpu_busy_ms_per_present":5.54,"worker_busy_pct":{"queue worker 0x0":2.857},"top_phases_ms_per_frame":{"Graphics.Draw":10.084,"Graphics.Draw.draw_and_resource_release":9.769,"Vulkan.DrawFromRecipe":7.869,"Graphics.DrawWithRecipe":7.842,"Graphics.DrawWithRecipe.draw_and_resource_release":7.828,"Driver.Packet":2.978,"Recorder.Submit":2.906,"Driver.Packet.draw":2.414},"trace_dropped":false,"trace":"aps5-trace-9d5f8326bfc6-47024.json.gz"} ``` **Slowest frames** (largest slices inside each, inclusive) - present 86: 126.7 ms at 5642 ms: Driver.WorkerWait (queue worker 0x0) 122.5, Driver.WorkerWait.idle_and_completion_poll (queue worker 0x0) 122.4, Graphics.Draw (draw committer) 12.9, Graphics.Draw.draw_and_resource_release (draw committer) 12.5 - present 105: 119.4 ms at 7686 ms: Driver.WorkerWait (queue worker 0x0) 115.6, Driver.WorkerWait.idle_and_completion_poll (queue worker 0x0) 115.5, Graphics.Draw (draw committer) 12.9, Graphics.Draw.draw_and_resource_release (draw committer) 12.4 - present 78: 119.2 ms at 4778 ms: Driver.WorkerWait (queue worker 0x0) 115.1, Driver.WorkerWait.idle_and_completion_poll (queue worker 0x0) 115.0, Graphics.Draw (draw committer) 12.6, Graphics.Draw.draw_and_resource_release (draw committer) 12.2 **Threads** (ms per frame) | thread | busy | wait | untraced | in slices < 20 us | largest | |---|---|---|---|---|---| | title | 0.0 (0 %) | 0.0 (0 %) | 105.7 | 0.4 | Recorder.Sync 0.0 | | queue worker 0x0 | 2.4 (2 %) | 102.4 (97 %) | 1.0 | 3.7 | Driver.Packet 2.4, Driver.EndSubmission 0.0 | | draw committer | 20.9 (20 %) | 0.6 (1 %) | 84.3 | 0.2 | Graphics.Draw 10.1, Vulkan.DrawFromRecipe 7.9 | | presenter | 0.9 (1 %) | 0.0 (0 %) | 104.8 | 0.1 | VideoOut.Flip 0.9, Driver.Present 0.0 | | gpu | 5.6 (5 %) | 0.0 (0 %) | 100.1 | 0.0 | batch 5.6 | </details> ### Where it helps Resident write collection in the SuperTuxKart scene (the series includes #7473, which skips clean resident runs; the counters below show the two together and do not separate this PR's direct output from #7473's skipped queries): | Measured | main `2185dbf92e` | main + series | |---|---:|---:| | `collectResident` calls per frame | 1,138 | 270.7 | | `collectResident` µs per call | 4.28 | 3.17 | | `collectResident` ms per frame | 4.87 | 0.86 | | GetWriteWatch calls per frame | 1,138 | 270.7 | | bytes scanned by collectResident per frame | 1,670 MiB | 79.1 MiB | Counters come from a local probe build that is not part of this PR (`review-probe.patch` in the evidence archive): the same counters and timers were inserted into main `2185dbf92e` and into main with all eleven series PRs merged (#7464 in its rebased form), anchored on function definitions present in both trees. Runs were in the mirrored order main, series with #7464 reduced to its wake only, series, series, reduced series, main, in the scene above with `APS5_PROFILE_DRAW=1`; values are medians of two runs over the same 8-second window as the trace, starting 20 s after the first flip, per flip. These runs carry profiling overhead and are not used for FPS. Each optimised function below is changed by this PR only; counters show where the work goes, not an isolated FPS gain. ### Other homebrew checks | Workload | Control FPS | This topic FPS | Scope | |---|---:|---:|---| | vkQuake | 54.590 | 56.628 | Moving demo; small differences need matched camera repeats | | Syobon Action | 30.276 | 30.280 | Approximately 30-FPS cap | | Middle Ages Ping Pong | 59.940 | 59.939 | Approximately 60-FPS cap | UI Lab: the 21 default concepts were rendered and visually reviewed in a navigation cycle for this topic. Artwork was present; this covers default navigation, not all themes or every widget interaction. Known baseline rendering issue: vkQuake still has intermittent flickering and an intermittently black floor on main and the tested performance branches. These changes do not fix it. Yamagi Quake II gameplay stops at unsupported last-provoking-vertex flat interpolation, and UZDoom at unsupported clip/cull-distance handling on the baseline; neither supplies a valid gameplay FPS comparison. ### Dependencies, series and overlap [#7448](https://github.com/boykopovar/AnyPS5/pull/7448) adds a physical-release lifetime test at the same GuestMemory.cpp insertion sites. Keep both independent tests when rebasing. Series item 10 builds on this direct-output collector. The project overlap scan compared the local topics against 785 open PRs and checked merges into main `e5c2b3c325e485ba7fd417c47c46f48aa2c89115`. This topic merges cleanly in that snapshot. Some other PRs already conflict with main, so the tool cannot compare all their shared-file hunks; the full report is retained with the common series evidence package. No exact duplicate was identified in the inspected implementations. This is not a certification that every conflicting foreign branch is composition-tested. Conventions and whitespace checks passed for the tested topic range. The benchmark base remains pinned for comparability; this is not a fresh-current-main build/test claim. Measurements and focused tests refer to the pinned source revisions above; no full-suite CI run is claimed. Re-checked on 2026-10-21: this head still merges cleanly into main `2185dbf92e`. #6658, which the earlier combined runs carried, merged into main on 2026-10-20. ### Combined series result Re-measured on 2026-10-21 on current main `2185dbf92e` (Windows 11 Pro build 26300, Ryzen 7 5800H, RTX 3070 Laptop GPU, NVIDIA 617.42, WinLibs GCC 15.2.0 r7, Release; SuperTuxKart (PPSA69421) tutorial prompt over the main menu, 1920x1080 internal rendering in a maximized 2560x1369 window, warm shader caches, audio muted, no input; `APS5_TRACE_SECONDS=20:8` with `APS5_TRACE_EVENTS=1048576`, console output not redirected, no profiling switches). Runs in the order A-B-C-D-D-C-B-A, two per configuration; FPS is presents over the 8-s window. | Configuration | FPS, run 1 / run 2 | |---|---| | main `2185dbf92e` | 9.18 / 9.03 | | main + #7464 + #7465 | 20.85 / 22.02 | | main + all eleven PRs of the series | 29.01 / 28.70 | #7464 and #7465 make the largest step together: the title's per-frame host imports disappear (see their PRs). With #7464 reduced to its CPU-label wake only, the whole series measured 10.07 / 9.01 FPS against main 9.24 / 9.30 in a separate block of the same session. Combined numbers are not the gain of any single PR. The combined builds are local merges of the published (#7465-#7470, #7472, #7474) and rebased (#7464, #7471, #7473) heads into main `2185dbf92e`; the commits in their summary lines are those merges, not pushed. Summary lines, traces and digests: [series-evidence.zip](https://github.com/Dripl1x/AnyPS5/releases/download/review-20261021/series-evidence.zip). ### Checklist <!-- Rules behind each item: https://github.com/boykopovar/AnyPS5/blob/main/CONTRIBUTING.md --> - [x] Based on current `main` (`2185dbf92e`, rebased 2026-10-21); related overlaps are listed above - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except [technical debt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/CONVENTIONS.md) - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed under Silent stubs in their library's [technical debt](https://github.com/boykopovar/AnyPS5/tree/main/docs/dev/debt) file - [x] No notes, investigation `.md` files or images added to the repository (attach them to this PR) - [x] New third-party code is a submodule built from source - [x] Generic behaviour, not specific to one title - [x] Depends on: none - [x] Fixes: none - [x] Unblocks: none - [x] GPUs tested: n/a (library-only change; game test hardware above) - [x] AI-assisted: yes The published head adds publication metadata only; its complete source tree is identical to the tested snapshot above. ### Series index These are the ten performance topics from the same profiling effort, followed by a separate UI Lab cache-preservation fix. Membership in the series does not imply a dependency. | Item | Pull request | Required dependency | |---|---|---| | 01 | [#7464: perf(agc): keep unimported label stores on the CPU](https://github.com/boykopovar/AnyPS5/pull/7464) | #6658 | | 02 | [#7465: perf(agc): defer small host imports until first GPU use](https://github.com/boykopovar/AnyPS5/pull/7465) | none | | 03 | [#7466: perf(agc): validate host imports through their registered owner](https://github.com/boykopovar/AnyPS5/pull/7466) | none | | 04 | [#7467: perf(libc): avoid repeated Windows path component scans](https://github.com/boykopovar/AnyPS5/pull/7467) | none | | 05 | [#7468: perf(libkernel): find direct-memory aliases through the physical index](https://github.com/boykopovar/AnyPS5/pull/7468) | none | | 06 | [#7469: perf(libkernel): find free direct-memory ranges in allocation order](https://github.com/boykopovar/AnyPS5/pull/7469) | none | | 07 | [#7470: perf(libc): release exact resident mappings without repeated queries](https://github.com/boykopovar/AnyPS5/pull/7470) | none | | 08 | [#7471: perf(libc): collect resident writes directly into the output buffer](https://github.com/boykopovar/AnyPS5/pull/7471) | none | | 09 | [#7472: perf(libc): reuse saved direct-memory buffers when unreferenced](https://github.com/boykopovar/AnyPS5/pull/7472) | none | | 10 | [#7473: perf(libc): skip write-watch queries for proven clean resident ranges](https://github.com/boykopovar/AnyPS5/pull/7473) | #7471 | | 11 | [#7474: fix(agc): preserve pipeline caches on immediate guest exit](https://github.com/boykopovar/AnyPS5/pull/7474) | none | ### Reproduction evidence [Series traces, summary lines, module hashes, focused-test logs and UI contact sheets](https://github.com/Dripl1x/AnyPS5/releases/tag/performance-series-20261018). Game measurements use the pinned base and source revisions described above; assets contain no game binaries. Update of 2026-10-21: [7471-evidence.zip](https://github.com/Dripl1x/AnyPS5/releases/download/review-20261021/7471-evidence.zip) (traces, summary lines, `trace_digest.py` and `performance_compare.py` output, loaded-module hashes), counters [where.json](https://github.com/Dripl1x/AnyPS5/releases/download/review-20261021/where.json) and the probe [review-probe.patch](https://github.com/Dripl1x/AnyPS5/releases/download/review-20261021/review-probe.patch) with [probe_window.py](https://github.com/Dripl1x/AnyPS5/releases/download/review-20261021/probe_window.py).
github-actions[bot] commented 2026-10-18 08:58:26 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-18T08:58:26Z.


Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.

Pull request Shared files not compared
PR 4449 core/libs/tests/GuestMemory.cpp
PR 5021 core/libs/tests/GuestMemory.cpp
PR 6044 core/libs/tests/GuestMemory.cpp
PR 6321 core/libs/tests/GuestMemory.cpp
PR 6469 core/libs/tests/GuestMemory.cpp
PR 6879 core/libs/tests/GuestMemory.cpp
PR 7105 core/libs/tests/GuestMemory.cpp
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6247960900 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7471#issuecomment-6247960900). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-18T08:58:26Z. --- <!-- pr-overlap --> Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap. | Pull request | Shared files not compared | |---|---| | [PR 4449](https://www.github.com/boykopovar/AnyPS5/pull/4449) | `core/libs/tests/GuestMemory.cpp` | | [PR 5021](https://www.github.com/boykopovar/AnyPS5/pull/5021) | `core/libs/tests/GuestMemory.cpp` | | [PR 6044](https://www.github.com/boykopovar/AnyPS5/pull/6044) | `core/libs/tests/GuestMemory.cpp` | | [PR 6321](https://www.github.com/boykopovar/AnyPS5/pull/6321) | `core/libs/tests/GuestMemory.cpp` | | [PR 6469](https://www.github.com/boykopovar/AnyPS5/pull/6469) | `core/libs/tests/GuestMemory.cpp` | | [PR 6879](https://www.github.com/boykopovar/AnyPS5/pull/6879) | `core/libs/tests/GuestMemory.cpp` | | [PR 7105](https://www.github.com/boykopovar/AnyPS5/pull/7105) | `core/libs/tests/GuestMemory.cpp` |
wachi35676 commented 2026-10-18 12:32:26 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by wachi35676 on 2026-10-18T12:32:26Z.


This is equivalent by inspection: when run.fresh == 0, the old loop reports exactly the GetWriteWatch pages with max(at, from) and settles nothing. The 462 related tests pass on Windows.

A clean 2 MiB resident collect takes 1.68–1.90 µs on main and 1.39–2.12 µs with this PR, which is within noise on this machine.

AI-assisted: yes (Claude Code); results above were run on this machine.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6249953908 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7471#issuecomment-6249953908). Originally posted by [wachi35676](https://github.com/wachi35676) on 2026-10-18T12:32:26Z. --- This is equivalent by inspection: when `run.fresh == 0`, the old loop reports exactly the `GetWriteWatch` pages with `max(at, from)` and settles nothing. The 462 related tests pass on Windows. A clean 2 MiB resident collect takes 1.68–1.90 µs on `main` and 1.39–2.12 µs with this PR, which is within noise on this machine. AI-assisted: yes (Claude Code); results above were run on this machine.
Dripl1x commented 2026-10-18 13:05:54 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Dripl1x on 2026-10-18T13:05:54Z.


@wachi35676 Thanks for checking the equivalence and running the related Windows tests. Agreed that the clean 2 MiB measurements are within noise on your machine; the change removes the intermediate copy, but those timings do not establish a repeatable isolated speedup.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6250269335 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7471#issuecomment-6250269335). Originally posted by [Dripl1x](https://github.com/Dripl1x) on 2026-10-18T13:05:54Z. --- @wachi35676 Thanks for checking the equivalence and running the related Windows tests. Agreed that the clean 2 MiB measurements are within noise on your machine; the change removes the intermediate copy, but those timings do not establish a repeatable isolated speedup.
github-actions[bot] commented 2026-10-18 21:44:49 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-18T21:44:49Z.


This pull request is labeled perf, so it needs the summary line of a capture on main and one with the change, from the same title, scene and machine, as the Performance report form asks. Please paste both aps5-summary.jsonl lines, attach the two traces and add the output of tools/trace_digest.py.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6255522835 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7471#issuecomment-6255522835). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-18T21:44:49Z. --- <!-- pr-labels-perf --> This pull request is labeled `perf`, so it needs the summary line of a capture on `main` and one with the change, from the same title, scene and machine, as the Performance report form asks. Please paste both `aps5-summary.jsonl` lines, attach the two traces and add the output of `tools/trace_digest.py`.
Dripl1x commented 2026-10-20 23:34:26 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Dripl1x on 2026-10-20T23:34:26Z.


Rebased onto main 2185dbf92e; head 9d5f8326bf. The only conflict was a test insertion point in core/libs/tests/GuestMemory.cpp; main's two #7448 release tests and this PR's test both stay. guest_memory and guest_mmap_fixed_anonymous pass 3/3 on Windows (RTX 3070 Laptop, Release) and conventions pass. The description now has summary lines of main and this head from the same session; no FPS change is claimed.

AI-assisted: yes (Claude Code)

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6304200952 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7471#issuecomment-6304200952). Originally posted by [Dripl1x](https://github.com/Dripl1x) on 2026-10-20T23:34:26Z. --- Rebased onto main `2185dbf92e`; head `9d5f8326bf`. The only conflict was a test insertion point in `core/libs/tests/GuestMemory.cpp`; main's two #7448 release tests and this PR's test both stay. `guest_memory` and `guest_mmap_fixed_anonymous` pass 3/3 on Windows (RTX 3070 Laptop, Release) and conventions pass. The description now has summary lines of main and this head from the same session; no FPS change is claimed. AI-assisted: yes (Claude Code)
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
boykopovar/AnyPS5!7471
No description provided.