Skip to content

perf(agc): keep a freed host block's size instead of asking the heap - #22554

Merged
oneandonlydean merged 1 commit into
boykopovar:mainfrom
Meh7an:perf/agc-allocator-sized-free
Nov 19, 2026
Merged

oneandonlydean merged 1 commit into
boykopovar:mainfrom
Meh7an:perf/agc-allocator-sized-free

Conversation

@Meh7an

@Meh7an Meh7an commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

What

The host allocator's free path asks the heap how big a block is. Release calls _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 with malloc(n) holds n bytes, so filing it under the class of n, 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). Under APS5_MIMALLOC, malloc(17) to malloc(24) are 24-byte bins.

This change keeps the size the delete already passes:

  • A sized delete of n >= 8 bytes files the block under the class of n and keeps n in the low four bits of the free-list link. Cached blocks are 16-byte aligned; a block that is not goes straight to free. No _msize.
  • Unsized deletes and sized deletes below 8 bytes keep main's _msize.
  • An allocation of m takes the head of its class when the kept size covers m. Otherwise it asks _msize for that one block. The driver's own blocks hold their whole granule and pass. A block that still does not hold m (a libstdc++ block) is refiled one class down, or freed in class 0, and the allocation calls malloc.
  • A cached block now needs only 8 bytes, so the depot keeps its lists in an array instead of chaining them through the head block's second word.
  • Each pop prefetches the next free block. The load of the popped block's link was the allocator's hottest instruction on both threads; it has its own numbers below.

Same guarantee as main. Main hands a cached block out for m only when the block holds at least m. Here every cached block carries a size it is known to hold:

  • for a sized delete, n is the size passed to the operator new that made the block ([new.delete]); main already relies on this when n is a multiple of 16. The driver allocates the whole granule, libstdc++ exactly n, mimalloc at least n;
  • for an unsized delete or 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 _msize then accepted; none was refiled.

