Skip to content

perf(agc): serve freed host blocks up to 4 KB from a per-thread cache - #24515

Merged
oneandonlydean merged 1 commit into
boykopovar:mainfrom
Meh7an:perf/agc-large-block-cache
Nov 21, 2026
Merged

oneandonlydean merged 1 commit into
boykopovar:mainfrom
Meh7an:perf/agc-large-block-cache

Conversation

@Meh7an

@Meh7an Meh7an commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

What

The host allocator caches freed blocks per thread only up to 1 KB. On the Sonic Origins S3K menu page every draw allocates blocks over that on the queue worker: the DrawTail (1568 B with its control block), the patched RecompileResult copy's control block (2136 B), that copy's three-binding DescriptorBinding vector (1368 B), and a 3680 B block on one draw in five. That is about 120 k allocations per second, all freed on the same thread, and each one goes to the system heap (malloc, about 125 ns). In the sampler it is 58 and 48 of the worker's 3,843 samples in two windows of main (1.5 and 1.25%); their frees add about 0.4%. The draw's commit closure (680 B) is already under the cache limit.

This change extends the size classes from 1 KB to 4 KB for blocks the cache keeps:

  • A class over 1 KB keeps at most 256 KB of blocks, and a thread keeps at most 4 MB of blocks over 1 KB. There is no depot for them: their flow is same-thread (the census below), so a block freed by one thread is not handed to another.
  • Every 65,536 frees of blocks over 1 KB, a thread frees the stock of every class that nothing was taken from since the last trim. A class that is only ever freed into (a thread that frees blocks it did not allocate) would otherwise hold the budget and starve the classes in use.
  • Classes up to 1 KB, their depot, and the size kept in the free-list link (perf(agc): keep a freed host block's size instead of asking the heap #22554) are unchanged. A block of 4097 to 4111 bytes is filed in the largest class, as blocks 1 to 15 bytes over 1 KB were before.

What did not work first. A 512 KB budget with a trim that counted a free as use served only 3 to 14% of the worker's allocations of the four hot classes: blocks that were only freed into never looked idle and filled the budget (failbudget was 95% of the misses). Counting pops only fixed it, and then the hot classes needed a few MB, which is where the 4 MB limit comes from (high-water stock per class on the worker: 1568 B 72 blocks, 2144 B 58, 1376 B 526, 3680 B 451).

What it does and does not show. The worker's over-1 KB allocation path leaves its top call sites and its allocator share falls by about 1 point (below). The committer's allocator share rose by about 0.5 point in the sampler, and the frame difference is inside the run-to-run noise of this scene (main alone spans 17.13 to 17.68 FPS in sampler windows and 17.99 to 18.48 in traced runs). One point of worker time is about 0.6 ms of a 58 ms frame, so even if all of it reached the frame the gain would be about 1%, below what four pairs can resolve. I am proposing it for the drop in the targeted work, not for a measured frame-rate gain.

Memory. At most 4 MB per thread for blocks over 1 KB, held only by threads that free such blocks (here the queue worker, the draw committer and one more thread). A thread that ends gives its blocks back to the heap, as before for the small classes.

Overlap: tools/pr_overlap.py over 2,267 open PRs finds one that shares a file: #16753 adds an include at line 1 of tests/HostAllocator.cpp, next to the <algorithm> include this change adds (a one-line textual conflict for whichever lands second). No open PR touches HostAllocator.cpp. The commit merges cleanly onto main e481b135558f, 27 commits after the measured base, none of them in the allocator files.

Tested

Windows 11 (10.0.26300), NVIDIA GeForce RTX 2080 Ti (driver 610.88), Intel Core i9-9900K. Sonic Origins (PPSA05324) menu on the S3K page, 3840x2160, default environment. Measured commits: main 42f6354612c9 and this commit (9a8304ae075f) on top of it, built in the same build directory; no other PR or commit is needed. In traced runs 1 and 2 the change ran as the same diff before it was committed (the trace says dirty).

Census (counting build on the same page, not part of this PR): worker, 35.9 k draws per second, allocations over 1 KB per draw: 1568 B 1.00, 2136 B 1.00, 1368 B 0.96, 3680 B 0.20, every one freed on the worker. Committer: 1 to 2 KB blocks at 14 k per second (1984 B 7.4 k, allocated and freed on the committer).

Sampler (APS5_SAMPLE_WORKER and APS5_SAMPLE_COMMITTER, one 60 s window per arm on the S3K page, 3,843 samples per thread, two orders; system DLL time is charged to the driver frame that called it):

main (window 1 / 2) this PR (window 1 / 2)
worker: operator new + operator delete, with what they call 10.72 / 10.49% 10.10 / 9.24%
worker: operator new into the system heap (samples) 150 / 123 89 / 89
committer: operator new + operator delete 4.89 / 5.26% 5.59 / 5.68%
worker blocked in DrawPipeline::Enqueue 12.0 / 12.7% 13.3 / 13.9%
sampler-run FPS 17.68 / 17.64 17.31 / 17.24

Window 1 ran the PR first and main second; window 2 the reverse. The sampler suspends each thread about every 20 ms and lowers the FPS it reads by about 0.6.

Traced runs (APS5_TRACE_SECONDS=200:15, same page, quiet machine, eight runs in four pairs, both orders; walker FPS, then tools/trace_digest.py frame times and GPU busy per present):

Run Arm FPS presents p50 ms p90 ms p99 ms GPU busy ms
1 main 17.99 241 61.8 66.3 72.6 31.5
1 PR (uncommitted) 18.31 250 59.8 62.9 68.6 31.6
2 PR (uncommitted) 18.60 250 59.3 63.3 66.8 31.6
2 main 18.15 243 61.0 65.0 70.5 31.8
3 main 18.06 238 62.6 65.8 69.1 33.1
3 PR 17.86 239 62.2 67.7 74.7 31.5
4 PR 18.64 243 60.6 66.4 85.3 31.2
4 main 18.48 250 59.2 64.0 70.0 31.0
mean main 18.17 243 61.15 65.28 70.55 31.9
mean PR 18.35 245.5 60.48 65.08 73.85 31.5

The pairs read +1.8, +2.5, -1.1 and +0.9% in FPS. The PR's p99 is worse by one 122 ms stall in run 4. In the retained trace events the queue worker is busy 12.70 ms per frame (main) against 12.65 (PR) and the draw committer 24.62 against 24.43: inside the noise. The worker's trace buffer fills after about 5.8 s and the committer's after about 14 s in every run, so per-thread slice times cover retained events only. The eight traces are attached as one zip per run (listed after this paragraph); the digests of the four runs whose commits differ (3 and 4) are below.

Trace zips, in table order (main 1, PR 1, PR 2, main 2, main 3, PR 3, PR 4, main 4):

Hit rate. A diagnostic build of this design with a 16 MB budget and a 4 MB class cap (not part of this PR) served 91 to 95% of the worker's allocations of the four hot classes from the cache. The committed 4 MB and 256 KB limits were not instrumented, so their hit rate is not measured.

Tests (agc_driver_host_allocator): the existing checks now cover sizes up to 4096 and run on fresh threads or in chunks of sizes, because a thread's large budget carries over between checks. New checks:

  • one class keeps no more than its share, and blocks taken from the cache leave the byte count;
  • a thread keeps no more than its budget, also while taking and returning blocks;
  • classes that were only filled give their blocks back across a trim, and so do classes that are only freed into, while a class in use keeps both its blocks across a trim;
  • the thread that frees large blocks keeps them, the thread that allocated them keeps none;
  • large blocks freed on another thread, and blocks of ended threads, do not pile up in private bytes;
  • vectors and strings grown past 4 KB keep their contents, and blocks 1 to 15 bytes over 4096 serve the largest class.

Broken copies of the change, each built against these tests, are caught in 10 of 10 cases: the thread budget not enforced, the class share not enforced, a pop or a trim leaving the byte count, no trim, a trim that frees the classes in use, a free counted as use, a pop not counted as use, the largest class back at 1 KB, and a large block filed by its class size instead of the size it holds.

The focused set passes identically on main and on this change under Vulkan validation: 63 tests matched, 43 passed, 0 failed, 0 VUID- lines, no layer-missing line (ANYPS5_REQUIRE_VULKAN=1, ANYPS5_NO_SHADER_CACHE=1, VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation). 18 of them are skipped by this build's ANYPS5_AGC_EXECUTION_TESTS list and 2 (agc_shader_result_memo_budget, agc_vertex_layer_export) were not run on either arm because objcopy failed after linking their executables. Full ctest was not run. tools/check_conventions.py passes.

Digest: main, run 3 (commit 42f6354)

seconds 200:15 from present 4485: 238 presents, frame p50 62.6 / p90 65.8 / p99 69.1 / max 71.0 ms, GPU busy 33.1 ms per present
NVIDIA GeForce RTX 2080 Ti, NVIDIA 610.88, Windows 10.0.26300, 3840x2160, commit 42f6354, dropped: yes

{"commit":"42f6354612c9","dirty":false,"env":{"APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"200:15"},"gpu":"NVIDIA GeForce RTX 2080 Ti","driver":"NVIDIA 610.88","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":4485,"ms":15025.332},"presents":238,"frame_ms":{"p50":62.617,"p90":65.788,"p99":69.087,"max":71.009},"gpu_busy_ms_per_present":33.083,"worker_busy_pct":{"queue worker 0x0":96.665},"phase_totals_ms":{"Driver.Completion":2.05,"Driver.Dispatch":1082.613,"Driver.Dispatch.capture_resources":16.076,"Driver.Dispatch.decode_key_device_setup":710.05,"Driver.Dispatch.lookup_cache":14.39,"Driver.Dispatch.materialize":3.576,"Driver.Dispatch.prepared_invocation":2.992,"Driver.Draw":10984.747,"Driver.Draw.device_setup":788.798,"Driver.Draw.draw_enqueued":2421.886,"Driver.Draw.post_compile_prepare":185.985,"Driver.Draw.prepare":1362.044,"Driver.Draw.shader_compile_and_link":5980.765,"Driver.EndSubmission":11.649,"Driver.Packet":14510.457,"Driver.Packet.device_lock":171.511,"Driver.Packet.dispatch":1086.557,"Driver.Packet.draw":11201.111,"Driver.Packet.execute":406.143,"Driver.Packet.flip_flush":6.834,"Driver.Packet.flush_between_packets":479.884,"Driver.Packet.memory_wait":0.002,"Driver.Packet.pipeline_drain":242.752,"Driver.Packet.pipeline_prepare":252.943,"Driver.Packet.prepare_memory":273.776,"Driver.Packet.rendering_wait":0.449,"Driver.Present":3440.936,"Driver.Present.acquire_image":3.426,"Driver.Present.device_setup":0.27,"Driver.Present.gpu_mutex_wait":158.613,"Driver.Present.inflight_wait":0.761,"Driver.Present.present_display_buffer":43.699,"Driver.Present.queue_present":46.759,"Driver.Present.release_and_callback":0.869,"Driver.Present.render_fence_wait":3185.71,"Driver.Present.resize":0.577,"Driver.Present.validate":0.078,"Driver.Suspend":0.062,"GpuMutex.wait.dispatch":0.079,"GpuMutex.wait.draw":62.834,"GpuMutex.wait.end":1.873,"GpuMutex.wait.fill":8.592,"GpuMutex.wait.flush":0.351,"GpuMutex.wait.label":6.543,"GpuMutex.wait.other":8.235,"GpuMutex.wait.present":157.688,"GpuMutex.wait.wait":2.838,"Graphics.Draw":9210.027,"Graphics.Draw.draw_and_resource_release":7044.578,"Graphics.Draw.index_upload":462.127,"Graphics.Draw.validate":785.261,"Graphics.Draw.vertex_upload":771.735,"Graphics.DrawWithRecipe":690.999,"Graphics.DrawWithRecipe.draw_and_resource_release":661.267,"Graphics.DrawWithRecipe.index_upload":4.643,"Graphics.DrawWithRecipe.validate":10.819,"Graphics.DrawWithRecipe.vertex_upload":9.546,"Recorder.Reap":134.561,"Recorder.Submit":457.955,"Recorder.WaitSerial":3396.464,"Resources.Complete":97.936,"Resources.Prepare":53.554,"Shader.DrawStage":3931.985,"Shader.DrawStage.capture_resources":1791.026,"Shader.DrawStage.materialize":1067.223,"Shader.DrawStage.prepared_invocation":986.818,"Shader.ResolveAbi":170.021,"Shader.ResolveGraphicsAbi":62.707,"Shader.ResolveGraphicsStagesAbi":169.766,"VideoOut.Flip":3440.944,"VideoOut.Flip.completion_mutex_wait":0.363,"VideoOut.Flip.config_mutex_wait":0.026,"VideoOut.Flip.frame_limit":0.166,"VideoOut.Flip.notify_game":9.822,"VideoOut.Flip.present":3427.229,"VideoOut.Flip.validate":0.433,"VideoOut.Flip.vblank_wait":0.168,"VideoOut.Flip.window_prepare":0.422,"VideoOut.Flip.window_title":1.94,"VideoOut.Readiness":1.559,"VideoOut.Readiness.locks_validate":0.893,"Vulkan.Acquire":3.107,"Vulkan.Acquire.acquire_fence_wait":0.542,"Vulkan.Acquire.acquire_image":1.643,"Vulkan.Acquire.fence_reset":0.682,"Vulkan.Acquire.retired_swapchains":0.159,"Vulkan.Dispatch":179.836,"Vulkan.Dispatch.command_record":58.398,"Vulkan.Dispatch.shader_resources":120.176,"Vulkan.DispatchRecipe":0.631,"Vulkan.DispatchRecipe.command_record":0.63,"Vulkan.DrawFromRecipe":700.457,"Vulkan.Present":23.387,"Vulkan.Present.command_record_scale":8.241,"Vulkan.Present.pixel_upload":3.23,"Vulkan.Present.queue_submit":11.629,"Vulkan.QueuePresent":45.603,"Vulkan.QueuePresent.queue_present":45.207,"Vulkan.Retire":3185.093,"Vulkan.Retire.wait":3179.375},"top_phases_ms_per_frame":{"Driver.Packet":60.968,"Driver.Packet.draw":47.063,"Driver.Draw":46.154,"Graphics.Draw":38.698,"Graphics.Draw.draw_and_resource_release":29.599,"Driver.Draw.shader_compile_and_link":25.129,"Shader.DrawStage":16.521,"VideoOut.Flip":14.458},"owned_draw_counts":{"OwnedDraw.evicted_other":942},"graphics_track":{"Graphics.Barrier.copy":952,"Graphics.Barrier.dispatch-lead":1471,"Graphics.Barrier.dispatch-trail":2621,"Graphics.Barrier.draw":39127,"Graphics.Barrier.fill-clear":2380,"Graphics.Barrier.label-run":40720,"Graphics.Barrier.present-blit":476,"Graphics.Barrier.shadow-publish":2,"Graphics.Barrier.staging-in":2228,"Graphics.Barrier.staging-out":476,"Graphics.Barrier.storage-upload":27142,"Graphics.Barrier.storage-writeback":2476,"Graphics.BarrierMerged.dispatch-lead":1150,"Graphics.BarrierMerged.shadow-publish":2,"Graphics.BarrierMerged.staging-in":156,"Graphics.BarrierMerged.staging-out":476,"Graphics.BarrierMerged.storage-writeback":393,"Graphics.Copy":1430,"Graphics.Copy.bytes":15262560,"Graphics.RenderPass":19262,"Graphics.RenderPass.Close.command":7322,"Graphics.RenderPass.Close.image":26,"Graphics.RenderPass.Close.key":935,"Graphics.RenderPass.Close.new-batch":10979,"Graphics.RenderPass.Continued":481566},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":5.742,"events_lost":424071,"totals_full":false},"draw committer":{"events_full_after_s":13.815,"events_lost":22748,"totals_full":false}},"trace":"aps5-trace-42f6354612c9-29200.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.

  • queue worker 0x0: 424071 events lost; buffer full at 5741.7 ms; over the 90 of 238 frames that ended before it: busy 34.3 ms per frame (54 %), wait 0.0, largest Driver.Packet 34.2, Driver.EndSubmission 0.0 (the thread table divides the retained slices by every frame)
  • draw committer: 22748 events lost; buffer full at 13815.0 ms; over the 218 of 238 frames that ended before it: busy 27.3 ms per frame (43 %), wait 0.4, largest Graphics.Draw 22.8, Vulkan.DrawFromRecipe 2.7 (the thread table divides the retained slices by every frame)

Slowest frames (largest slices inside each, inclusive)

  • present 4626: 71.0 ms at 8920 ms: batch (gpu) 35.4, Graphics.Draw (draw committer) 27.7, VideoOut.Flip (presenter) 15.8, VideoOut.Flip.present (presenter) 15.7
  • present 4515: 70.9 ms at 1907 ms: Driver.Packet (queue worker 0x0) 45.7, Driver.Packet.draw (queue worker 0x0) 38.7, Driver.Draw (queue worker 0x0) 37.3, batch (gpu) 31.7
  • present 4578: 69.1 ms at 5879 ms: batch (gpu) 37.3, Graphics.Draw (draw committer) 27.3, Graphics.Draw.draw_and_resource_release (draw committer) 19.7, VideoOut.Flip (presenter) 14.6
  • present 4594: 68.9 ms at 6891 ms: batch (gpu) 33.5, Graphics.Draw (draw committer) 26.7, Graphics.Draw.draw_and_resource_release (draw committer) 18.8, VideoOut.Flip (presenter) 15.4
  • present 4689: 68.6 ms at 12888 ms: batch (gpu) 31.3, Graphics.Draw (draw committer) 27.2, Graphics.Draw.draw_and_resource_release (draw committer) 19.5, VideoOut.Flip (presenter) 12.6

Persistent spikes (frame time above the fastest frame that separates it from a longer frame; one entry per stall, not per frame)

  • present 4626: 71.0 ms at 8920 ms, persistence 11.5 ms
  • present 4515: 70.9 ms at 1907 ms, persistence 11.3 ms
  • present 4594: 68.9 ms at 6891 ms, persistence 9.1 ms
  • present 4578: 69.1 ms at 5879 ms, persistence 8.9 ms
  • present 4689: 68.6 ms at 12888 ms, persistence 8.0 ms
  • present 4493: 68.0 ms at 508 ms, persistence 7.8 ms
  • present 4673: 68.3 ms at 11877 ms, persistence 7.7 ms
  • present 4499: 68.6 ms at 887 ms, persistence 7.6 ms
  • present 4721: 68.4 ms at 14892 ms, persistence 7.5 ms
  • present 4531: 67.8 ms at 2921 ms, persistence 6.9 ms

Threads (ms per frame)

thread busy wait untraced in slices < 20 us largest
title 0.1 (0 %) 14.3 (23 %) 48.8 0.5 Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveAbi 0.0
queue worker 0x0 13.1 (21 %) 0.0 (0 %) 50.1 51.5 Driver.Packet 13.1, Driver.EndSubmission 0.0
draw committer 25.0 (40 %) 0.3 (1 %) 37.7 38.9 Graphics.Draw 21.0, Vulkan.DrawFromRecipe 2.5
title 0.0 (0 %) 0.0 (0 %) 63.1 0.1 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 63.1 0.1 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 63.1 0.1 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 63.1 0.1 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
presenter 0.5 (1 %) 14.0 (22 %) 48.6 0.1 VideoOut.Flip 14.5, Driver.Present 0.1
title 0.0 (0 %) 0.0 (0 %) 63.1 0.1 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 63.1 0.1 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 63.1 0.1 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 63.1 0.1 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 63.1 0.1 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 63.1 0.1 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 63.1 0.1 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 63.1 0.1 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
gpu 32.9 (52 %) 0.0 (0 %) 30.2 0.0 batch 32.9

Largest slices (ms per frame, inclusive, all threads): batch 32.9, Graphics.Draw 21.0, VideoOut.Flip 14.5, Driver.Present 14.5, VideoOut.Flip.present 14.4, Recorder.WaitSerial 14.3, Driver.Present.render_fence_wait 13.4, Vulkan.Retire 13.4, Vulkan.Retire.wait 13.4, Driver.Packet 13.1

Longest waits

  • Recorder.WaitSerial (title) 16.6 ms at 7288 ms, present 4599
  • Recorder.WaitSerial (title) 16.5 ms at 4747 ms, present 4559
  • Recorder.WaitSerial (title) 16.4 ms at 10184 ms, present 4646
  • Recorder.WaitSerial (title) 16.3 ms at 12450 ms, present 4682
  • Recorder.WaitSerial (title) 16.2 ms at 826 ms, present 4497
  • Recorder.WaitSerial (title) 16.2 ms at 13457 ms, present 4697
  • Recorder.WaitSerial (title) 16.1 ms at 1716 ms, present 4511
  • Recorder.WaitSerial (title) 16.0 ms at 1088 ms, present 4501
  • Recorder.WaitSerial (title) 16.0 ms at 319 ms, present 4489
  • Driver.Present.render_fence_wait (presenter) 16.0 ms at 12450 ms, present 4682

Largest GPU batches (GPU ranges inside, and the CPU slices that recorded each, inclusive)

  • batch 6354: 6.5 ms at 6010 ms, present 4579: GPU no ranges; recorded by Vulkan.DrawFromRecipe (draw committer) 0.1, Graphics.DrawWithRecipe (draw committer) 0.1, Graphics.DrawWithRecipe.draw_and_resource_release (draw committer) 0.1
  • batch 5417: 6.4 ms at 5125 ms, present 4565: GPU no ranges; recorded by Driver.Packet (queue worker 0x0) 7.2, Driver.Packet.draw (queue worker 0x0) 4.1, Driver.Draw (queue worker 0x0) 4.0, Driver.Packet.dispatch (queue worker 0x0) 2.6
  • batch 6419: 6.2 ms at 6077 ms, present 4580: GPU no ranges; recorded by Vulkan.DrawFromRecipe (draw committer) 0.1, Graphics.DrawWithRecipe (draw committer) 0.1, Graphics.DrawWithRecipe.draw_and_resource_release (draw committer) 0.1
  • batch 2914: 6.2 ms at 2792 ms, present 4528: GPU no ranges; recorded by no CPU slices
  • batch 12930: 6.2 ms at 12193 ms, present 4677: GPU no ranges; recorded by Vulkan.DrawFromRecipe (draw committer) 0.1, Graphics.DrawWithRecipe (draw committer) 0.1, Graphics.DrawWithRecipe.draw_and_resource_release (draw committer) 0.1
Digest: this PR, run 3 (commit 9a8304a)

seconds 200:15 from present 4516: 239 presents, frame p50 62.2 / p90 67.7 / p99 74.7 / max 80.6 ms, GPU busy 31.5 ms per present
NVIDIA GeForce RTX 2080 Ti, NVIDIA 610.88, Windows 10.0.26300, 3840x2160, commit 9a8304a, dropped: yes

{"commit":"9a8304ae075f","dirty":false,"env":{"APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"200:15"},"gpu":"NVIDIA GeForce RTX 2080 Ti","driver":"NVIDIA 610.88","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":4516,"ms":15021.488},"presents":239,"frame_ms":{"p50":62.22,"p90":67.721,"p99":74.721,"max":80.632},"gpu_busy_ms_per_present":31.48,"worker_busy_pct":{"queue worker 0x0":96.619},"phase_totals_ms":{"Driver.Completion":3.328,"Driver.Dispatch":1154.63,"Driver.Dispatch.capture_resources":17.641,"Driver.Dispatch.decode_key_device_setup":771.755,"Driver.Dispatch.lookup_cache":15.264,"Driver.Dispatch.materialize":3.441,"Driver.Dispatch.prepared_invocation":3.257,"Driver.Draw":10824.127,"Driver.Draw.device_setup":735.18,"Driver.Draw.draw_enqueued":2394.296,"Driver.Draw.post_compile_prepare":183.951,"Driver.Draw.prepare":1306.196,"Driver.Draw.shader_compile_and_link":5960.871,"Driver.EndSubmission":33.92,"Driver.Packet":14476.303,"Driver.Packet.device_lock":170.224,"Driver.Packet.dispatch":1158.763,"Driver.Packet.draw":11031.82,"Driver.Packet.execute":413.45,"Driver.Packet.flip_flush":8.075,"Driver.Packet.flush_between_packets":475.396,"Driver.Packet.memory_wait":0.009,"Driver.Packet.pipeline_drain":274.262,"Driver.Packet.pipeline_prepare":253.814,"Driver.Packet.prepare_memory":269.374,"Driver.Packet.rendering_wait":0.657,"Driver.Present":3031.643,"Driver.Present.acquire_image":3.54,"Driver.Present.device_setup":0.275,"Driver.Present.gpu_mutex_wait":79.294,"Driver.Present.inflight_wait":0.606,"Driver.Present.present_display_buffer":43.089,"Driver.Present.queue_present":45.276,"Driver.Present.release_and_callback":0.783,"Driver.Present.render_fence_wait":2857.688,"Driver.Present.resize":0.639,"Driver.Present.validate":0.145,"Driver.Suspend":0.091,"GpuMutex.wait.dispatch":0.048,"GpuMutex.wait.draw":54.938,"GpuMutex.wait.end":1.217,"GpuMutex.wait.fill":4.658,"GpuMutex.wait.flush":0.674,"GpuMutex.wait.label":4.969,"GpuMutex.wait.other":4.719,"GpuMutex.wait.present":78.528,"GpuMutex.wait.wait":3.832,"Graphics.Draw":9142.825,"Graphics.Draw.draw_and_resource_release":6991.612,"Graphics.Draw.index_upload":463.917,"Graphics.Draw.validate":799.105,"Graphics.Draw.vertex_upload":741.309,"Graphics.DrawWithRecipe":652.507,"Graphics.DrawWithRecipe.draw_and_resource_release":625.928,"Graphics.DrawWithRecipe.index_upload":3.498,"Graphics.DrawWithRecipe.validate":10.013,"Graphics.DrawWithRecipe.vertex_upload":8.495,"Recorder.Reap":132.698,"Recorder.Submit":514.773,"Recorder.WaitSerial":2996.287,"Resources.Complete":103.873,"Resources.Prepare":70.559,"Shader.DrawStage":3948.058,"Shader.DrawStage.capture_resources":1826.339,"Shader.DrawStage.materialize":1065.168,"Shader.DrawStage.prepared_invocation":964.172,"Shader.ResolveAbi":155.553,"Shader.ResolveGraphicsAbi":65.632,"Shader.ResolveGraphicsStagesAbi":150.202,"VideoOut.Flip":3034.61,"VideoOut.Flip.completion_mutex_wait":0.451,"VideoOut.Flip.config_mutex_wait":0.026,"VideoOut.Flip.frame_limit":0.19,"VideoOut.Flip.notify_game":11.625,"VideoOut.Flip.present":3018.987,"VideoOut.Flip.validate":0.304,"VideoOut.Flip.vblank_wait":0.224,"VideoOut.Flip.window_prepare":0.499,"VideoOut.Flip.window_title":1.999,"VideoOut.Readiness":1.038,"VideoOut.Readiness.locks_validate":0.429,"Vulkan.Acquire":3.248,"Vulkan.Acquire.acquire_fence_wait":0.601,"Vulkan.Acquire.acquire_image":1.648,"Vulkan.Acquire.fence_reset":0.705,"Vulkan.Acquire.retired_swapchains":0.137,"Vulkan.Dispatch":176.892,"Vulkan.Dispatch.command_record":55.641,"Vulkan.Dispatch.shader_resources":120.135,"Vulkan.DispatchRecipe":1.593,"Vulkan.DispatchRecipe.command_record":1.586,"Vulkan.DrawFromRecipe":660.326,"Vulkan.Present":23.063,"Vulkan.Present.command_record_scale":8.596,"Vulkan.Present.pixel_upload":2.362,"Vulkan.Present.queue_submit":11.797,"Vulkan.QueuePresent":44.375,"Vulkan.QueuePresent.queue_present":44.047,"Vulkan.Retire":2857.063,"Vulkan.Retire.wait":2851.471},"top_phases_ms_per_frame":{"Driver.Packet":60.57,"Driver.Packet.draw":46.158,"Driver.Draw":45.289,"Graphics.Draw":38.254,"Graphics.Draw.draw_and_resource_release":29.254,"Driver.Draw.shader_compile_and_link":24.941,"Shader.DrawStage":16.519,"VideoOut.Flip":12.697},"owned_draw_counts":{"OwnedDraw.evicted_other":1208},"graphics_track":{"Graphics.Barrier.copy":956,"Graphics.Barrier.dispatch-lead":1333,"Graphics.Barrier.dispatch-trail":2632,"Graphics.Barrier.draw":39539,"Graphics.Barrier.fill-clear":2390,"Graphics.Barrier.input-mirror":178,"Graphics.Barrier.label-run":40940,"Graphics.Barrier.present-blit":478,"Graphics.Barrier.shadow-publish":2,"Graphics.Barrier.staging-in":2840,"Graphics.Barrier.staging-out":478,"Graphics.Barrier.storage-upload":27256,"Graphics.Barrier.storage-writeback":2505,"Graphics.BarrierMerged.dispatch-lead":1299,"Graphics.BarrierMerged.label-run":7,"Graphics.BarrierMerged.shadow-publish":2,"Graphics.BarrierMerged.staging-in":510,"Graphics.BarrierMerged.staging-out":478,"Graphics.BarrierMerged.storage-writeback":376,"Graphics.Copy":2331,"Graphics.Copy.bytes":15810760,"Graphics.RenderPass":19467,"Graphics.RenderPass.Close.command":7408,"Graphics.RenderPass.Close.image":11,"Graphics.RenderPass.Close.key":958,"Graphics.RenderPass.Close.label":7,"Graphics.RenderPass.Close.new-batch":11083,"Graphics.RenderPass.Continued":484837},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":5.893,"events_lost":406948,"totals_full":false},"draw committer":{"events_full_after_s":14.379,"events_lost":11685,"totals_full":false}},"trace":"aps5-trace-9a8304ae075f-37740.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.

  • queue worker 0x0: 406948 events lost; buffer full at 5892.6 ms; over the 94 of 239 frames that ended before it: busy 33.2 ms per frame (53 %), wait 0.0, largest Driver.Packet 33.1, Driver.EndSubmission 0.1 (the thread table divides the retained slices by every frame)
  • draw committer: 11685 events lost; buffer full at 14379.0 ms; over the 228 of 239 frames that ended before it: busy 26.6 ms per frame (42 %), wait 0.3, largest Graphics.Draw 21.8, Vulkan.DrawFromRecipe 2.6 (the thread table divides the retained slices by every frame)

Slowest frames (largest slices inside each, inclusive)

  • present 4566: 80.6 ms at 3101 ms: Driver.Packet (queue worker 0x0) 50.1, batch (gpu) 45.4, Graphics.Draw (draw committer) 29.0, Driver.Packet.draw (queue worker 0x0) 26.4
  • present 4670: 80.5 ms at 9642 ms: batch (gpu) 40.4, Graphics.Draw (draw committer) 22.4, Graphics.Draw.draw_and_resource_release (draw committer) 11.2, VideoOut.Flip (presenter) 9.4
  • present 4744: 74.7 ms at 14327 ms: batch (gpu) 34.6, VideoOut.Flip (presenter) 14.6, VideoOut.Flip.present (presenter) 14.6, Driver.Present (presenter) 14.6
  • present 4612: 73.9 ms at 5998 ms: batch (gpu) 33.1, Graphics.Draw (draw committer) 26.9, Graphics.Draw.draw_and_resource_release (draw committer) 15.3, VideoOut.Flip (presenter) 13.2
  • present 4735: 72.8 ms at 13750 ms: batch (gpu) 38.5, Graphics.Draw (draw committer) 26.3, Graphics.Draw.draw_and_resource_release (draw committer) 14.4, VideoOut.Flip (presenter) 10.9

Persistent spikes (frame time above the fastest frame that separates it from a longer frame; one entry per stall, not per frame)

  • present 4566: 80.6 ms at 3101 ms, persistence 25.8 ms
  • present 4670: 80.5 ms at 9642 ms, persistence 24.7 ms
  • present 4744: 74.7 ms at 14327 ms, persistence 19.3 ms
  • present 4612: 73.9 ms at 5998 ms, persistence 17.0 ms
  • present 4735: 72.8 ms at 13750 ms, persistence 13.4 ms
  • present 4524: 68.0 ms at 499 ms, persistence 13.2 ms
  • present 4589: 68.8 ms at 4547 ms, persistence 12.9 ms
  • present 4726: 72.4 ms at 13170 ms, persistence 12.1 ms
  • present 4646: 70.6 ms at 8141 ms, persistence 11.9 ms
  • present 4710: 69.7 ms at 12166 ms, persistence 11.3 ms

Threads (ms per frame)

thread busy wait untraced in slices < 20 us largest
title 0.1 (0 %) 12.5 (20 %) 50.2 0.4 Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveAbi 0.0
queue worker 0x0 13.1 (21 %) 0.0 (0 %) 49.8 54.3 Driver.Packet 13.0, Driver.EndSubmission 0.0
draw committer 25.4 (40 %) 0.3 (0 %) 37.2 41.2 Graphics.Draw 20.8, Vulkan.DrawFromRecipe 2.5
title 0.0 (0 %) 0.0 (0 %) 62.8 0.1 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 62.8 0.1 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 62.8 0.1 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 62.8 0.1 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
presenter 0.5 (1 %) 12.3 (20 %) 50.1 0.1 VideoOut.Flip 12.7, Driver.Present 0.1
title 0.0 (0 %) 0.0 (0 %) 62.8 0.1 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 62.8 0.1 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 62.8 0.1 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 62.8 0.1 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 62.8 0.1 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 62.8 0.1 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 62.8 0.1 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 62.8 0.1 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
gpu 31.5 (50 %) 0.0 (0 %) 31.4 0.0 batch 31.5

Largest slices (ms per frame, inclusive, all threads): batch 31.5, Graphics.Draw 20.8, Driver.Packet 13.0, VideoOut.Flip 12.7, Driver.Present 12.7, VideoOut.Flip.present 12.6, Recorder.WaitSerial 12.5, Driver.Present.render_fence_wait 12.0, Vulkan.Retire 12.0, Vulkan.Retire.wait 11.9

Longest waits

  • Recorder.WaitSerial (title) 15.9 ms at 622 ms, present 4526
  • Driver.Present.render_fence_wait (presenter) 15.7 ms at 622 ms, present 4526
  • Recorder.WaitSerial (title) 15.4 ms at 2479 ms, present 4555
  • Recorder.WaitSerial (title) 15.3 ms at 13427 ms, present 4729
  • Recorder.WaitSerial (title) 15.2 ms at 2608 ms, present 4557
  • Recorder.WaitSerial (title) 15.2 ms at 13042 ms, present 4724
  • Driver.Present.render_fence_wait (presenter) 15.1 ms at 2480 ms, present 4556
  • Recorder.WaitSerial (title) 15.1 ms at 12037 ms, present 4708
  • Recorder.WaitSerial (title) 15.1 ms at 5099 ms, present 4598
  • Recorder.WaitSerial (title) 15.1 ms at 370 ms, present 4521

Largest GPU batches (GPU ranges inside, and the CPU slices that recorded each, inclusive)

  • batch 14854: 6.1 ms at 13882 ms, present 4736: GPU no ranges; recorded by no CPU slices
  • batch 2238: 6.0 ms at 2096 ms, present 4549: GPU no ranges; recorded by no CPU slices
  • batch 15402: 6.0 ms at 14396 ms, present 4744: GPU no ranges; recorded by no CPU slices
  • batch 15876: 5.9 ms at 14833 ms, present 4751: GPU no ranges; recorded by no CPU slices
  • batch 2914: 5.8 ms at 2729 ms, present 4559: GPU no ranges; recorded by Vulkan.DrawFromRecipe (draw committer) 0.1, Graphics.DrawWithRecipe (draw committer) 0.1, Graphics.DrawWithRecipe.draw_and_resource_release (draw committer) 0.1
Digest: this PR, run 4 (commit 9a8304a)

seconds 200:15 from present 4589: 243 presents, frame p50 60.6 / p90 66.4 / p99 85.3 / max 122.6 ms, GPU busy 31.2 ms per present
NVIDIA GeForce RTX 2080 Ti, NVIDIA 610.88, Windows 10.0.26300, 3840x2160, commit 9a8304a, dropped: yes

{"commit":"9a8304ae075f","dirty":false,"env":{"APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"200:15"},"gpu":"NVIDIA GeForce RTX 2080 Ti","driver":"NVIDIA 610.88","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":4589,"ms":15020.878},"presents":243,"frame_ms":{"p50":60.61,"p90":66.434,"p99":85.341,"max":122.622},"gpu_busy_ms_per_present":31.182,"worker_busy_pct":{"queue worker 0x0":96.611},"phase_totals_ms":{"Driver.Completion":2.808,"Driver.Dispatch":1123.888,"Driver.Dispatch.capture_resources":16.991,"Driver.Dispatch.decode_key_device_setup":752.397,"Driver.Dispatch.lookup_cache":13.994,"Driver.Dispatch.materialize":3.252,"Driver.Dispatch.prepared_invocation":2.985,"Driver.Draw":10889.331,"Driver.Draw.device_setup":727.058,"Driver.Draw.draw_enqueued":2534.249,"Driver.Draw.post_compile_prepare":177.93,"Driver.Draw.prepare":1312.502,"Driver.Draw.shader_compile_and_link":5894.626,"Driver.EndSubmission":17.732,"Driver.Packet":14491.168,"Driver.Packet.device_lock":171.819,"Driver.Packet.dispatch":1127.788,"Driver.Packet.draw":11099.561,"Driver.Packet.execute":427.004,"Driver.Packet.flip_flush":6.649,"Driver.Packet.flush_between_packets":469.691,"Driver.Packet.memory_wait":0.014,"Driver.Packet.pipeline_drain":251.676,"Driver.Packet.pipeline_prepare":256.355,"Driver.Packet.prepare_memory":274.76,"Driver.Packet.rendering_wait":0.356,"Driver.Present":3154.348,"Driver.Present.acquire_image":3.317,"Driver.Present.device_setup":0.268,"Driver.Present.gpu_mutex_wait":158.652,"Driver.Present.inflight_wait":0.763,"Driver.Present.present_display_buffer":44.488,"Driver.Present.queue_present":46.485,"Driver.Present.release_and_callback":0.819,"Driver.Present.render_fence_wait":2898.677,"Driver.Present.resize":0.529,"Driver.Present.validate":0.096,"Driver.Suspend":0.056,"GpuMutex.wait.draw":58.464,"GpuMutex.wait.end":2.372,"GpuMutex.wait.fill":6.898,"GpuMutex.wait.flush":0.668,"GpuMutex.wait.label":6.44,"GpuMutex.wait.other":5.54,"GpuMutex.wait.present":157.871,"GpuMutex.wait.wait":2.461,"Graphics.Draw":9529.638,"Graphics.Draw.draw_and_resource_release":7306.033,"Graphics.Draw.index_upload":487.169,"Graphics.Draw.validate":798.87,"Graphics.Draw.vertex_upload":780.254,"Graphics.DrawWithRecipe":654.726,"Graphics.DrawWithRecipe.draw_and_resource_release":630.713,"Graphics.DrawWithRecipe.index_upload":2.972,"Graphics.DrawWithRecipe.validate":9.092,"Graphics.DrawWithRecipe.vertex_upload":7.454,"Recorder.Reap":134.076,"Recorder.Submit":460.526,"Recorder.WaitSerial":3115.288,"Resources.Complete":98.049,"Resources.Prepare":53.459,"Shader.DrawStage":3915.91,"Shader.DrawStage.capture_resources":1838.677,"Shader.DrawStage.materialize":1012.084,"Shader.DrawStage.prepared_invocation":976.427,"Shader.ResolveAbi":162.997,"Shader.ResolveGraphicsAbi":66.32,"Shader.ResolveGraphicsStagesAbi":158.181,"VideoOut.Flip":3158.279,"VideoOut.Flip.completion_mutex_wait":0.395,"VideoOut.Flip.config_mutex_wait":0.026,"VideoOut.Flip.frame_limit":0.18,"VideoOut.Flip.notify_game":9.901,"VideoOut.Flip.present":3144.552,"VideoOut.Flip.validate":0.314,"VideoOut.Flip.vblank_wait":0.171,"VideoOut.Flip.window_prepare":0.413,"VideoOut.Flip.window_title":1.982,"VideoOut.Readiness":1.2,"VideoOut.Readiness.locks_validate":0.512,"Vulkan.Acquire":3.014,"Vulkan.Acquire.acquire_fence_wait":0.615,"Vulkan.Acquire.acquire_image":1.669,"Vulkan.Acquire.fence_reset":0.513,"Vulkan.Acquire.retired_swapchains":0.133,"Vulkan.Dispatch":177.374,"Vulkan.Dispatch.command_record":57.735,"Vulkan.Dispatch.shader_resources":118.595,"Vulkan.DrawFromRecipe":663.011,"Vulkan.Present":23.939,"Vulkan.Present.command_record_scale":8.17,"Vulkan.Present.pixel_upload":3.151,"Vulkan.Present.queue_submit":12.294,"Vulkan.QueuePresent":45.272,"Vulkan.QueuePresent.queue_present":44.836,"Vulkan.Retire":2898.292,"Vulkan.Retire.wait":2893.284},"top_phases_ms_per_frame":{"Driver.Packet":59.634,"Driver.Packet.draw":45.677,"Driver.Draw":44.812,"Graphics.Draw":39.217,"Graphics.Draw.draw_and_resource_release":30.066,"Driver.Draw.shader_compile_and_link":24.258,"Shader.DrawStage":16.115,"VideoOut.Flip":12.997},"owned_draw_counts":{"OwnedDraw.evicted_other":1138},"graphics_track":{"Graphics.Barrier.copy":972,"Graphics.Barrier.dispatch-lead":1495,"Graphics.Barrier.dispatch-trail":2676,"Graphics.Barrier.draw":40081,"Graphics.Barrier.fill":2,"Graphics.Barrier.fill-clear":2430,"Graphics.Barrier.input-mirror":122,"Graphics.Barrier.label-run":41461,"Graphics.Barrier.present-blit":486,"Graphics.Barrier.shadow-publish":3,"Graphics.Barrier.staging-in":2252,"Graphics.Barrier.staging-out":486,"Graphics.Barrier.storage-upload":27720,"Graphics.Barrier.storage-writeback":2526,"Graphics.BarrierMerged.dispatch-lead":1181,"Graphics.BarrierMerged.shadow-publish":3,"Graphics.BarrierMerged.staging-in":182,"Graphics.BarrierMerged.staging-out":486,"Graphics.BarrierMerged.storage-writeback":407,"Graphics.Copy":1582,"Graphics.Copy.bytes":15817440,"Graphics.RenderPass":19765,"Graphics.RenderPass.Close.command":7587,"Graphics.RenderPass.Close.image":18,"Graphics.RenderPass.Close.key":1010,"Graphics.RenderPass.Close.new-batch":11150,"Graphics.RenderPass.Continued":493461},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":5.794,"events_lost":413462,"totals_full":false},"draw committer":{"events_full_after_s":13.829,"events_lost":22853,"totals_full":false}},"trace":"aps5-trace-9a8304ae075f-10440.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.

  • queue worker 0x0: 413462 events lost; buffer full at 5793.9 ms; over the 91 of 243 frames that ended before it: busy 35.2 ms per frame (55 %), wait 0.0, largest Driver.Packet 35.1, Driver.EndSubmission 0.1 (the thread table divides the retained slices by every frame)
  • draw committer: 22853 events lost; buffer full at 13829.1 ms; over the 223 of 243 frames that ended before it: busy 27.1 ms per frame (44 %), wait 0.3, largest Graphics.Draw 22.8, Vulkan.DrawFromRecipe 2.6 (the thread table divides the retained slices by every frame)

Slowest frames (largest slices inside each, inclusive)

  • present 4664: 122.6 ms at 4700 ms: Driver.Packet (queue worker 0x0) 107.3, Driver.Packet.draw (queue worker 0x0) 88.4, Driver.Draw (queue worker 0x0) 86.6, Graphics.Draw (draw committer) 72.7
  • present 4665: 93.3 ms at 4822 ms: Driver.Packet (queue worker 0x0) 74.4, Driver.Packet.draw (queue worker 0x0) 65.8, Driver.Draw (queue worker 0x0) 63.9, Graphics.Draw (draw committer) 46.9
  • present 4602: 85.3 ms at 840 ms: Driver.Packet (queue worker 0x0) 55.6, Graphics.Draw (draw committer) 47.3, Driver.Packet.draw (queue worker 0x0) 39.8, Driver.Draw (queue worker 0x0) 39.1
  • present 4605: 79.2 ms at 1057 ms: Driver.Packet (queue worker 0x0) 52.8, Driver.Packet.draw (queue worker 0x0) 41.5, Driver.Draw (queue worker 0x0) 40.4, batch (gpu) 34.5
  • present 4776: 77.7 ms at 11631 ms: batch (gpu) 44.2, Graphics.Draw (draw committer) 31.4, Graphics.Draw.draw_and_resource_release (draw committer) 23.4, VideoOut.Flip (presenter) 14.4

Persistent spikes (frame time above the fastest frame that separates it from a longer frame; one entry per stall, not per frame)

  • present 4664: 122.6 ms at 4700 ms, persistence 67.4 ms
  • present 4602: 85.3 ms at 840 ms, persistence 29.5 ms
  • present 4776: 77.7 ms at 11631 ms, persistence 22.5 ms
  • present 4605: 79.2 ms at 1057 ms, persistence 18.6 ms
  • present 4676: 74.4 ms at 5525 ms, persistence 18.2 ms
  • present 4774: 73.4 ms at 11497 ms, persistence 13.2 ms
  • present 4728: 69.5 ms at 8655 ms, persistence 13.0 ms
  • present 4826: 68.6 ms at 14652 ms, persistence 12.2 ms
  • present 4779: 68.6 ms at 11827 ms, persistence 11.3 ms
  • present 4659: 71.1 ms at 4364 ms, persistence 9.7 ms

Threads (ms per frame)

thread busy wait untraced in slices < 20 us largest
title 0.1 (0 %) 12.8 (21 %) 48.9 0.4 Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveAbi 0.0
queue worker 0x0 13.2 (21 %) 0.0 (0 %) 48.6 50.9 Driver.Packet 13.2, Driver.EndSubmission 0.0
draw committer 24.9 (40 %) 0.3 (0 %) 36.6 40.1 Graphics.Draw 20.9, Vulkan.DrawFromRecipe 2.4
title 0.0 (0 %) 0.0 (0 %) 61.8 0.1 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 61.8 0.1 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 61.8 0.1 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 61.8 0.1 Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveAbi 0.0
presenter 0.5 (1 %) 12.6 (20 %) 48.8 0.1 VideoOut.Flip 13.0, Driver.Present 0.0
title 0.0 (0 %) 0.0 (0 %) 61.8 0.1 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 61.8 0.1 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 61.8 0.1 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 61.8 0.1 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 61.8 0.1 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 61.8 0.1 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 61.8 0.1 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 61.8 0.1 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
gpu 31.2 (50 %) 0.0 (0 %) 30.7 0.0 batch 31.2

Largest slices (ms per frame, inclusive, all threads): batch 31.2, Graphics.Draw 20.9, Driver.Packet 13.2, VideoOut.Flip 13.0, Driver.Present 13.0, VideoOut.Flip.present 12.9, Recorder.WaitSerial 12.8, Driver.Present.render_fence_wait 11.9, Vulkan.Retire 11.9, Vulkan.Retire.wait 11.9

Longest waits

  • Recorder.WaitSerial (title) 15.7 ms at 8176 ms, present 4720
  • Recorder.WaitSerial (title) 15.5 ms at 6618 ms, present 4693
  • Recorder.WaitSerial (title) 15.4 ms at 6736 ms, present 4695
  • Driver.Present.render_fence_wait (presenter) 15.4 ms at 8176 ms, present 4720
  • Recorder.WaitSerial (title) 15.2 ms at 7346 ms, present 4705
  • Driver.Present.render_fence_wait (presenter) 15.2 ms at 6619 ms, present 4694
  • Recorder.WaitSerial (title) 15.2 ms at 9657 ms, present 4743
  • Recorder.WaitSerial (title) 15.1 ms at 8054 ms, present 4717
  • Recorder.WaitSerial (title) 15.0 ms at 9782 ms, present 4745
  • Recorder.WaitSerial (title) 14.9 ms at 11379 ms, present 4771

Largest GPU batches (GPU ranges inside, and the CPU slices that recorded each, inclusive)

  • batch 7811: 5.9 ms at 7343 ms, present 4705: GPU no ranges; recorded by Vulkan.DrawFromRecipe (draw committer) 0.1, Graphics.DrawWithRecipe (draw committer) 0.1, Graphics.DrawWithRecipe.draw_and_resource_release (draw committer) 0.1
  • batch 105: 5.9 ms at 127 ms, present 4590: GPU no ranges; recorded by no CPU slices
  • batch 3277: 5.9 ms at 3093 ms, present 4637: GPU no ranges; recorded by Vulkan.DrawFromRecipe (draw committer) 0.1, Graphics.DrawWithRecipe (draw committer) 0.1, Graphics.DrawWithRecipe.draw_and_resource_release (draw committer) 0.1
  • batch 14052: 5.8 ms at 13076 ms, present 4799: GPU no ranges; recorded by Vulkan.DrawFromRecipe (draw committer) 0.1, Graphics.DrawWithRecipe (draw committer) 0.1, Graphics.DrawWithRecipe.draw_and_resource_release (draw committer) 0.1
  • batch 7208: 5.8 ms at 6793 ms, present 4696: GPU no ranges; recorded by no CPU slices
Digest: main, run 4 (commit 42f6354)

seconds 200:15 from present 4970: 250 presents, frame p50 59.2 / p90 64.0 / p99 70.0 / max 72.2 ms, GPU busy 31.0 ms per present
NVIDIA GeForce RTX 2080 Ti, NVIDIA 610.88, Windows 10.0.26300, 3840x2160, commit 42f6354, dropped: yes

{"commit":"42f6354612c9","dirty":false,"env":{"APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"200:15"},"gpu":"NVIDIA GeForce RTX 2080 Ti","driver":"NVIDIA 610.88","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":4970,"ms":15010.67},"presents":250,"frame_ms":{"p50":59.166,"p90":64.044,"p99":69.997,"max":72.25},"gpu_busy_ms_per_present":31.001,"worker_busy_pct":{"queue worker 0x0":96.665},"phase_totals_ms":{"Driver.Completion":2.479,"Driver.Dispatch":1093.169,"Driver.Dispatch.capture_resources":17.765,"Driver.Dispatch.decode_key_device_setup":724.489,"Driver.Dispatch.lookup_cache":14.022,"Driver.Dispatch.materialize":3.262,"Driver.Dispatch.prepared_invocation":2.948,"Driver.Draw":10916.648,"Driver.Draw.device_setup":791.659,"Driver.Draw.draw_enqueued":2365.04,"Driver.Draw.post_compile_prepare":183.502,"Driver.Draw.prepare":1332.49,"Driver.Draw.shader_compile_and_link":5987.694,"Driver.EndSubmission":15.551,"Driver.Packet":14492.007,"Driver.Packet.device_lock":175.407,"Driver.Packet.dispatch":1096.812,"Driver.Packet.draw":11129.699,"Driver.Packet.execute":420.823,"Driver.Packet.flip_flush":6.784,"Driver.Packet.flush_between_packets":476.638,"Driver.Packet.memory_wait":0.007,"Driver.Packet.pipeline_drain":249.186,"Driver.Packet.pipeline_prepare":257.95,"Driver.Packet.prepare_memory":277.201,"Driver.Packet.rendering_wait":0.327,"Driver.Present":3338.529,"Driver.Present.acquire_image":3.265,"Driver.Present.device_setup":0.377,"Driver.Present.gpu_mutex_wait":169.373,"Driver.Present.inflight_wait":0.68,"Driver.Present.present_display_buffer":45.152,"Driver.Present.queue_present":46.384,"Driver.Present.release_and_callback":0.712,"Driver.Present.render_fence_wait":3071.714,"Driver.Present.resize":0.623,"Driver.Present.validate":0.064,"Driver.Suspend":0.052,"GpuMutex.wait.dispatch":0.086,"GpuMutex.wait.draw":60.264,"GpuMutex.wait.end":1.57,"GpuMutex.wait.fill":11.89,"GpuMutex.wait.flush":0.927,"GpuMutex.wait.label":3.255,"GpuMutex.wait.other":3.506,"GpuMutex.wait.present":168.601,"GpuMutex.wait.wait":2.246,"Graphics.Draw":9349.33,"Graphics.Draw.draw_and_resource_release":7147.804,"Graphics.Draw.index_upload":471.809,"Graphics.Draw.validate":803.968,"Graphics.Draw.vertex_upload":766.092,"Graphics.DrawWithRecipe":629.84,"Graphics.DrawWithRecipe.draw_and_resource_release":611.279,"Graphics.DrawWithRecipe.index_upload":1.901,"Graphics.DrawWithRecipe.validate":7.805,"Graphics.DrawWithRecipe.vertex_upload":5.14,"Recorder.Reap":128.899,"Recorder.Submit":450.842,"Recorder.WaitSerial":3291.907,"Resources.Complete":78.799,"Resources.Prepare":51.386,"Shader.DrawStage":4025.453,"Shader.DrawStage.capture_resources":1846.461,"Shader.DrawStage.materialize":1088.049,"Shader.DrawStage.prepared_invocation":1003.087,"Shader.ResolveAbi":174.925,"Shader.ResolveGraphicsAbi":68.941,"Shader.ResolveGraphicsStagesAbi":180.102,"VideoOut.Flip":3353.486,"VideoOut.Flip.completion_mutex_wait":0.456,"VideoOut.Flip.config_mutex_wait":0.024,"VideoOut.Flip.frame_limit":0.178,"VideoOut.Flip.notify_game":23.605,"VideoOut.Flip.present":3325.747,"VideoOut.Flip.validate":0.373,"VideoOut.Flip.vblank_wait":0.238,"VideoOut.Flip.window_prepare":0.522,"VideoOut.Flip.window_title":1.905,"VideoOut.Readiness":1.302,"VideoOut.Readiness.locks_validate":0.537,"Vulkan.Acquire":2.98,"Vulkan.Acquire.acquire_fence_wait":0.524,"Vulkan.Acquire.acquire_image":1.615,"Vulkan.Acquire.fence_reset":0.622,"Vulkan.Acquire.retired_swapchains":0.123,"Vulkan.Dispatch":176.179,"Vulkan.Dispatch.command_record":57.061,"Vulkan.Dispatch.shader_resources":117.951,"Vulkan.DispatchRecipe":0.186,"Vulkan.DispatchRecipe.command_record":0.186,"Vulkan.DrawFromRecipe":637.238,"Vulkan.Present":24.443,"Vulkan.Present.command_record_scale":8.304,"Vulkan.Present.pixel_upload":2.76,"Vulkan.Present.queue_submit":13.017,"Vulkan.QueuePresent":45.007,"Vulkan.QueuePresent.queue_present":44.636,"Vulkan.Retire":3071.095,"Vulkan.Retire.wait":3064.48},"top_phases_ms_per_frame":{"Driver.Packet":57.968,"Driver.Packet.draw":44.519,"Driver.Draw":43.667,"Graphics.Draw":37.397,"Graphics.Draw.draw_and_resource_release":28.591,"Driver.Draw.shader_compile_and_link":23.951,"Shader.DrawStage":16.102,"VideoOut.Flip":13.414},"owned_draw_counts":{"OwnedDraw.evicted_other":1187},"graphics_track":{"Graphics.Barrier.copy":1000,"Graphics.Barrier.dispatch-lead":1507,"Graphics.Barrier.dispatch-trail":2753,"Graphics.Barrier.draw":40873,"Graphics.Barrier.fill-clear":2500,"Graphics.Barrier.label-run":42408,"Graphics.Barrier.present-blit":500,"Graphics.Barrier.shadow-publish":2,"Graphics.Barrier.staging-in":2336,"Graphics.Barrier.staging-out":500,"Graphics.Barrier.storage-upload":28510,"Graphics.Barrier.storage-writeback":2607,"Graphics.BarrierMerged.dispatch-lead":1246,"Graphics.BarrierMerged.shadow-publish":2,"Graphics.BarrierMerged.staging-in":168,"Graphics.BarrierMerged.staging-out":500,"Graphics.BarrierMerged.storage-writeback":406,"Graphics.Copy":1502,"Graphics.Copy.bytes":16032096,"Graphics.RenderPass":20152,"Graphics.RenderPass.Close.command":7816,"Graphics.RenderPass.Close.image":11,"Graphics.RenderPass.Close.key":1060,"Graphics.RenderPass.Close.new-batch":11265,"Graphics.RenderPass.Continued":507423},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":5.896,"events_lost":408247,"totals_full":false},"draw committer":{"events_full_after_s":14.126,"events_lost":16738,"totals_full":false}},"trace":"aps5-trace-42f6354612c9-36848.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.

  • queue worker 0x0: 408247 events lost; buffer full at 5896.3 ms; over the 98 of 250 frames that ended before it: busy 30.5 ms per frame (51 %), wait 0.0, largest Driver.Packet 30.5, Driver.EndSubmission 0.1 (the thread table divides the retained slices by every frame)
  • draw committer: 16738 events lost; buffer full at 14125.7 ms; over the 235 of 250 frames that ended before it: busy 25.2 ms per frame (42 %), wait 0.3, largest Graphics.Draw 21.1, Vulkan.DrawFromRecipe 2.5 (the thread table divides the retained slices by every frame)

Slowest frames (largest slices inside each, inclusive)

  • present 5098: 72.2 ms at 7728 ms: batch (gpu) 30.5, Graphics.Draw (draw committer) 27.8, Graphics.Draw.draw_and_resource_release (draw committer) 17.0, VideoOut.Flip (presenter) 11.2
  • present 5083: 70.4 ms at 6760 ms: Graphics.Draw (draw committer) 31.1, batch (gpu) 29.0, Graphics.Draw.draw_and_resource_release (draw committer) 13.0, VideoOut.Flip (presenter) 11.2
  • present 5089: 70.0 ms at 7145 ms: batch (gpu) 33.0, Graphics.Draw (draw committer) 29.1, Graphics.Draw.draw_and_resource_release (draw committer) 22.4, VideoOut.Flip (presenter) 13.0
  • present 5091: 68.8 ms at 7277 ms: batch (gpu) 31.4, Graphics.Draw (draw committer) 25.1, Graphics.Draw.draw_and_resource_release (draw committer) 14.9, VideoOut.Flip (presenter) 12.6
  • present 5097: 68.5 ms at 7660 ms: batch (gpu) 33.2, Graphics.Draw (draw committer) 27.0, Graphics.Draw.draw_and_resource_release (draw committer) 17.7, VideoOut.Flip (presenter) 13.6

Persistent spikes (frame time above the fastest frame that separates it from a longer frame; one entry per stall, not per frame)

  • present 5098: 72.2 ms at 7728 ms, persistence 15.2 ms
  • present 5083: 70.4 ms at 6760 ms, persistence 11.7 ms
  • present 5089: 70.0 ms at 7145 ms, persistence 10.6 ms
  • present 5032: 67.1 ms at 3724 ms, persistence 10.1 ms
  • present 4982: 66.4 ms at 714 ms, persistence 8.4 ms
  • present 5114: 66.2 ms at 8712 ms, persistence 8.0 ms
  • present 5215: 64.9 ms at 14713 ms, persistence 7.8 ms
  • present 5198: 64.9 ms at 13706 ms, persistence 7.6 ms
  • present 5086: 67.5 ms at 6950 ms, persistence 7.6 ms
  • present 4999: 66.2 ms at 1739 ms, persistence 7.5 ms

Threads (ms per frame)

thread busy wait untraced in slices < 20 us largest
title 0.1 (0 %) 13.2 (22 %) 46.8 0.5 Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveAbi 0.0
queue worker 0x0 12.0 (20 %) 0.0 (0 %) 48.0 54.0 Driver.Packet 12.0, Driver.EndSubmission 0.0
draw committer 23.7 (39 %) 0.3 (0 %) 36.1 40.2 Graphics.Draw 19.9, Vulkan.DrawFromRecipe 2.4
title 0.0 (0 %) 0.0 (0 %) 60.0 0.1 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 60.0 0.1 Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 60.0 0.1 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 60.0 0.1 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
presenter 0.5 (1 %) 13.0 (22 %) 46.6 0.1 VideoOut.Flip 13.4, Driver.Present 0.1
title 0.0 (0 %) 0.0 (0 %) 60.0 0.1 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 60.0 0.1 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 60.0 0.1 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 60.0 0.1 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 60.0 0.1 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 60.0 0.1 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 60.0 0.1 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 60.0 0.1 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
gpu 31.0 (52 %) 0.0 (0 %) 29.1 0.0 batch 31.0

Largest slices (ms per frame, inclusive, all threads): batch 31.0, Graphics.Draw 19.9, VideoOut.Flip 13.4, Driver.Present 13.4, VideoOut.Flip.present 13.3, Recorder.WaitSerial 13.2, Driver.Present.render_fence_wait 12.3, Vulkan.Retire 12.3, Vulkan.Retire.wait 12.3, Driver.Packet 12.0

Longest waits

  • Recorder.WaitSerial (title) 15.0 ms at 3850 ms, present 5034
  • Recorder.WaitSerial (title) 14.8 ms at 9550 ms, present 5128
  • Recorder.WaitSerial (title) 14.7 ms at 12985 ms, present 5185
  • Driver.Present.render_fence_wait (presenter) 14.7 ms at 3850 ms, present 5034
  • Recorder.WaitSerial (title) 14.6 ms at 2280 ms, present 5007
  • Recorder.WaitSerial (title) 14.6 ms at 12154 ms, present 5172
  • Recorder.WaitSerial (title) 14.6 ms at 1316 ms, present 4991
  • Recorder.WaitSerial (title) 14.6 ms at 5561 ms, present 5062
  • Recorder.WaitSerial (title) 14.5 ms at 4799 ms, present 5050
  • Driver.Present.render_fence_wait (presenter) 14.4 ms at 9550 ms, present 5128

Largest GPU batches (GPU ranges inside, and the CPU slices that recorded each, inclusive)

  • batch 12698: 5.9 ms at 11618 ms, present 5162: GPU no ranges; recorded by Vulkan.DrawFromRecipe (draw committer) 0.1, Graphics.DrawWithRecipe (draw committer) 0.1, Graphics.DrawWithRecipe.draw_and_resource_release (draw committer) 0.1
  • batch 14776: 5.6 ms at 13520 ms, present 5194: GPU no ranges; recorded by Vulkan.DrawFromRecipe (draw committer) 0.1, Graphics.DrawWithRecipe (draw committer) 0.1, Graphics.DrawWithRecipe.draw_and_resource_release (draw committer) 0.1
  • batch 14844: 5.6 ms at 13585 ms, present 5195: GPU no ranges; recorded by Vulkan.DrawFromRecipe (draw committer) 0.0, Graphics.DrawWithRecipe (draw committer) 0.0, Graphics.DrawWithRecipe.draw_and_resource_release (draw committer) 0.0
  • batch 7537: 5.6 ms at 6885 ms, present 5084: GPU no ranges; recorded by Vulkan.DrawFromRecipe (draw committer) 0.1, Graphics.DrawWithRecipe (draw committer) 0.1, Graphics.DrawWithRecipe.draw_and_resource_release (draw committer) 0.1
  • batch 5625: 5.6 ms at 5151 ms, present 5055: GPU no ranges; recorded by Vulkan.DrawFromRecipe (draw committer) 0.1, Graphics.DrawWithRecipe (draw committer) 0.1, Graphics.DrawWithRecipe.draw_and_resource_release (draw committer) 0.1

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt and the licence notice of code adapted from upstream (see AGENTS.md)
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Fixes: none
  • Unblocks: none (Sonic Origins PPSA05324, S3K menu page: the worker's allocation work over 1 KB)
  • GPUs tested: NVIDIA GeForce RTX 2080 Ti, driver 610.88, Windows 11 (10.0.26300)
  • AI-assisted: yes

HostAllocator cached freed blocks only up to 1 KB, so the blocks a draw
allocates over that size went to the system heap on every draw: the
DrawTail, the patched RecompileResult copy and that copy's binding
vector, 1.4 to 3.7 KB each, about 120 k allocations a second on the
queue worker of the Sonic Origins S3K page.

The size classes now reach 4 KB. A class over 1 KB keeps at most 256 KB
of blocks, a thread at most 4 MB of them, and there is no depot for
them. Every 65,536 large frees a thread gives back the stock of the
classes nothing popped from since the last trim, so classes that are
only freed into cannot hold the budget.
@github-actions github-actions Bot added perf Performance change agc libSceAgc* labels Nov 20, 2026

@MarcZX10 MarcZX10 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed — looks good

Nothing blocks this change; the performance evidence is author supplied, and the reviewed allocator logic and tests support merging.

What I ran

Reviewed head 9a8304ae075f10e5e48893c0354d10de080f8c79. Read the prepared description, commit summary, diff and both changed source files using repo_read.py; inspected allocator build references. No commands or tests were run in this review.

Results

Check Result Note
Diff and source review passed Two changed files read
Test execution not run Results in the description are author reported
Performance validation not run Traces and measurements were not independently checked

Findings

Blocking

None.

Non-blocking

None.

Not verified

The PR description reports Windows allocator tests and convention checks passing, plus same-scene performance measurements; these were not run or independently verified. The prepared file manifest lists both changed files as included, and both full texts were read. No files.json was available in the review folder, so excluded-file details were not verified.

To get this to a good state

Nothing is required.

@oneandonlydean
oneandonlydean merged commit 2a1ac2c into boykopovar:main Nov 21, 2026
15 of 16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agc libSceAgc* perf Performance change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants