Repository navigation
perf(agc): record unimported labels in large allocations through a 64 KiB import window - #26718
Conversation
…lpers importWindowBounds and windowRun read rangeImportWindow themselves. They now take the window as a parameter that defaults to it, so a caller can import a narrower window of a large registered range. No caller changes.
ImportRequester gains Label, named "label" in the host import report, for imports a label store makes so it can be recorded on the GPU. No import is requested with it yet; the report test now lists it.
… window A queue-0 label whose memory no import covers synced the recorder and was stored on the CPU (boykopovar#7464). That is cheap for the small blocks it was made for, which the title maps every frame, but a label in a large allocation that the import budget refuses waits for every batch in flight each time. In Cult of the Lamb (PPSA06465) on a Renoir APU, whose import budget is 586 MiB, the labels land in 16 MiB allocations and the sync costs about 60 ms per frame in gameplay. Such a label now requests a 64 KiB window of its allocation (Label requester) and is recorded on the GPU when the window imports. An allocation no larger than the window keeps the CPU path, so the small blocks of boykopovar#7464 are still not imported.
The budget refuses a label window exactly when the label's allocation was refused, so the window rarely imported. Label windows now bypass the budget, its eviction and the remembered refusals, and have a limit of their own: at most 16 MiB of windows are live. A window past the limit retires the least recently used label window that the import eviction rule would let go (not held by a build, not used in the current or the previous frame) and rewatches what it unwatched, as retireLeastRecent does; when no window can go the label keeps the CPU path. Retiring and clearing the imports keep the label bytes in step.
HostImportCounts carries the live bytes of label windows, and the host import report appends them when there are any.
… window agc_driver_label_import_window lowers the import budget below a 1 MiB allocation and stores a label in it. The label must be recorded on the GPU (reason 0) through one 64 KiB label window, pin exactly that window, count it as label bytes and land without touching its neighbours.
A label in a 64 KiB allocation must still return reason 7 without making an import, as boykopovar#7464 requires for the small blocks titles map per frame.
…etire Labels fill the label windows to 16 MiB. Before any build every window is held, so the next label keeps its CPU path and the windows do not grow. After a build the next label is recorded on the GPU: the least recently used window (the first case's) is retired, the newer ones stay and every label lands.
mihiii1337
left a comment
There was a problem hiding this comment.
Requesting changes for two independent, reproducible blockers at d71f6b1da47d06934e29acc32308f891d417c091 (recorded base d1d700affa94d499003c1fec960e745dca2e23d5).
-
The Windows fixture does not isolate
small.FillBuffer(work)runs before the small-block check, and separately registeredVirtualAllocblocks can be adjacent. The import run can therefore already coversmall, so line 123 observes GPU reason 0 instead of exercising the intended CPU fallback. On the clean exact head, all three registered variants fail at that assertion on both physical GPUs below. With only a scratch fixture change that reserves one extra unregistered 64 KiB after each registered block, the same production source passes 3/3 on each GPU. Please make the fixture guarantee that separation (or otherwise prove thatsmallis not already covered before testing the label-only path). -
Label windows still consume the normal host-import budget. The label admission path bypasses the normal budget guard at
GuestBufferMemory.cpp:2548-2549, but every label is added tostate.liveBytesat:2782-2785.pinnedTotalincludes allliveBytes(:617-618), and the normal admission/remaining-budget paths use that total.retireLeastRecent(:2037-2049) also does not exclude.label. A scratch-only regression first admitted a normal control import, filled the label pool to 16 MiB, then requested a fresh normal import and checked that neither the control nor the labels were evicted. All three variants fail on both GPUs withlabel windows consumed the normal host import budget. That contradicts the stated separation from the normal host-import budget and its eviction. Please account label windows outside the normal budget and exclude them from normal-budget eviction, with a regression that requests a new normal import after filling the label pool.
Windows 11 build 26300, Release, WinLibs GCC 15.2.0 r7. Physical devices: Intel A78B (driver 101.6127, Vulkan 1.3.295) and NVIDIA RTX 4070 Laptop (driver 621.01). Khronos validation 1.4.369 was enabled at instance/device level with synchronization validation; no VUID or SYNC errors were emitted.
Tests on each GPU:
- clean exact head:
agc_driver_label_import_window,_draw_pipeline,_plan_verify: 0/3, fixture assertion above; - isolated-block scratch fixture, production unchanged: 3/3;
- same fixture plus normal-budget probe: 0/3, budget assertion above.
The scratch changes were not committed or pushed. AI-assisted: yes.
|
RTX 3070 run of Tested
Not tested: AMD on Windows, Linux, titles. AI-assisted (Claude Code). |
|
Windows run, since the Tested section is Linux (RADV) only: on an NVIDIA Quadro P3200 the three new tests fail with this head, while the 22 existing tests of the set pass on both sides. Setup: Windows 11 Pro 10.0.26300, NVIDIA Quadro P3200 (Pascal,
All three new tests stop at the same check, after the large-allocation case passes: The cause is the test's block layout on Windows, not the label path. With a temporary On Windows the 64 KiB Allocating AI-assisted: yes (Claude Code) |
|
Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.
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.
|
MarcZX10
left a comment
There was a problem hiding this comment.
Reviewed — no blocking findings
Nothing blocks this change based on the inspected code; the targeted source and test logic support the stated label-window behavior, though not every changed file was read.
What I ran
Reviewed head d71f6b1da47d06934e29acc32308f891d417c091 using the prepared diff and repo_read.py for targeted source ranges. No build or tests were run during this review.
Results
| Check | Result | Note |
|---|---|---|
| Diff and targeted source review | passed | Label window paths inspected |
| Tests | not run | Author-reported results are not review-run results |
| Full changed-file review | not run | Some changed files were not read in full |
Findings
Blocking
None identified in the inspected code.
Non-blocking
None.
Not verified
The full text of core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp and core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp was excluded from the review folder for size; targeted relevant ranges were read through repo_read.py. Other changed files read: core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp, core/libs/prx/libSceAgcDriver/tests/execution/LabelImportWindow.cpp, and review/commits.md. core/libs/prx/libSceAgcDriver/tests/BdaResources.cpp, core/libs/prx/libSceAgcDriver/tests/cmake/agc_driver_label_import_window_tests.cmake, review/description.md, and review/manifest.json were not read in full. No independent build, test run, platform check, or console behavior was verified.
To get this to a good state
Nothing is required. The behavior has focused coverage described in the change, but those tests were not run in this review.
|
Thanks to all three of you for the Windows runs and the diagnosis. Both points were right; fixed in three commits on top (
Re-run on the Renoir: the focused set passes 24/24 (33 layer inserts, 0 |
MarcZX10
left a comment
There was a problem hiding this comment.
Reviewed — no blocking findings
Nothing blocks this review; the findings below are optional.
What I ran
Reviewed head d2d884ab94ceecd76e055cbca107b64aaff97cfe. No commands or tests were run; I reviewed the prepared diff and targeted source ranges. The test and performance results in the PR description are author-reported.
Results
| Check | Result | Note |
|---|---|---|
| Diff and targeted source review | passed | Prepared artifacts and relevant code inspected |
| Tests and negative controls | not run | Results are author-reported |
Findings
Blocking
None found in the code inspected.
Non-blocking
None.
Not verified
The full text of VulkanDevice.cpp and GuestBufferMemory.cpp was not read; I inspected their relevant changed hunks and surrounding code through repo_read.py. The full text of GuestBufferMemory.hpp, BdaResources.cpp, and LabelImportWindow.cpp was read. The new CMake test registration file was not read. No repository tests, builds, negative controls, or performance runs were performed. The supplied manifest identifies six changed files; five were inspected at least in part, and the CMake registration was not inspected. The PR’s test and performance claims were not independently verified.
To get this to a good state
Nothing is required. Optional: run the reported checks on this exact head and inspect the CMake registration file before treating the review as complete.
mihiii1337
left a comment
There was a problem hiding this comment.
The two original blockers are fixed on exact head d2d884ab94ceecd76e055cbca107b64aaff97cfe: the separated Windows fixture and the full-label-pool normal-budget case both pass. A separate overlapping-range case still lets label bytes count as normal-budget replacement credit when APS5_IMPORT_RETIRE_CREDIT=1.
importRunAt adds every overlapping import to replaced at GuestBufferMemory.cpp:2537-2543, including .label entries. pinnedTotal deliberately excludes label bytes. The immediate-credit path then computes live = pinned - replaced, so a normal import can subtract a label window that was never charged to the normal budget.
Independent Windows 11 reproduction on the exact production head:
- Retain one 64 KiB label window inside a five-window registered allocation.
- Advance the build so the label import is replaceable.
- Set the normal budget to current normal live bytes plus four windows.
- With
APS5_IMPORT_RETIRE_CREDIT=1, request a normal import covering all five windows.
That request should be refused: normal live plus five windows exceeds the normal budget by one window, and the overlapping label window is outside that budget. Instead it succeeds on both physical devices, failing the test-only assertion label bytes were credited to a normal import over the normal budget:
- Intel A78B: CTest exit 8;
- NVIDIA RTX 4070 Laptop: CTest exit 8.
The local regression changed only LabelImportWindow.cpp; it was not committed or pushed. Before adding it, the stock exact-head trio passed 3/3 on Intel and 3/3 on NVIDIA with Vulkan required, shader cache disabled, and Khronos validation enabled. Conventions and git diff --check also pass.
Please exclude label entries from normal replacement credit (or track normal replacement bytes separately) and add an overlapping label-to-normal regression with retire credit enabled. I did not reproduce the issue with the default-off retire-credit path.
AI-assisted: yes.
|
Thanks for the re-run and the third case; right again. Fixed in
The new case follows your steps: it imports one 64 KiB label window in the middle of a five-window allocation, runs a build so the window can be replaced, sets the normal budget to the normal live bytes plus four windows, turns retire credit on and requests a normal import of the whole allocation, then requires the normal live bytes (live minus label windows) to stay within the budget. Without the fix it fails in all three variants with On the Renoir: the focused set passes 24/24 (33 layer inserts, 0 |
MarcZX10
left a comment
There was a problem hiding this comment.
Reviewed — looks good
Nothing blocks this change; the evidence inspected supports merging.
What I ran
Reviewed head b1c9409abdd8bc98a1288857e0185a7bc07b05a6 using the pinned repo_read.py reader. No commands or tests were run by me; test and performance results below are reported by the author.
Results
| Check | Result | Note |
|---|---|---|
| Changed code review | passed | Reviewed the changed implementation and test lines |
| Author-reported tests | not run | 24 targeted tests and negative controls reported passing |
| Author-reported conventions | not run | Convention and debt checks reported passing |
| Console performance | not run | Hardware measurements supplied by the author |
Findings
Blocking
None.
Non-blocking
None.
Not verified
I read every changed line listed as reviewed in the manifest. The full GuestBufferMemory.cpp and VulkanDevice.cpp files were excluded from the prepared review folder; I used the reader for the relevant changed implementation ranges. I did not independently run tests, convention checks, performance captures, or console behavior checks. The reader did not provide files.json; the folder listing and manifest identify all six changed files and show their included/excluded status.
To get this to a good state
Nothing is required.
|
@root-over Re-run at
AI-assisted (Claude Code). Synthetic tests only. |
mihiii1337
left a comment
There was a problem hiding this comment.
Reviewed exact head b1c9409abdd8bc98a1288857e0185a7bc07b05a6. The overlapping label-to-normal budget blocker is fixed: replacement credit now excludes label imports, and the committed regression recreates the five-window request under a four-window normal budget with retire credit enabled, then verifies normal live bytes stay within that budget.
Independent Windows 11 verification on the exact head:
- native Release build of
agc_driver_label_import_window_testscompleted; agc_driver_label_import_window,_draw_pipeline, and_plan_verify: 3/3 passed on Intel A78B;- the same trio: 3/3 passed on NVIDIA RTX 4070 Laptop;
- Vulkan was required, shader cache disabled, and the Khronos validation layer requested in both runs;
tools/check_conventions.py --base d1d700affa94d499003c1fec960e745dca2e23d5andgit diff --checkpassed.
The hosted checks for this fresh head are still queued. I did not run a title or console test. No blocking finding remains in the reviewed fix.
AI-assisted: yes.
What
Since #7464 a queue-0 label whose guest memory no host import covers syncs the recorder and is stored on the CPU (
WriteLabelOnGpureason 7). That keeps the small blocks #7464 measured (mapped every frame, 64 KiB or less) from being imported for their labels. A label in a large allocation that the host import budget refuses takes the same path, so each one waits for every batch in flight.Cult of the Lamb (PPSA06465) on a Renoir APU hits this in gameplay: the budget there is 586 MiB, the title's labels land in 16 MiB and 4 MiB allocations the budget refuses, and
Recorder.Synctakes 63.3 ms of the draw committer per frame (trace below). The labels are few (64 in 130 s in a counting build, in 12 allocations), but each one drains the GPU.This PR imports a 64 KiB window of such an allocation for the label and records the label on the GPU:
importWindowBoundsandwindowRuntake the window as a parameter (default unchanged).ImportRequester::Label("label" in the host import report).WriteLabelOnGpurequests it before taking reason 7; when the window imports, the label is recorded on the GPU as a covered label is.max(64 KiB, hostImportAlignment). An allocation no larger than the window gets no label import, so perf(agc): keep unimported label stores on the CPU #7464's small blocks keep the CPU path unchanged.evictableBytes,retireLeastRecent) skips them, and a normal import that replaces a label window gets no credit for its bytes. They have a limit of their own: at most 16 MiB of windows are live. Past it, the least recently used label window that the import eviction rule would let go (not held by a build, not used in this or the previous frame) is retired and rewatched asretireLeastRecentdoes; when none can go, the label keeps reason 7.HostImportCounts::labelBytesreports the live window bytes (; 1.5 MiB of label windowsin the report).agc_driver_label_import_window(and its_draw_pipeline/_plan_verifyvariants) leaves an unregistered 64 KiB gap after each of its blocks, so no import of one block covers the next, and checks that a label in a 1 MiB allocation over the budget is recorded on the GPU (reason 0) through exactly one 64 KiB window and lands without touching its neighbours; that a label in a 64 KiB allocation still returns reason 7 without importing; that labels fill the windows to 16 MiB, that a label past the limit keeps reason 7 while every window is held, and that after a build the least recently used window is retired (and rewatched as before), the newer ones stay and every label lands; and that with the windows full, a normal import within the budget is made without retiring the earlier normal import or a label window; and that a normal import over the budget that would replace a label window, withAPS5_IMPORT_RETIRE_CREDITon, does not leave normal imports over the budget.#26384 also imports labelled memory, after a mapping outlived three flips, through the budgeted
HostImportFor. On this machine it does not change Cult of the Lamb (table below), since the budget still refuses these allocations; the two changes touch the same line ofWriteLabelOnGpuand should compose (a settled mapping imports through #26384, a refused large one through its window).Tested
Ubuntu 26.04 (Linux 7.0.0-43), GCC 15.2.0, Release, Ryzen 5 5625U, AMD Radeon Graphics (RADV RENOIR, gfx90c), Mesa 26.0.8, on
maine68be05111.GPU tests,
ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation VK_LOADER_DEBUG=layer, validation layer 1.4.341,ctest -R '^agc_driver_(graphics|label_import_window.*|unimported_label_order.*|same_queue_label_wait.*|cpu_label_wake|label_.*|host_import_.*)$' -V:maine68be05111b1c9409abdInsert instance layer "VK_LAYER_KHRONOS_validation"was not found but was requested by env var VK_INSTANCE_LAYERSVUID-The whole
^agc_suite (2064 tests) under the same layer on an earlier head of this branch (5bb725a05f, before the retire rule took the import eviction rule and the rewatch): 2063 pass, 1921 layer inserts, 0VUID-; the failure isagc_driver_cvt_f32_f64_denormal_result, which fails onmainon this GPU (#26142). Every commit builds on its own and the new test passes from the commit that adds it.Negative controls, each a local revert of one rule,
agc_driver_label_import_window:Labelrequest inWriteLabelOnGpu:a label in an allocation over the import budget was not recorded on the GPU (reason 7)a label in an allocation no larger than a window did not keep its CPU path (reason 0)a label past the limit while every label window is held did not keep its CPU path (reason 0)a label past the limit was not recorded on the GPU once older windows were released (reason 7)d71f6b1da4):cannot record work on a fresh allocation(the normal import is refused)d2d884ab94):label bytes were credited to a normal import over the normal budgetpython3 tools/check_conventions.py --base origin/mainandpython3 tools/debt_fold.py --checkpass.Cult of the Lamb (PPSA06465,
01.000.023), 1920x1080, the same converted title and save each run; a recorded pad route (APS5_PAD_REPLAY) goes from the title screen into gameplay, 150 s per run, the numbers are the mean over the 10 s intervals from 90 s (gameplay). Runs alternate the arms by swapping the build'slibsdirectory.d71f6b1da4maine68be05111After the budget fix (
d2d884ab94), a batch in round order against the previous head andmain(the secondmainrun crashed in the game, a guestfree()atapp.elf+0x1697553, before the measured window, and is left out):d2d884ab94d71f6b1da4maine68be05111All arms run faster in this batch than in the one above (the machine, not the code:
mainis the same build); the gap between this PR andmainis 15 % here and 23 % above.An earlier batch in round order (this PR's previous head
5bb725a05f, which differs only in the retire path these runs never reach, at most 12 windows here), with #26384's head81f6333f36merged into the samemain(c9b670179e, local merge); a first round that ran while a build was compiling is left out:5bb725a05f)mainmain+ #26384Traces, summary lines and digests, SHA-256
3ce8f74d236b733486d4f4e9d5433a6adb54c2ab69847a372765a519a05cd337.Performance report
One run each with
APS5_TRACE_SECONDS=100:10(gameplay), same machine, route and build as above,mainfirst.Summary lines (main, this PR)
{"commit":"e68be05111f4","dirty":false,"env":{"APS5_PAD_REPLAY":"<path>","APS5_TRACE_SECONDS":"100:10","APS5_TRACE_SUMMARY_EVERY":"10"},"gpu":"AMD Radeon Graphics (RADV RENOIR)","driver":"radv Mesa 26.0.8-1ubuntu0.3","os":"Linux 7.0.0-43-generic","cpu":"AMD Ryzen 5 5625U with Radeon Graphics","cpu_threads":12,"memory_mib":14780,"title_id":"PPSA06465","title":"Cult Of The Lamb","content_version":"01.000.023","resolution":"1920x1080","window":{"spec":"seconds 100:10","first_present":2621,"ms":10042.602},"presents":84,"frame_ms":{"p50":119.804,"p90":123.244,"p99":129.290,"max":129.290},"gpu_busy_ms_per_present":63.116,"worker_busy_pct":{"queue worker 0x0":98.658},"phase_totals_ms":{"Driver.Completion":1.665,"Driver.Dispatch":4988.975,"Driver.Dispatch.decode_key_device_setup":4885.676,"Driver.Dispatch.lookup_cache":2.243,"Driver.Draw":2941.627,"Driver.Draw.device_setup":109.802,"Driver.Draw.draw_enqueued":1280.234,"Driver.Draw.post_compile_prepare":94.856,"Driver.Draw.prepare":172.870,"Driver.Draw.shader_compile_and_link":1253.254,"Driver.EndSubmission":104.649,"Driver.Packet":9801.417,"Driver.Packet.device_lock":16.526,"Driver.Packet.dispatch":4990.045,"Driver.Packet.draw":2961.952,"Driver.Packet.execute":331.258,"Driver.Packet.flip_flush":0.379,"Driver.Packet.flush_between_packets":64.388,"Driver.Packet.memory_wait":2.121,"Driver.Packet.pipeline_drain":272.948,"Driver.Packet.pipeline_prepare":33.930,"Driver.Packet.prepare_memory":32.337,"Driver.Packet.rendering_wait":0.351,"Driver.Present":106.706,"Driver.Present.acquire_image":12.392,"Driver.Present.device_setup":0.134,"Driver.Present.gpu_mutex_wait":2.841,"Driver.Present.inflight_wait":0.486,"Driver.Present.present_display_buffer":28.040,"Driver.Present.queue_present":7.895,"Driver.Present.release_and_callback":0.172,"Driver.Present.render_fence_wait":54.172,"Driver.Present.resize":0.283,"Driver.Present.validate":0.083,"Driver.Suspend":0.052,"GpuMutex.wait.draw":0.663,"GpuMutex.wait.end":2.356,"GpuMutex.wait.fill":62.483,"GpuMutex.wait.flush":0.010,"GpuMutex.wait.label":3.033,"GpuMutex.wait.other":0.270,"GpuMutex.wait.present":2.383,"Graphics.Draw":2514.812,"Graphics.Draw.draw_and_resource_release":1640.947,"Graphics.Draw.index_upload":362.057,"Graphics.Draw.validate":116.269,"Graphics.Draw.vertex_upload":377.608,"Graphics.DrawWithRecipe":764.420,"Graphics.DrawWithRecipe.draw_and_resource_release":521.302,"Graphics.DrawWithRecipe.index_upload":96.836,"Graphics.DrawWithRecipe.validate":23.862,"Graphics.DrawWithRecipe.vertex_upload":113.562,"Graphics.Submit":42.120,"Graphics.Submit.command_end":0.457,"Graphics.Submit.queue_submit":41.465,"Graphics.Wait":49.492,"Graphics.Wait.fence_wait":42.241,"Recorder.Reap":35.972,"Recorder.Submit":573.550,"Recorder.Sync":5314.751,"Resources.Complete":459.512,"Resources.Prepare":143.664,"Shader.DrawStage":662.996,"Shader.DrawStage.capture_resources":294.714,"Shader.DrawStage.materialize":235.988,"Shader.DrawStage.prepared_invocation":123.919,"Shader.ResolveAbi":269.729,"Shader.ResolveGraphicsAbi":130.874,"Shader.ResolveGraphicsStagesAbi":244.151,"VideoOut.Flip":114.012,"VideoOut.Flip.completion_mutex_wait":0.136,"VideoOut.Flip.config_mutex_wait":0.016,"VideoOut.Flip.frame_limit":0.093,"VideoOut.Flip.notify_game":4.245,"VideoOut.Flip.present":108.079,"VideoOut.Flip.validate":0.237,"VideoOut.Flip.vblank_wait":0.145,"VideoOut.Flip.window_prepare":0.263,"VideoOut.Flip.window_title":0.570,"VideoOut.Readiness":0.640,"VideoOut.Readiness.locks_validate":0.203,"Vulkan.Acquire":11.916,"Vulkan.Acquire.acquire_fence_wait":0.630,"Vulkan.Acquire.acquire_image":9.531,"Vulkan.Acquire.fence_reset":1.622,"Vulkan.Acquire.retired_swapchains":0.080,"Vulkan.Dispatch":19.678,"Vulkan.Dispatch.command_record":4.998,"Vulkan.Dispatch.shader_resources":14.478,"Vulkan.DrawFromRecipe":775.404,"Vulkan.Present":24.182,"Vulkan.Present.command_record_scale":9.174,"Vulkan.Present.pixel_upload":0.456,"Vulkan.Present.queue_submit":14.346,"Vulkan.QueuePresent":7.504,"Vulkan.QueuePresent.queue_present":7.312,"Vulkan.Retire":67.176,"Vulkan.Retire.wait":51.987},"top_phases_ms_per_frame":{"Driver.Packet":116.684,"Recorder.Sync":63.271,"Driver.Packet.dispatch":59.405,"Driver.Dispatch":59.393,"Driver.Dispatch.decode_key_device_setup":58.163,"Driver.Packet.draw":35.261,"Driver.Draw":35.019,"Graphics.Draw":29.938},"owned_draw_counts":{"OwnedDraw.evicted_other":8037},"graphics_track":{"Graphics.Barrier.dispatch-lead":168,"Graphics.Barrier.dispatch-trail":168,"Graphics.Barrier.draw":21031,"Graphics.Barrier.input-mirror":3669,"Graphics.Barrier.label-run":3750,"Graphics.Barrier.present-blit":168,"Graphics.Copy":4509,"Graphics.Copy.bytes":58538402,"Graphics.RenderPass":8648,"Graphics.RenderPass.Close.command":2385,"Graphics.RenderPass.Close.image":169,"Graphics.RenderPass.Close.key":1255,"Graphics.RenderPass.Close.new-batch":4839,"Graphics.RenderPass.Continued":20077},"trace_dropped":false,"trace":"aps5-trace-e68be05111f4-783481.json.gz"} {"commit":"d71f6b1da47d","dirty":false,"env":{"APS5_PAD_REPLAY":"<path>","APS5_TRACE_SECONDS":"100:10","APS5_TRACE_SUMMARY_EVERY":"10"},"gpu":"AMD Radeon Graphics (RADV RENOIR)","driver":"radv Mesa 26.0.8-1ubuntu0.3","os":"Linux 7.0.0-43-generic","cpu":"AMD Ryzen 5 5625U with Radeon Graphics","cpu_threads":12,"memory_mib":14780,"title_id":"PPSA06465","title":"Cult Of The Lamb","content_version":"01.000.023","resolution":"1920x1080","window":{"spec":"seconds 100:10","first_present":2854,"ms":10002.023},"presents":100,"frame_ms":{"p50":99.824,"p90":103.789,"p99":106.417,"max":106.417},"gpu_busy_ms_per_present":67.510,"worker_busy_pct":{"queue worker 0x0":92.329},"phase_totals_ms":{"Driver.Completion":1.476,"Driver.Dispatch":4713.343,"Driver.Dispatch.decode_key_device_setup":4582.449,"Driver.Dispatch.lookup_cache":2.273,"Driver.Draw":2736.510,"Driver.Draw.device_setup":153.957,"Driver.Draw.draw_enqueued":458.604,"Driver.Draw.post_compile_prepare":135.428,"Driver.Draw.prepare":225.442,"Driver.Draw.shader_compile_and_link":1722.310,"Driver.EndSubmission":26.152,"Driver.Packet":9207.026,"Driver.Packet.device_lock":21.258,"Driver.Packet.dispatch":4714.701,"Driver.Packet.draw":2765.994,"Driver.Packet.execute":952.060,"Driver.Packet.flip_flush":14.515,"Driver.Packet.flush_between_packets":72.555,"Driver.Packet.memory_wait":0.683,"Driver.Packet.pipeline_drain":149.731,"Driver.Packet.pipeline_prepare":46.215,"Driver.Packet.prepare_memory":41.860,"Driver.Packet.rendering_wait":0.496,"Driver.Present":606.008,"Driver.Present.acquire_image":21.141,"Driver.Present.device_setup":0.171,"Driver.Present.gpu_mutex_wait":2.057,"Driver.Present.inflight_wait":0.624,"Driver.Present.present_display_buffer":30.593,"Driver.Present.queue_present":8.688,"Driver.Present.release_and_callback":0.224,"Driver.Present.render_fence_wait":541.829,"Driver.Present.resize":0.347,"Driver.Present.validate":0.091,"Driver.Suspend":0.065,"GpuMutex.wait.draw":1.589,"GpuMutex.wait.end":0.096,"GpuMutex.wait.fill":96.052,"GpuMutex.wait.flush":0.183,"GpuMutex.wait.label":1.258,"GpuMutex.wait.other":0.996,"GpuMutex.wait.present":1.504,"Graphics.Draw":3094.431,"Graphics.Draw.draw_and_resource_release":1987.475,"Graphics.Draw.index_upload":454.210,"Graphics.Draw.validate":154.208,"Graphics.Draw.vertex_upload":475.695,"Graphics.DrawWithRecipe":954.950,"Graphics.DrawWithRecipe.draw_and_resource_release":621.603,"Graphics.DrawWithRecipe.index_upload":136.635,"Graphics.DrawWithRecipe.validate":28.879,"Graphics.DrawWithRecipe.vertex_upload":157.000,"Graphics.Submit":51.678,"Graphics.Submit.command_end":0.520,"Graphics.Submit.queue_submit":50.961,"Graphics.Wait":3092.210,"Graphics.Wait.fence_wait":3067.077,"Recorder.Reap":161.709,"Recorder.Submit":742.044,"Recorder.Sync":433.125,"Resources.Complete":471.301,"Resources.Prepare":151.998,"Shader.DrawStage":913.808,"Shader.DrawStage.capture_resources":417.214,"Shader.DrawStage.materialize":315.062,"Shader.DrawStage.prepared_invocation":170.004,"Shader.ResolveAbi":448.169,"Shader.ResolveGraphicsAbi":202.552,"Shader.ResolveGraphicsStagesAbi":405.910,"VideoOut.Flip":613.464,"VideoOut.Flip.completion_mutex_wait":0.167,"VideoOut.Flip.config_mutex_wait":0.022,"VideoOut.Flip.frame_limit":0.109,"VideoOut.Flip.notify_game":4.031,"VideoOut.Flip.present":607.368,"VideoOut.Flip.validate":0.250,"VideoOut.Flip.vblank_wait":0.168,"VideoOut.Flip.window_prepare":0.299,"VideoOut.Flip.window_title":0.750,"VideoOut.Readiness":0.455,"VideoOut.Readiness.locks_validate":0.237,"Vulkan.Acquire":20.642,"Vulkan.Acquire.acquire_fence_wait":0.859,"Vulkan.Acquire.acquire_image":17.705,"Vulkan.Acquire.fence_reset":1.885,"Vulkan.Acquire.retired_swapchains":0.110,"Vulkan.Dispatch":11.364,"Vulkan.Dispatch.command_record":4.686,"Vulkan.Dispatch.shader_resources":6.452,"Vulkan.DrawFromRecipe":967.731,"Vulkan.Present":25.621,"Vulkan.Present.command_record_scale":9.304,"Vulkan.Present.pixel_upload":0.535,"Vulkan.Present.queue_submit":15.564,"Vulkan.QueuePresent":8.256,"Vulkan.QueuePresent.queue_present":8.061,"Vulkan.Retire":542.205,"Vulkan.Retire.wait":539.016},"top_phases_ms_per_frame":{"Driver.Packet":92.070,"Driver.Packet.dispatch":47.147,"Driver.Dispatch":47.133,"Driver.Dispatch.decode_key_device_setup":45.824,"Graphics.Draw":30.944,"Graphics.Wait":30.922,"Graphics.Wait.fence_wait":30.671,"Driver.Packet.draw":27.660},"owned_draw_counts":{"OwnedDraw.evicted_other":7286},"graphics_track":{"Graphics.Barrier.dispatch-trail":200,"Graphics.Barrier.draw":23001,"Graphics.Barrier.input-mirror":4521,"Graphics.Barrier.label-run":14759,"Graphics.Barrier.present-blit":200,"Graphics.BarrierMerged.dispatch-lead":200,"Graphics.Copy":5521,"Graphics.Copy.bytes":75153324,"Graphics.RenderPass":10886,"Graphics.RenderPass.Close.command":3000,"Graphics.RenderPass.Close.image":464,"Graphics.RenderPass.Close.key":1618,"Graphics.RenderPass.Close.new-batch":5804,"Graphics.RenderPass.Continued":23987},"trace_dropped":false,"trace":"aps5-trace-d71f6b1da47d-784006.json.gz"}tools/trace_digest.py, main
seconds 100:10 from present 2621: 84 presents, frame p50 119.8 / p90 123.2 / p99 129.3 / max 129.3 ms, GPU busy 63.1 ms per present
AMD Radeon Graphics (RADV RENOIR), radv Mesa 26.0.8-1ubuntu0.3, Linux 7.0.0-43-generic, 1920x1080, commit e68be05, dropped: no
Slowest frames (largest slices inside each, inclusive)
Persistent spikes (frame time above the fastest frame that separates it from a longer frame; one entry per stall, not per frame)
Threads (ms per frame)
tools/trace_digest.py, this PR
seconds 100:10 from present 2854: 100 presents, frame p50 99.8 / p90 103.8 / p99 106.4 / max 106.4 ms, GPU busy 67.5 ms per present
AMD Radeon Graphics (RADV RENOIR), radv Mesa 26.0.8-1ubuntu0.3, Linux 7.0.0-43-generic, 1920x1080, commit d71f6b1, dropped: no
Slowest frames (largest slices inside each, inclusive)
Persistent spikes (frame time above the fastest frame that separates it from a longer frame; one entry per stall, not per frame)
Threads (ms per frame)
In the window,
Recorder.Syncon the draw committer goes from 63.3 to 4.3 ms per frame, presents from 84 to 100 and frame p50 from 119.8 to 99.8 ms. GPU busy per present goes from 63.1 to 67.5 ms, as the GPU now runs the label stores and the committer feeds it faster.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)