Overlap: no open PR changes HostAllocator.cpp, RuntimeHeap.c or 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.py over all 1,780 open PRs finds one that shares a file (#16753, which adds a test to tests/HostAllocator.cpp on other lines) and no overlap once merged. The change merges cleanly onto main db68035f8bd, 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 89b0eef7ab42 and this change on top of it (cbef220d6cf4), built in the same build directory.

Sampler (APS5_SAMPLE_WORKER and APS5_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):

main this PR
worker: operator new + operator delete, with what they call 539 (14.0%) 366 (9.5%)
of it RtlSizeHeap 226 99 (82 of them the check of a short kept size)
worker blocked in DrawPipeline::Enqueue 13.7% 9.9%
committer: operator new + operator delete 251 (6.5%) 163 (4.2%)
of it operator delete 69 6
committer Driver::commitDraw 72.1% 65.0%
sampler-run FPS, median (min to max) 17.30 (15.90 to 18.00) 18.15 (17.18 to 18.54)

The 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:

without the prefetch this PR
load of the popped block's link (worker) 134 93
same (committer) 86 65
worker allocator, as above 420 344
committer allocator 249 182
sampler-run FPS 17.50 (14.48 to 19.93) 18.12 (16.98 to 18.54)

With the draw finisher (APS5_DRAW_PIPELINE=1, the default proposed by #15456), two pairs:

main this PR
sampler-run FPS 22.59, 23.07 21.27, 22.79
worker waiting in DrawFinisher::Drain (second pair) 43.1% 42.6%
worker allocator (second pair) 293 240
committer allocator (second pair) 201 169

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):

  • reading FPS 19.18, 19.21, 19.53, 19.43;
  • frame p50 57.6, 58.6, 57.4, 58.5 ms; p90 61.0, 62.9, 60.6, 62.0 ms;
  • GPU busy 33.4, 34.0, 33.5, 33.1 ms per present.

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_allocator call operator new and the sized operator delete through volatile pointers, so the compiler cannot fold the pointer comparisons.

  • A block freed with its size comes back for that size, for every size from 8 to 1024 that is not a multiple of 16. A block 1 to 15 bytes over 1024 serves the largest class.
  • A driver block freed with fewer bytes than its granule still serves the whole granule (the _msize fallback).
  • A block made by libstdc++-6.dll's own operator new (_Znwy, looked up in the loaded DLL) for every size from 8 to 1024 that is not a multiple of 16:
    • comes back for its own size;
    • is never handed out for its whole granule (_msize of the result covers the request);
    • serves the class below after the refile.

Broken copies of the change, each built against these tests, are caught in 8 of 9 cases:

  • the class trusted instead of the kept size (heap corruption, 0xC0000374);
  • no _msize check for a short kept size;
  • a refile into the same class;
  • the kept size read one too high;
  • the kept size stored unshifted;
  • no cap at the largest class (timeout);
  • a refile from class 0;
  • a depot list taken off by one.

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=1 and VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation. Neither log has a VUID- 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.

  • queue worker 0x0: 466217 events lost; buffer full at 5387.8 ms
  • draw committer: 10261 events lost; buffer full at 14456.6 ms

Slowest frames (largest slices inside each, inclusive)

  • present 5309: 71.4 ms at 10581 ms: batch (gpu) 35.3, Graphics.Draw (draw committer) 24.6, Graphics.Draw.draw_and_resource_release (draw committer) 17.6, VideoOut.Flip (presenter) 16.7
  • present 5188: 65.6 ms at 3540 ms: batch (gpu) 38.3, Driver.Packet (queue worker 0x0) 37.6, Driver.Packet.draw (queue worker 0x0) 30.3, Driver.Draw (queue worker 0x0) 29.5
  • present 5189: 65.4 ms at 3606 ms: Driver.Packet (queue worker 0x0) 44.0, Driver.Packet.draw (queue worker 0x0) 38.2, Driver.Draw (queue worker 0x0) 36.9, batch (gpu) 30.2
  • present 5274: 63.8 ms at 8547 ms: batch (gpu) 36.0, Graphics.Draw (draw committer) 22.6, VideoOut.Flip (presenter) 18.0, VideoOut.Flip.present (presenter) 17.9
  • present 5240: 63.8 ms at 6571 ms: batch (gpu) 35.9, Graphics.Draw (draw committer) 20.4, VideoOut.Flip (presenter) 17.4, VideoOut.Flip.present (presenter) 17.3

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

  • present 5309: 71.4 ms at 10581 ms, persistence 17.1 ms
  • present 5188: 65.6 ms at 3540 ms, persistence 11.3 ms
  • present 5274: 63.8 ms at 8547 ms, persistence 9.3 ms
  • present 5240: 63.8 ms at 6571 ms, persistence 9.0 ms
  • present 5380: 63.7 ms at 14712 ms, persistence 8.9 ms
  • present 5348: 63.5 ms at 12846 ms, persistence 8.6 ms
  • present 5279: 63.1 ms at 8840 ms, persistence 8.4 ms
  • present 5208: 62.9 ms at 4709 ms, persistence 7.9 ms
  • present 5326: 62.8 ms at 11572 ms, persistence 7.8 ms
  • present 5264: 63.4 ms at 7972 ms, persistence 7.8 ms

Threads (ms per frame)

thread busy wait untraced in slices < 20 us largest
title 0.1 (0 %) 16.1 (28 %) 42.0 0.5 Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveAbi 0.0
queue worker 0x0 11.3 (19 %) 0.0 (0 %) 46.9 45.1 Driver.Packet 11.3, Driver.EndSubmission 0.0
draw committer 22.1 (38 %) 0.3 (0 %) 35.8 36.0 Graphics.Draw 18.5, Vulkan.DrawFromRecipe 2.3
title 0.0 (0 %) 0.0 (0 %) 58.2 0.1 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 58.2 0.0 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
presenter 0.7 (1 %) 15.7 (27 %) 41.8 0.0 VideoOut.Flip 16.3, Driver.Present 0.1
title 0.0 (0 %) 0.0 (0 %) 58.2 0.0 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 58.2 0.0 Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 58.2 0.0 Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 58.2 0.0 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 58.2 0.1 Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 58.2 0.1 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 58.2 0.1 Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 58.2 0.0 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 58.2 0.1 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 58.2 0.1 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
gpu 33.4 (57 %) 0.0 (0 %) 24.8 0.0 batch 33.4

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

  • Recorder.WaitSerial (title) 19.5 ms at 11344 ms, present 5321
  • Recorder.WaitSerial (title) 19.0 ms at 12382 ms, present 5339
  • Driver.Present.render_fence_wait (presenter) 18.8 ms at 11345 ms, present 5322
  • Recorder.WaitSerial (title) 18.7 ms at 9481 ms, present 5290
  • Recorder.WaitSerial (title) 18.6 ms at 12732 ms, present 5345
  • Recorder.WaitSerial (title) 18.6 ms at 5517 ms, present 5221
  • Recorder.WaitSerial (title) 18.5 ms at 8780 ms, present 5277
  • Driver.Present.render_fence_wait (presenter) 18.5 ms at 9481 ms, present 5290
  • Recorder.WaitSerial (title) 18.5 ms at 3079 ms, present 5180
  • Driver.Present.render_fence_wait (presenter) 18.4 ms at 12383 ms, present 5340

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

  • batch 8423: 11.0 ms at 14356 ms, present 5373: GPU no ranges; recorded by Vulkan.DrawFromRecipe (draw committer) 0.2, Graphics.DrawWithRecipe (draw committer) 0.2, Graphics.DrawWithRecipe.draw_and_resource_release (draw committer) 0.2, Graphics.Draw (draw committer) 0.1
  • batch 1152: 10.9 ms at 1973 ms, present 5160: GPU no ranges; recorded by Vulkan.DrawFromRecipe (draw committer) 0.2, Graphics.DrawWithRecipe (draw committer) 0.2, Graphics.DrawWithRecipe.draw_and_resource_release (draw committer) 0.2, Graphics.Draw (draw committer) 0.2
  • batch 7019: 10.8 ms at 11973 ms, present 5332: GPU no ranges; recorded by no CPU slices
  • batch 2446: 10.7 ms at 4184 ms, present 5198: GPU no ranges; recorded by Driver.Packet (queue worker 0x0) 8.2, Driver.Packet.draw (queue worker 0x0) 4.0, Driver.Draw (queue worker 0x0) 4.0, Driver.Packet.dispatch (queue worker 0x0) 3.7
  • batch 808: 10.7 ms at 1391 ms, present 5150: GPU no ranges; recorded by Driver.Packet (queue worker 0x0) 7.9, Driver.Packet.dispatch (queue worker 0x0) 3.7, Driver.Dispatch (queue worker 0x0) 3.7, Driver.Packet.draw (queue worker 0x0) 3.7
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.

  • queue worker 0x0: 460469 events lost; buffer full at 5400.4 ms
  • draw committer: 10813 events lost; buffer full at 14445.3 ms

Slowest frames (largest slices inside each, inclusive)

  • present 5373: 110.2 ms at 10638 ms: Graphics.Draw (draw committer) 39.4, batch (gpu) 34.6, Graphics.Draw.draw_and_resource_release (draw committer) 17.7, VideoOut.Flip (presenter) 15.3
  • present 5242: 73.5 ms at 2872 ms: Driver.Packet (queue worker 0x0) 49.9, Driver.Packet.draw (queue worker 0x0) 41.3, Driver.Draw (queue worker 0x0) 38.9, batch (gpu) 37.3
  • present 5376: 72.8 ms at 10879 ms: batch (gpu) 38.2, Graphics.Draw (draw committer) 33.7, Graphics.Draw.draw_and_resource_release (draw committer) 22.0, VideoOut.Flip (presenter) 18.2
  • present 5259: 68.8 ms at 3891 ms: Driver.Packet (queue worker 0x0) 42.4, batch (gpu) 41.9, Driver.Packet.draw (queue worker 0x0) 27.3, Driver.Draw (queue worker 0x0) 26.5
  • present 5382: 67.1 ms at 11238 ms: batch (gpu) 37.2, Graphics.Draw (draw committer) 22.7, VideoOut.Flip (presenter) 19.0, VideoOut.Flip.present (presenter) 18.8

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

  • present 5373: 110.2 ms at 10638 ms, persistence 56.9 ms
  • present 5242: 73.5 ms at 2872 ms, persistence 20.2 ms
  • present 5259: 68.8 ms at 3891 ms, persistence 12.6 ms
  • present 5382: 67.1 ms at 11238 ms, persistence 12.4 ms
  • present 5315: 66.7 ms at 7202 ms, persistence 11.3 ms
  • present 5281: 66.7 ms at 5196 ms, persistence 11.3 ms
  • present 5366: 67.0 ms at 10219 ms, persistence 10.8 ms
  • present 5416: 65.0 ms at 13236 ms, persistence 10.7 ms
  • present 5214: 65.8 ms at 1227 ms, persistence 10.5 ms
  • present 5298: 66.6 ms at 6205 ms, persistence 10.4 ms

Threads (ms per frame)

thread busy wait untraced in slices < 20 us largest
title 0.1 (0 %) 16.4 (28 %) 42.9 0.5 Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveAbi 0.0
queue worker 0x0 11.6 (20 %) 0.0 (0 %) 47.8 45.7 Driver.Packet 11.6, Driver.EndSubmission 0.0
draw committer 22.6 (38 %) 0.3 (0 %) 36.5 36.7 Graphics.Draw 19.0, Vulkan.DrawFromRecipe 2.3
title 0.0 (0 %) 0.0 (0 %) 59.4 0.1 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 59.4 0.0 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 59.4 0.1 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
presenter 0.8 (1 %) 16.0 (27 %) 42.7 0.0 VideoOut.Flip 16.7, Driver.Present 0.1
title 0.0 (0 %) 0.0 (0 %) 59.4 0.0 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 59.4 0.0 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 59.4 0.1 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 59.4 0.0 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 59.4 0.0 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 59.4 0.0 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 59.4 0.0 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 59.4 0.0 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 59.4 0.1 Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveAbi 0.0
gpu 34.0 (57 %) 0.0 (0 %) 25.4 0.0 batch 34.0

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

  • Recorder.WaitSerial (title) 19.8 ms at 12413 ms, present 5401
  • Recorder.WaitSerial (title) 19.5 ms at 990 ms, present 5209
  • Recorder.WaitSerial (title) 19.4 ms at 14077 ms, present 5429
  • Driver.Present.render_fence_wait (presenter) 19.0 ms at 12414 ms, present 5402
  • Driver.Present.render_fence_wait (presenter) 18.9 ms at 14077 ms, present 5430
  • Recorder.WaitSerial (title) 18.9 ms at 13960 ms, present 5428
  • Recorder.WaitSerial (title) 18.8 ms at 11238 ms, present 5381
  • Recorder.WaitSerial (title) 18.8 ms at 12997 ms, present 5411
  • Recorder.WaitSerial (title) 18.8 ms at 5740 ms, present 5289
  • Recorder.WaitSerial (title) 18.7 ms at 7026 ms, present 5312

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

  • batch 6389: 11.0 ms at 11122 ms, present 5379: GPU no ranges; recorded by Vulkan.DrawFromRecipe (draw committer) 0.4, Graphics.DrawWithRecipe (draw committer) 0.4, Graphics.DrawWithRecipe.draw_and_resource_release (draw committer) 0.4, Graphics.Draw (draw committer) 0.1
  • batch 2439: 10.9 ms at 4241 ms, present 5264: GPU no ranges; recorded by Vulkan.DrawFromRecipe (draw committer) 0.4, Graphics.DrawWithRecipe (draw committer) 0.4, Graphics.DrawWithRecipe.draw_and_resource_release (draw committer) 0.4, Graphics.Draw (draw committer) 0.1
  • batch 2748: 10.9 ms at 4785 ms, present 5273: GPU no ranges; recorded by Driver.Packet (queue worker 0x0) 6.1, Driver.Packet.draw (queue worker 0x0) 3.6, Driver.Draw (queue worker 0x0) 3.5, Driver.Packet.dispatch (queue worker 0x0) 2.3
  • batch 160: 10.9 ms at 286 ms, present 5197: GPU no ranges; recorded by Vulkan.DrawFromRecipe (draw committer) 0.2, Graphics.DrawWithRecipe (draw committer) 0.1, Graphics.DrawWithRecipe.draw_and_resource_release (draw committer) 0.1, Graphics.Draw (draw committer) 0.1
  • batch 5222: 10.6 ms at 9041 ms, present 5345: GPU no ranges; recorded by no CPU slices
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.

  • queue worker 0x0: 431133 events lost; buffer full at 5675.5 ms
  • draw committer: 41376 events lost; buffer full at 12981.3 ms

Slowest frames (largest slices inside each, inclusive)

  • present 5378: 67.0 ms at 7739 ms: batch (gpu) 33.4, Graphics.Draw (draw committer) 25.5, VideoOut.Flip (presenter) 16.0, VideoOut.Flip.present (presenter) 15.9
  • present 5369: 65.3 ms at 7210 ms: batch (gpu) 33.4, Graphics.Draw (draw committer) 22.4, Graphics.Draw.draw_and_resource_release (draw committer) 17.3, VideoOut.Flip (presenter) 15.7
  • present 5248: 64.3 ms at 235 ms: Driver.Packet (queue worker 0x0) 40.3, batch (gpu) 36.9, Driver.Packet.draw (queue worker 0x0) 33.0, Driver.Draw (queue worker 0x0) 31.6
  • present 5428: 64.1 ms at 10637 ms: batch (gpu) 38.0, Graphics.Draw (draw committer) 23.1, VideoOut.Flip (presenter) 18.0, VideoOut.Flip.present (presenter) 17.8
  • present 5430: 63.8 ms at 10757 ms: batch (gpu) 36.5, Graphics.Draw (draw committer) 23.9, Graphics.Draw.draw_and_resource_release (draw committer) 18.0, VideoOut.Flip (presenter) 17.9

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

  • present 5378: 67.0 ms at 7739 ms, persistence 13.1 ms
  • present 5248: 64.3 ms at 235 ms, persistence 10.4 ms
  • present 5369: 65.3 ms at 7210 ms, persistence 10.3 ms
  • present 5428: 64.1 ms at 10637 ms, persistence 10.0 ms
  • present 5317: 63.1 ms at 4220 ms, persistence 9.2 ms
  • present 5456: 63.7 ms at 12253 ms, persistence 8.8 ms
  • present 5275: 63.3 ms at 1808 ms, persistence 7.9 ms
  • present 5430: 63.8 ms at 10757 ms, persistence 7.9 ms
  • present 5352: 62.0 ms at 6231 ms, persistence 7.4 ms
  • present 5254: 63.2 ms at 581 ms, persistence 7.2 ms

Threads (ms per frame)

thread busy wait untraced in slices < 20 us largest
title 0.0 (0 %) 16.4 (28 %) 41.3 0.5 Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveAbi 0.0
queue worker 0x0 11.4 (20 %) 0.0 (0 %) 46.3 48.2 Driver.Packet 11.4, Driver.EndSubmission 0.0
draw committer 20.8 (36 %) 0.3 (0 %) 36.7 31.4 Graphics.Draw 17.5, Vulkan.DrawFromRecipe 2.1
title 0.0 (0 %) 0.0 (0 %) 57.7 0.0 Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 57.7 0.0 Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 57.7 0.0 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
presenter 0.8 (1 %) 15.9 (28 %) 41.0 0.0 VideoOut.Flip 16.6, Driver.Present 0.1
title 0.0 (0 %) 0.0 (0 %) 57.7 0.0 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 57.7 0.1 Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 57.7 0.1 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 57.7 0.0 Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 57.7 0.0 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 57.7 0.0 Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 57.7 0.1 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 57.7 0.0 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 57.7 0.0 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
gpu 33.5 (58 %) 0.0 (0 %) 24.2 0.0 batch 33.5

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

  • Recorder.WaitSerial (title) 19.4 ms at 115 ms, present 5245
  • Recorder.WaitSerial (title) 19.3 ms at 3591 ms, present 5306
  • Recorder.WaitSerial (title) 19.2 ms at 2095 ms, present 5279
  • Recorder.WaitSerial (title) 19.1 ms at 14889 ms, present 5502
  • Recorder.WaitSerial (title) 19.0 ms at 9595 ms, present 5410
  • Recorder.WaitSerial (title) 18.9 ms at 11796 ms, present 5447
  • Recorder.WaitSerial (title) 18.9 ms at 12830 ms, present 5465
  • Recorder.WaitSerial (title) 18.9 ms at 10295 ms, present 5422
  • Recorder.WaitSerial (title) 18.9 ms at 12716 ms, present 5463
  • Recorder.WaitSerial (title) 18.8 ms at 9133 ms, present 5401

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

  • batch 7385: 11.5 ms at 12423 ms, present 5458: GPU no ranges; recorded by Vulkan.DrawFromRecipe (draw committer) 0.2, Graphics.DrawWithRecipe (draw committer) 0.2, Graphics.DrawWithRecipe.draw_and_resource_release (draw committer) 0.2, Graphics.Draw (draw committer) 0.2
  • batch 161: 11.5 ms at 292 ms, present 5248: GPU no ranges; recorded by Vulkan.DrawFromRecipe (draw committer) 0.4, Graphics.DrawWithRecipe (draw committer) 0.3, Graphics.DrawWithRecipe.draw_and_resource_release (draw committer) 0.3, Graphics.Draw (draw committer) 0.2
  • batch 4225: 11.4 ms at 7089 ms, present 5366: GPU no ranges; recorded by Vulkan.DrawFromRecipe (draw committer) 0.2, Graphics.DrawWithRecipe (draw committer) 0.2, Graphics.DrawWithRecipe.draw_and_resource_release (draw committer) 0.2, Graphics.Draw (draw committer) 0.2
  • batch 5707: 11.2 ms at 9590 ms, present 5409: GPU no ranges; recorded by no CPU slices
  • batch 855: 11.2 ms at 1454 ms, present 5268: GPU no ranges; recorded by Driver.Packet (queue worker 0x0) 5.0, Driver.Packet.dispatch (queue worker 0x0) 2.4, Driver.Dispatch (queue worker 0x0) 2.4, Driver.Packet.draw (queue worker 0x0) 2.3
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.

  • queue worker 0x0: 468886 events lost; buffer full at 5407.6 ms
  • draw committer: 8128 events lost; buffer full at 14612.0 ms

Slowest frames (largest slices inside each, inclusive)

  • present 5406: 69.0 ms at 12524 ms: batch (gpu) 33.9, Graphics.Draw (draw committer) 23.4, VideoOut.Flip (presenter) 17.8, VideoOut.Flip.present (presenter) 17.6
  • present 5203: 67.3 ms at 522 ms: Driver.Packet (queue worker 0x0) 46.0, Driver.Packet.draw (queue worker 0x0) 40.3, Driver.Draw (queue worker 0x0) 38.7, batch (gpu) 29.9
  • present 5382: 67.1 ms at 11088 ms: batch (gpu) 39.4, Graphics.Draw (draw committer) 23.9, VideoOut.Flip (presenter) 17.2, VideoOut.Flip.present (presenter) 16.9
  • present 5202: 65.9 ms at 456 ms: Driver.Packet (queue worker 0x0) 40.1, batch (gpu) 38.1, Driver.Packet.draw (queue worker 0x0) 31.8, Driver.Draw (queue worker 0x0) 31.0
  • present 5398: 65.7 ms at 12053 ms: batch (gpu) 34.4, Graphics.Draw (draw committer) 21.3, VideoOut.Flip (presenter) 15.4, VideoOut.Flip.present (presenter) 15.2

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

  • present 5406: 69.0 ms at 12524 ms, persistence 14.6 ms
  • present 5203: 67.3 ms at 522 ms, persistence 13.0 ms
  • present 5304: 65.5 ms at 6494 ms, persistence 10.8 ms
  • present 5382: 67.1 ms at 11088 ms, persistence 10.5 ms
  • present 5440: 64.6 ms at 14526 ms, persistence 9.7 ms
  • present 5251: 64.8 ms at 3357 ms, persistence 9.6 ms
  • present 5372: 65.5 ms at 10493 ms, persistence 9.2 ms
  • present 5398: 65.7 ms at 12053 ms, persistence 8.8 ms
  • present 5321: 63.0 ms at 7489 ms, persistence 8.2 ms
  • present 5212: 65.1 ms at 1059 ms, persistence 8.1 ms

Threads (ms per frame)

thread busy wait untraced in slices < 20 us largest
title 0.0 (0 %) 16.0 (27 %) 43.0 0.5 Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveAbi 0.0
queue worker 0x0 11.5 (19 %) 0.0 (0 %) 47.5 45.8 Driver.Packet 11.5, Driver.EndSubmission 0.0
draw committer 22.5 (38 %) 0.3 (0 %) 36.2 36.3 Graphics.Draw 18.9, Vulkan.DrawFromRecipe 2.4
title 0.0 (0 %) 0.0 (0 %) 59.0 0.0 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 59.0 0.1 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 59.0 0.0 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 59.0 0.0 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
presenter 0.8 (1 %) 15.5 (26 %) 42.7 0.0 VideoOut.Flip 16.3, Driver.Present 0.1
title 0.0 (0 %) 0.0 (0 %) 59.0 0.0 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 59.0 0.0 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 59.0 0.1 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 59.0 0.0 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 59.0 0.1 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 59.0 0.1 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 59.0 0.0 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 59.0 0.1 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
gpu 32.9 (56 %) 0.0 (0 %) 26.1 0.0 batch 32.9

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

  • Recorder.WaitSerial (title) 19.2 ms at 227 ms, present 5197
  • Recorder.WaitSerial (title) 18.8 ms at 5078 ms, present 5279
  • Recorder.WaitSerial (title) 18.7 ms at 14647 ms, present 5441
  • Recorder.WaitSerial (title) 18.7 ms at 11697 ms, present 5392
  • Recorder.WaitSerial (title) 18.5 ms at 11212 ms, present 5384
  • Recorder.WaitSerial (title) 18.5 ms at 14882 ms, present 5445
  • Recorder.WaitSerial (title) 18.5 ms at 4023 ms, present 5261
  • Recorder.WaitSerial (title) 18.5 ms at 14997 ms, present 5448
  • Recorder.WaitSerial (title) 18.5 ms at 14764 ms, present 5444
  • Driver.Present.render_fence_wait (presenter) 18.4 ms at 228 ms, present 5198

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

  • batch 923: 11.3 ms at 1591 ms, present 5220: GPU no ranges; recorded by Driver.Packet (queue worker 0x0) 7.9, Driver.Packet.draw (queue worker 0x0) 3.8, Driver.Draw (queue worker 0x0) 3.7, Driver.Packet.dispatch (queue worker 0x0) 3.6
  • batch 2428: 11.1 ms at 4191 ms, present 5264: GPU no ranges; recorded by Vulkan.DrawFromRecipe (draw committer) 0.3, Graphics.DrawWithRecipe (draw committer) 0.3, Graphics.DrawWithRecipe.draw_and_resource_release (draw committer) 0.3, Graphics.Draw (draw committer) 0.1
  • batch 8416: 11.0 ms at 14458 ms, present 5438: GPU no ranges; recorded by no CPU slices
  • batch 6287: 10.9 ms at 10790 ms, present 5376: GPU no ranges; recorded by Vulkan.DrawFromRecipe (draw committer) 0.2, Graphics.DrawWithRecipe (draw committer) 0.2, Graphics.DrawWithRecipe.draw_and_resource_release (draw committer) 0.2, Graphics.Draw (draw committer) 0.1
  • batch 3187: 10.8 ms at 5472 ms, present 5286: GPU no ranges; recorded by no CPU slices

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, worker and committer sampler share)
  • GPUs tested: NVIDIA GeForce RTX 2080 Ti, driver 617.14, Windows 11 (10.0.26300)
  • AI-assisted: yes

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.
@github-actions github-actions Bot added agc libSceAgc* perf Performance change labels Nov 17, 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 — no blocking findings

