Repository navigation
perf(agc): keep a freed host block's size instead of asking the heap - #22554
Conversation
A sized delete gives the size the block was allocated with, so the cache files the block under that size and keeps it in the free-list link's low four bits. An allocation takes the block when that size covers it, or when _msize says the block holds the request, so a block made by libstdc++-6.dll is never handed out for more bytes than the heap gave it. Unsized deletes and deletes below 8 bytes still ask _msize. The depot keeps its lists in an array, and each pop prefetches the next free block.
MarcZX10
left a comment
There was a problem hiding this comment.
Reviewed — no blocking findings
Nothing blocks this; the points below are optional.
What I ran
- Head:
cbef220d6cf4ab835ca9dce33d4945c645e89fbd, basemain. No merged-preview check. - Read-only review of the diff and the head text of
HostAllocator.cpp. No build and no tests were run. - Commands:
python3 repo_read.py cat core/libs/prx/libSceAgcDriver/Execution/src/HostAllocator.cpp 200 240
python3 repo_read.py search "Release|operator delete" core/libs/prx/libSceAgcDriver
Results
| Check | Result | Note |
|---|---|---|
| Diff read | passed | Both changed files |
| Head read | passed | HostAllocator.cpp lines 200–240 |
| Build and focused tests | not run | Author-reported only |
| Performance figures | not run | Author-reported, not reproduced |
Other call sites of Release |
not verified | Search returned no matches |
Findings
Blocking
None.
Non-blocking
core/libs/prx/libSceAgcDriver/tests/HostAllocator.cpp:160:Check(exact > 0, ...)passes when any one size matches the C runtime. Its message says the exact size is reported, so the check is weaker than its name.core/libs/prx/libSceAgcDriver/tests/HostAllocator.cpp:151:Check(lower == made, ...)depends on the LIFO order of the class cache after the refile. It holds with the current sequence of calls, but it is not a property the allocator promises.
Not verified
- Build, the focused test set, and the Vulkan validation runs claimed in the description.
- The performance numbers and traces.
- The test helpers
CheckandFillAndVerify, and the test setup that loadslibstdc++-6.dll. Only the diff of the test file was read. - Lines 1–199 of
HostAllocator.cppat head. The changed hunks and their context were read from the diff. - Callers of
operator deleteoutside the driver folder. The search found no matches. - Behaviour of
_msizeon blocks from other heaps (for example underAPS5_MIMALLOC). Not checked against the allocator source.
To get this to a good state
Nothing is required. The optional points are the two non-blocking items above.
|
A second Windows machine for this one, since the change only affects the
|
|
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.
|
|
Head No new failures and no new validation messages on either GPU.
Layer runs used AI-assisted: yes |
What
The host allocator's free path asks the heap how big a block is.
Releasecalls_msize(HeapSize,RtlSizeHeap) for every sized delete whose size is not a multiple of 16, and for every unsized delete, so it can file the block in its per-thread cache. On the Sonic Origins S3K menu page that call is 3.9 to 5.9% of the queue worker and 1.0 to 1.2% of the draw committer in four sampler windows of main. That is more than the heap's own allocations and frees on the same threads: 65 to 72 and 29 to 35 worker samples, against 149 to 226 for the size query.The query exists for a reason (fc25ed9): blocks cross between the driver and
libstdc++-6.dll. A block that libstdc++ made withmalloc(n)holdsnbytes, so filing it under the class ofn, as if it held the whole 16-byte granule, can hand it out for up to 15 bytes it does not have. A test in this PR shows that is not theoretical: a copy of the allocator that trusts the class corrupts the heap (0xC0000374). UnderAPS5_MIMALLOC,malloc(17)tomalloc(24)are 24-byte bins.This change keeps the size the delete already passes:
n >= 8bytes files the block under the class ofnand keepsnin the low four bits of the free-list link. Cached blocks are 16-byte aligned; a block that is not goes straight tofree. No_msize._msize.mtakes the head of its class when the kept size coversm. Otherwise it asks_msizefor that one block. The driver's own blocks hold their whole granule and pass. A block that still does not holdm(a libstdc++ block) is refiled one class down, or freed in class 0, and the allocation callsmalloc.Same guarantee as main. Main hands a cached block out for
monly when the block holds at leastm. Here every cached block carries a size it is known to hold:nis the size passed to theoperator newthat made the block ([new.delete]); main already relies on this whennis a multiple of 16. The driver allocates the whole granule, libstdc++ exactlyn, mimalloc at leastn;n < 8, the size is_msize, as on main.A block is handed out only when that size, or
_msize, covers the request. Nothing about the heap's granularity is assumed. A throwaway counting build on the same page (not part of this PR) explains why the fallback rarely costs much. Of the worker's 2.5 M frees per second, main sends 910 k through_msize. With the size kept in the link, about 250 k allocations per second find a kept size below the request, because a class mixes sizes. Every one of them was a driver block that_msizethen accepted; none was refiled.Overlap: no open PR changes
HostAllocator.cpp,RuntimeHeap.cor the driver's operator overrides. That comes from a diff scan of 579 open PRs by symbol on 2026-11-17, rechecked before building and before pushing.tools/pr_overlap.pyover all 1,780 open PRs finds one that shares a file (#16753, which adds a test totests/HostAllocator.cppon other lines) and no overlap once merged. The change merges cleanly onto maindb68035f8bd, 45 commits after the measured base.Tested
Windows 11 (10.0.26300), NVIDIA GeForce RTX 2080 Ti (driver 617.14), Intel Core i9-9900K. Sonic Origins (PPSA05324) menu on the S3K page, 3840x2160, default environment. Measured commits: main
89b0eef7ab42and this change on top of it (cbef220d6cf4), built in the same build directory.Sampler (
APS5_SAMPLE_WORKERandAPS5_SAMPLE_COMMITTER, one 60 s window per arm on the S3K page, 3,843 samples per thread; system DLL time is charged to the driver frame that called it):operator new+operator delete, with what they callRtlSizeHeapDrawPipeline::Enqueueoperator new+operator deleteoperator deleteDriver::commitDrawThe machine had outside load at the start of this pair (26% CPU). A second window of this PR, taken later beside the build without the prefetch, read 18.12 (16.98 to 18.54).
The prefetch on its own: the same change without the prefetch line (a local build, not part of this PR), measured in a pair with this PR:
With the draw finisher (
APS5_DRAW_PIPELINE=1, the default proposed by #15456), two pairs:DrawFinisher::Drain(second pair)The first window of this PR was noisy (18.94 to 22.20). With the finisher on, the frame waits on the finisher thread, whose own allocator time the coarse thread sampler does not show. The frame is flat there, and the allocator time on the worker and the committer is lower.
Traced runs (
APS5_TRACE_SECONDS=200:15, order main, change, change, main):That is flat. The worker's trace buffer fills after about 5.4 s and the committer's after about 14.4 s in every run, so per-thread slice times cover retained events only. S3K's frame is set by the worker and the committer together; in the sampler pairs the frame moves with them, and in the traced runs it does not. Both arms' summary lines are in the digests below, and the four traces are attached as two zips (m338_traces_main_89b0eef7ab42.zip, m338_traces_pr_cbef220d6cf4.zip).
Tests: three new checks in
agc_driver_host_allocatorcalloperator newand the sizedoperator deletethrough volatile pointers, so the compiler cannot fold the pointer comparisons._msizefallback).libstdc++-6.dll's ownoperator new(_Znwy, looked up in the loaded DLL) for every size from 8 to 1024 that is not a multiple of 16:_msizeof the result covers the request);Broken copies of the change, each built against these tests, are caught in 8 of 9 cases:
0xC0000374);_msizecheck for a short kept size;The survivor drops the per-class depth bound, which main has and its suite does not observe either.
The focused set passes on both builds under Vulkan validation: 29 tests, including the host allocator, recorder, vertex input, draw cache and draw-path tests. It ran with
ANYPS5_REQUIRE_VULKAN=1,ANYPS5_NO_SHADER_CACHE=1andVK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation. Neither log has aVUID-line or the layer-missing line. Full ctest was not run.Digest: main, run 1 (commit 89b0eef)
seconds 200:15 from present 5127: 258 presents, frame p50 57.6 / p90 61.0 / p99 65.4 / max 71.4 ms, GPU busy 33.4 ms per present
NVIDIA GeForce RTX 2080 Ti, NVIDIA 617.14, Windows 10.0.26300, 3840x2160, commit 89b0eef, dropped: yes
{"commit":"89b0eef7ab42","dirty":false,"env":{"APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"200:15"},"gpu":"NVIDIA GeForce RTX 2080 Ti","driver":"NVIDIA 617.14","os":"Windows 10.0.26300","cpu":"Intel(R) Core(TM) i9-9900K CPU @ 3.60GHz","cpu_threads":16,"memory_mib":65468,"title_id":"PPSA05324","title":"Sonic Origins","content_version":"02.002.000","resolution":"3840x2160","window":{"spec":"seconds 200:15","first_present":5127,"ms":15013.83},"presents":258,"frame_ms":{"p50":57.574,"p90":61.024,"p99":65.438,"max":71.443},"gpu_busy_ms_per_present":33.43,"worker_busy_pct":{"queue worker 0x0":96.358},"phase_totals_ms":{"Driver.Completion":4.003,"Driver.Dispatch":1000.352,"Driver.Dispatch.capture_resources":16.849,"Driver.Dispatch.decode_key_device_setup":596.587,"Driver.Dispatch.lookup_cache":14.39,"Driver.Dispatch.materialize":2.929,"Driver.Dispatch.prepared_invocation":2.782,"Driver.Draw":11031.464,"Driver.Draw.device_setup":829.969,"Driver.Draw.draw_enqueued":2415.885,"Driver.Draw.post_compile_prepare":128.89,"Driver.Draw.prepare":1345.649,"Driver.Draw.shader_compile_and_link":6033.578,"Driver.EndSubmission":6.207,"Driver.Packet":14456.668,"Driver.Packet.device_lock":172.474,"Driver.Packet.dispatch":1004.374,"Driver.Packet.draw":11254.05,"Driver.Packet.execute":410.023,"Driver.Packet.flip_flush":9.774,"Driver.Packet.flush_between_packets":502.265,"Driver.Packet.memory_wait":0.034,"Driver.Packet.pipeline_drain":237.287,"Driver.Packet.pipeline_prepare":270.05,"Driver.Packet.prepare_memory":275.332,"Driver.Packet.rendering_wait":0.4,"Driver.Present":4190.397,"Driver.Present.acquire_image":3.451,"Driver.Present.device_setup":0.258,"Driver.Present.gpu_mutex_wait":63.378,"Driver.Present.inflight_wait":0.734,"Driver.Present.present_display_buffer":44.087,"Driver.Present.queue_present":99.213,"Driver.Present.release_and_callback":0.882,"Driver.Present.render_fence_wait":3977.468,"Driver.Present.resize":0.629,"Driver.Present.validate":0.108,"Driver.Suspend":0.083,"GpuMutex.wait.dispatch":0.236,"GpuMutex.wait.draw":52.298,"GpuMutex.wait.end":0.502,"GpuMutex.wait.fill":2.724,"GpuMutex.wait.flush":3.83,"GpuMutex.wait.label":2.492,"GpuMutex.wait.other":10.529,"GpuMutex.wait.present":62.492,"GpuMutex.wait.wait":3.963,"Graphics.Draw":8693.648,"Graphics.Draw.draw_and_resource_release":6823.371,"Graphics.Draw.index_upload":382.408,"Graphics.Draw.validate":707.266,"Graphics.Draw.vertex_upload":612.873,"Graphics.DrawWithRecipe":653.181,"Graphics.DrawWithRecipe.draw_and_resource_release":626.199,"Graphics.DrawWithRecipe.index_upload":3.761,"Graphics.DrawWithRecipe.validate":9.184,"Graphics.DrawWithRecipe.vertex_upload":8.493,"Recorder.Reap":151.492,"Recorder.Submit":325.331,"Recorder.WaitSerial":4150.456,"Resources.Complete":100.3,"Resources.Prepare":71.583,"Shader.DrawStage":3885.863,"Shader.DrawStage.capture_resources":1768.783,"Shader.DrawStage.materialize":1009.807,"Shader.DrawStage.prepared_invocation":1016.919,"Shader.ResolveAbi":147.205,"Shader.ResolveGraphicsAbi":41.413,"Shader.ResolveGraphicsStagesAbi":150.92,"VideoOut.Flip":4207.631,"VideoOut.Flip.completion_mutex_wait":0.684,"VideoOut.Flip.config_mutex_wait":0.027,"VideoOut.Flip.frame_limit":0.238,"VideoOut.Flip.notify_game":9.87,"VideoOut.Flip.present":4174.847,"VideoOut.Flip.validate":0.348,"VideoOut.Flip.vblank_wait":0.201,"VideoOut.Flip.window_prepare":0.585,"VideoOut.Flip.window_title":20.551,"VideoOut.Readiness":1.271,"VideoOut.Readiness.locks_validate":0.794,"Vulkan.Acquire":3.121,"Vulkan.Acquire.acquire_fence_wait":0.511,"Vulkan.Acquire.acquire_image":1.836,"Vulkan.Acquire.fence_reset":0.518,"Vulkan.Acquire.retired_swapchains":0.114,"Vulkan.Dispatch":200.092,"Vulkan.Dispatch.command_record":61.215,"Vulkan.Dispatch.shader_resources":137.524,"Vulkan.DispatchRecipe":0.219,"Vulkan.DispatchRecipe.command_record":0.218,"Vulkan.DrawFromRecipe":662.273,"Vulkan.Present":22.794,"Vulkan.Present.command_record_scale":8.62,"Vulkan.Present.pixel_upload":3.913,"Vulkan.Present.queue_submit":9.919,"Vulkan.QueuePresent":98.058,"Vulkan.QueuePresent.queue_present":97.265,"Vulkan.Retire":3977.068,"Vulkan.Retire.wait":3971.682},"top_phases_ms_per_frame":{"Driver.Packet":56.034,"Driver.Packet.draw":43.62,"Driver.Draw":42.758,"Graphics.Draw":33.696,"Graphics.Draw.draw_and_resource_release":26.447,"Driver.Draw.shader_compile_and_link":23.386,"VideoOut.Flip":16.309,"Driver.Present":16.242},"owned_draw_counts":{"OwnedDraw.evicted_other":874},"graphics_track":{"Graphics.Barrier.copy":1032,"Graphics.Barrier.dispatch-lead":1399,"Graphics.Barrier.dispatch-trail":2841,"Graphics.Barrier.draw":38477,"Graphics.Barrier.fill-clear":2580,"Graphics.Barrier.label-run":35631,"Graphics.Barrier.present-blit":516,"Graphics.Barrier.shadow-publish":2,"Graphics.Barrier.staging-in":2619,"Graphics.Barrier.staging-out":516,"Graphics.Barrier.storage-upload":29422,"Graphics.Barrier.storage-writeback":2417,"Graphics.BarrierMerged.dispatch-lead":1442,"Graphics.BarrierMerged.label-run":13,"Graphics.BarrierMerged.shadow-publish":2,"Graphics.BarrierMerged.staging-in":481,"Graphics.BarrierMerged.staging-out":516,"Graphics.BarrierMerged.storage-writeback":693,"Graphics.Copy":1808,"Graphics.Copy.bytes":16557504,"Graphics.RenderPass":19341,"Graphics.RenderPass.Close.command":12423,"Graphics.RenderPass.Close.image":497,"Graphics.RenderPass.Close.key":1534,"Graphics.RenderPass.Close.label":13,"Graphics.RenderPass.Close.new-batch":4875,"Graphics.RenderPass.Continued":486597},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":5.388,"events_lost":466217,"totals_full":false},"draw committer":{"events_full_after_s":14.457,"events_lost":10261,"totals_full":false}},"trace":"aps5-trace-89b0eef7ab42-42824.json.gz"}Incomplete trace: recorded data was lost. Slice-based timings, waits and batch inventories cover retained events only; missing slices are not idle time. Summary statistics are reported separately.
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)
Largest slices (ms per frame, inclusive, all threads): batch 33.4, Graphics.Draw 18.5, VideoOut.Flip 16.3, Driver.Present 16.2, VideoOut.Flip.present 16.2, Recorder.WaitSerial 16.1, Driver.Present.render_fence_wait 15.4, Vulkan.Retire 15.4, Vulkan.Retire.wait 15.4, Driver.Packet 11.3
Longest waits
Largest GPU batches (GPU ranges inside, and the CPU slices that recorded each, inclusive)
Digest: this PR, run 1 (commit cbef220)
seconds 200:15 from present 5193: 253 presents, frame p50 58.6 / p90 62.9 / p99 72.8 / max 110.2 ms, GPU busy 34.0 ms per present
NVIDIA GeForce RTX 2080 Ti, NVIDIA 617.14, Windows 10.0.26300, 3840x2160, commit cbef220, dropped: yes
{"commit":"cbef220d6cf4","dirty":false,"env":{"APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"200:15"},"gpu":"NVIDIA GeForce RTX 2080 Ti","driver":"NVIDIA 617.14","os":"Windows 10.0.26300","cpu":"Intel(R) Core(TM) i9-9900K CPU @ 3.60GHz","cpu_threads":16,"memory_mib":65468,"title_id":"PPSA05324","title":"Sonic Origins","content_version":"02.002.000","resolution":"3840x2160","window":{"spec":"seconds 200:15","first_present":5193,"ms":15032.549},"presents":253,"frame_ms":{"p50":58.623,"p90":62.86,"p99":72.829,"max":110.197},"gpu_busy_ms_per_present":34.016,"worker_busy_pct":{"queue worker 0x0":96.422},"phase_totals_ms":{"Driver.Completion":2.519,"Driver.Dispatch":997.689,"Driver.Dispatch.capture_resources":17.467,"Driver.Dispatch.decode_key_device_setup":593.306,"Driver.Dispatch.lookup_cache":14.337,"Driver.Dispatch.materialize":3.25,"Driver.Dispatch.prepared_invocation":2.829,"Driver.Draw":11049.34,"Driver.Draw.device_setup":879.451,"Driver.Draw.draw_enqueued":2113.496,"Driver.Draw.post_compile_prepare":139.199,"Driver.Draw.prepare":1394.646,"Driver.Draw.shader_compile_and_link":6247.536,"Driver.EndSubmission":8.607,"Driver.Packet":14483.48,"Driver.Packet.device_lock":173.687,"Driver.Packet.dispatch":1001.943,"Driver.Packet.draw":11289.842,"Driver.Packet.execute":386.255,"Driver.Packet.flip_flush":9.936,"Driver.Packet.flush_between_packets":507.992,"Driver.Packet.memory_wait":0.004,"Driver.Packet.pipeline_drain":242.276,"Driver.Packet.pipeline_prepare":291.085,"Driver.Packet.prepare_memory":275.094,"Driver.Packet.rendering_wait":0.493,"Driver.Present":4195.396,"Driver.Present.acquire_image":3.517,"Driver.Present.device_setup":0.226,"Driver.Present.gpu_mutex_wait":80.228,"Driver.Present.inflight_wait":0.664,"Driver.Present.present_display_buffer":45.785,"Driver.Present.queue_present":102.368,"Driver.Present.release_and_callback":1.044,"Driver.Present.render_fence_wait":3960.729,"Driver.Present.resize":0.573,"Driver.Present.validate":0.094,"Driver.Suspend":0.111,"GpuMutex.wait.dispatch":0.088,"GpuMutex.wait.draw":51.419,"GpuMutex.wait.end":0.607,"GpuMutex.wait.fill":3.546,"GpuMutex.wait.flush":5.516,"GpuMutex.wait.label":3.454,"GpuMutex.wait.other":10.503,"GpuMutex.wait.present":79.364,"GpuMutex.wait.wait":2.546,"Graphics.Draw":8670.268,"Graphics.Draw.draw_and_resource_release":6755.033,"Graphics.Draw.index_upload":412.185,"Graphics.Draw.validate":738.056,"Graphics.Draw.vertex_upload":618.838,"Graphics.DrawWithRecipe":679.687,"Graphics.DrawWithRecipe.draw_and_resource_release":643.417,"Graphics.DrawWithRecipe.index_upload":6.657,"Graphics.DrawWithRecipe.validate":11.746,"Graphics.DrawWithRecipe.vertex_upload":11.581,"Recorder.Reap":156.044,"Recorder.Submit":322.185,"Recorder.WaitSerial":4153.585,"Resources.Complete":87.812,"Resources.Prepare":70.619,"Shader.DrawStage":3927.135,"Shader.DrawStage.capture_resources":1795.555,"Shader.DrawStage.materialize":1016.323,"Shader.DrawStage.prepared_invocation":1023.587,"Shader.ResolveAbi":143.319,"Shader.ResolveGraphicsAbi":43.729,"Shader.ResolveGraphicsStagesAbi":150.088,"VideoOut.Flip":4217.718,"VideoOut.Flip.completion_mutex_wait":0.758,"VideoOut.Flip.config_mutex_wait":0.103,"VideoOut.Flip.frame_limit":0.189,"VideoOut.Flip.notify_game":14.146,"VideoOut.Flip.present":4179.17,"VideoOut.Flip.validate":0.345,"VideoOut.Flip.vblank_wait":0.266,"VideoOut.Flip.window_prepare":0.506,"VideoOut.Flip.window_title":21.926,"VideoOut.Readiness":1.339,"VideoOut.Readiness.locks_validate":0.854,"Vulkan.Acquire":3.2,"Vulkan.Acquire.acquire_fence_wait":0.617,"Vulkan.Acquire.acquire_image":1.833,"Vulkan.Acquire.fence_reset":0.539,"Vulkan.Acquire.retired_swapchains":0.122,"Vulkan.Dispatch":198.692,"Vulkan.Dispatch.command_record":61.483,"Vulkan.Dispatch.shader_resources":135.927,"Vulkan.DispatchRecipe":0.37,"Vulkan.DispatchRecipe.command_record":0.369,"Vulkan.DrawFromRecipe":690.605,"Vulkan.Present":23.658,"Vulkan.Present.command_record_scale":8.779,"Vulkan.Present.pixel_upload":4.5,"Vulkan.Present.queue_submit":10.059,"Vulkan.QueuePresent":101.121,"Vulkan.QueuePresent.queue_present":100.358,"Vulkan.Retire":3960.331,"Vulkan.Retire.wait":3954.803},"top_phases_ms_per_frame":{"Driver.Packet":57.247,"Driver.Packet.draw":44.624,"Driver.Draw":43.673,"Graphics.Draw":34.27,"Graphics.Draw.draw_and_resource_release":26.7,"Driver.Draw.shader_compile_and_link":24.694,"VideoOut.Flip":16.671,"Driver.Present":16.583},"owned_draw_counts":{"OwnedDraw.evicted_other":737},"graphics_track":{"Graphics.Barrier.copy":1012,"Graphics.Barrier.dispatch-lead":1330,"Graphics.Barrier.dispatch-trail":2786,"Graphics.Barrier.draw":37855,"Graphics.Barrier.fill-clear":2530,"Graphics.Barrier.label-run":34937,"Graphics.Barrier.present-blit":506,"Graphics.Barrier.shadow-publish":2,"Graphics.Barrier.staging-in":2566,"Graphics.Barrier.staging-out":506,"Graphics.Barrier.storage-upload":28852,"Graphics.Barrier.storage-writeback":2381,"Graphics.BarrierMerged.dispatch-lead":1456,"Graphics.BarrierMerged.label-run":15,"Graphics.BarrierMerged.shadow-publish":2,"Graphics.BarrierMerged.staging-in":474,"Graphics.BarrierMerged.staging-out":506,"Graphics.BarrierMerged.storage-writeback":669,"Graphics.Copy":1773,"Graphics.Copy.bytes":16236624,"Graphics.RenderPass":19012,"Graphics.RenderPass.Close.command":12192,"Graphics.RenderPass.Close.image":493,"Graphics.RenderPass.Close.key":1497,"Graphics.RenderPass.Close.label":15,"Graphics.RenderPass.Close.new-batch":4816,"Graphics.RenderPass.Continued":477121},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":5.4,"events_lost":460469,"totals_full":false},"draw committer":{"events_full_after_s":14.445,"events_lost":10813,"totals_full":false}},"trace":"aps5-trace-cbef220d6cf4-37452.json.gz"}Incomplete trace: recorded data was lost. Slice-based timings, waits and batch inventories cover retained events only; missing slices are not idle time. Summary statistics are reported separately.
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)
Largest slices (ms per frame, inclusive, all threads): batch 34.0, Graphics.Draw 19.0, VideoOut.Flip 16.7, Driver.Present 16.6, VideoOut.Flip.present 16.5, Recorder.WaitSerial 16.4, Driver.Present.render_fence_wait 15.7, Vulkan.Retire 15.7, Vulkan.Retire.wait 15.6, Driver.Packet 11.6
Longest waits
Largest GPU batches (GPU ranges inside, and the CPU slices that recorded each, inclusive)
Digest: this PR, run 2 (commit cbef220)
seconds 200:15 from present 5244: 260 presents, frame p50 57.4 / p90 60.6 / p99 64.3 / max 67.0 ms, GPU busy 33.5 ms per present
NVIDIA GeForce RTX 2080 Ti, NVIDIA 617.14, Windows 10.0.26300, 3840x2160, commit cbef220, dropped: yes
{"commit":"cbef220d6cf4","dirty":false,"env":{"APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"200:15"},"gpu":"NVIDIA GeForce RTX 2080 Ti","driver":"NVIDIA 617.14","os":"Windows 10.0.26300","cpu":"Intel(R) Core(TM) i9-9900K CPU @ 3.60GHz","cpu_threads":16,"memory_mib":65468,"title_id":"PPSA05324","title":"Sonic Origins","content_version":"02.002.000","resolution":"3840x2160","window":{"spec":"seconds 200:15","first_present":5244,"ms":15004.35},"presents":260,"frame_ms":{"p50":57.362,"p90":60.551,"p99":64.332,"max":67.03},"gpu_busy_ms_per_present":33.524,"worker_busy_pct":{"queue worker 0x0":96.415},"phase_totals_ms":{"Driver.Completion":1.83,"Driver.Dispatch":1070.43,"Driver.Dispatch.capture_resources":17.231,"Driver.Dispatch.decode_key_device_setup":668.72,"Driver.Dispatch.lookup_cache":14.101,"Driver.Dispatch.materialize":3.15,"Driver.Dispatch.prepared_invocation":2.714,"Driver.Draw":10962.683,"Driver.Draw.device_setup":858.061,"Driver.Draw.draw_enqueued":2133.785,"Driver.Draw.post_compile_prepare":144.564,"Driver.Draw.prepare":1370.195,"Driver.Draw.shader_compile_and_link":6190.474,"Driver.EndSubmission":12.996,"Driver.Packet":14451.476,"Driver.Packet.device_lock":174.366,"Driver.Packet.dispatch":1074.459,"Driver.Packet.draw":11182.245,"Driver.Packet.execute":385.741,"Driver.Packet.flip_flush":9.448,"Driver.Packet.flush_between_packets":485.62,"Driver.Packet.memory_wait":0.012,"Driver.Packet.pipeline_drain":254.452,"Driver.Packet.pipeline_prepare":281.262,"Driver.Packet.prepare_memory":275.98,"Driver.Packet.rendering_wait":0.556,"Driver.Present":4292.643,"Driver.Present.acquire_image":3.655,"Driver.Present.device_setup":0.189,"Driver.Present.gpu_mutex_wait":83.533,"Driver.Present.inflight_wait":0.73,"Driver.Present.present_display_buffer":47.701,"Driver.Present.queue_present":103.97,"Driver.Present.release_and_callback":0.936,"Driver.Present.render_fence_wait":4050.874,"Driver.Present.resize":0.578,"Driver.Present.validate":0.207,"Driver.Suspend":0.091,"GpuMutex.wait.dispatch":0.073,"GpuMutex.wait.draw":45.664,"GpuMutex.wait.end":0.725,"GpuMutex.wait.fill":6.112,"GpuMutex.wait.flush":6.024,"GpuMutex.wait.label":5.723,"GpuMutex.wait.other":15.047,"GpuMutex.wait.present":82.743,"GpuMutex.wait.wait":4.08,"Graphics.Draw":9020.576,"Graphics.Draw.draw_and_resource_release":7064.077,"Graphics.Draw.index_upload":431.285,"Graphics.Draw.validate":745.676,"Graphics.Draw.vertex_upload":636.186,"Graphics.DrawWithRecipe":691.707,"Graphics.DrawWithRecipe.draw_and_resource_release":658.434,"Graphics.DrawWithRecipe.index_upload":5.778,"Graphics.DrawWithRecipe.validate":10.962,"Graphics.DrawWithRecipe.vertex_upload":10.554,"Recorder.Reap":153.385,"Recorder.Submit":335.203,"Recorder.WaitSerial":4249.396,"Resources.Complete":95.235,"Resources.Prepare":71.364,"Shader.DrawStage":3869.065,"Shader.DrawStage.capture_resources":1808.996,"Shader.DrawStage.materialize":987.121,"Shader.DrawStage.prepared_invocation":976.942,"Shader.ResolveAbi":141.192,"Shader.ResolveGraphicsAbi":42.675,"Shader.ResolveGraphicsStagesAbi":151.462,"VideoOut.Flip":4313.251,"VideoOut.Flip.completion_mutex_wait":0.731,"VideoOut.Flip.config_mutex_wait":0.055,"VideoOut.Flip.frame_limit":0.27,"VideoOut.Flip.notify_game":13.691,"VideoOut.Flip.present":4275.327,"VideoOut.Flip.validate":0.286,"VideoOut.Flip.vblank_wait":0.313,"VideoOut.Flip.window_prepare":0.508,"VideoOut.Flip.window_title":21.75,"VideoOut.Readiness":1.425,"VideoOut.Readiness.locks_validate":0.82,"Vulkan.Acquire":3.307,"Vulkan.Acquire.acquire_fence_wait":0.622,"Vulkan.Acquire.acquire_image":1.873,"Vulkan.Acquire.fence_reset":0.543,"Vulkan.Acquire.retired_swapchains":0.165,"Vulkan.Dispatch":195.742,"Vulkan.Dispatch.command_record":59.929,"Vulkan.Dispatch.shader_resources":134.563,"Vulkan.DispatchRecipe":0.66,"Vulkan.DispatchRecipe.command_record":0.657,"Vulkan.DrawFromRecipe":702.689,"Vulkan.Present":25.895,"Vulkan.Present.command_record_scale":8.739,"Vulkan.Present.pixel_upload":5.559,"Vulkan.Present.queue_submit":10.948,"Vulkan.QueuePresent":102.462,"Vulkan.QueuePresent.queue_present":101.695,"Vulkan.Retire":4050.528,"Vulkan.Retire.wait":4045.05},"top_phases_ms_per_frame":{"Driver.Packet":55.583,"Driver.Packet.draw":43.009,"Driver.Draw":42.164,"Graphics.Draw":34.695,"Graphics.Draw.draw_and_resource_release":27.17,"Driver.Draw.shader_compile_and_link":23.81,"VideoOut.Flip":16.589,"Driver.Present":16.51},"owned_draw_counts":{"OwnedDraw.evicted_other":874},"graphics_track":{"Graphics.Barrier.copy":1040,"Graphics.Barrier.dispatch-lead":1366,"Graphics.Barrier.dispatch-trail":2863,"Graphics.Barrier.draw":38812,"Graphics.Barrier.fill-clear":2600,"Graphics.Barrier.label-run":35933,"Graphics.Barrier.present-blit":520,"Graphics.Barrier.shadow-publish":2,"Graphics.Barrier.staging-in":2649,"Graphics.Barrier.staging-out":520,"Graphics.Barrier.storage-upload":29650,"Graphics.Barrier.storage-writeback":2444,"Graphics.BarrierMerged.dispatch-lead":1497,"Graphics.BarrierMerged.label-run":11,"Graphics.BarrierMerged.shadow-publish":2,"Graphics.BarrierMerged.staging-in":475,"Graphics.BarrierMerged.staging-out":520,"Graphics.BarrierMerged.storage-writeback":690,"Graphics.Copy":1822,"Graphics.Copy.bytes":16685856,"Graphics.RenderPass":19498,"Graphics.RenderPass.Close.command":12447,"Graphics.RenderPass.Close.image":507,"Graphics.RenderPass.Close.key":1544,"Graphics.RenderPass.Close.label":11,"Graphics.RenderPass.Close.new-batch":4990,"Graphics.RenderPass.Continued":490362},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":5.675,"events_lost":431133,"totals_full":false},"draw committer":{"events_full_after_s":12.981,"events_lost":41376,"totals_full":false}},"trace":"aps5-trace-cbef220d6cf4-42736.json.gz"}Incomplete trace: recorded data was lost. Slice-based timings, waits and batch inventories cover retained events only; missing slices are not idle time. Summary statistics are reported separately.
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)
Largest slices (ms per frame, inclusive, all threads): batch 33.5, Graphics.Draw 17.5, VideoOut.Flip 16.6, Driver.Present 16.5, VideoOut.Flip.present 16.4, Recorder.WaitSerial 16.3, Driver.Present.render_fence_wait 15.6, Vulkan.Retire 15.6, Vulkan.Retire.wait 15.6, Driver.Packet 11.4
Longest waits
Largest GPU batches (GPU ranges inside, and the CPU slices that recorded each, inclusive)
Digest: main, run 2 (commit 89b0eef)
seconds 200:15 from present 5194: 255 presents, frame p50 58.5 / p90 62.0 / p99 67.1 / max 69.0 ms, GPU busy 33.1 ms per present
NVIDIA GeForce RTX 2080 Ti, NVIDIA 617.14, Windows 10.0.26300, 3840x2160, commit 89b0eef, dropped: yes
{"commit":"89b0eef7ab42","dirty":false,"env":{"APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"200:15"},"gpu":"NVIDIA GeForce RTX 2080 Ti","driver":"NVIDIA 617.14","os":"Windows 10.0.26300","cpu":"Intel(R) Core(TM) i9-9900K CPU @ 3.60GHz","cpu_threads":16,"memory_mib":65468,"title_id":"PPSA05324","title":"Sonic Origins","content_version":"02.002.000","resolution":"3840x2160","window":{"spec":"seconds 200:15","first_present":5194,"ms":15055.259},"presents":255,"frame_ms":{"p50":58.505,"p90":61.961,"p99":67.145,"max":68.967},"gpu_busy_ms_per_present":33.051,"worker_busy_pct":{"queue worker 0x0":96.355},"phase_totals_ms":{"Driver.Completion":3.847,"Driver.Dispatch":1006.579,"Driver.Dispatch.capture_resources":16.481,"Driver.Dispatch.decode_key_device_setup":595.407,"Driver.Dispatch.lookup_cache":14.847,"Driver.Dispatch.materialize":3.051,"Driver.Dispatch.prepared_invocation":2.71,"Driver.Draw":11093.673,"Driver.Draw.device_setup":845.097,"Driver.Draw.draw_enqueued":2408.868,"Driver.Draw.post_compile_prepare":128.964,"Driver.Draw.prepare":1364.684,"Driver.Draw.shader_compile_and_link":6082.864,"Driver.EndSubmission":10.284,"Driver.Packet":14492.239,"Driver.Packet.device_lock":169.604,"Driver.Packet.dispatch":1010.467,"Driver.Packet.draw":11309.395,"Driver.Packet.execute":404.873,"Driver.Packet.flip_flush":9.694,"Driver.Packet.flush_between_packets":498.271,"Driver.Packet.memory_wait":0.031,"Driver.Packet.pipeline_drain":231.701,"Driver.Packet.pipeline_prepare":258.062,"Driver.Packet.prepare_memory":280.058,"Driver.Packet.rendering_wait":0.359,"Driver.Present":4112.169,"Driver.Present.acquire_image":3.476,"Driver.Present.device_setup":0.258,"Driver.Present.gpu_mutex_wait":58.89,"Driver.Present.inflight_wait":0.735,"Driver.Present.present_display_buffer":44.461,"Driver.Present.queue_present":103.713,"Driver.Present.release_and_callback":0.898,"Driver.Present.render_fence_wait":3898.845,"Driver.Present.resize":0.625,"Driver.Present.validate":0.069,"Driver.Suspend":0.113,"GpuMutex.wait.dispatch":0.015,"GpuMutex.wait.draw":57.28,"GpuMutex.wait.end":0.824,"GpuMutex.wait.fill":2.807,"GpuMutex.wait.flush":2.64,"GpuMutex.wait.label":3.93,"GpuMutex.wait.other":10.427,"GpuMutex.wait.present":58.179,"GpuMutex.wait.wait":3.185,"Graphics.Draw":8617.884,"Graphics.Draw.draw_and_resource_release":6772.069,"Graphics.Draw.index_upload":378.614,"Graphics.Draw.validate":700.264,"Graphics.Draw.vertex_upload":597.805,"Graphics.DrawWithRecipe":666.769,"Graphics.DrawWithRecipe.draw_and_resource_release":636.81,"Graphics.DrawWithRecipe.index_upload":4.262,"Graphics.DrawWithRecipe.validate":9.919,"Graphics.DrawWithRecipe.vertex_upload":9.6,"Recorder.Reap":147.864,"Recorder.Submit":325.743,"Recorder.WaitSerial":4070.948,"Resources.Complete":99.553,"Resources.Prepare":76.75,"Shader.DrawStage":3967.114,"Shader.DrawStage.capture_resources":1757.885,"Shader.DrawStage.materialize":1114.763,"Shader.DrawStage.prepared_invocation":988.246,"Shader.ResolveAbi":142.974,"Shader.ResolveGraphicsAbi":41.859,"Shader.ResolveGraphicsStagesAbi":146.054,"VideoOut.Flip":4149.487,"VideoOut.Flip.completion_mutex_wait":0.685,"VideoOut.Flip.config_mutex_wait":0.045,"VideoOut.Flip.frame_limit":0.235,"VideoOut.Flip.notify_game":29.394,"VideoOut.Flip.present":4095.147,"VideoOut.Flip.validate":0.385,"VideoOut.Flip.vblank_wait":0.225,"VideoOut.Flip.window_prepare":0.48,"VideoOut.Flip.window_title":22.589,"VideoOut.Readiness":1.224,"VideoOut.Readiness.locks_validate":0.707,"Vulkan.Acquire":3.136,"Vulkan.Acquire.acquire_fence_wait":0.505,"Vulkan.Acquire.acquire_image":1.792,"Vulkan.Acquire.fence_reset":0.56,"Vulkan.Acquire.retired_swapchains":0.178,"Vulkan.Dispatch":198.231,"Vulkan.Dispatch.command_record":61.121,"Vulkan.Dispatch.shader_resources":135.735,"Vulkan.DispatchRecipe":0.987,"Vulkan.DispatchRecipe.command_record":0.985,"Vulkan.DrawFromRecipe":676.891,"Vulkan.Present":23.051,"Vulkan.Present.command_record_scale":8.513,"Vulkan.Present.pixel_upload":3.951,"Vulkan.Present.queue_submit":10.246,"Vulkan.QueuePresent":102.581,"Vulkan.QueuePresent.queue_present":101.747,"Vulkan.Retire":3898.357,"Vulkan.Retire.wait":3892.688},"top_phases_ms_per_frame":{"Driver.Packet":56.832,"Driver.Packet.draw":44.351,"Driver.Draw":43.505,"Graphics.Draw":33.796,"Graphics.Draw.draw_and_resource_release":26.557,"Driver.Draw.shader_compile_and_link":23.854,"VideoOut.Flip":16.272,"Driver.Present":16.126},"owned_draw_counts":{"OwnedDraw.evicted_other":877},"graphics_track":{"Graphics.Barrier.copy":1020,"Graphics.Barrier.dispatch-lead":1297,"Graphics.Barrier.dispatch-trail":2808,"Graphics.Barrier.draw":38071,"Graphics.Barrier.fill-clear":2550,"Graphics.Barrier.label-run":35269,"Graphics.Barrier.present-blit":510,"Graphics.Barrier.shadow-publish":2,"Graphics.Barrier.staging-in":2916,"Graphics.Barrier.staging-out":510,"Graphics.Barrier.storage-upload":29080,"Graphics.Barrier.storage-writeback":2399,"Graphics.BarrierMerged.dispatch-lead":1511,"Graphics.BarrierMerged.label-run":14,"Graphics.BarrierMerged.shadow-publish":2,"Graphics.BarrierMerged.staging-in":658,"Graphics.BarrierMerged.staging-out":510,"Graphics.BarrierMerged.storage-writeback":675,"Graphics.Copy":2297,"Graphics.Copy.bytes":16373136,"Graphics.RenderPass":19129,"Graphics.RenderPass.Close.command":12231,"Graphics.RenderPass.Close.image":478,"Graphics.RenderPass.Close.key":1516,"Graphics.RenderPass.Close.label":14,"Graphics.RenderPass.Close.new-batch":4890,"Graphics.RenderPass.Continued":480927},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":5.408,"events_lost":468886,"totals_full":false},"draw committer":{"events_full_after_s":14.612,"events_lost":8128,"totals_full":false}},"trace":"aps5-trace-89b0eef7ab42-2192.json.gz"}Incomplete trace: recorded data was lost. Slice-based timings, waits and batch inventories cover retained events only; missing slices are not idle time. Summary statistics are reported separately.
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)
Largest slices (ms per frame, inclusive, all threads): batch 32.9, Graphics.Draw 18.9, VideoOut.Flip 16.3, Driver.Present 16.1, VideoOut.Flip.present 16.1, Recorder.WaitSerial 16.0, Driver.Present.render_fence_wait 15.3, Vulkan.Retire 15.3, Vulkan.Retire.wait 15.3, Driver.Packet 11.5
Longest waits
Largest GPU batches (GPU ranges inside, and the CPU slices that recorded each, inclusive)
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)