Repository navigation
perf(agc): write the frame-dump log line through the asynchronous profile output - #9602
Conversation
|
This pull request is labeled |
MarcZX10
left a comment
There was a problem hiding this comment.
The change is a one-line replacement on the presenter path; the reported improvement is plausible, and the PR reports focused frame-dump tests with the validation layer. Hosted conventions, eligibility, intake, labels and report checks pass; product/relinker jobs are skipped. I did not run tests locally.
The required perf evidence is not complete yet. Both summary lines identify commit 6ef5a1c4c922; the changed run is marked dirty, and the traces are neither attached nor digested. The repository requires distinct main and change captures from the same title, scene and machine, the traces, and tools/trace_digest.py output. Please rerun against current main and the clean PR head and add those artifacts.
The AGC validation rule also requires the focused tests on both main and the change on the same machine/GPU with ANYPS5_REQUIRE_VULKAN=1, ANYPS5_NO_SHADER_CACHE=1 and the Khronos layer, confirming the layer was loaded and comparing VUIDs. The current report documents the PR side only. Finally, this branch is based on 6ef5a1c4, while current upstream main is dce41a89; update the branch and rerun the report and focused validation on the resulting head.
MarcZX10
left a comment
There was a problem hiding this comment.
Correction to my preceding review: the PR branch is based on d9c99c9, not 6ef5a1c4; the report’s paired baseline is 6ef5a1c4, and current upstream main is now dce41a89. Please update the branch and rerun the required captures/tests against current main and the PR head.
The performance evidence remains incomplete: both summary lines identify commit 6ef5a1c4c922, the changed run is marked dirty, and the traces are neither attached nor digested. The repository requires distinct clean main/change captures from the same title, scene and machine, with both traces and tools/trace_digest.py output.
For this AGC change, the repository also requires the focused tests on main and the change on the same machine/GPU with ANYPS5_REQUIRE_VULKAN=1, ANYPS5_NO_SHADER_CACHE=1 and the Khronos layer, confirmation the layer loaded, and a VUID comparison. The current report documents PR-side checks, not the required paired baseline comparison. Hosted conventions, eligibility, intake, labels and report checks pass; product/relinker jobs are skipped. I did not run tests locally.
|
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.
|
a399b9b to
52d1385
Compare
|
I rechecked exact head |
|
Thanks. Rebased on Clean captures, same title, scene and machine.
The gap is smaller than in the description's first A/B on The summary lines of the trace window (100 to 120 s), {"commit":"7e2ba73e4c8c","dirty":false,"env":{"APS5_DUMP_FRAMES":"400","APS5_DUMP_FRAMES_EVERY":"30","APS5_TRACE_SECONDS":"100:20","APS5_TRACE_SUMMARY_EVERY":"10"},"gpu":"AMD Radeon RX 6700 XT","driver":"AMD proprietary driver 26.10.1 (AMD proprietary shader compiler)","os":"Windows 10.0.26200","cpu":"AMD Ryzen 5 5600X 6-Core Processor","cpu_threads":12,"memory_mib":32690,"title_id":"PPSA14363","title":"METAL GEAR SOLID - Master Collection Version","content_version":"03.000.000","resolution":"1920x1080","window":{"spec":"seconds 100:20","first_present":5894,"ms":20003.816},"presents":1199,"frame_ms":{"p50":16.684,"p90":17.033,"p99":17.741,"max":18.160},"gpu_busy_ms_per_present":1.145,"worker_busy_pct":{"queue worker 0x0":2.600},"top_phases_ms_per_frame":{"VideoOut.Flip":2.226,"VideoOut.Flip.present":1.892,"Driver.Present":1.890,"Driver.Present.acquire_image":1.297,"Vulkan.Acquire":1.295,"Vulkan.Acquire.acquire_fence_wait":1.220,"Driver.Packet":0.431,"Driver.Present.render_fence_wait":0.415},"trace_dropped":false,"trace":"aps5-trace-7e2ba73e4c8c-18208.json.gz"}{"commit":"52d1385bddf4","dirty":false,"env":{"APS5_DUMP_FRAMES":"400","APS5_DUMP_FRAMES_EVERY":"30","APS5_TRACE_SECONDS":"100:20","APS5_TRACE_SUMMARY_EVERY":"10"},"gpu":"AMD Radeon RX 6700 XT","driver":"AMD proprietary driver 26.10.1 (AMD proprietary shader compiler)","os":"Windows 10.0.26200","cpu":"AMD Ryzen 5 5600X 6-Core Processor","cpu_threads":12,"memory_mib":32690,"title_id":"PPSA14363","title":"METAL GEAR SOLID - Master Collection Version","content_version":"03.000.000","resolution":"1920x1080","window":{"spec":"seconds 100:20","first_present":5947,"ms":20003.301},"presents":1199,"frame_ms":{"p50":16.682,"p90":16.962,"p99":17.377,"max":17.941},"gpu_busy_ms_per_present":1.145,"worker_busy_pct":{"queue worker 0x0":2.313},"top_phases_ms_per_frame":{"VideoOut.Flip":1.744,"VideoOut.Flip.present":1.665,"Driver.Present":1.663,"Driver.Present.acquire_image":1.331,"Vulkan.Acquire":1.330,"Vulkan.Acquire.acquire_fence_wait":1.262,"Driver.Packet":0.383,"Graphics.Draw":0.224},"trace_dropped":false,"trace":"aps5-trace-52d1385bddf4-20000.json.gz"}
In its top phases,
|
| # | seconds | presents | p50 | p90 | p99 | max | GPU busy | busiest worker | largest phase |
|---|---|---|---|---|---|---|---|---|---|
| 1 | 0-10 | 502 | 16.7 | 17.0 | 34.2 | 831.8 | 1.3 | 3 % | VideoOut.Flip 15.8 |
| 2 | 10-20 | 597 | 16.7 | 17.0 | 17.9 | 62.2 | 1.4 | 2 % | VideoOut.Flip 8.2 |
| 3 | 20-30 | 600 | 16.7 | 17.0 | 17.8 | 17.9 | 1.1 | 3 % | VideoOut.Flip 2.2 |
| 4 | 30-40 | 600 | 16.7 | 17.0 | 17.6 | 23.3 | 1.1 | 2 % | VideoOut.Flip 2.2 |
| 5 | 40-50 | 600 | 16.7 | 17.0 | 17.7 | 25.0 | 1.1 | 2 % | VideoOut.Flip 2.2 |
| 6 | 50-60 | 600 | 16.7 | 17.1 | 17.7 | 18.3 | 1.1 | 2 % | VideoOut.Flip 2.2 |
| 7 | 60-70 | 600 | 16.7 | 17.0 | 17.6 | 21.2 | 1.1 | 2 % | VideoOut.Flip 2.2 |
| 8 | 70-80 | 600 | 16.7 | 17.0 | 17.7 | 18.1 | 1.1 | 2 % | VideoOut.Flip 2.2 |
| 9 | 80-90 | 600 | 16.7 | 17.0 | 17.6 | 18.2 | 1.1 | 2 % | VideoOut.Flip 2.2 |
| 10 | 90-100 | 600 | 16.7 | 17.0 | 17.7 | 17.8 | 1.1 | 2 % | VideoOut.Flip 2.2 |
| 11 | 100-110 | 600 | 16.7 | 17.0 | 17.7 | 18.0 | 1.1 | 2 % | VideoOut.Flip 2.2 |
| 12 | 110-120 | 595 | 16.7 | 17.1 | 17.8 | 120.0 | 1.1 | 3 % | VideoOut.Flip 2.4 |
| 13 | 120-130 | 600 | 16.7 | 17.0 | 17.8 | 18.2 | 1.1 | 3 % | VideoOut.Flip 6.0 |
| 14 | 130-140 | 600 | 16.7 | 17.0 | 17.7 | 18.2 | 1.1 | 3 % | VideoOut.Flip 2.2 |
p99 ms @+++++++++++++ 0-34.2
gpu ms %@############ 0-1.4
This PR 52d1385bdd:
14 intervals, 0.0 to 140.1 s, 8346 presents
AMD Radeon RX 6700 XT, AMD proprietary driver 26.10.1 (AMD proprietary shader compiler), Windows 10.0.26200, 1920x1080, commit 52d1385
| # | seconds | presents | p50 | p90 | p99 | max | GPU busy | busiest worker | largest phase |
|---|---|---|---|---|---|---|---|---|---|
| 1 | 0-10 | 553 | 16.7 | 17.0 | 26.5 | 599.7 | 1.2 | 2 % | VideoOut.Flip 15.8 |
| 2 | 10-20 | 599 | 16.7 | 16.9 | 17.6 | 46.1 | 1.4 | 2 % | VideoOut.Flip 11.8 |
| 3 | 20-30 | 600 | 16.7 | 16.9 | 17.3 | 17.6 | 1.1 | 2 % | VideoOut.Flip 1.7 |
| 4 | 30-40 | 600 | 16.7 | 16.9 | 17.5 | 17.5 | 1.1 | 2 % | VideoOut.Flip 1.7 |
| 5 | 40-50 | 600 | 16.7 | 16.9 | 17.4 | 18.1 | 1.1 | 2 % | VideoOut.Flip 1.7 |
| 6 | 50-60 | 600 | 16.7 | 16.9 | 17.2 | 17.7 | 1.1 | 2 % | VideoOut.Flip 1.7 |
| 7 | 60-70 | 600 | 16.7 | 16.9 | 17.3 | 17.5 | 1.1 | 2 % | VideoOut.Flip 1.7 |
| 8 | 70-80 | 600 | 16.7 | 17.0 | 17.4 | 17.8 | 1.1 | 2 % | VideoOut.Flip 1.7 |
| 9 | 80-90 | 600 | 16.7 | 17.0 | 17.3 | 17.5 | 1.1 | 2 % | VideoOut.Flip 1.7 |
| 10 | 90-100 | 600 | 16.7 | 17.0 | 17.5 | 18.1 | 1.1 | 2 % | VideoOut.Flip 1.7 |
| 11 | 100-110 | 600 | 16.7 | 17.0 | 17.4 | 17.9 | 1.1 | 2 % | VideoOut.Flip 1.7 |
| 12 | 110-120 | 595 | 16.7 | 17.0 | 17.4 | 109.1 | 1.1 | 2 % | VideoOut.Flip 1.9 |
| 13 | 120-130 | 599 | 16.7 | 17.0 | 17.3 | 24.2 | 1.1 | 2 % | VideoOut.Flip 1.8 |
| 14 | 130-140 | 600 | 16.7 | 16.9 | 17.3 | 17.5 | 1.1 | 2 % | VideoOut.Flip 1.7 |
p99 ms @************* 0-26.5
gpu ms #@############ 0-1.4
Traces. These runs come from a commercial title, so the trace files stay local. I asked the maintainers on #9373 whether summary lines plus the tools' output are enough for such a title.
Validation-layer A/B. video_out_hdr_present and video_out_hdr_probe ran on main and on this head, each 3 rounds without the layer and once with it (ANYPS5_REQUIRE_VULKAN=1, ANYPS5_NO_SHADER_CACHE=1, implicit layers disabled):
| plain, 3 rounds | with the layer | VUID- lines |
layer inserted | |
|---|---|---|---|---|
main 7e2ba73e4c |
2 of 2 pass, 3 of 3 | 2 of 2 | 0 | once, no "was not found" |
this PR 52d1385bdd |
2 of 2 pass, 3 of 3 | 2 of 2 | 0 | once, no "was not found" |
video_out_hdr_present is the one Vulkan process: it writes six frame dumps through WriteFrameDump, prints their [gpu] frame_NNN.bmp lines and reads the BMPs back, with a largest difference of 0 on both sides. HDR10 presentation is not exercised on this display. video_out_hdr_probe runs without a Vulkan instance. video_out_frame_dump_queue is registered only off Windows.
MarcZX10
left a comment
There was a problem hiding this comment.
The updated comment adds a useful paired Vulkan validation run: the focused tests ran on the reported baseline and this PR, the layer loaded, and both sides show zero VUID- lines. The frame-dump test also passed three times on both sides and read back the BMPs. Exact-head whitespace and conventions pass against current main 3ca07d086d5f44fbe3c00370e7f03953ab46ca1b; the current-main merge tree is clean. The author’s Windows RX 6700 XT results are reported; I did not run GPU tests locally, and hosted product jobs are skipped.
The report still uses main 7e2ba73e4c (with only #9115) and PR head 52d1385bdd, while this branch is based on 7e2ba73e4c8c26b5d632b0d2f46166ffc1b8a29d and current main is now 3ca07d086d5f44fbe3c00370e7f03953ab46ca1b. Please update the branch, then rerun the same title/scene/machine performance A/B and paired validation-layer checks against current main and the resulting clean PR head.
The summaries and trace_digest.py output are now present, but the trace files remain local because the test uses a commercial title. I found no maintainer answer in #9373 approving summary-only evidence. Please get that exception confirmed there rather than posting commercial traces without approval; otherwise attach the required traces and digest as the repository performance form requests. Preserve the agreed overlap handling for #6946/#9508/#1896/#7642 when updating. This request is for current-main and performance/validation evidence only; no intake hold is being applied.
52d1385 to
67a69f7
Compare
|
Rebased on Performance A/B, same title, scene and machine.
Two more runs of this session, one per side, are left out: another session's build held this PC's build lock while they ran (it came free 36 s into one of them and only after the other had ended), and both show single frames of 0.5 to 1.6 s that the pair above does not have.
Summary lines of the two trace windows (100 to 120 s), this PR first{"commit":"67a69f7d8e23","dirty":false,"env":{"APS5_DUMP_FRAMES":"400","APS5_DUMP_FRAMES_EVERY":"30","APS5_TRACE_SECONDS":"100:20","APS5_TRACE_SUMMARY_EVERY":"10"},"gpu":"AMD Radeon RX 6700 XT","driver":"AMD proprietary driver 26.10.1 (AMD proprietary shader compiler)","os":"Windows 10.0.26200","cpu":"AMD Ryzen 5 5600X 6-Core Processor","cpu_threads":12,"memory_mib":32690,"title_id":"PPSA14363","title":"METAL GEAR SOLID - Master Collection Version","content_version":"03.000.000","resolution":"1920x1080","window":{"spec":"seconds 100:20","first_present":5943,"ms":20003.384},"presents":1199,"frame_ms":{"p50":16.683,"p90":16.917,"p99":17.277,"max":17.673},"gpu_busy_ms_per_present":1.228,"worker_busy_pct":{"queue worker 0x0":2.624},"top_phases_ms_per_frame":{"VideoOut.Flip":15.836,"VideoOut.Flip.vblank_wait":14.989,"VideoOut.Flip.present":0.681,"Driver.Present":0.677,"Driver.Packet":0.435,"Driver.Present.acquire_image":0.256,"Graphics.Draw":0.255,"Vulkan.Acquire":0.255},"trace_dropped":false,"trace":"aps5-trace-67a69f7d8e23-5548.json.gz"}{"commit":"3ca07d086d5f","dirty":false,"env":{"APS5_DUMP_FRAMES":"400","APS5_DUMP_FRAMES_EVERY":"30","APS5_TRACE_SECONDS":"100:20","APS5_TRACE_SUMMARY_EVERY":"10"},"gpu":"AMD Radeon RX 6700 XT","driver":"AMD proprietary driver 26.10.1 (AMD proprietary shader compiler)","os":"Windows 10.0.26200","cpu":"AMD Ryzen 5 5600X 6-Core Processor","cpu_threads":12,"memory_mib":32690,"title_id":"PPSA14363","title":"METAL GEAR SOLID - Master Collection Version","content_version":"03.000.000","resolution":"1920x1080","window":{"spec":"seconds 100:20","first_present":5828,"ms":20003.375},"presents":1198,"frame_ms":{"p50":16.686,"p90":17.007,"p99":17.689,"max":26.245},"gpu_busy_ms_per_present":1.299,"worker_busy_pct":{"queue worker 0x0":2.497},"top_phases_ms_per_frame":{"VideoOut.Flip":2.339,"VideoOut.Flip.present":2.093,"Driver.Present":2.090,"Driver.Present.acquire_image":1.324,"Vulkan.Acquire":1.323,"Vulkan.Acquire.acquire_fence_wait":1.252,"Driver.Present.render_fence_wait":0.585,"Vulkan.Retire":0.584},"trace_dropped":false,"trace":"aps5-trace-3ca07d086d5f-28544.json.gz"}
|
| Capture | Commit | Trace | Presents | Window (ms) |
|---|---|---|---|---|
| baseline | 3ca07d0 | aps5-trace-3ca07d086d5f-28544.json.gz | 1198 | 20003.375 |
| candidate | 67a69f7 | aps5-trace-67a69f7d8e23-5548.json.gz | 1199 | 20003.384 |
- Compare captures from the same machine, title, content version and scene; matching recorded metadata cannot verify the physical machine 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 | 5828 | 5943 |
Frame and GPU times (ms)
| Metric | Baseline | Candidate | Change | Change (%) |
|---|---|---|---|---|
| frame_ms.p50 | 16.686 | 16.683 | -0.003 | -0.018 |
| frame_ms.p90 | 17.007 | 16.917 | -0.090 | -0.529 |
| frame_ms.p99 | 17.689 | 17.277 | -0.412 | -2.329 |
| frame_ms.max | 26.245 | 17.673 | -8.572 | -32.661 |
| mean_frame_ms | 16.697 | 16.683 | -0.014 | -0.083 |
| gpu_busy_ms_per_present | 1.299 | 1.228 | -0.071 | -5.466 |
Top phases (ms per frame)
| Metric | Baseline | Candidate | Change | Change (%) |
|---|---|---|---|---|
| Driver.Packet | n/a | 0.435 | n/a | n/a |
| Driver.Present | 2.090 | 0.677 | -1.413 | -67.608 |
| Driver.Present.acquire_image | 1.324 | 0.256 | -1.068 | -80.665 |
| Driver.Present.render_fence_wait | 0.585 | n/a | n/a | n/a |
| Graphics.Draw | n/a | 0.255 | n/a | n/a |
| VideoOut.Flip | 2.339 | 15.836 | +13.497 | +577.041 |
| VideoOut.Flip.present | 2.093 | 0.681 | -1.412 | -67.463 |
| VideoOut.Flip.vblank_wait | n/a | 14.989 | n/a | n/a |
| Vulkan.Acquire | 1.323 | 0.255 | -1.068 | -80.726 |
| Vulkan.Acquire.acquire_fence_wait | 1.252 | n/a | n/a | n/a |
| Vulkan.Retire | 0.584 | n/a | n/a | n/a |
tools/trace_digest.py on both runs' summary files
This PR 67a69f7d8e:
14 intervals, 0.0 to 140.2 s, 8343 presents
AMD Radeon RX 6700 XT, AMD proprietary driver 26.10.1 (AMD proprietary shader compiler), Windows 10.0.26200, 1920x1080, commit 67a69f7
| # | seconds | presents | p50 | p90 | p99 | max | GPU busy | busiest worker | largest phase |
|---|---|---|---|---|---|---|---|---|---|
| 1 | 0-10 | 549 | 16.7 | 17.0 | 34.4 | 589.1 | 1.2 | 4 % | VideoOut.Flip 15.6 |
| 2 | 10-20 | 599 | 16.7 | 16.9 | 17.4 | 47.9 | 1.6 | 3 % | VideoOut.Flip 15.9 |
| 3 | 20-30 | 600 | 16.7 | 16.9 | 17.2 | 17.6 | 1.2 | 2 % | VideoOut.Flip 15.9 |
| 4 | 30-40 | 600 | 16.7 | 16.9 | 17.2 | 17.4 | 1.3 | 2 % | VideoOut.Flip 15.9 |
| 5 | 40-50 | 600 | 16.7 | 16.9 | 17.2 | 17.7 | 1.2 | 2 % | VideoOut.Flip 15.9 |
| 6 | 50-60 | 600 | 16.7 | 16.9 | 17.4 | 17.9 | 1.2 | 3 % | VideoOut.Flip 15.8 |
| 7 | 60-70 | 600 | 16.7 | 16.9 | 17.5 | 17.8 | 1.3 | 3 % | VideoOut.Flip 15.9 |
| 8 | 70-80 | 600 | 16.7 | 16.9 | 17.2 | 17.3 | 1.2 | 3 % | VideoOut.Flip 15.8 |
| 9 | 80-90 | 600 | 16.7 | 16.9 | 17.2 | 17.7 | 1.3 | 3 % | VideoOut.Flip 15.8 |
| 10 | 90-100 | 600 | 16.7 | 16.9 | 17.2 | 17.8 | 1.3 | 2 % | VideoOut.Flip 15.9 |
| 11 | 100-110 | 600 | 16.7 | 16.9 | 17.2 | 17.7 | 1.2 | 3 % | VideoOut.Flip 15.9 |
| 12 | 110-120 | 595 | 16.7 | 16.9 | 17.4 | 119.4 | 1.3 | 3 % | VideoOut.Flip 16.0 |
| 13 | 120-130 | 600 | 16.7 | 17.0 | 17.4 | 17.9 | 1.3 | 3 % | VideoOut.Flip 2.0 |
| 14 | 130-140 | 600 | 16.7 | 17.0 | 17.3 | 17.9 | 1.3 | 3 % | VideoOut.Flip 2.0 |
p99 ms @+++=+++===+++ 0-34.4
gpu ms #@############ 0-1.6
main 3ca07d086d:
14 intervals, 0.0 to 140.2 s, 8227 presents
AMD Radeon RX 6700 XT, AMD proprietary driver 26.10.1 (AMD proprietary shader compiler), Windows 10.0.26200, 1920x1080, commit 3ca07d0
| # | seconds | presents | p50 | p90 | p99 | max | GPU busy | busiest worker | largest phase |
|---|---|---|---|---|---|---|---|---|---|
| 1 | 0-10 | 441 | 16.7 | 17.2 | 63.7 | 1499.4 | 1.4 | 2 % | VideoOut.Flip 11.0 |
| 2 | 10-20 | 598 | 16.7 | 17.0 | 17.5 | 63.7 | 1.6 | 3 % | VideoOut.Flip 3.4 |
| 3 | 20-30 | 597 | 16.7 | 17.0 | 17.9 | 75.1 | 1.3 | 2 % | VideoOut.Flip 2.4 |
| 4 | 30-40 | 600 | 16.7 | 17.1 | 17.8 | 18.0 | 1.3 | 3 % | VideoOut.Flip 2.3 |
| 5 | 40-50 | 599 | 16.7 | 17.0 | 18.0 | 28.5 | 1.3 | 3 % | VideoOut.Flip 2.3 |
| 6 | 50-60 | 600 | 16.7 | 17.0 | 17.7 | 18.1 | 1.3 | 3 % | VideoOut.Flip 2.3 |
| 7 | 60-70 | 599 | 16.7 | 17.1 | 17.9 | 30.6 | 1.3 | 3 % | VideoOut.Flip 2.4 |
| 8 | 70-80 | 599 | 16.7 | 17.0 | 17.8 | 28.1 | 1.2 | 3 % | VideoOut.Flip 2.3 |
| 9 | 80-90 | 600 | 16.7 | 17.0 | 17.6 | 18.1 | 1.3 | 2 % | VideoOut.Flip 4.4 |
| 10 | 90-100 | 600 | 16.7 | 17.0 | 17.8 | 24.5 | 1.3 | 3 % | VideoOut.Flip 2.3 |
| 11 | 100-110 | 599 | 16.7 | 17.0 | 17.8 | 26.2 | 1.3 | 3 % | VideoOut.Flip 2.4 |
| 12 | 110-120 | 595 | 16.7 | 17.0 | 17.6 | 112.4 | 1.3 | 2 % | VideoOut.Flip 2.5 |
| 13 | 120-130 | 600 | 16.7 | 17.0 | 17.9 | 21.3 | 1.2 | 3 % | VideoOut.Flip 2.3 |
| 14 | 130-140 | 600 | 16.7 | 17.0 | 17.8 | 18.0 | 1.3 | 2 % | VideoOut.Flip 2.3 |
p99 ms @:------:--:-- 0-63.7
gpu ms %@############ 0-1.6
Validation-layer A/B. video_out_hdr_present and video_out_hdr_probe on main 3ca07d086d and on this head, 3 rounds without the layer and once with it (ANYPS5_REQUIRE_VULKAN=1, ANYPS5_NO_SHADER_CACHE=1, implicit layers disabled, VK_LOADER_DEBUG=layer):
| plain, 3 rounds | with the layer | VUID- lines |
layer inserted | |
|---|---|---|---|---|
main 3ca07d086d |
2 of 2 pass, 3 of 3 | 2 of 2 | 0 | once, no "was not found" |
this PR 67a69f7d8e |
2 of 2 pass, 3 of 3 | 2 of 2 | 0 | once, no "was not found" |
video_out_hdr_present writes the frame dumps through WriteFrameDump, prints their [gpu] frame_NNN.bmp lines and reads the BMPs back, with a largest difference of 0 on both sides.
Traces. These runs come from a commercial title, so the trace files stay local. The question whether summary lines plus the tools' output are enough for such a title is still open on #9373 (no maintainer answer yet); I will attach the traces if a maintainer asks for them there.
The overlap handling is unchanged: the #6946/#9508/#1896/#7642 overlaps are on #9373's [draw] pipelined line, and this PR still only switches the frame-dump line from std::fprintf to ProfilePrint_nid_no_patch.
|
The performance-evidence form is now satisfied by the 2026-10-22T19:20Z comment: the paired captures are distinct, clean ( Current-main drift still requires a rerun, though: current Independent structural checks on the one-line change itself,
Disclosure: source-level verification on Windows; I did not build, run, or GPU-test anything here, and every measurement above is author-reported plus form-checked by me. The validation A/B table (layer inserted, zero |
…file output Co-Authored-By: Claude <noreply@anthropic.com>
|
Rebased onto Performance A/B, same title, scene and machine.
The gap is smaller on this base than on
|
| Capture | Commit | Trace | Presents | Window (ms) |
|---|---|---|---|---|
| baseline | 048d0f9 | aps5-trace-048d0f9aa35e-8604.json.gz | 1199 | 20003.430 |
| candidate | 1a9f8be | aps5-trace-1a9f8be3fc59-16180.json.gz | 1199 | 20003.309 |
- Compare captures from the same machine, title, content version and scene; matching recorded metadata cannot verify the physical machine 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 | 5894 | 5948 |
Frame and GPU times (ms)
| Metric | Baseline | Candidate | Change | Change (%) |
|---|---|---|---|---|
| frame_ms.p50 | 16.679 | 16.682 | +0.003 | +0.018 |
| frame_ms.p90 | 17.000 | 16.957 | -0.043 | -0.253 |
| frame_ms.p99 | 17.631 | 17.401 | -0.230 | -1.305 |
| frame_ms.max | 18.012 | 17.630 | -0.382 | -2.121 |
| mean_frame_ms | 16.683 | 16.683 | -0.000 | -0.001 |
| gpu_busy_ms_per_present | 1.214 | 1.214 | +0.000 | +0.000 |
Top phases (ms per frame)
| Metric | Baseline | Candidate | Change | Change (%) |
|---|---|---|---|---|
| Driver.Packet | n/a | 0.376 | n/a | n/a |
| Driver.Present | 1.937 | 1.727 | -0.210 | -10.842 |
| Driver.Present.acquire_image | 1.278 | 1.317 | +0.039 | +3.052 |
| Driver.Present.render_fence_wait | 0.488 | 0.241 | -0.247 | -50.615 |
| VideoOut.Flip | 2.280 | 1.860 | -0.420 | -18.421 |
| VideoOut.Flip.present | 1.940 | 1.729 | -0.211 | -10.876 |
| Vulkan.Acquire | 1.277 | 1.316 | +0.039 | +3.054 |
| Vulkan.Acquire.acquire_fence_wait | 1.209 | 1.249 | +0.040 | +3.309 |
| Vulkan.Retire | 0.488 | n/a | n/a | n/a |
tools/performance_compare.py, main against this PR, pair 2
Performance comparison
| Capture | Commit | Trace | Presents | Window (ms) |
|---|---|---|---|---|
| baseline | 048d0f9 | aps5-trace-048d0f9aa35e-10148.json.gz | 1199 | 20003.436 |
| candidate | 1a9f8be | aps5-trace-1a9f8be3fc59-25528.json.gz | 1199 | 20003.308 |
- Compare captures from the same machine, title, content version and scene; matching recorded metadata cannot verify the physical machine 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 | 5877 | 5946 |
Frame and GPU times (ms)
| Metric | Baseline | Candidate | Change | Change (%) |
|---|---|---|---|---|
| frame_ms.p50 | 16.684 | 16.686 | +0.002 | +0.012 |
| frame_ms.p90 | 16.977 | 16.926 | -0.051 | -0.300 |
| frame_ms.p99 | 17.622 | 17.192 | -0.430 | -2.440 |
| frame_ms.max | 18.273 | 17.755 | -0.518 | -2.835 |
| mean_frame_ms | 16.683 | 16.683 | -0.000 | -0.001 |
| gpu_busy_ms_per_present | 1.222 | 1.222 | +0.000 | +0.000 |
Top phases (ms per frame)
| Metric | Baseline | Candidate | Change | Change (%) |
|---|---|---|---|---|
| Driver.Packet | n/a | 0.374 | n/a | n/a |
| Driver.Present | 1.938 | 1.724 | -0.214 | -11.042 |
| Driver.Present.acquire_image | 1.292 | 1.306 | +0.014 | +1.084 |
| Driver.Present.render_fence_wait | 0.480 | 0.250 | -0.230 | -47.917 |
| VideoOut.Flip | 2.210 | 1.850 | -0.360 | -16.290 |
| VideoOut.Flip.present | 1.940 | 1.727 | -0.213 | -10.979 |
| Vulkan.Acquire | 1.291 | 1.305 | +0.014 | +1.084 |
| Vulkan.Acquire.acquire_fence_wait | 1.226 | 1.238 | +0.012 | +0.979 |
| Vulkan.Retire | 0.479 | n/a | n/a | n/a |
tools/trace_digest.py on the four runs' summary files
9602-A1:
14 intervals, 0.0 to 140.2 s, 8294 presents
AMD Radeon RX 6700 XT, AMD proprietary driver 26.10.1 (AMD proprietary shader compiler), Windows 10.0.26200, 1920x1080, commit 048d0f9
| # | seconds | presents | p50 | p90 | p99 | max | GPU busy | busiest worker | largest phase |
|---|---|---|---|---|---|---|---|---|---|
| 1 | 0-10 | 502 | 16.7 | 17.1 | 39.5 | 874.4 | 1.3 | 2 % | VideoOut.Flip 13.5 |
| 2 | 10-20 | 597 | 16.7 | 17.0 | 17.5 | 61.0 | 1.5 | 2 % | VideoOut.Flip 8.1 |
| 3 | 20-30 | 600 | 16.7 | 17.0 | 17.7 | 25.7 | 1.2 | 2 % | VideoOut.Flip 4.6 |
| 4 | 30-40 | 600 | 16.7 | 17.0 | 17.7 | 18.0 | 1.2 | 2 % | VideoOut.Flip 2.3 |
| 5 | 40-50 | 600 | 16.7 | 17.0 | 17.7 | 18.2 | 1.2 | 2 % | VideoOut.Flip 2.3 |
| 6 | 50-60 | 600 | 16.7 | 17.0 | 17.6 | 20.5 | 1.2 | 2 % | VideoOut.Flip 2.3 |
| 7 | 60-70 | 600 | 16.7 | 17.0 | 17.7 | 17.8 | 1.2 | 2 % | VideoOut.Flip 2.3 |
| 8 | 70-80 | 600 | 16.7 | 17.0 | 17.7 | 17.8 | 1.2 | 2 % | VideoOut.Flip 2.3 |
| 9 | 80-90 | 600 | 16.7 | 17.0 | 17.8 | 21.5 | 1.2 | 2 % | VideoOut.Flip 2.3 |
| 10 | 90-100 | 600 | 16.7 | 17.0 | 17.7 | 21.9 | 1.2 | 2 % | VideoOut.Flip 2.3 |
| 11 | 100-110 | 600 | 16.7 | 17.0 | 17.5 | 18.0 | 1.2 | 2 % | VideoOut.Flip 2.3 |
| 12 | 110-120 | 595 | 16.7 | 17.0 | 17.7 | 117.5 | 1.2 | 2 % | VideoOut.Flip 2.5 |
| 13 | 120-130 | 600 | 16.7 | 17.0 | 17.6 | 17.9 | 1.2 | 2 % | VideoOut.Flip 2.3 |
| 14 | 130-140 | 600 | 16.7 | 17.0 | 17.6 | 18.2 | 1.2 | 2 % | VideoOut.Flip 2.3 |
p99 ms @============= 0-39.5
gpu ms %@############ 0-1.5
9602-B1:
14 intervals, 0.0 to 140.2 s, 8348 presents
AMD Radeon RX 6700 XT, AMD proprietary driver 26.10.1 (AMD proprietary shader compiler), Windows 10.0.26200, 1920x1080, commit 1a9f8be
| # | seconds | presents | p50 | p90 | p99 | max | GPU busy | busiest worker | largest phase |
|---|---|---|---|---|---|---|---|---|---|
| 1 | 0-10 | 554 | 16.7 | 16.9 | 32.6 | 584.0 | 1.2 | 2 % | VideoOut.Flip 13.2 |
| 2 | 10-20 | 599 | 16.7 | 16.9 | 17.6 | 47.2 | 1.5 | 2 % | VideoOut.Flip 11.9 |
| 3 | 20-30 | 600 | 16.7 | 17.0 | 17.3 | 17.5 | 1.2 | 2 % | VideoOut.Flip 1.9 |
| 4 | 30-40 | 600 | 16.7 | 16.9 | 17.3 | 17.7 | 1.2 | 2 % | VideoOut.Flip 1.9 |
| 5 | 40-50 | 600 | 16.7 | 16.9 | 17.3 | 17.5 | 1.2 | 2 % | VideoOut.Flip 1.9 |
| 6 | 50-60 | 600 | 16.7 | 17.0 | 17.4 | 17.7 | 1.2 | 2 % | VideoOut.Flip 1.9 |
| 7 | 60-70 | 600 | 16.7 | 16.9 | 17.3 | 17.5 | 1.2 | 2 % | VideoOut.Flip 1.8 |
| 8 | 70-80 | 600 | 16.7 | 17.0 | 17.4 | 17.6 | 1.2 | 2 % | VideoOut.Flip 1.9 |
| 9 | 80-90 | 600 | 16.7 | 17.0 | 17.4 | 18.2 | 1.2 | 2 % | VideoOut.Flip 1.9 |
| 10 | 90-100 | 600 | 16.7 | 16.9 | 17.3 | 17.6 | 1.2 | 2 % | VideoOut.Flip 1.8 |
| 11 | 100-110 | 600 | 16.7 | 17.0 | 17.4 | 17.6 | 1.2 | 2 % | VideoOut.Flip 1.9 |
| 12 | 110-120 | 595 | 16.7 | 16.9 | 17.4 | 114.4 | 1.2 | 2 % | VideoOut.Flip 2.1 |
| 13 | 120-130 | 600 | 16.7 | 16.9 | 17.3 | 19.3 | 1.2 | 2 % | VideoOut.Flip 1.9 |
| 14 | 130-140 | 600 | 16.7 | 17.0 | 17.4 | 17.7 | 1.2 | 2 % | VideoOut.Flip 1.9 |
p99 ms @+++++++++++++ 0-32.6
gpu ms #@############ 0-1.5
9602-B2:
14 intervals, 0.0 to 140.2 s, 8346 presents
AMD Radeon RX 6700 XT, AMD proprietary driver 26.10.1 (AMD proprietary shader compiler), Windows 10.0.26200, 1920x1080, commit 1a9f8be
| # | seconds | presents | p50 | p90 | p99 | max | GPU busy | busiest worker | largest phase |
|---|---|---|---|---|---|---|---|---|---|
| 1 | 0-10 | 552 | 16.7 | 16.9 | 32.6 | 590.3 | 1.2 | 2 % | VideoOut.Flip 15.4 |
| 2 | 10-20 | 599 | 16.7 | 16.9 | 17.4 | 46.3 | 1.5 | 2 % | VideoOut.Flip 12.7 |
| 3 | 20-30 | 600 | 16.7 | 16.9 | 17.2 | 17.7 | 1.2 | 2 % | VideoOut.Flip 1.9 |
| 4 | 30-40 | 600 | 16.7 | 17.0 | 17.4 | 17.6 | 1.2 | 2 % | VideoOut.Flip 1.8 |
| 5 | 40-50 | 600 | 16.7 | 16.9 | 17.3 | 17.7 | 1.2 | 2 % | VideoOut.Flip 1.8 |
| 6 | 50-60 | 600 | 16.7 | 17.0 | 17.2 | 17.7 | 1.2 | 2 % | VideoOut.Flip 1.9 |
| 7 | 60-70 | 600 | 16.7 | 17.0 | 17.4 | 17.5 | 1.2 | 2 % | VideoOut.Flip 1.9 |
| 8 | 70-80 | 600 | 16.7 | 16.9 | 17.3 | 18.0 | 1.2 | 2 % | VideoOut.Flip 1.9 |
| 9 | 80-90 | 600 | 16.7 | 16.9 | 17.2 | 17.4 | 1.2 | 2 % | VideoOut.Flip 1.8 |
| 10 | 90-100 | 600 | 16.7 | 17.0 | 17.3 | 17.8 | 1.2 | 2 % | VideoOut.Flip 1.8 |
| 11 | 100-110 | 600 | 16.7 | 16.9 | 17.2 | 17.4 | 1.2 | 2 % | VideoOut.Flip 1.8 |
| 12 | 110-120 | 595 | 16.7 | 16.9 | 17.2 | 116.8 | 1.2 | 2 % | VideoOut.Flip 2.0 |
| 13 | 120-130 | 600 | 16.7 | 16.9 | 17.3 | 17.8 | 1.2 | 2 % | VideoOut.Flip 1.9 |
| 14 | 130-140 | 600 | 16.7 | 17.0 | 17.4 | 20.7 | 1.2 | 2 % | VideoOut.Flip 1.9 |
p99 ms @+++++++++++++ 0-32.6
gpu ms #@############ 0-1.5
9602-A2:
14 intervals, 0.0 to 140.2 s, 8277 presents
AMD Radeon RX 6700 XT, AMD proprietary driver 26.10.1 (AMD proprietary shader compiler), Windows 10.0.26200, 1920x1080, commit 048d0f9
| # | seconds | presents | p50 | p90 | p99 | max | GPU busy | busiest worker | largest phase |
|---|---|---|---|---|---|---|---|---|---|
| 1 | 0-10 | 484 | 16.7 | 17.1 | 50.6 | 843.8 | 1.3 | 2 % | VideoOut.Flip 14.5 |
| 2 | 10-20 | 598 | 16.7 | 17.0 | 17.5 | 61.2 | 1.5 | 2 % | VideoOut.Flip 4.7 |
| 3 | 20-30 | 600 | 16.7 | 17.0 | 17.7 | 18.5 | 1.2 | 2 % | VideoOut.Flip 2.2 |
| 4 | 30-40 | 600 | 16.7 | 17.0 | 17.7 | 17.8 | 1.2 | 2 % | VideoOut.Flip 2.2 |
| 5 | 40-50 | 600 | 16.7 | 17.0 | 17.7 | 17.9 | 1.2 | 2 % | VideoOut.Flip 2.2 |
| 6 | 50-60 | 600 | 16.7 | 17.0 | 17.7 | 18.4 | 1.2 | 2 % | VideoOut.Flip 2.2 |
| 7 | 60-70 | 600 | 16.7 | 17.0 | 17.8 | 19.8 | 1.2 | 2 % | VideoOut.Flip 3.6 |
| 8 | 70-80 | 600 | 16.7 | 17.0 | 17.7 | 20.2 | 1.2 | 2 % | VideoOut.Flip 2.2 |
| 9 | 80-90 | 600 | 16.7 | 17.0 | 17.5 | 17.7 | 1.2 | 2 % | VideoOut.Flip 2.2 |
| 10 | 90-100 | 600 | 16.7 | 17.0 | 17.6 | 17.8 | 1.2 | 2 % | VideoOut.Flip 2.2 |
| 11 | 100-110 | 600 | 16.7 | 17.0 | 17.6 | 18.3 | 1.2 | 2 % | VideoOut.Flip 2.2 |
| 12 | 110-120 | 595 | 16.7 | 17.0 | 17.6 | 111.9 | 1.2 | 2 % | VideoOut.Flip 2.4 |
| 13 | 120-130 | 600 | 16.7 | 17.0 | 17.7 | 21.7 | 1.2 | 2 % | VideoOut.Flip 2.2 |
| 14 | 130-140 | 600 | 16.7 | 17.0 | 17.5 | 17.7 | 1.2 | 2 % | VideoOut.Flip 6.9 |
p99 ms @------------- 0-50.6
gpu ms %@############ 0-1.5
Summary lines of the four trace windows (100 to 120 s), in the table's order
{"commit":"048d0f9aa35e","dirty":false,"env":{"APS5_DUMP_FRAMES":"400","APS5_DUMP_FRAMES_EVERY":"30","APS5_TRACE_SECONDS":"100:20","APS5_TRACE_SUMMARY_EVERY":"10"},"gpu":"AMD Radeon RX 6700 XT","driver":"AMD proprietary driver 26.10.1 (AMD proprietary shader compiler)","os":"Windows 10.0.26200","cpu":"AMD Ryzen 5 5600X 6-Core Processor","cpu_threads":12,"memory_mib":32690,"title_id":"PPSA14363","title":"METAL GEAR SOLID - Master Collection Version","content_version":"03.000.000","resolution":"1920x1080","window":{"spec":"seconds 100:20","first_present":5894,"ms":20003.430},"presents":1199,"frame_ms":{"p50":16.679,"p90":17.000,"p99":17.631,"max":18.012},"gpu_busy_ms_per_present":1.214,"worker_busy_pct":{"queue worker 0x0":2.308},"top_phases_ms_per_frame":{"VideoOut.Flip":2.280,"VideoOut.Flip.present":1.940,"Driver.Present":1.937,"Driver.Present.acquire_image":1.278,"Vulkan.Acquire":1.277,"Vulkan.Acquire.acquire_fence_wait":1.209,"Driver.Present.render_fence_wait":0.488,"Vulkan.Retire":0.488},"trace_dropped":false,"trace":"aps5-trace-048d0f9aa35e-8604.json.gz"}{"commit":"1a9f8be3fc59","dirty":false,"env":{"APS5_DUMP_FRAMES":"400","APS5_DUMP_FRAMES_EVERY":"30","APS5_TRACE_SECONDS":"100:20","APS5_TRACE_SUMMARY_EVERY":"10"},"gpu":"AMD Radeon RX 6700 XT","driver":"AMD proprietary driver 26.10.1 (AMD proprietary shader compiler)","os":"Windows 10.0.26200","cpu":"AMD Ryzen 5 5600X 6-Core Processor","cpu_threads":12,"memory_mib":32690,"title_id":"PPSA14363","title":"METAL GEAR SOLID - Master Collection Version","content_version":"03.000.000","resolution":"1920x1080","window":{"spec":"seconds 100:20","first_present":5948,"ms":20003.309},"presents":1199,"frame_ms":{"p50":16.682,"p90":16.957,"p99":17.401,"max":17.630},"gpu_busy_ms_per_present":1.214,"worker_busy_pct":{"queue worker 0x0":2.272},"top_phases_ms_per_frame":{"VideoOut.Flip":1.860,"VideoOut.Flip.present":1.729,"Driver.Present":1.727,"Driver.Present.acquire_image":1.317,"Vulkan.Acquire":1.316,"Vulkan.Acquire.acquire_fence_wait":1.249,"Driver.Packet":0.376,"Driver.Present.render_fence_wait":0.241},"trace_dropped":false,"trace":"aps5-trace-1a9f8be3fc59-16180.json.gz"}{"commit":"1a9f8be3fc59","dirty":false,"env":{"APS5_DUMP_FRAMES":"400","APS5_DUMP_FRAMES_EVERY":"30","APS5_TRACE_SECONDS":"100:20","APS5_TRACE_SUMMARY_EVERY":"10"},"gpu":"AMD Radeon RX 6700 XT","driver":"AMD proprietary driver 26.10.1 (AMD proprietary shader compiler)","os":"Windows 10.0.26200","cpu":"AMD Ryzen 5 5600X 6-Core Processor","cpu_threads":12,"memory_mib":32690,"title_id":"PPSA14363","title":"METAL GEAR SOLID - Master Collection Version","content_version":"03.000.000","resolution":"1920x1080","window":{"spec":"seconds 100:20","first_present":5946,"ms":20003.308},"presents":1199,"frame_ms":{"p50":16.686,"p90":16.926,"p99":17.192,"max":17.755},"gpu_busy_ms_per_present":1.222,"worker_busy_pct":{"queue worker 0x0":2.263},"top_phases_ms_per_frame":{"VideoOut.Flip":1.850,"VideoOut.Flip.present":1.727,"Driver.Present":1.724,"Driver.Present.acquire_image":1.306,"Vulkan.Acquire":1.305,"Vulkan.Acquire.acquire_fence_wait":1.238,"Driver.Packet":0.374,"Driver.Present.render_fence_wait":0.250},"trace_dropped":false,"trace":"aps5-trace-1a9f8be3fc59-25528.json.gz"}{"commit":"048d0f9aa35e","dirty":false,"env":{"APS5_DUMP_FRAMES":"400","APS5_DUMP_FRAMES_EVERY":"30","APS5_TRACE_SECONDS":"100:20","APS5_TRACE_SUMMARY_EVERY":"10"},"gpu":"AMD Radeon RX 6700 XT","driver":"AMD proprietary driver 26.10.1 (AMD proprietary shader compiler)","os":"Windows 10.0.26200","cpu":"AMD Ryzen 5 5600X 6-Core Processor","cpu_threads":12,"memory_mib":32690,"title_id":"PPSA14363","title":"METAL GEAR SOLID - Master Collection Version","content_version":"03.000.000","resolution":"1920x1080","window":{"spec":"seconds 100:20","first_present":5877,"ms":20003.436},"presents":1199,"frame_ms":{"p50":16.684,"p90":16.977,"p99":17.622,"max":18.273},"gpu_busy_ms_per_present":1.222,"worker_busy_pct":{"queue worker 0x0":2.175},"top_phases_ms_per_frame":{"VideoOut.Flip":2.210,"VideoOut.Flip.present":1.940,"Driver.Present":1.938,"Driver.Present.acquire_image":1.292,"Vulkan.Acquire":1.291,"Vulkan.Acquire.acquire_fence_wait":1.226,"Driver.Present.render_fence_wait":0.480,"Vulkan.Retire":0.479},"trace_dropped":false,"trace":"aps5-trace-048d0f9aa35e-10148.json.gz"}Validation-layer A/B on the same two builds: video_out_hdr_present and video_out_hdr_probe, 3 rounds without the layer and once with it (ANYPS5_REQUIRE_VULKAN=1, ANYPS5_NO_SHADER_CACHE=1, implicit layers disabled, VK_LOADER_DEBUG=layer):
| plain, 3 rounds | with the layer | VUID- lines |
layer inserted | |
|---|---|---|---|---|
main 048d0f9aa3 |
2 of 2 pass, 3 of 3 | 2 of 2 | 0 | once, no "was not found" |
this PR 1a9f8be3fc |
2 of 2 pass, 3 of 3 | 2 of 2 | 0 | once, no "was not found" |
video_out_hdr_present writes the frame dumps through WriteFrameDump, prints their [gpu] frame_NNN.bmp lines and reads the BMPs back, with a largest difference of 0 on both sides.
Traces still stay local; the question for commercial titles is open on #9373.
On your two semantic notes: both are right and are what the shared output does for every line routed through it. The frame-dump line can now land after a later synchronous stderr line, and under diagnostic overload it can be dropped and counted on a [profile-output] dropped ... line instead of being printed. The PR body's Tested section now says so.
67a69f7 to
1a9f8be
Compare
Dismissing a stale review: the requested changes were addressed after it (new head and/or updated description with the asked-for runs) and the merge queue blocks on it. Please request changes again if anything is still open.
|
Re-checked on current |
What
WriteFrameDump(Execution/src/VulkanDevice.cpp) logs each frame thatAPS5_DUMP_FRAMESdumps withstd::fprintf(stderr, "[gpu] frame_NNN.bmp: ..."). It runs on the presenter, insideDriver::Present, before the guest sees the flip complete. The path is the trailingFinishPresent, thenRetirePresents(0), thenRetireSlot, thenWriteFrameDump.VideoOutDriver::processFlipraises the FLIP event and stores the previous buffer's label only afterPresentreturns, so the guest waits for this write. The BMP itself is already written by the dump writer thread; only the log line was synchronous.The line now goes through
ProfilePrint_nid_no_patch, like the periodic reports since #798. Its text and timestamp are unchanged: the time is still taken when the frame is read back.Why
The CRT's stderr is unbuffered. When it is not a console, a printf-family call writes it one byte per
WriteFile, so this 67-character line costs 67 writes on every dumped frame. When stderr is a file redirected with Windows PowerShell'sStart-Process -RedirectStandardError(how our scripts start a title), that file is opened write-through, and one write costs 0.11 to 0.39 ms. The line then costs about 7 to 26 ms on the presenter per dumped frame. Every frame-time measurement made with frame dumps on showed it in p99 and max. #9373 does the same forAPS5_PROFILE_DRAW's draw reports.Tested
Rerun on
main048d0f9aa3(head1a9f8be3fc, the same one-line change), PPSA14363 (METAL GEAR SOLID Master Collection Vol. 1, own dump), RX 6700 XT: launcher title screen, 150 s,APS5_DUMP_FRAMES=400withAPS5_DUMP_FRAMES_EVERY=30,APS5_TRACE_SUMMARY_EVERY=10,APS5_TRACE_SECONDS=100:20; both sides built clean with onlylibSceAgcDriver.prxswapped; each run held the exclusive GPU lock and the build lock on an idle PC; two pairs, the second in the opposite order. Per 10 s window from 20 s on, without 110 to 120 s:main048d0f9aa3, pair 1main048d0f9aa3, pair 21a9f8be3fc, pair 11a9f8be3fc, pair 2Summary lines,
tools/performance_compare.pyandtools/trace_digest.pyoutput for these runs: this comment.Before the rebase, on
main3ca07d086dand head67a69f7d8e:PPSA14363 (METAL GEAR SOLID Master Collection Vol. 1, own dump), RX 6700 XT:
APS5_DUMP_FRAMES=400withAPS5_DUMP_FRAMES_EVERY=30,APS5_TRACE_SUMMARY_EVERY=10and a 20 s trace window at 100 s (APS5_TRACE_SECONDS=100:20), no profiler.main3ca07d086dand this PR's head67a69f7d8e, each with fix(libSceNpTrophy2): return INVALID_TROPHY_ID for a trophy that is not in the title's data #9115's trophy fix (to get past stop 1), with onlylibSceAgcDriver.prxswapped.main.main3ca07d086d67a69f7d8eEarlier A/Bs showed the same direction: on
main7e2ba73e4c, 17.6-17.8 ms against 17.2-17.5 ms at p99 and 3 against 1 windows over 20 ms; onmain6ef5a1c4c9,mainread 17.8-24.0 ms at p99 and 18.2-208.0 ms at max, with 6 of 12 windows over 20 ms andVulkan.Retire.dumpat 0.6-1.1 ms per frame, while this PR read 17.2-17.4 ms and 17.5-23.0 ms. The cost of each write to the write-through log varies between runs.Summary lines of the trace window, 100 to 120 s. First
main, then this PR:{"commit":"3ca07d086d5f","dirty":false,"env":{"APS5_DUMP_FRAMES":"400","APS5_DUMP_FRAMES_EVERY":"30","APS5_TRACE_SECONDS":"100:20","APS5_TRACE_SUMMARY_EVERY":"10"},"gpu":"AMD Radeon RX 6700 XT","driver":"AMD proprietary driver 26.10.1 (AMD proprietary shader compiler)","os":"Windows 10.0.26200","cpu":"AMD Ryzen 5 5600X 6-Core Processor","cpu_threads":12,"memory_mib":32690,"title_id":"PPSA14363","title":"METAL GEAR SOLID - Master Collection Version","content_version":"03.000.000","resolution":"1920x1080","window":{"spec":"seconds 100:20","first_present":5828,"ms":20003.375},"presents":1198,"frame_ms":{"p50":16.686,"p90":17.007,"p99":17.689,"max":26.245},"gpu_busy_ms_per_present":1.299,"worker_busy_pct":{"queue worker 0x0":2.497},"top_phases_ms_per_frame":{"VideoOut.Flip":2.339,"VideoOut.Flip.present":2.093,"Driver.Present":2.090,"Driver.Present.acquire_image":1.324,"Vulkan.Acquire":1.323,"Vulkan.Acquire.acquire_fence_wait":1.252,"Driver.Present.render_fence_wait":0.585,"Vulkan.Retire":0.584},"trace_dropped":false,"trace":"aps5-trace-3ca07d086d5f-28544.json.gz"}{"commit":"67a69f7d8e23","dirty":false,"env":{"APS5_DUMP_FRAMES":"400","APS5_DUMP_FRAMES_EVERY":"30","APS5_TRACE_SECONDS":"100:20","APS5_TRACE_SUMMARY_EVERY":"10"},"gpu":"AMD Radeon RX 6700 XT","driver":"AMD proprietary driver 26.10.1 (AMD proprietary shader compiler)","os":"Windows 10.0.26200","cpu":"AMD Ryzen 5 5600X 6-Core Processor","cpu_threads":12,"memory_mib":32690,"title_id":"PPSA14363","title":"METAL GEAR SOLID - Master Collection Version","content_version":"03.000.000","resolution":"1920x1080","window":{"spec":"seconds 100:20","first_present":5943,"ms":20003.384},"presents":1199,"frame_ms":{"p50":16.683,"p90":16.917,"p99":17.277,"max":17.673},"gpu_busy_ms_per_present":1.228,"worker_busy_pct":{"queue worker 0x0":2.624},"top_phases_ms_per_frame":{"VideoOut.Flip":15.836,"VideoOut.Flip.vblank_wait":14.989,"VideoOut.Flip.present":0.681,"Driver.Present":0.677,"Driver.Packet":0.435,"Driver.Present.acquire_image":0.256,"Graphics.Draw":0.255,"Vulkan.Acquire":0.255},"trace_dropped":false,"trace":"aps5-trace-67a69f7d8e23-5548.json.gz"}tools/performance_compare.pyon these two lines and thetools/trace_digest.pytables of both runs are in this comment. Traces are not attached, because these runs come from a commercial title.Tests:
video_out_hdr_presentdumps frames, reads the BMPs back and prints the[gpu] frame_NNN.bmpline. It passes 3 of 3 together withvideo_out_hdr_probe, onmain048d0f9aa3and on this head (and before the rebase onmain3ca07d086dand67a69f7d8e).main048d0f9aa3and on this head (and before on3ca07d086d), both pass with 0VUID-lines on both sides.VK_LOADER_DEBUG=layershows the layer inserted in the one Vulkan test process, with no "was not found" line.video_out_frame_dump_queueis registered only off Windows, so it was not run here.tools/check_conventions.pypasses.Ordering and overload: like every line sent through
ProfilePrint_nid_no_patch, the frame-dump line now keeps its order only among the profile output: it can land after a later synchronous stderr line, and if the writer falls behind it can be dropped and counted on a[profile-output] dropped ...line instead of being printed.Not tested: other GPUs, Linux.
Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)🤖 Generated with Claude Code