Nothing blocks this; the points below are optional.

What I ran

  • Head: cbef220d6cf4ab835ca9dce33d4945c645e89fbd, base main. 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 Check and FillAndVerify, and the test setup that loads libstdc++-6.dll. Only the diff of the test file was read.
  • Lines 1–199 of HostAllocator.cpp at head. The changed hunks and their context were read from the diff.
  • Callers of operator delete outside the driver folder. The search found no matches.
  • Behaviour of _msize on blocks from other heaps (for example under APS5_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.

@milescoviello

Copy link
Copy Markdown
Contributor

A second Windows machine for this one, since the change only affects the _msize path: Windows 11 (VM, NVIDIA GeForce GT 1030, WinLibs GCC 16.2 POSIX UCRT, Ninja, Release).

agc_driver_host_allocator passes 3 of 3 runs on the merge base 89b0eef7ab and 3 of 3 on this head cbef220d6c, with the new cases from this PR included. I only ran the unit test, not a title, so this says nothing about the frame-time numbers.

@github-actions

Copy link
Copy Markdown

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

Pull request Shared files not compared
PR 16753 core/libs/prx/libSceAgcDriver/tests/HostAllocator.cpp

@Colewiz7

Copy link
Copy Markdown
Contributor

Head cbef220d6c merged onto main 7c836568c8 as 67a5991486, no conflict. Linux 7.3.4, GCC 16.2.1 Release, Mesa 26.2.6 RADV, RX 7900 XT (gfx1100) and 7800X3D iGPU (gfx1036).

No new failures and no new validation messages on either GPU.

RX 7900 XT iGPU
tests run (6206 on the 7900 XT, the 2007 GPU ones on the iGPU), new failures vs main none none
-R '^agc' (1940 tests) with the layer, new failures vs main none none
VUID- / SYNC-HAZARD lines 0 / 0 0 / 0

Layer runs used VK_LAYER_KHRONOS_validation 1.4.363.1 with VK_LOADER_DEBUG=layer and ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1; the loader inserted the layer in every run, and the set of distinct validation messages matches main.

AI-assisted: yes

@oneandonlydean
oneandonlydean merged commit 89b194e into boykopovar:main Nov 19, 2026
14 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.

5 participants