perf(agc): answer clear accesses at the top of the flush hook #18010

Merged
meh7an merged 2 commits from upstream-pr/18010 into main 2026-11-16 05:43:57 +00:00
meh7an commented 2026-11-10 04:19:46 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by meh7an on 2026-11-10T04:19:46Z.


What

The flush hook (FlushForAccess) runs before every guest memory access the driver makes. On Sonic Origins' S3K menu page that is about 8,200 calls per frame, mostly from the draw committer's CopyDrawInput and the queue worker's GuestMemory::Read. Almost every call finds nothing to do, yet it loads the pending-write snapshot twice, lists the pending images into a vector and takes the unit shadow registry's mutex. This answers such an access at the top of the hook from copies the calling thread keeps; anything else takes the old path unchanged.

  • ClearAccess checks, in this order: no pending image over the range (the pending list's published snapshot, kept per thread while its version holds; an out-of-date snapshot falls through to the old path, which rebuilds it), no image being flushed (flushingCount == 0), no live unit shadow over the range, and no pending write over the range (the write snapshot, kept per thread while publishGeneration holds).
  • The order is the one #8751 set. A flusher moves an image from pending to flushing, records its store (which puts it in the write snapshot), then removes it from flushing, so the write snapshot is read last. Unregister stores flushingCount with release after the store was recorded, and the hook loads it with acquire before it loads publishGeneration, so an image found neither pending nor flushing is in the snapshot or has landed. A version-current pending snapshot was rebuilt under the registry mutex after any flusher that took an image out had stored flushingCount in the same critical section, so the load after the version check sees it.
  • The old hook's first write check is dropped: a write seen there and gone by the last check has landed, because a range leaves the snapshot only after its batch's completions ran.
  • Live units: liveSerial is bumped under the registry mutex wherever units become live or stop being live (publish, mark, eviction, retire, a stale entry dropped, a device destroyed). currentLiveRanges builds the merged UnitRange of every live unit once per serial, under the mutex, and publishes it; threads keep a shared_ptr. It answers like anyShadowedLocked for every range: both skip shadows with liveUnits == 0, and the unit index range anyShadowedLocked walks is exactly the set of units whose import-clipped range overlaps the access.
  • The queued-label ranges move from an FLS value to a ThreadScratch, with a HostThreadSlot<bool> saying whether any are noted, so the hook's first check no longer calls FlsGetValue (it showed in the profile under the hook). The deferred labels they are made from already live in a TEB slot, so both now have the same per-thread storage.
  • hookCalls is counted only under APS5_PROFILE_DRAW, the only place it is printed.
  • Memory: each thread keeps at most one copy of each of the three snapshots; the live-range list has at most one entry per live 64 KiB unit (16 bytes each, bounded by the unit shadow budget).
  • APS5_NO_HOOK_CLEAR_ACCESS=1 makes the hook run all of its checks on every access, as before (new ENVIRONMENT.md row).
  • A counter-only build on main 3cd86e6ea7 (S3K, 60 s) found the early return would fire on 99.99% of the committer's calls and 99.86% of the worker's. The rest were images being flushed and pending snapshots out of date; none overlapped a pending image, a live unit, a queued label or a pending write.
  • Overlap: no open PR adds an early return to the hook, a live-unit snapshot or per-thread registry copies (diff scan of 1987 open PRs for the hook, registry and snapshot symbols). #17796 changes one line in the middle of the hook (DeferToMirror), which applies only when an image is pending over the range, so the two merge cleanly. #10193, #13928 and #13929 call QueuedLabelRanges().empty() in new code; that still compiles and agrees with the new slot. tools/pr_overlap.py failed closed: 24 open PRs that share Recorder.cpp, Texture.cpp, tests/Recorder.cpp or ENVIRONMENT.md could not be compared, so they were compared by the symbol scan above.

Tested

Windows 11 (10.0.26300), NVIDIA GeForce RTX 2080 Ti (driver 617.14), Sonic Origins (PPSA05324) menu on the S3K page, 3840x2160, default environment. The measuring base is plain main f0d842158c and this commit on top of it.

  • New test agc_hook_clear_access (agc_driver_recorder_tests --hook-clear-access-only), and agc_hook_clear_access_off (the same with APS5_NO_HOOK_CLEAR_ACCESS=1). Each access goes through GuestMemory::FlushGpuWrites and checks whether the hook answered it early, and the data: an access with nothing pending; beside and inside a pending write (inside: the hook waited for it); beside and over a queued label, with a recorder callback that notes a pending write (over: the label is recorded and its write waited for; once forgotten, the label is not recorded again); beside and over a live unit (over: the hook publishes it and the import holds its bytes); over a pending image on a unit that is not live (the hook stores the image's results). With the switch on, 6 accesses are answered early; with it off, none, and the data checks are the same.
  • unitShadowTests (agc_unit_shadow, agc_driver_unit_shadow, agc_driver_unit_shadow_budget) now also requires the live-unit copy to agree with AnyShadowedOverlaps at all 19 range checks: marking, whole and partial publish, a stale unit dropped, eviction under the 8 MiB budget, retire.
  • Broken copies of the change, each run against these tests: no serial bump at publish, no bump at mark, no live-unit check, no pending-image check, a write copy never refreshed, the label slot never set, and the early return placed before the label check are each caught. Removing the bump at the retire erase survives: earlier bumps in the same retire cover it in the test, and a missed bump on removal only makes the copy report units as live that are not, which sends the access to the old path.
  • Not covered by a test: an image being flushed by another thread during the access (needs a concurrent flusher); it rests on the order argued above.
  • Vulkan validation protocol (ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation, ctest -V, same machine and GPU): agc_driver_host_write_hook, agc_driver_host_write_pending_storage, agc_driver_idle_store_yields, agc_driver_storage_flush_ordering, agc_driver_storage_read_during_idle_store, agc_driver_store_idle_results (and _wake, _disabled), agc_unit_shadow, agc_idle_publish_wait, agc_driver_bda_reads_shadowed_results (and _per_build), agc_unit_shadow_completion_store, agc_driver_unit_shadow (and _budget), agc_small_tiled_shadow_label pass on main (16/16) and on the change (18/18 with the two new tests). Neither log contains was not found but was requested by env var VK_INSTANCE_LAYERS or a VUID- line, and the logs are equal apart from timings and the new tests. agc_idle_publish_wait reports its block not watched on this machine in both.
  • The 40 label and queued-label tests (ctest -R "^agc_.*(label|queued|Queued)", the queued-label ranges changed storage for every caller) pass on the change under the same protocol, agc_driver_native_depth_driver_queued_fill skipped by its own device check; no VUID- line.
  • tools/check_conventions.py and tools/env_reference.py --check pass. Full ctest was not run.

Sampler (APS5_SAMPLE_COMMITTER and APS5_SAMPLE_WORKER, 60 s window, 3843 samples per thread):

main f0d842158c this PR 88490895b5
FlushForAccess inclusive, draw committer 65 (1.69%) 39 (1.01%)
FlushForAccess inclusive, queue worker 59 (1.54%) 39 (1.02%)
under the hook, committer: SnapshotOverlaps / AccessKeptByCpu / PublishShadowsOnly 23 / 12 / 14 none; LiveUnitsClear 9, PendingClearOnThread 9

That is about 0.4 ms per frame on the committer and 0.3 ms on the worker. The frame is bound by the committer and the GPU: the worker waits 28-30% of its samples in DrawPipeline::Enqueue, the committer about 12%.

Two traced runs per arm (APS5_TRACE_SECONDS=200:15), in main, PR, PR, main order, both commit IDs in the summaries:

main f0d842158c this PR 88490895b5
reading FPS (median of 6) 15.49 / 15.40 15.81 / 15.84
frame p50 67.7 / 68.2 ms 70.4 / 67.0 ms
committer Graphics.Draw per frame (retained events) 26.9 / 27.4 ms 28.5 / 26.4 ms
GPU busy per present 36.5 / 35.5 ms 35.0 / 34.4 ms

The saving shows in the sampler; frame time and FPS stay within the run-to-run spread, so no FPS change is claimed (the sampler runs read 15.80 on main and 15.06 on the PR, the PR run rising from 14.58). GPU busy is not claimed either. All four traces dropped events once the worker's buffer filled, equally in both arms; the slice figures cover retained events only. Other work on the machine was not excluded during the runs.

seconds 200:15 from present 4570: 219 presents, frame p50 67.7 / p90 71.9 / p99 76.9 / max 77.3 ms, GPU busy 36.5 ms per present
NVIDIA GeForce RTX 2080 Ti, NVIDIA 617.14, Windows 10.0.26300, 3840x2160, commit f0d842158c, dropped: yes

{"commit":"f0d842158c28","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":32700,"title_id":"PPSA05324","title":"Sonic Origins","content_version":"02.002.000","resolution":"3840x2160","window":{"spec":"seconds 200:15","first_present":4570,"ms":15006.876},"presents":219,"frame_ms":{"p50":67.737,"p90":71.905,"p99":76.872,"max":77.291},"gpu_busy_ms_per_present":36.53,"worker_busy_pct":{"queue worker 0x0":96.928},"top_phases_ms_per_frame":{"Driver.Packet":64.541,"Graphics.Draw":48.45,"Driver.Packet.draw":48.019,"Driver.Draw":47.109,"Graphics.Draw.draw_and_resource_release":38.442,"Driver.Draw.shader_compile_and_link":22.83,"Shader.DrawStage":14.912,"Driver.Draw.draw_enqueued":14.045},"owned_draw_counts":{"OwnedDraw.evicted_other":19889},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":6.155,"events_lost":380734,"totals_full":false},"draw committer":{"events_full_after_s":12.075,"events_lost":64061,"totals_full":false}},"trace":"aps5-trace-f0d842158c28-43996.json.gz"}

seconds 200:15 from present 4594: 212 presents, frame p50 70.4 / p90 75.2 / p99 81.1 / max 94.6 ms, GPU busy 35.0 ms per present
NVIDIA GeForce RTX 2080 Ti, NVIDIA 617.14, Windows 10.0.26300, 3840x2160, commit 88490895b5, dropped: yes

{"commit":"88490895b541","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":32700,"title_id":"PPSA05324","title":"Sonic Origins","content_version":"02.002.000","resolution":"3840x2160","window":{"spec":"seconds 200:15","first_present":4594,"ms":15036.121},"presents":212,"frame_ms":{"p50":70.399,"p90":75.212,"p99":81.115,"max":94.631},"gpu_busy_ms_per_present":35.017,"worker_busy_pct":{"queue worker 0x0":96.759},"top_phases_ms_per_frame":{"Driver.Packet":66.689,"Graphics.Draw":49.836,"Driver.Packet.draw":49.799,"Driver.Draw":48.827,"Graphics.Draw.draw_and_resource_release":39.7,"Driver.Draw.shader_compile_and_link":23.781,"Shader.DrawStage":15.705,"Driver.Draw.draw_enqueued":14.14},"owned_draw_counts":{"OwnedDraw.evicted_other":18642},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":5.819,"events_lost":412690,"totals_full":false},"draw committer":{"events_full_after_s":12.333,"events_lost":58269,"totals_full":false}},"trace":"aps5-trace-88490895b541-1220.json.gz"}

seconds 200:15 from present 4645: 223 presents, frame p50 67.0 / p90 70.8 / p99 74.0 / max 74.6 ms, GPU busy 34.4 ms per present
NVIDIA GeForce RTX 2080 Ti, NVIDIA 617.14, Windows 10.0.26300, 3840x2160, commit 88490895b5, dropped: yes

{"commit":"88490895b541","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":32700,"title_id":"PPSA05324","title":"Sonic Origins","content_version":"02.002.000","resolution":"3840x2160","window":{"spec":"seconds 200:15","first_present":4645,"ms":15061.021},"presents":223,"frame_ms":{"p50":66.968,"p90":70.789,"p99":73.984,"max":74.621},"gpu_busy_ms_per_present":34.392,"worker_busy_pct":{"queue worker 0x0":96.922},"top_phases_ms_per_frame":{"Driver.Packet":63.566,"Graphics.Draw":47.849,"Driver.Packet.draw":47.536,"Driver.Draw":46.603,"Graphics.Draw.draw_and_resource_release":38.246,"Driver.Draw.shader_compile_and_link":22.182,"Shader.DrawStage":14.688,"Driver.Draw.draw_enqueued":14.063},"owned_draw_counts":{"OwnedDraw.evicted_other":20175},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":6.213,"events_lost":374208,"totals_full":false},"draw committer":{"events_full_after_s":12.222,"events_lost":60970,"totals_full":false}},"trace":"aps5-trace-88490895b541-41952.json.gz"}

seconds 200:15 from present 4569: 217 presents, frame p50 68.2 / p90 73.1 / p99 82.7 / max 93.1 ms, GPU busy 35.5 ms per present
NVIDIA GeForce RTX 2080 Ti, NVIDIA 617.14, Windows 10.0.26300, 3840x2160, commit f0d842158c, dropped: yes

{"commit":"f0d842158c28","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":32700,"title_id":"PPSA05324","title":"Sonic Origins","content_version":"02.002.000","resolution":"3840x2160","window":{"spec":"seconds 200:15","first_present":4569,"ms":15017.278},"presents":217,"frame_ms":{"p50":68.203,"p90":73.076,"p99":82.742,"max":93.074},"gpu_busy_ms_per_present":35.464,"worker_busy_pct":{"queue worker 0x0":96.938},"top_phases_ms_per_frame":{"Driver.Packet":65.192,"Graphics.Draw":48.954,"Driver.Packet.draw":48.548,"Driver.Draw":47.627,"Graphics.Draw.draw_and_resource_release":38.829,"Driver.Draw.shader_compile_and_link":23.019,"Shader.DrawStage":15.036,"Driver.Draw.draw_enqueued":14.307},"owned_draw_counts":{"OwnedDraw.evicted_other":19910},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":6.158,"events_lost":384919,"totals_full":false},"draw committer":{"events_full_after_s":12.178,"events_lost":60683,"totals_full":false}},"trace":"aps5-trace-f0d842158c28-8204.json.gz"}

Traces (two runs per zip, each with its aps5-summary.jsonl): m314-main-traces.zip (main f0d842158c), m314-change-traces.zip (this PR 88490895b5).

trace_digest.py, main run 1

seconds 200:15 from present 4570: 219 presents, frame p50 67.7 / p90 71.9 / p99 76.9 / max 77.3 ms, GPU busy 36.5 ms per present
NVIDIA GeForce RTX 2080 Ti, NVIDIA 617.14, Windows 10.0.26300, 3840x2160, commit f0d842158c, dropped: yes

{"commit":"f0d842158c28","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":32700,"title_id":"PPSA05324","title":"Sonic Origins","content_version":"02.002.000","resolution":"3840x2160","window":{"spec":"seconds 200:15","first_present":4570,"ms":15006.876},"presents":219,"frame_ms":{"p50":67.737,"p90":71.905,"p99":76.872,"max":77.291},"gpu_busy_ms_per_present":36.53,"worker_busy_pct":{"queue worker 0x0":96.928},"top_phases_ms_per_frame":{"Driver.Packet":64.541,"Graphics.Draw":48.45,"Driver.Packet.draw":48.019,"Driver.Draw":47.109,"Graphics.Draw.draw_and_resource_release":38.442,"Driver.Draw.shader_compile_and_link":22.83,"Shader.DrawStage":14.912,"Driver.Draw.draw_enqueued":14.045},"owned_draw_counts":{"OwnedDraw.evicted_other":19889},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":6.155,"events_lost":380734,"totals_full":false},"draw committer":{"events_full_after_s":12.075,"events_lost":64061,"totals_full":false}},"trace":"aps5-trace-f0d842158c28-43996.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: 380734 events lost; buffer full at 6155.5 ms
  • draw committer: 64061 events lost; buffer full at 12075.4 ms

Slowest frames (largest slices inside each, inclusive)

  • present 4588: 77.3 ms at 1228 ms: Driver.Packet (queue worker 0x0) 50.4, Driver.Packet.draw (queue worker 0x0) 40.0, Driver.Draw (queue worker 0x0) 38.9, Graphics.Draw (draw committer) 38.3
  • present 4662: 77.2 ms at 6303 ms: batch (gpu) 37.1, Graphics.Draw (draw committer) 34.9, Graphics.Draw.draw_and_resource_release (draw committer) 27.6, VideoOut.Flip (presenter) 10.3
  • present 4778: 76.9 ms at 14256 ms: batch (gpu) 34.1, VideoOut.Flip (presenter) 9.3, Recorder.WaitSerial (title) 9.2, VideoOut.Flip.present (presenter) 9.2
  • present 4675: 76.6 ms at 7203 ms: Graphics.Draw (draw committer) 41.6, batch (gpu) 39.3, Graphics.Draw.draw_and_resource_release (draw committer) 31.2, VideoOut.Flip (presenter) 9.6
  • present 4732: 75.6 ms at 11100 ms: Graphics.Draw (draw committer) 38.0, batch (gpu) 37.9, Graphics.Draw.draw_and_resource_release (draw committer) 29.6, VideoOut.Flip (presenter) 10.7

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

  • present 4588: 77.3 ms at 1228 ms, persistence 12.2 ms
  • present 4662: 77.2 ms at 6303 ms, persistence 12.2 ms
  • present 4778: 76.9 ms at 14256 ms, persistence 11.8 ms
  • present 4732: 75.6 ms at 11100 ms, persistence 10.0 ms
  • present 4675: 76.6 ms at 7203 ms, persistence 9.8 ms
  • present 4763: 74.9 ms at 13222 ms, persistence 9.4 ms
  • present 4705: 74.9 ms at 9242 ms, persistence 9.3 ms
  • present 4746: 74.2 ms at 12057 ms, persistence 9.0 ms
  • present 4602: 74.1 ms at 2194 ms, persistence 8.5 ms
  • present 4768: 74.0 ms at 13566 ms, persistence 8.4 ms

Threads (ms per frame)

thread busy wait untraced in slices < 20 us largest
title 0.4 (1 %) 10.4 (15 %) 57.7 0.5 Shader.ResolveGraphicsStagesAbi 0.2, Shader.ResolveGraphicsAbi 0.1
queue worker 0x0 17.2 (25 %) 0.0 (0 %) 51.3 50.8 Driver.Packet 16.5, Driver.EndSubmission 0.8
draw committer 29.3 (43 %) 0.2 (0 %) 39.0 29.3 Graphics.Draw 26.9, Recorder.Submit 1.8
title 0.1 (0 %) 0.0 (0 %) 68.4 0.1 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
title 0.1 (0 %) 0.0 (0 %) 68.4 0.1 Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveAbi 0.0
title 0.1 (0 %) 0.0 (0 %) 68.4 0.1 Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveGraphicsAbi 0.0
title 0.1 (0 %) 0.0 (0 %) 68.4 0.1 Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveGraphicsAbi 0.0
presenter 1.0 (1 %) 9.8 (14 %) 57.8 0.0 VideoOut.Flip 10.7, Driver.Present 0.0
title 0.1 (0 %) 0.0 (0 %) 68.4 0.1 Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveGraphicsAbi 0.0
title 0.1 (0 %) 0.0 (0 %) 68.4 0.0 Shader.ResolveGraphicsAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
title 0.1 (0 %) 0.0 (0 %) 68.4 0.1 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsAbi 0.0
title 0.1 (0 %) 0.0 (0 %) 68.4 0.1 Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveAbi 0.0
title 0.1 (0 %) 0.0 (0 %) 68.4 0.1 Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveAbi 0.0
title 0.1 (0 %) 0.0 (0 %) 68.4 0.1 Shader.ResolveGraphicsAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
title 0.1 (0 %) 0.0 (0 %) 68.4 0.1 Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveGraphicsAbi 0.0
title 0.1 (0 %) 0.0 (0 %) 68.4 0.1 Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveGraphicsAbi 0.0
gpu 36.5 (53 %) 0.0 (0 %) 32.0 0.0 batch 36.5

Largest slices (ms per frame, inclusive, all threads): batch 36.5, Graphics.Draw 26.9, Graphics.Draw.draw_and_resource_release 21.2, Driver.Packet 16.5, Driver.Packet.draw 12.5, Driver.Draw 12.2, VideoOut.Flip 10.7, Driver.Present 10.5, VideoOut.Flip.present 10.5, Recorder.WaitSerial 10.4

Longest waits

  • Recorder.WaitSerial (title) 11.9 ms at 11519 ms, present 4737
  • Recorder.WaitSerial (title) 11.8 ms at 9169 ms, present 4704
  • Recorder.WaitSerial (title) 11.8 ms at 2057 ms, present 4599
  • Recorder.WaitSerial (title) 11.8 ms at 11653 ms, present 4739
  • Recorder.WaitSerial (title) 11.8 ms at 5067 ms, present 4643
  • Recorder.WaitSerial (title) 11.8 ms at 3155 ms, present 4615
  • Recorder.WaitSerial (title) 11.8 ms at 7414 ms, present 4677
  • Recorder.WaitSerial (title) 11.7 ms at 6023 ms, present 4658
  • Recorder.WaitSerial (title) 11.6 ms at 5885 ms, present 4655
  • Recorder.WaitSerial (title) 11.6 ms at 5817 ms, present 4654

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

  • batch 11168: 9.9 ms at 12734 ms, present 4755: GPU no ranges; recorded by no CPU slices
  • batch 11289: 9.9 ms at 12871 ms, present 4757: GPU no ranges; recorded by no CPU slices
  • batch 5638: 9.7 ms at 6437 ms, present 4663: GPU no ranges; recorded by Graphics.Draw (draw committer) 0.6, Graphics.Draw.draw_and_resource_release (draw committer) 0.6, Resources.Complete (draw committer) 0.1
  • batch 7320: 9.7 ms at 8350 ms, present 4691: GPU no ranges; recorded by Graphics.Draw (draw committer) 0.5, Graphics.Draw.draw_and_resource_release (draw committer) 0.5, Resources.Complete (draw committer) 0.1
  • batch 948: 9.7 ms at 1082 ms, present 4585: 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
trace_digest.py, PR run 1

seconds 200:15 from present 4594: 212 presents, frame p50 70.4 / p90 75.2 / p99 81.1 / max 94.6 ms, GPU busy 35.0 ms per present
NVIDIA GeForce RTX 2080 Ti, NVIDIA 617.14, Windows 10.0.26300, 3840x2160, commit 88490895b5, dropped: yes

{"commit":"88490895b541","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":32700,"title_id":"PPSA05324","title":"Sonic Origins","content_version":"02.002.000","resolution":"3840x2160","window":{"spec":"seconds 200:15","first_present":4594,"ms":15036.121},"presents":212,"frame_ms":{"p50":70.399,"p90":75.212,"p99":81.115,"max":94.631},"gpu_busy_ms_per_present":35.017,"worker_busy_pct":{"queue worker 0x0":96.759},"top_phases_ms_per_frame":{"Driver.Packet":66.689,"Graphics.Draw":49.836,"Driver.Packet.draw":49.799,"Driver.Draw":48.827,"Graphics.Draw.draw_and_resource_release":39.7,"Driver.Draw.shader_compile_and_link":23.781,"Shader.DrawStage":15.705,"Driver.Draw.draw_enqueued":14.14},"owned_draw_counts":{"OwnedDraw.evicted_other":18642},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":5.819,"events_lost":412690,"totals_full":false},"draw committer":{"events_full_after_s":12.333,"events_lost":58269,"totals_full":false}},"trace":"aps5-trace-88490895b541-1220.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: 412690 events lost; buffer full at 5818.7 ms
  • draw committer: 58269 events lost; buffer full at 12333.1 ms

Slowest frames (largest slices inside each, inclusive)

  • present 4800: 94.6 ms at 14585 ms: batch (gpu) 40.9, VideoOut.Flip (presenter) 9.8, VideoOut.Flip.present (presenter) 9.7, Driver.Present (presenter) 9.7
  • present 4660: 81.4 ms at 4674 ms: Driver.Packet (queue worker 0x0) 53.6, Graphics.Draw (draw committer) 47.2, Driver.Packet.draw (queue worker 0x0) 43.3, Driver.Draw (queue worker 0x0) 42.4
  • present 4666: 81.1 ms at 5107 ms: Driver.Packet (queue worker 0x0) 53.7, Graphics.Draw (draw committer) 43.1, Driver.Packet.draw (queue worker 0x0) 42.4, Driver.Draw (queue worker 0x0) 41.0
  • present 4620: 80.5 ms at 1850 ms: Driver.Packet (queue worker 0x0) 56.4, Graphics.Draw (draw committer) 45.9, Driver.Packet.draw (queue worker 0x0) 45.2, Driver.Draw (queue worker 0x0) 44.1
  • present 4645: 79.6 ms at 3615 ms: Driver.Packet (queue worker 0x0) 54.8, Graphics.Draw (draw committer) 45.8, Driver.Packet.draw (queue worker 0x0) 45.2, Driver.Draw (queue worker 0x0) 43.9

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

  • present 4800: 94.6 ms at 14585 ms, persistence 30.4 ms
  • present 4660: 81.4 ms at 4674 ms, persistence 17.1 ms
  • present 4620: 80.5 ms at 1850 ms, persistence 15.3 ms
  • present 4645: 79.6 ms at 3615 ms, persistence 13.5 ms
  • present 4718: 79.6 ms at 8861 ms, persistence 13.4 ms
  • present 4598: 77.7 ms at 290 ms, persistence 12.6 ms
  • present 4666: 81.1 ms at 5107 ms, persistence 11.8 ms
  • present 4707: 78.7 ms at 8079 ms, persistence 11.5 ms
  • present 4737: 77.6 ms at 10209 ms, persistence 11.4 ms
  • present 4780: 77.4 ms at 13172 ms, persistence 11.0 ms

Threads (ms per frame)

thread busy wait untraced in slices < 20 us largest
title 0.4 (1 %) 9.2 (13 %) 61.3 0.5 Shader.ResolveGraphicsStagesAbi 0.2, Shader.ResolveGraphicsAbi 0.1
queue worker 0x0 17.5 (25 %) 0.0 (0 %) 53.4 47.7 Driver.Packet 16.8, Driver.EndSubmission 0.7
draw committer 30.8 (43 %) 0.2 (0 %) 39.9 30.7 Graphics.Draw 28.5, Recorder.Submit 1.7
title 0.1 (0 %) 0.0 (0 %) 70.8 0.1 Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveGraphicsAbi 0.0
title 0.1 (0 %) 0.0 (0 %) 70.8 0.1 Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveGraphicsAbi 0.0
title 0.1 (0 %) 0.0 (0 %) 70.8 0.1 Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveGraphicsAbi 0.0
presenter 0.9 (1 %) 8.6 (12 %) 61.4 0.0 VideoOut.Flip 9.5, Driver.Present 0.0
title 0.1 (0 %) 0.0 (0 %) 70.8 0.1 Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveAbi 0.0
title 0.1 (0 %) 0.0 (0 %) 70.8 0.1 Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveAbi 0.0
title 0.1 (0 %) 0.0 (0 %) 70.8 0.1 Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveGraphicsAbi 0.0
title 0.1 (0 %) 0.0 (0 %) 70.8 0.1 Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveAbi 0.0
title 0.1 (0 %) 0.0 (0 %) 70.8 0.1 Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveGraphicsAbi 0.0
title 0.1 (0 %) 0.0 (0 %) 70.8 0.1 Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveGraphicsAbi 0.0
title 0.1 (0 %) 0.0 (0 %) 70.8 0.1 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
title 0.1 (0 %) 0.0 (0 %) 70.8 0.1 Shader.ResolveGraphicsAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
title 0.1 (0 %) 0.0 (0 %) 70.8 0.1 Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveGraphicsAbi 0.0
gpu 34.9 (49 %) 0.0 (0 %) 36.0 0.0 batch 34.9

Largest slices (ms per frame, inclusive, all threads): batch 34.9, Graphics.Draw 28.5, Graphics.Draw.draw_and_resource_release 21.9, Driver.Packet 16.8, Driver.Packet.draw 13.0, Driver.Draw 12.6, VideoOut.Flip 9.5, Driver.Present 9.3, VideoOut.Flip.present 9.3, Recorder.WaitSerial 9.2

Longest waits

  • Recorder.WaitSerial (title) 11.1 ms at 12426 ms, present 4769
  • Recorder.WaitSerial (title) 11.1 ms at 3338 ms, present 4640
  • Recorder.WaitSerial (title) 11.0 ms at 10632 ms, present 4742
  • Recorder.WaitSerial (title) 10.9 ms at 8585 ms, present 4713
  • Recorder.WaitSerial (title) 10.9 ms at 3406 ms, present 4641
  • Recorder.WaitSerial (title) 10.8 ms at 1850 ms, present 4619
  • Recorder.WaitSerial (title) 10.8 ms at 13250 ms, present 4780
  • Recorder.WaitSerial (title) 10.8 ms at 8372 ms, present 4710
  • Recorder.WaitSerial (title) 10.8 ms at 14514 ms, present 4798
  • Recorder.WaitSerial (title) 10.8 ms at 10768 ms, present 4744

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

  • batch 7390: 10.0 ms at 8711 ms, present 4715: GPU no ranges; recorded by Graphics.Draw (draw committer) 0.4, Graphics.Draw.draw_and_resource_release (draw committer) 0.4, Resources.Complete (draw committer) 0.0
  • batch 5691: 9.9 ms at 6696 ms, present 4687: GPU no ranges; recorded by Graphics.Draw (draw committer) 0.5, Graphics.Draw.draw_and_resource_release (draw committer) 0.5, Resources.Complete (draw committer) 0.0
  • batch 8842: 9.8 ms at 10414 ms, present 4739: GPU no ranges; recorded by Graphics.Draw (draw committer) 0.6, Graphics.Draw.draw_and_resource_release (draw committer) 0.6, Resources.Complete (draw committer) 0.1
  • batch 11796: 9.8 ms at 13798 ms, present 4788: GPU no ranges; recorded by no CPU slices
  • batch 8537: 9.8 ms at 10051 ms, present 4734: GPU no ranges; recorded by Graphics.Draw (draw committer) 0.5, Graphics.Draw.draw_and_resource_release (draw committer) 0.5, Resources.Complete (draw committer) 0.1
trace_digest.py, PR run 2

seconds 200:15 from present 4645: 223 presents, frame p50 67.0 / p90 70.8 / p99 74.0 / max 74.6 ms, GPU busy 34.4 ms per present
NVIDIA GeForce RTX 2080 Ti, NVIDIA 617.14, Windows 10.0.26300, 3840x2160, commit 88490895b5, dropped: yes

{"commit":"88490895b541","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":32700,"title_id":"PPSA05324","title":"Sonic Origins","content_version":"02.002.000","resolution":"3840x2160","window":{"spec":"seconds 200:15","first_present":4645,"ms":15061.021},"presents":223,"frame_ms":{"p50":66.968,"p90":70.789,"p99":73.984,"max":74.621},"gpu_busy_ms_per_present":34.392,"worker_busy_pct":{"queue worker 0x0":96.922},"top_phases_ms_per_frame":{"Driver.Packet":63.566,"Graphics.Draw":47.849,"Driver.Packet.draw":47.536,"Driver.Draw":46.603,"Graphics.Draw.draw_and_resource_release":38.246,"Driver.Draw.shader_compile_and_link":22.182,"Shader.DrawStage":14.688,"Driver.Draw.draw_enqueued":14.063},"owned_draw_counts":{"OwnedDraw.evicted_other":20175},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":6.213,"events_lost":374208,"totals_full":false},"draw committer":{"events_full_after_s":12.222,"events_lost":60970,"totals_full":false}},"trace":"aps5-trace-88490895b541-41952.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: 374208 events lost; buffer full at 6213.2 ms
  • draw committer: 60970 events lost; buffer full at 12221.9 ms

Slowest frames (largest slices inside each, inclusive)

  • present 4848: 74.6 ms at 13703 ms: batch (gpu) 35.7, VideoOut.Flip (presenter) 9.4, VideoOut.Flip.present (presenter) 9.2, Driver.Present (presenter) 9.2
  • present 4700: 74.1 ms at 3719 ms: Driver.Packet (queue worker 0x0) 49.3, Driver.Packet.draw (queue worker 0x0) 39.9, Driver.Draw (queue worker 0x0) 38.3, Graphics.Draw (draw committer) 35.5
  • present 4804: 74.0 ms at 10729 ms: Graphics.Draw (draw committer) 37.1, batch (gpu) 35.0, Graphics.Draw.draw_and_resource_release (draw committer) 28.1, VideoOut.Flip (presenter) 10.5
  • present 4714: 73.9 ms at 4668 ms: Driver.Packet (queue worker 0x0) 45.5, batch (gpu) 36.6, Graphics.Draw (draw committer) 35.5, Driver.Packet.draw (queue worker 0x0) 34.5
  • present 4837: 73.8 ms at 12942 ms: batch (gpu) 34.6, VideoOut.Flip (presenter) 9.1, VideoOut.Flip.present (presenter) 8.8, Driver.Present (presenter) 8.8

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

  • present 4848: 74.6 ms at 13703 ms, persistence 10.9 ms
  • present 4700: 74.1 ms at 3719 ms, persistence 10.4 ms
  • present 4804: 74.0 ms at 10729 ms, persistence 9.6 ms
  • present 4762: 73.4 ms at 7895 ms, persistence 9.4 ms
  • present 4714: 73.9 ms at 4668 ms, persistence 8.3 ms
  • present 4678: 71.5 ms at 2227 ms, persistence 7.8 ms
  • present 4863: 72.5 ms at 14716 ms, persistence 7.7 ms
  • present 4837: 73.8 ms at 12942 ms, persistence 7.7 ms
  • present 4775: 73.1 ms at 8778 ms, persistence 7.6 ms
  • present 4783: 72.1 ms at 9320 ms, persistence 6.9 ms

Threads (ms per frame)

thread busy wait untraced in slices < 20 us largest
title 0.4 (1 %) 9.7 (14 %) 57.4 0.5 Shader.ResolveGraphicsStagesAbi 0.2, Shader.ResolveGraphicsAbi 0.1
queue worker 0x0 16.9 (25 %) 0.0 (0 %) 50.6 51.4 Driver.Packet 16.1, Driver.EndSubmission 0.8
draw committer 28.5 (42 %) 0.2 (0 %) 38.8 29.8 Graphics.Draw 26.4, Recorder.Submit 1.6
title 0.1 (0 %) 0.0 (0 %) 67.4 0.1 Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveAbi 0.0
title 0.1 (0 %) 0.0 (0 %) 67.4 0.1 Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveGraphicsAbi 0.0
title 0.1 (0 %) 0.0 (0 %) 67.4 0.1 Shader.ResolveGraphicsAbi 0.0, Shader.ResolveAbi 0.0
title 0.1 (0 %) 0.0 (0 %) 67.4 0.1 Shader.ResolveGraphicsStagesAbi 0.1, Shader.ResolveGraphicsAbi 0.0
presenter 0.9 (1 %) 9.1 (13 %) 57.5 0.0 VideoOut.Flip 10.0, Driver.Present 0.0
title 0.1 (0 %) 0.0 (0 %) 67.4 0.1 Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveGraphicsAbi 0.0
title 0.1 (0 %) 0.0 (0 %) 67.4 0.1 Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveGraphicsAbi 0.0
title 0.1 (0 %) 0.0 (0 %) 67.4 0.1 Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveGraphicsAbi 0.0
title 0.1 (0 %) 0.0 (0 %) 67.4 0.1 Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveGraphicsAbi 0.0
title 0.1 (0 %) 0.0 (0 %) 67.4 0.1 Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveAbi 0.0
title 0.1 (0 %) 0.0 (0 %) 67.4 0.0 Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveGraphicsAbi 0.0
title 0.1 (0 %) 0.0 (0 %) 67.4 0.1 Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveAbi 0.0
title 0.1 (0 %) 0.0 (0 %) 67.4 0.1 Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveGraphicsAbi 0.0
gpu 34.4 (51 %) 0.0 (0 %) 33.1 0.0 batch 34.4

Largest slices (ms per frame, inclusive, all threads): batch 34.4, Graphics.Draw 26.4, Graphics.Draw.draw_and_resource_release 21.0, Driver.Packet 16.1, Driver.Packet.draw 12.4, Driver.Draw 12.0, VideoOut.Flip 10.0, Driver.Present 9.8, VideoOut.Flip.present 9.8, Recorder.WaitSerial 9.7

Longest waits

  • Recorder.WaitSerial (title) 11.3 ms at 14047 ms, present 4852
  • Recorder.WaitSerial (title) 11.2 ms at 7293 ms, present 4753
  • Recorder.WaitSerial (title) 11.2 ms at 5289 ms, present 4722
  • Recorder.WaitSerial (title) 11.1 ms at 4060 ms, present 4704
  • Recorder.WaitSerial (title) 11.1 ms at 3243 ms, present 4693
  • Recorder.WaitSerial (title) 11.0 ms at 10937 ms, present 4806
  • Recorder.WaitSerial (title) 11.0 ms at 3926 ms, present 4702
  • Recorder.WaitSerial (title) 11.0 ms at 4195 ms, present 4707
  • Recorder.WaitSerial (title) 11.0 ms at 4261 ms, present 4707
  • Recorder.WaitSerial (title) 11.0 ms at 3513 ms, present 4697

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

  • batch 6768: 9.8 ms at 7678 ms, present 4758: GPU no ranges; recorded by Graphics.Draw (draw committer) 0.5, Graphics.Draw.draw_and_resource_release (draw committer) 0.5, Resources.Complete (draw committer) 0.1, Graphics.Draw.validate (draw committer) 0.0
  • batch 11318: 9.5 ms at 12797 ms, present 4834: GPU no ranges; recorded by no CPU slices
  • batch 10005: 9.5 ms at 11323 ms, present 4812: GPU no ranges; recorded by Graphics.Draw (draw committer) 0.4, Graphics.Draw.draw_and_resource_release (draw committer) 0.4, Resources.Complete (draw committer) 0.1, Recorder.Reap (draw committer) 0.0
  • batch 8093: 9.4 ms at 9176 ms, present 4780: GPU no ranges; recorded by Graphics.Draw (draw committer) 0.5, Graphics.Draw.draw_and_resource_release (draw committer) 0.5, Resources.Complete (draw committer) 0.1, Recorder.Reap (draw committer) 0.0
  • batch 10241: 9.4 ms at 11593 ms, present 4816: GPU no ranges; recorded by Graphics.Draw (draw committer) 0.5, Graphics.Draw.draw_and_resource_release (draw committer) 0.4, Resources.Complete (draw committer) 0.1
trace_digest.py, main run 2

seconds 200:15 from present 4569: 217 presents, frame p50 68.2 / p90 73.1 / p99 82.7 / max 93.1 ms, GPU busy 35.5 ms per present
NVIDIA GeForce RTX 2080 Ti, NVIDIA 617.14, Windows 10.0.26300, 3840x2160, commit f0d842158c, dropped: yes

{"commit":"f0d842158c28","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":32700,"title_id":"PPSA05324","title":"Sonic Origins","content_version":"02.002.000","resolution":"3840x2160","window":{"spec":"seconds 200:15","first_present":4569,"ms":15017.278},"presents":217,"frame_ms":{"p50":68.203,"p90":73.076,"p99":82.742,"max":93.074},"gpu_busy_ms_per_present":35.464,"worker_busy_pct":{"queue worker 0x0":96.938},"top_phases_ms_per_frame":{"Driver.Packet":65.192,"Graphics.Draw":48.954,"Driver.Packet.draw":48.548,"Driver.Draw":47.627,"Graphics.Draw.draw_and_resource_release":38.829,"Driver.Draw.shader_compile_and_link":23.019,"Shader.DrawStage":15.036,"Driver.Draw.draw_enqueued":14.307},"owned_draw_counts":{"OwnedDraw.evicted_other":19910},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":6.158,"events_lost":384919,"totals_full":false},"draw committer":{"events_full_after_s":12.178,"events_lost":60683,"totals_full":false}},"trace":"aps5-trace-f0d842158c28-8204.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: 384919 events lost; buffer full at 6158.3 ms
  • draw committer: 60683 events lost; buffer full at 12177.8 ms

Slowest frames (largest slices inside each, inclusive)

  • present 4752: 93.1 ms at 12633 ms: batch (gpu) 39.8, VideoOut.Flip (presenter) 8.6, VideoOut.Flip.present (presenter) 8.6, Driver.Present (presenter) 8.5
  • present 4753: 86.7 ms at 12726 ms: batch (gpu) 29.5, VideoOut.Flip (presenter) 2.7, VideoOut.Flip.present (presenter) 2.5, Driver.Present (presenter) 2.5
  • present 4754: 82.7 ms at 12813 ms: batch (gpu) 33.3, VideoOut.Flip (presenter) 7.3, VideoOut.Flip.present (presenter) 7.1, Driver.Present (presenter) 7.1
  • present 4743: 78.5 ms at 11973 ms: Graphics.Draw (draw committer) 41.0, batch (gpu) 35.5, Graphics.Draw.draw_and_resource_release (draw committer) 33.0, VideoOut.Flip (presenter) 9.3
  • present 4612: 78.5 ms at 2953 ms: Driver.Packet (queue worker 0x0) 53.0, Graphics.Draw (draw committer) 45.4, Driver.Packet.draw (queue worker 0x0) 42.3, Driver.Draw (queue worker 0x0) 41.5

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

  • present 4752: 93.1 ms at 12633 ms, persistence 30.5 ms
  • present 4612: 78.5 ms at 2953 ms, persistence 15.9 ms
  • present 4594: 77.8 ms at 1708 ms, persistence 12.2 ms
  • present 4771: 76.8 ms at 13993 ms, persistence 11.8 ms
  • present 4627: 76.5 ms at 3982 ms, persistence 10.8 ms
  • present 4700: 73.5 ms at 8973 ms, persistence 9.9 ms
  • present 4689: 74.5 ms at 8222 ms, persistence 9.4 ms
  • present 4743: 78.5 ms at 11973 ms, persistence 9.4 ms
  • present 4761: 75.9 ms at 13302 ms, persistence 9.3 ms
  • present 4735: 76.9 ms at 11393 ms, persistence 8.8 ms

Threads (ms per frame)

thread busy wait untraced in slices < 20 us largest
title 0.4 (1 %) 9.3 (13 %) 59.5 0.5 Shader.ResolveGraphicsStagesAbi 0.2, Shader.ResolveGraphicsAbi 0.1
queue worker 0x0 17.4 (25 %) 0.0 (0 %) 51.8 51.2 Driver.Packet 16.6, Driver.EndSubmission 0.8
draw committer 29.8 (43 %) 0.2 (0 %) 39.2 30.1 Graphics.Draw 27.4, Recorder.Submit 1.9
title 0.1 (0 %) 0.0 (0 %) 69.1 0.1 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
title 0.1 (0 %) 0.0 (0 %) 69.1 0.1 Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveGraphicsAbi 0.0
title 0.1 (0 %) 0.0 (0 %) 69.1 0.1 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsAbi 0.0
title 0.1 (0 %) 0.0 (0 %) 69.1 0.1 Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveAbi 0.0
presenter 0.8 (1 %) 8.7 (13 %) 59.7 0.0 VideoOut.Flip 9.5, Driver.Present 0.0
title 0.1 (0 %) 0.0 (0 %) 69.1 0.1 Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveGraphicsAbi 0.0
title 0.1 (0 %) 0.0 (0 %) 69.1 0.1 Shader.ResolveGraphicsAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
title 0.1 (0 %) 0.0 (0 %) 69.1 0.1 Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveAbi 0.0
title 0.1 (0 %) 0.0 (0 %) 69.1 0.1 Shader.ResolveGraphicsAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
title 0.1 (0 %) 0.0 (0 %) 69.1 0.1 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
title 0.1 (0 %) 0.0 (0 %) 69.1 0.1 Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveGraphicsAbi 0.0
title 0.1 (0 %) 0.0 (0 %) 69.1 0.1 Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveGraphicsAbi 0.0
title 0.1 (0 %) 0.0 (0 %) 69.1 0.0 Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveGraphicsAbi 0.0
gpu 35.5 (51 %) 0.0 (0 %) 33.7 0.0 batch 35.5

Largest slices (ms per frame, inclusive, all threads): batch 35.5, Graphics.Draw 27.4, Graphics.Draw.draw_and_resource_release 21.4, Driver.Packet 16.6, Driver.Packet.draw 12.7, Driver.Draw 12.3, VideoOut.Flip 9.5, Driver.Present 9.4, VideoOut.Flip.present 9.4, Recorder.WaitSerial 9.3

Longest waits

  • Recorder.WaitSerial (title) 11.1 ms at 3710 ms, present 4623
  • Recorder.WaitSerial (title) 11.0 ms at 2619 ms, present 4606
  • Recorder.WaitSerial (title) 10.8 ms at 14410 ms, present 4776
  • Recorder.WaitSerial (title) 10.8 ms at 8501 ms, present 4692
  • Recorder.WaitSerial (title) 10.8 ms at 9986 ms, present 4715
  • Recorder.WaitSerial (title) 10.8 ms at 4526 ms, present 4635
  • Recorder.WaitSerial (title) 10.8 ms at 10833 ms, present 4726
  • Recorder.WaitSerial (title) 10.8 ms at 4593 ms, present 4635
  • Recorder.WaitSerial (title) 10.7 ms at 7943 ms, present 4684
  • Recorder.WaitSerial (title) 10.7 ms at 1639 ms, present 4592

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

  • batch 9868: 10.4 ms at 11244 ms, present 4732: GPU no ranges; recorded by Graphics.Draw (draw committer) 0.5, Graphics.Draw.draw_and_resource_release (draw committer) 0.5, Resources.Complete (draw committer) 0.1
  • batch 9623: 9.9 ms at 10961 ms, present 4728: GPU no ranges; recorded by Graphics.Draw (draw committer) 0.5, Graphics.Draw.draw_and_resource_release (draw committer) 0.5, Resources.Complete (draw committer) 0.1
  • batch 10053: 9.8 ms at 11459 ms, present 4735: GPU no ranges; recorded by Graphics.Draw (draw committer) 0.6, Graphics.Draw.draw_and_resource_release (draw committer) 0.6, Resources.Complete (draw committer) 0.1
  • batch 2283: 9.6 ms at 2609 ms, present 4606: GPU no ranges; recorded by Graphics.Draw (draw committer) 0.5, Graphics.Draw.draw_and_resource_release (draw committer) 0.5, Resources.Complete (draw committer) 0.1
  • batch 9504: 9.6 ms at 10824 ms, present 4726: GPU no ranges; recorded by Graphics.Draw (draw committer) 0.5, Graphics.Draw.draw_and_resource_release (draw committer) 0.5, Resources.Complete (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
  • 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
  • GPUs tested: NVIDIA GeForce RTX 2080 Ti, driver 617.14, Windows 11 (10.0.26300)
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5235737742 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/18010). Originally posted by [meh7an](https://github.com/meh7an) on 2026-11-10T04:19:46Z. --- ### What The flush hook (`FlushForAccess`) runs before every guest memory access the driver makes. On Sonic Origins' S3K menu page that is about 8,200 calls per frame, mostly from the draw committer's `CopyDrawInput` and the queue worker's `GuestMemory::Read`. Almost every call finds nothing to do, yet it loads the pending-write snapshot twice, lists the pending images into a vector and takes the unit shadow registry's mutex. This answers such an access at the top of the hook from copies the calling thread keeps; anything else takes the old path unchanged. - `ClearAccess` checks, in this order: no pending image over the range (the pending list's published snapshot, kept per thread while its version holds; an out-of-date snapshot falls through to the old path, which rebuilds it), no image being flushed (`flushingCount == 0`), no live unit shadow over the range, and no pending write over the range (the write snapshot, kept per thread while `publishGeneration` holds). - The order is the one #8751 set. A flusher moves an image from pending to flushing, records its store (which puts it in the write snapshot), then removes it from flushing, so the write snapshot is read last. `Unregister` stores `flushingCount` with release after the store was recorded, and the hook loads it with acquire before it loads `publishGeneration`, so an image found neither pending nor flushing is in the snapshot or has landed. A version-current pending snapshot was rebuilt under the registry mutex after any flusher that took an image out had stored `flushingCount` in the same critical section, so the load after the version check sees it. - The old hook's first write check is dropped: a write seen there and gone by the last check has landed, because a range leaves the snapshot only after its batch's completions ran. - Live units: `liveSerial` is bumped under the registry mutex wherever units become live or stop being live (publish, mark, eviction, retire, a stale entry dropped, a device destroyed). `currentLiveRanges` builds the merged `UnitRange` of every live unit once per serial, under the mutex, and publishes it; threads keep a `shared_ptr`. It answers like `anyShadowedLocked` for every range: both skip shadows with `liveUnits == 0`, and the unit index range `anyShadowedLocked` walks is exactly the set of units whose import-clipped range overlaps the access. - The queued-label ranges move from an FLS value to a `ThreadScratch`, with a `HostThreadSlot<bool>` saying whether any are noted, so the hook's first check no longer calls `FlsGetValue` (it showed in the profile under the hook). The deferred labels they are made from already live in a TEB slot, so both now have the same per-thread storage. - `hookCalls` is counted only under `APS5_PROFILE_DRAW`, the only place it is printed. - Memory: each thread keeps at most one copy of each of the three snapshots; the live-range list has at most one entry per live 64 KiB unit (16 bytes each, bounded by the unit shadow budget). - `APS5_NO_HOOK_CLEAR_ACCESS=1` makes the hook run all of its checks on every access, as before (new `ENVIRONMENT.md` row). - A counter-only build on main `3cd86e6ea7` (S3K, 60 s) found the early return would fire on 99.99% of the committer's calls and 99.86% of the worker's. The rest were images being flushed and pending snapshots out of date; none overlapped a pending image, a live unit, a queued label or a pending write. - Overlap: no open PR adds an early return to the hook, a live-unit snapshot or per-thread registry copies (diff scan of 1987 open PRs for the hook, registry and snapshot symbols). #17796 changes one line in the middle of the hook (`DeferToMirror`), which applies only when an image is pending over the range, so the two merge cleanly. #10193, #13928 and #13929 call `QueuedLabelRanges().empty()` in new code; that still compiles and agrees with the new slot. `tools/pr_overlap.py` failed closed: 24 open PRs that share `Recorder.cpp`, `Texture.cpp`, `tests/Recorder.cpp` or `ENVIRONMENT.md` could not be compared, so they were compared by the symbol scan above. ### Tested Windows 11 (10.0.26300), NVIDIA GeForce RTX 2080 Ti (driver 617.14), Sonic Origins (PPSA05324) menu on the S3K page, 3840x2160, default environment. The measuring base is plain main `f0d842158c` and this commit on top of it. - New test `agc_hook_clear_access` (`agc_driver_recorder_tests --hook-clear-access-only`), and `agc_hook_clear_access_off` (the same with `APS5_NO_HOOK_CLEAR_ACCESS=1`). Each access goes through `GuestMemory::FlushGpuWrites` and checks whether the hook answered it early, and the data: an access with nothing pending; beside and inside a pending write (inside: the hook waited for it); beside and over a queued label, with a recorder callback that notes a pending write (over: the label is recorded and its write waited for; once forgotten, the label is not recorded again); beside and over a live unit (over: the hook publishes it and the import holds its bytes); over a pending image on a unit that is not live (the hook stores the image's results). With the switch on, 6 accesses are answered early; with it off, none, and the data checks are the same. - `unitShadowTests` (`agc_unit_shadow`, `agc_driver_unit_shadow`, `agc_driver_unit_shadow_budget`) now also requires the live-unit copy to agree with `AnyShadowedOverlaps` at all 19 range checks: marking, whole and partial publish, a stale unit dropped, eviction under the 8 MiB budget, retire. - Broken copies of the change, each run against these tests: no serial bump at publish, no bump at mark, no live-unit check, no pending-image check, a write copy never refreshed, the label slot never set, and the early return placed before the label check are each caught. Removing the bump at the retire erase survives: earlier bumps in the same retire cover it in the test, and a missed bump on removal only makes the copy report units as live that are not, which sends the access to the old path. - Not covered by a test: an image being flushed by another thread during the access (needs a concurrent flusher); it rests on the order argued above. - Vulkan validation protocol (`ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation`, `ctest -V`, same machine and GPU): `agc_driver_host_write_hook`, `agc_driver_host_write_pending_storage`, `agc_driver_idle_store_yields`, `agc_driver_storage_flush_ordering`, `agc_driver_storage_read_during_idle_store`, `agc_driver_store_idle_results` (and `_wake`, `_disabled`), `agc_unit_shadow`, `agc_idle_publish_wait`, `agc_driver_bda_reads_shadowed_results` (and `_per_build`), `agc_unit_shadow_completion_store`, `agc_driver_unit_shadow` (and `_budget`), `agc_small_tiled_shadow_label` pass on main (16/16) and on the change (18/18 with the two new tests). Neither log contains `was not found but was requested by env var VK_INSTANCE_LAYERS` or a `VUID-` line, and the logs are equal apart from timings and the new tests. `agc_idle_publish_wait` reports its block not watched on this machine in both. - The 40 label and queued-label tests (`ctest -R "^agc_.*(label|queued|Queued)"`, the queued-label ranges changed storage for every caller) pass on the change under the same protocol, `agc_driver_native_depth_driver_queued_fill` skipped by its own device check; no `VUID-` line. - `tools/check_conventions.py` and `tools/env_reference.py --check` pass. Full ctest was not run. Sampler (`APS5_SAMPLE_COMMITTER` and `APS5_SAMPLE_WORKER`, 60 s window, 3843 samples per thread): | | main `f0d842158c` | this PR `88490895b5` | |---|---|---| | `FlushForAccess` inclusive, draw committer | 65 (1.69%) | 39 (1.01%) | | `FlushForAccess` inclusive, queue worker | 59 (1.54%) | 39 (1.02%) | | under the hook, committer: `SnapshotOverlaps` / `AccessKeptByCpu` / `PublishShadowsOnly` | 23 / 12 / 14 | none; `LiveUnitsClear` 9, `PendingClearOnThread` 9 | That is about 0.4 ms per frame on the committer and 0.3 ms on the worker. The frame is bound by the committer and the GPU: the worker waits 28-30% of its samples in `DrawPipeline::Enqueue`, the committer about 12%. Two traced runs per arm (`APS5_TRACE_SECONDS=200:15`), in main, PR, PR, main order, both commit IDs in the summaries: | | main `f0d842158c` | this PR `88490895b5` | |---|---|---| | reading FPS (median of 6) | 15.49 / 15.40 | 15.81 / 15.84 | | frame p50 | 67.7 / 68.2 ms | 70.4 / 67.0 ms | | committer `Graphics.Draw` per frame (retained events) | 26.9 / 27.4 ms | 28.5 / 26.4 ms | | GPU busy per present | 36.5 / 35.5 ms | 35.0 / 34.4 ms | The saving shows in the sampler; frame time and FPS stay within the run-to-run spread, so no FPS change is claimed (the sampler runs read 15.80 on main and 15.06 on the PR, the PR run rising from 14.58). GPU busy is not claimed either. All four traces dropped events once the worker's buffer filled, equally in both arms; the slice figures cover retained events only. Other work on the machine was not excluded during the runs. **seconds 200:15** from present 4570: 219 presents, frame p50 67.7 / p90 71.9 / p99 76.9 / max 77.3 ms, GPU busy 36.5 ms per present NVIDIA GeForce RTX 2080 Ti, NVIDIA 617.14, Windows 10.0.26300, 3840x2160, commit f0d842158c28, dropped: yes ```json {"commit":"f0d842158c28","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":32700,"title_id":"PPSA05324","title":"Sonic Origins","content_version":"02.002.000","resolution":"3840x2160","window":{"spec":"seconds 200:15","first_present":4570,"ms":15006.876},"presents":219,"frame_ms":{"p50":67.737,"p90":71.905,"p99":76.872,"max":77.291},"gpu_busy_ms_per_present":36.53,"worker_busy_pct":{"queue worker 0x0":96.928},"top_phases_ms_per_frame":{"Driver.Packet":64.541,"Graphics.Draw":48.45,"Driver.Packet.draw":48.019,"Driver.Draw":47.109,"Graphics.Draw.draw_and_resource_release":38.442,"Driver.Draw.shader_compile_and_link":22.83,"Shader.DrawStage":14.912,"Driver.Draw.draw_enqueued":14.045},"owned_draw_counts":{"OwnedDraw.evicted_other":19889},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":6.155,"events_lost":380734,"totals_full":false},"draw committer":{"events_full_after_s":12.075,"events_lost":64061,"totals_full":false}},"trace":"aps5-trace-f0d842158c28-43996.json.gz"} ``` **seconds 200:15** from present 4594: 212 presents, frame p50 70.4 / p90 75.2 / p99 81.1 / max 94.6 ms, GPU busy 35.0 ms per present NVIDIA GeForce RTX 2080 Ti, NVIDIA 617.14, Windows 10.0.26300, 3840x2160, commit 88490895b541, dropped: yes ```json {"commit":"88490895b541","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":32700,"title_id":"PPSA05324","title":"Sonic Origins","content_version":"02.002.000","resolution":"3840x2160","window":{"spec":"seconds 200:15","first_present":4594,"ms":15036.121},"presents":212,"frame_ms":{"p50":70.399,"p90":75.212,"p99":81.115,"max":94.631},"gpu_busy_ms_per_present":35.017,"worker_busy_pct":{"queue worker 0x0":96.759},"top_phases_ms_per_frame":{"Driver.Packet":66.689,"Graphics.Draw":49.836,"Driver.Packet.draw":49.799,"Driver.Draw":48.827,"Graphics.Draw.draw_and_resource_release":39.7,"Driver.Draw.shader_compile_and_link":23.781,"Shader.DrawStage":15.705,"Driver.Draw.draw_enqueued":14.14},"owned_draw_counts":{"OwnedDraw.evicted_other":18642},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":5.819,"events_lost":412690,"totals_full":false},"draw committer":{"events_full_after_s":12.333,"events_lost":58269,"totals_full":false}},"trace":"aps5-trace-88490895b541-1220.json.gz"} ``` **seconds 200:15** from present 4645: 223 presents, frame p50 67.0 / p90 70.8 / p99 74.0 / max 74.6 ms, GPU busy 34.4 ms per present NVIDIA GeForce RTX 2080 Ti, NVIDIA 617.14, Windows 10.0.26300, 3840x2160, commit 88490895b541, dropped: yes ```json {"commit":"88490895b541","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":32700,"title_id":"PPSA05324","title":"Sonic Origins","content_version":"02.002.000","resolution":"3840x2160","window":{"spec":"seconds 200:15","first_present":4645,"ms":15061.021},"presents":223,"frame_ms":{"p50":66.968,"p90":70.789,"p99":73.984,"max":74.621},"gpu_busy_ms_per_present":34.392,"worker_busy_pct":{"queue worker 0x0":96.922},"top_phases_ms_per_frame":{"Driver.Packet":63.566,"Graphics.Draw":47.849,"Driver.Packet.draw":47.536,"Driver.Draw":46.603,"Graphics.Draw.draw_and_resource_release":38.246,"Driver.Draw.shader_compile_and_link":22.182,"Shader.DrawStage":14.688,"Driver.Draw.draw_enqueued":14.063},"owned_draw_counts":{"OwnedDraw.evicted_other":20175},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":6.213,"events_lost":374208,"totals_full":false},"draw committer":{"events_full_after_s":12.222,"events_lost":60970,"totals_full":false}},"trace":"aps5-trace-88490895b541-41952.json.gz"} ``` **seconds 200:15** from present 4569: 217 presents, frame p50 68.2 / p90 73.1 / p99 82.7 / max 93.1 ms, GPU busy 35.5 ms per present NVIDIA GeForce RTX 2080 Ti, NVIDIA 617.14, Windows 10.0.26300, 3840x2160, commit f0d842158c28, dropped: yes ```json {"commit":"f0d842158c28","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":32700,"title_id":"PPSA05324","title":"Sonic Origins","content_version":"02.002.000","resolution":"3840x2160","window":{"spec":"seconds 200:15","first_present":4569,"ms":15017.278},"presents":217,"frame_ms":{"p50":68.203,"p90":73.076,"p99":82.742,"max":93.074},"gpu_busy_ms_per_present":35.464,"worker_busy_pct":{"queue worker 0x0":96.938},"top_phases_ms_per_frame":{"Driver.Packet":65.192,"Graphics.Draw":48.954,"Driver.Packet.draw":48.548,"Driver.Draw":47.627,"Graphics.Draw.draw_and_resource_release":38.829,"Driver.Draw.shader_compile_and_link":23.019,"Shader.DrawStage":15.036,"Driver.Draw.draw_enqueued":14.307},"owned_draw_counts":{"OwnedDraw.evicted_other":19910},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":6.158,"events_lost":384919,"totals_full":false},"draw committer":{"events_full_after_s":12.178,"events_lost":60683,"totals_full":false}},"trace":"aps5-trace-f0d842158c28-8204.json.gz"} ``` Traces (two runs per zip, each with its `aps5-summary.jsonl`): [m314-main-traces.zip](https://github.com/user-attachments/files/34611555/m314-main-traces.zip) (main `f0d842158c`), [m314-change-traces.zip](https://github.com/user-attachments/files/34611559/m314-change-traces.zip) (this PR `88490895b5`). <details><summary>trace_digest.py, main run 1</summary> **seconds 200:15** from present 4570: 219 presents, frame p50 67.7 / p90 71.9 / p99 76.9 / max 77.3 ms, GPU busy 36.5 ms per present NVIDIA GeForce RTX 2080 Ti, NVIDIA 617.14, Windows 10.0.26300, 3840x2160, commit f0d842158c28, dropped: yes ```json {"commit":"f0d842158c28","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":32700,"title_id":"PPSA05324","title":"Sonic Origins","content_version":"02.002.000","resolution":"3840x2160","window":{"spec":"seconds 200:15","first_present":4570,"ms":15006.876},"presents":219,"frame_ms":{"p50":67.737,"p90":71.905,"p99":76.872,"max":77.291},"gpu_busy_ms_per_present":36.53,"worker_busy_pct":{"queue worker 0x0":96.928},"top_phases_ms_per_frame":{"Driver.Packet":64.541,"Graphics.Draw":48.45,"Driver.Packet.draw":48.019,"Driver.Draw":47.109,"Graphics.Draw.draw_and_resource_release":38.442,"Driver.Draw.shader_compile_and_link":22.83,"Shader.DrawStage":14.912,"Driver.Draw.draw_enqueued":14.045},"owned_draw_counts":{"OwnedDraw.evicted_other":19889},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":6.155,"events_lost":380734,"totals_full":false},"draw committer":{"events_full_after_s":12.075,"events_lost":64061,"totals_full":false}},"trace":"aps5-trace-f0d842158c28-43996.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: 380734 events lost; buffer full at 6155.5 ms - draw committer: 64061 events lost; buffer full at 12075.4 ms **Slowest frames** (largest slices inside each, inclusive) - present 4588: 77.3 ms at 1228 ms: Driver.Packet (queue worker 0x0) 50.4, Driver.Packet.draw (queue worker 0x0) 40.0, Driver.Draw (queue worker 0x0) 38.9, Graphics.Draw (draw committer) 38.3 - present 4662: 77.2 ms at 6303 ms: batch (gpu) 37.1, Graphics.Draw (draw committer) 34.9, Graphics.Draw.draw_and_resource_release (draw committer) 27.6, VideoOut.Flip (presenter) 10.3 - present 4778: 76.9 ms at 14256 ms: batch (gpu) 34.1, VideoOut.Flip (presenter) 9.3, Recorder.WaitSerial (title) 9.2, VideoOut.Flip.present (presenter) 9.2 - present 4675: 76.6 ms at 7203 ms: Graphics.Draw (draw committer) 41.6, batch (gpu) 39.3, Graphics.Draw.draw_and_resource_release (draw committer) 31.2, VideoOut.Flip (presenter) 9.6 - present 4732: 75.6 ms at 11100 ms: Graphics.Draw (draw committer) 38.0, batch (gpu) 37.9, Graphics.Draw.draw_and_resource_release (draw committer) 29.6, VideoOut.Flip (presenter) 10.7 **Persistent spikes** (frame time above the fastest frame that separates it from a longer frame; one entry per stall, not per frame) - present 4588: 77.3 ms at 1228 ms, persistence 12.2 ms - present 4662: 77.2 ms at 6303 ms, persistence 12.2 ms - present 4778: 76.9 ms at 14256 ms, persistence 11.8 ms - present 4732: 75.6 ms at 11100 ms, persistence 10.0 ms - present 4675: 76.6 ms at 7203 ms, persistence 9.8 ms - present 4763: 74.9 ms at 13222 ms, persistence 9.4 ms - present 4705: 74.9 ms at 9242 ms, persistence 9.3 ms - present 4746: 74.2 ms at 12057 ms, persistence 9.0 ms - present 4602: 74.1 ms at 2194 ms, persistence 8.5 ms - present 4768: 74.0 ms at 13566 ms, persistence 8.4 ms **Threads** (ms per frame) | thread | busy | wait | untraced | in slices < 20 us | largest | |---|---|---|---|---|---| | title | 0.4 (1 %) | 10.4 (15 %) | 57.7 | 0.5 | Shader.ResolveGraphicsStagesAbi 0.2, Shader.ResolveGraphicsAbi 0.1 | | queue worker 0x0 | 17.2 (25 %) | 0.0 (0 %) | 51.3 | 50.8 | Driver.Packet 16.5, Driver.EndSubmission 0.8 | | draw committer | 29.3 (43 %) | 0.2 (0 %) | 39.0 | 29.3 | Graphics.Draw 26.9, Recorder.Submit 1.8 | | title | 0.1 (0 %) | 0.0 (0 %) | 68.4 | 0.1 | Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0 | | title | 0.1 (0 %) | 0.0 (0 %) | 68.4 | 0.1 | Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveAbi 0.0 | | title | 0.1 (0 %) | 0.0 (0 %) | 68.4 | 0.1 | Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveGraphicsAbi 0.0 | | title | 0.1 (0 %) | 0.0 (0 %) | 68.4 | 0.1 | Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveGraphicsAbi 0.0 | | presenter | 1.0 (1 %) | 9.8 (14 %) | 57.8 | 0.0 | VideoOut.Flip 10.7, Driver.Present 0.0 | | title | 0.1 (0 %) | 0.0 (0 %) | 68.4 | 0.1 | Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveGraphicsAbi 0.0 | | title | 0.1 (0 %) | 0.0 (0 %) | 68.4 | 0.0 | Shader.ResolveGraphicsAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0 | | title | 0.1 (0 %) | 0.0 (0 %) | 68.4 | 0.1 | Shader.ResolveAbi 0.0, Shader.ResolveGraphicsAbi 0.0 | | title | 0.1 (0 %) | 0.0 (0 %) | 68.4 | 0.1 | Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveAbi 0.0 | | title | 0.1 (0 %) | 0.0 (0 %) | 68.4 | 0.1 | Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveAbi 0.0 | | title | 0.1 (0 %) | 0.0 (0 %) | 68.4 | 0.1 | Shader.ResolveGraphicsAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0 | | title | 0.1 (0 %) | 0.0 (0 %) | 68.4 | 0.1 | Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveGraphicsAbi 0.0 | | title | 0.1 (0 %) | 0.0 (0 %) | 68.4 | 0.1 | Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveGraphicsAbi 0.0 | | gpu | 36.5 (53 %) | 0.0 (0 %) | 32.0 | 0.0 | batch 36.5 | **Largest slices** (ms per frame, inclusive, all threads): batch 36.5, Graphics.Draw 26.9, Graphics.Draw.draw_and_resource_release 21.2, Driver.Packet 16.5, Driver.Packet.draw 12.5, Driver.Draw 12.2, VideoOut.Flip 10.7, Driver.Present 10.5, VideoOut.Flip.present 10.5, Recorder.WaitSerial 10.4 **Longest waits** - Recorder.WaitSerial (title) 11.9 ms at 11519 ms, present 4737 - Recorder.WaitSerial (title) 11.8 ms at 9169 ms, present 4704 - Recorder.WaitSerial (title) 11.8 ms at 2057 ms, present 4599 - Recorder.WaitSerial (title) 11.8 ms at 11653 ms, present 4739 - Recorder.WaitSerial (title) 11.8 ms at 5067 ms, present 4643 - Recorder.WaitSerial (title) 11.8 ms at 3155 ms, present 4615 - Recorder.WaitSerial (title) 11.8 ms at 7414 ms, present 4677 - Recorder.WaitSerial (title) 11.7 ms at 6023 ms, present 4658 - Recorder.WaitSerial (title) 11.6 ms at 5885 ms, present 4655 - Recorder.WaitSerial (title) 11.6 ms at 5817 ms, present 4654 **Largest GPU batches** (GPU ranges inside, and the CPU slices that recorded each, inclusive) - batch 11168: 9.9 ms at 12734 ms, present 4755: GPU no ranges; recorded by no CPU slices - batch 11289: 9.9 ms at 12871 ms, present 4757: GPU no ranges; recorded by no CPU slices - batch 5638: 9.7 ms at 6437 ms, present 4663: GPU no ranges; recorded by Graphics.Draw (draw committer) 0.6, Graphics.Draw.draw_and_resource_release (draw committer) 0.6, Resources.Complete (draw committer) 0.1 - batch 7320: 9.7 ms at 8350 ms, present 4691: GPU no ranges; recorded by Graphics.Draw (draw committer) 0.5, Graphics.Draw.draw_and_resource_release (draw committer) 0.5, Resources.Complete (draw committer) 0.1 - batch 948: 9.7 ms at 1082 ms, present 4585: 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 </details> <details><summary>trace_digest.py, PR run 1</summary> **seconds 200:15** from present 4594: 212 presents, frame p50 70.4 / p90 75.2 / p99 81.1 / max 94.6 ms, GPU busy 35.0 ms per present NVIDIA GeForce RTX 2080 Ti, NVIDIA 617.14, Windows 10.0.26300, 3840x2160, commit 88490895b541, dropped: yes ```json {"commit":"88490895b541","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":32700,"title_id":"PPSA05324","title":"Sonic Origins","content_version":"02.002.000","resolution":"3840x2160","window":{"spec":"seconds 200:15","first_present":4594,"ms":15036.121},"presents":212,"frame_ms":{"p50":70.399,"p90":75.212,"p99":81.115,"max":94.631},"gpu_busy_ms_per_present":35.017,"worker_busy_pct":{"queue worker 0x0":96.759},"top_phases_ms_per_frame":{"Driver.Packet":66.689,"Graphics.Draw":49.836,"Driver.Packet.draw":49.799,"Driver.Draw":48.827,"Graphics.Draw.draw_and_resource_release":39.7,"Driver.Draw.shader_compile_and_link":23.781,"Shader.DrawStage":15.705,"Driver.Draw.draw_enqueued":14.14},"owned_draw_counts":{"OwnedDraw.evicted_other":18642},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":5.819,"events_lost":412690,"totals_full":false},"draw committer":{"events_full_after_s":12.333,"events_lost":58269,"totals_full":false}},"trace":"aps5-trace-88490895b541-1220.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: 412690 events lost; buffer full at 5818.7 ms - draw committer: 58269 events lost; buffer full at 12333.1 ms **Slowest frames** (largest slices inside each, inclusive) - present 4800: 94.6 ms at 14585 ms: batch (gpu) 40.9, VideoOut.Flip (presenter) 9.8, VideoOut.Flip.present (presenter) 9.7, Driver.Present (presenter) 9.7 - present 4660: 81.4 ms at 4674 ms: Driver.Packet (queue worker 0x0) 53.6, Graphics.Draw (draw committer) 47.2, Driver.Packet.draw (queue worker 0x0) 43.3, Driver.Draw (queue worker 0x0) 42.4 - present 4666: 81.1 ms at 5107 ms: Driver.Packet (queue worker 0x0) 53.7, Graphics.Draw (draw committer) 43.1, Driver.Packet.draw (queue worker 0x0) 42.4, Driver.Draw (queue worker 0x0) 41.0 - present 4620: 80.5 ms at 1850 ms: Driver.Packet (queue worker 0x0) 56.4, Graphics.Draw (draw committer) 45.9, Driver.Packet.draw (queue worker 0x0) 45.2, Driver.Draw (queue worker 0x0) 44.1 - present 4645: 79.6 ms at 3615 ms: Driver.Packet (queue worker 0x0) 54.8, Graphics.Draw (draw committer) 45.8, Driver.Packet.draw (queue worker 0x0) 45.2, Driver.Draw (queue worker 0x0) 43.9 **Persistent spikes** (frame time above the fastest frame that separates it from a longer frame; one entry per stall, not per frame) - present 4800: 94.6 ms at 14585 ms, persistence 30.4 ms - present 4660: 81.4 ms at 4674 ms, persistence 17.1 ms - present 4620: 80.5 ms at 1850 ms, persistence 15.3 ms - present 4645: 79.6 ms at 3615 ms, persistence 13.5 ms - present 4718: 79.6 ms at 8861 ms, persistence 13.4 ms - present 4598: 77.7 ms at 290 ms, persistence 12.6 ms - present 4666: 81.1 ms at 5107 ms, persistence 11.8 ms - present 4707: 78.7 ms at 8079 ms, persistence 11.5 ms - present 4737: 77.6 ms at 10209 ms, persistence 11.4 ms - present 4780: 77.4 ms at 13172 ms, persistence 11.0 ms **Threads** (ms per frame) | thread | busy | wait | untraced | in slices < 20 us | largest | |---|---|---|---|---|---| | title | 0.4 (1 %) | 9.2 (13 %) | 61.3 | 0.5 | Shader.ResolveGraphicsStagesAbi 0.2, Shader.ResolveGraphicsAbi 0.1 | | queue worker 0x0 | 17.5 (25 %) | 0.0 (0 %) | 53.4 | 47.7 | Driver.Packet 16.8, Driver.EndSubmission 0.7 | | draw committer | 30.8 (43 %) | 0.2 (0 %) | 39.9 | 30.7 | Graphics.Draw 28.5, Recorder.Submit 1.7 | | title | 0.1 (0 %) | 0.0 (0 %) | 70.8 | 0.1 | Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveGraphicsAbi 0.0 | | title | 0.1 (0 %) | 0.0 (0 %) | 70.8 | 0.1 | Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveGraphicsAbi 0.0 | | title | 0.1 (0 %) | 0.0 (0 %) | 70.8 | 0.1 | Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveGraphicsAbi 0.0 | | presenter | 0.9 (1 %) | 8.6 (12 %) | 61.4 | 0.0 | VideoOut.Flip 9.5, Driver.Present 0.0 | | title | 0.1 (0 %) | 0.0 (0 %) | 70.8 | 0.1 | Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveAbi 0.0 | | title | 0.1 (0 %) | 0.0 (0 %) | 70.8 | 0.1 | Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveAbi 0.0 | | title | 0.1 (0 %) | 0.0 (0 %) | 70.8 | 0.1 | Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveGraphicsAbi 0.0 | | title | 0.1 (0 %) | 0.0 (0 %) | 70.8 | 0.1 | Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveAbi 0.0 | | title | 0.1 (0 %) | 0.0 (0 %) | 70.8 | 0.1 | Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveGraphicsAbi 0.0 | | title | 0.1 (0 %) | 0.0 (0 %) | 70.8 | 0.1 | Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveGraphicsAbi 0.0 | | title | 0.1 (0 %) | 0.0 (0 %) | 70.8 | 0.1 | Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0 | | title | 0.1 (0 %) | 0.0 (0 %) | 70.8 | 0.1 | Shader.ResolveGraphicsAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0 | | title | 0.1 (0 %) | 0.0 (0 %) | 70.8 | 0.1 | Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveGraphicsAbi 0.0 | | gpu | 34.9 (49 %) | 0.0 (0 %) | 36.0 | 0.0 | batch 34.9 | **Largest slices** (ms per frame, inclusive, all threads): batch 34.9, Graphics.Draw 28.5, Graphics.Draw.draw_and_resource_release 21.9, Driver.Packet 16.8, Driver.Packet.draw 13.0, Driver.Draw 12.6, VideoOut.Flip 9.5, Driver.Present 9.3, VideoOut.Flip.present 9.3, Recorder.WaitSerial 9.2 **Longest waits** - Recorder.WaitSerial (title) 11.1 ms at 12426 ms, present 4769 - Recorder.WaitSerial (title) 11.1 ms at 3338 ms, present 4640 - Recorder.WaitSerial (title) 11.0 ms at 10632 ms, present 4742 - Recorder.WaitSerial (title) 10.9 ms at 8585 ms, present 4713 - Recorder.WaitSerial (title) 10.9 ms at 3406 ms, present 4641 - Recorder.WaitSerial (title) 10.8 ms at 1850 ms, present 4619 - Recorder.WaitSerial (title) 10.8 ms at 13250 ms, present 4780 - Recorder.WaitSerial (title) 10.8 ms at 8372 ms, present 4710 - Recorder.WaitSerial (title) 10.8 ms at 14514 ms, present 4798 - Recorder.WaitSerial (title) 10.8 ms at 10768 ms, present 4744 **Largest GPU batches** (GPU ranges inside, and the CPU slices that recorded each, inclusive) - batch 7390: 10.0 ms at 8711 ms, present 4715: GPU no ranges; recorded by Graphics.Draw (draw committer) 0.4, Graphics.Draw.draw_and_resource_release (draw committer) 0.4, Resources.Complete (draw committer) 0.0 - batch 5691: 9.9 ms at 6696 ms, present 4687: GPU no ranges; recorded by Graphics.Draw (draw committer) 0.5, Graphics.Draw.draw_and_resource_release (draw committer) 0.5, Resources.Complete (draw committer) 0.0 - batch 8842: 9.8 ms at 10414 ms, present 4739: GPU no ranges; recorded by Graphics.Draw (draw committer) 0.6, Graphics.Draw.draw_and_resource_release (draw committer) 0.6, Resources.Complete (draw committer) 0.1 - batch 11796: 9.8 ms at 13798 ms, present 4788: GPU no ranges; recorded by no CPU slices - batch 8537: 9.8 ms at 10051 ms, present 4734: GPU no ranges; recorded by Graphics.Draw (draw committer) 0.5, Graphics.Draw.draw_and_resource_release (draw committer) 0.5, Resources.Complete (draw committer) 0.1 </details> <details><summary>trace_digest.py, PR run 2</summary> **seconds 200:15** from present 4645: 223 presents, frame p50 67.0 / p90 70.8 / p99 74.0 / max 74.6 ms, GPU busy 34.4 ms per present NVIDIA GeForce RTX 2080 Ti, NVIDIA 617.14, Windows 10.0.26300, 3840x2160, commit 88490895b541, dropped: yes ```json {"commit":"88490895b541","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":32700,"title_id":"PPSA05324","title":"Sonic Origins","content_version":"02.002.000","resolution":"3840x2160","window":{"spec":"seconds 200:15","first_present":4645,"ms":15061.021},"presents":223,"frame_ms":{"p50":66.968,"p90":70.789,"p99":73.984,"max":74.621},"gpu_busy_ms_per_present":34.392,"worker_busy_pct":{"queue worker 0x0":96.922},"top_phases_ms_per_frame":{"Driver.Packet":63.566,"Graphics.Draw":47.849,"Driver.Packet.draw":47.536,"Driver.Draw":46.603,"Graphics.Draw.draw_and_resource_release":38.246,"Driver.Draw.shader_compile_and_link":22.182,"Shader.DrawStage":14.688,"Driver.Draw.draw_enqueued":14.063},"owned_draw_counts":{"OwnedDraw.evicted_other":20175},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":6.213,"events_lost":374208,"totals_full":false},"draw committer":{"events_full_after_s":12.222,"events_lost":60970,"totals_full":false}},"trace":"aps5-trace-88490895b541-41952.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: 374208 events lost; buffer full at 6213.2 ms - draw committer: 60970 events lost; buffer full at 12221.9 ms **Slowest frames** (largest slices inside each, inclusive) - present 4848: 74.6 ms at 13703 ms: batch (gpu) 35.7, VideoOut.Flip (presenter) 9.4, VideoOut.Flip.present (presenter) 9.2, Driver.Present (presenter) 9.2 - present 4700: 74.1 ms at 3719 ms: Driver.Packet (queue worker 0x0) 49.3, Driver.Packet.draw (queue worker 0x0) 39.9, Driver.Draw (queue worker 0x0) 38.3, Graphics.Draw (draw committer) 35.5 - present 4804: 74.0 ms at 10729 ms: Graphics.Draw (draw committer) 37.1, batch (gpu) 35.0, Graphics.Draw.draw_and_resource_release (draw committer) 28.1, VideoOut.Flip (presenter) 10.5 - present 4714: 73.9 ms at 4668 ms: Driver.Packet (queue worker 0x0) 45.5, batch (gpu) 36.6, Graphics.Draw (draw committer) 35.5, Driver.Packet.draw (queue worker 0x0) 34.5 - present 4837: 73.8 ms at 12942 ms: batch (gpu) 34.6, VideoOut.Flip (presenter) 9.1, VideoOut.Flip.present (presenter) 8.8, Driver.Present (presenter) 8.8 **Persistent spikes** (frame time above the fastest frame that separates it from a longer frame; one entry per stall, not per frame) - present 4848: 74.6 ms at 13703 ms, persistence 10.9 ms - present 4700: 74.1 ms at 3719 ms, persistence 10.4 ms - present 4804: 74.0 ms at 10729 ms, persistence 9.6 ms - present 4762: 73.4 ms at 7895 ms, persistence 9.4 ms - present 4714: 73.9 ms at 4668 ms, persistence 8.3 ms - present 4678: 71.5 ms at 2227 ms, persistence 7.8 ms - present 4863: 72.5 ms at 14716 ms, persistence 7.7 ms - present 4837: 73.8 ms at 12942 ms, persistence 7.7 ms - present 4775: 73.1 ms at 8778 ms, persistence 7.6 ms - present 4783: 72.1 ms at 9320 ms, persistence 6.9 ms **Threads** (ms per frame) | thread | busy | wait | untraced | in slices < 20 us | largest | |---|---|---|---|---|---| | title | 0.4 (1 %) | 9.7 (14 %) | 57.4 | 0.5 | Shader.ResolveGraphicsStagesAbi 0.2, Shader.ResolveGraphicsAbi 0.1 | | queue worker 0x0 | 16.9 (25 %) | 0.0 (0 %) | 50.6 | 51.4 | Driver.Packet 16.1, Driver.EndSubmission 0.8 | | draw committer | 28.5 (42 %) | 0.2 (0 %) | 38.8 | 29.8 | Graphics.Draw 26.4, Recorder.Submit 1.6 | | title | 0.1 (0 %) | 0.0 (0 %) | 67.4 | 0.1 | Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveAbi 0.0 | | title | 0.1 (0 %) | 0.0 (0 %) | 67.4 | 0.1 | Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveGraphicsAbi 0.0 | | title | 0.1 (0 %) | 0.0 (0 %) | 67.4 | 0.1 | Shader.ResolveGraphicsAbi 0.0, Shader.ResolveAbi 0.0 | | title | 0.1 (0 %) | 0.0 (0 %) | 67.4 | 0.1 | Shader.ResolveGraphicsStagesAbi 0.1, Shader.ResolveGraphicsAbi 0.0 | | presenter | 0.9 (1 %) | 9.1 (13 %) | 57.5 | 0.0 | VideoOut.Flip 10.0, Driver.Present 0.0 | | title | 0.1 (0 %) | 0.0 (0 %) | 67.4 | 0.1 | Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveGraphicsAbi 0.0 | | title | 0.1 (0 %) | 0.0 (0 %) | 67.4 | 0.1 | Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveGraphicsAbi 0.0 | | title | 0.1 (0 %) | 0.0 (0 %) | 67.4 | 0.1 | Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveGraphicsAbi 0.0 | | title | 0.1 (0 %) | 0.0 (0 %) | 67.4 | 0.1 | Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveGraphicsAbi 0.0 | | title | 0.1 (0 %) | 0.0 (0 %) | 67.4 | 0.1 | Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveAbi 0.0 | | title | 0.1 (0 %) | 0.0 (0 %) | 67.4 | 0.0 | Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveGraphicsAbi 0.0 | | title | 0.1 (0 %) | 0.0 (0 %) | 67.4 | 0.1 | Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveAbi 0.0 | | title | 0.1 (0 %) | 0.0 (0 %) | 67.4 | 0.1 | Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveGraphicsAbi 0.0 | | gpu | 34.4 (51 %) | 0.0 (0 %) | 33.1 | 0.0 | batch 34.4 | **Largest slices** (ms per frame, inclusive, all threads): batch 34.4, Graphics.Draw 26.4, Graphics.Draw.draw_and_resource_release 21.0, Driver.Packet 16.1, Driver.Packet.draw 12.4, Driver.Draw 12.0, VideoOut.Flip 10.0, Driver.Present 9.8, VideoOut.Flip.present 9.8, Recorder.WaitSerial 9.7 **Longest waits** - Recorder.WaitSerial (title) 11.3 ms at 14047 ms, present 4852 - Recorder.WaitSerial (title) 11.2 ms at 7293 ms, present 4753 - Recorder.WaitSerial (title) 11.2 ms at 5289 ms, present 4722 - Recorder.WaitSerial (title) 11.1 ms at 4060 ms, present 4704 - Recorder.WaitSerial (title) 11.1 ms at 3243 ms, present 4693 - Recorder.WaitSerial (title) 11.0 ms at 10937 ms, present 4806 - Recorder.WaitSerial (title) 11.0 ms at 3926 ms, present 4702 - Recorder.WaitSerial (title) 11.0 ms at 4195 ms, present 4707 - Recorder.WaitSerial (title) 11.0 ms at 4261 ms, present 4707 - Recorder.WaitSerial (title) 11.0 ms at 3513 ms, present 4697 **Largest GPU batches** (GPU ranges inside, and the CPU slices that recorded each, inclusive) - batch 6768: 9.8 ms at 7678 ms, present 4758: GPU no ranges; recorded by Graphics.Draw (draw committer) 0.5, Graphics.Draw.draw_and_resource_release (draw committer) 0.5, Resources.Complete (draw committer) 0.1, Graphics.Draw.validate (draw committer) 0.0 - batch 11318: 9.5 ms at 12797 ms, present 4834: GPU no ranges; recorded by no CPU slices - batch 10005: 9.5 ms at 11323 ms, present 4812: GPU no ranges; recorded by Graphics.Draw (draw committer) 0.4, Graphics.Draw.draw_and_resource_release (draw committer) 0.4, Resources.Complete (draw committer) 0.1, Recorder.Reap (draw committer) 0.0 - batch 8093: 9.4 ms at 9176 ms, present 4780: GPU no ranges; recorded by Graphics.Draw (draw committer) 0.5, Graphics.Draw.draw_and_resource_release (draw committer) 0.5, Resources.Complete (draw committer) 0.1, Recorder.Reap (draw committer) 0.0 - batch 10241: 9.4 ms at 11593 ms, present 4816: GPU no ranges; recorded by Graphics.Draw (draw committer) 0.5, Graphics.Draw.draw_and_resource_release (draw committer) 0.4, Resources.Complete (draw committer) 0.1 </details> <details><summary>trace_digest.py, main run 2</summary> **seconds 200:15** from present 4569: 217 presents, frame p50 68.2 / p90 73.1 / p99 82.7 / max 93.1 ms, GPU busy 35.5 ms per present NVIDIA GeForce RTX 2080 Ti, NVIDIA 617.14, Windows 10.0.26300, 3840x2160, commit f0d842158c28, dropped: yes ```json {"commit":"f0d842158c28","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":32700,"title_id":"PPSA05324","title":"Sonic Origins","content_version":"02.002.000","resolution":"3840x2160","window":{"spec":"seconds 200:15","first_present":4569,"ms":15017.278},"presents":217,"frame_ms":{"p50":68.203,"p90":73.076,"p99":82.742,"max":93.074},"gpu_busy_ms_per_present":35.464,"worker_busy_pct":{"queue worker 0x0":96.938},"top_phases_ms_per_frame":{"Driver.Packet":65.192,"Graphics.Draw":48.954,"Driver.Packet.draw":48.548,"Driver.Draw":47.627,"Graphics.Draw.draw_and_resource_release":38.829,"Driver.Draw.shader_compile_and_link":23.019,"Shader.DrawStage":15.036,"Driver.Draw.draw_enqueued":14.307},"owned_draw_counts":{"OwnedDraw.evicted_other":19910},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":6.158,"events_lost":384919,"totals_full":false},"draw committer":{"events_full_after_s":12.178,"events_lost":60683,"totals_full":false}},"trace":"aps5-trace-f0d842158c28-8204.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: 384919 events lost; buffer full at 6158.3 ms - draw committer: 60683 events lost; buffer full at 12177.8 ms **Slowest frames** (largest slices inside each, inclusive) - present 4752: 93.1 ms at 12633 ms: batch (gpu) 39.8, VideoOut.Flip (presenter) 8.6, VideoOut.Flip.present (presenter) 8.6, Driver.Present (presenter) 8.5 - present 4753: 86.7 ms at 12726 ms: batch (gpu) 29.5, VideoOut.Flip (presenter) 2.7, VideoOut.Flip.present (presenter) 2.5, Driver.Present (presenter) 2.5 - present 4754: 82.7 ms at 12813 ms: batch (gpu) 33.3, VideoOut.Flip (presenter) 7.3, VideoOut.Flip.present (presenter) 7.1, Driver.Present (presenter) 7.1 - present 4743: 78.5 ms at 11973 ms: Graphics.Draw (draw committer) 41.0, batch (gpu) 35.5, Graphics.Draw.draw_and_resource_release (draw committer) 33.0, VideoOut.Flip (presenter) 9.3 - present 4612: 78.5 ms at 2953 ms: Driver.Packet (queue worker 0x0) 53.0, Graphics.Draw (draw committer) 45.4, Driver.Packet.draw (queue worker 0x0) 42.3, Driver.Draw (queue worker 0x0) 41.5 **Persistent spikes** (frame time above the fastest frame that separates it from a longer frame; one entry per stall, not per frame) - present 4752: 93.1 ms at 12633 ms, persistence 30.5 ms - present 4612: 78.5 ms at 2953 ms, persistence 15.9 ms - present 4594: 77.8 ms at 1708 ms, persistence 12.2 ms - present 4771: 76.8 ms at 13993 ms, persistence 11.8 ms - present 4627: 76.5 ms at 3982 ms, persistence 10.8 ms - present 4700: 73.5 ms at 8973 ms, persistence 9.9 ms - present 4689: 74.5 ms at 8222 ms, persistence 9.4 ms - present 4743: 78.5 ms at 11973 ms, persistence 9.4 ms - present 4761: 75.9 ms at 13302 ms, persistence 9.3 ms - present 4735: 76.9 ms at 11393 ms, persistence 8.8 ms **Threads** (ms per frame) | thread | busy | wait | untraced | in slices < 20 us | largest | |---|---|---|---|---|---| | title | 0.4 (1 %) | 9.3 (13 %) | 59.5 | 0.5 | Shader.ResolveGraphicsStagesAbi 0.2, Shader.ResolveGraphicsAbi 0.1 | | queue worker 0x0 | 17.4 (25 %) | 0.0 (0 %) | 51.8 | 51.2 | Driver.Packet 16.6, Driver.EndSubmission 0.8 | | draw committer | 29.8 (43 %) | 0.2 (0 %) | 39.2 | 30.1 | Graphics.Draw 27.4, Recorder.Submit 1.9 | | title | 0.1 (0 %) | 0.0 (0 %) | 69.1 | 0.1 | Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0 | | title | 0.1 (0 %) | 0.0 (0 %) | 69.1 | 0.1 | Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveGraphicsAbi 0.0 | | title | 0.1 (0 %) | 0.0 (0 %) | 69.1 | 0.1 | Shader.ResolveAbi 0.0, Shader.ResolveGraphicsAbi 0.0 | | title | 0.1 (0 %) | 0.0 (0 %) | 69.1 | 0.1 | Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveAbi 0.0 | | presenter | 0.8 (1 %) | 8.7 (13 %) | 59.7 | 0.0 | VideoOut.Flip 9.5, Driver.Present 0.0 | | title | 0.1 (0 %) | 0.0 (0 %) | 69.1 | 0.1 | Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveGraphicsAbi 0.0 | | title | 0.1 (0 %) | 0.0 (0 %) | 69.1 | 0.1 | Shader.ResolveGraphicsAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0 | | title | 0.1 (0 %) | 0.0 (0 %) | 69.1 | 0.1 | Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveAbi 0.0 | | title | 0.1 (0 %) | 0.0 (0 %) | 69.1 | 0.1 | Shader.ResolveGraphicsAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0 | | title | 0.1 (0 %) | 0.0 (0 %) | 69.1 | 0.1 | Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0 | | title | 0.1 (0 %) | 0.0 (0 %) | 69.1 | 0.1 | Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveGraphicsAbi 0.0 | | title | 0.1 (0 %) | 0.0 (0 %) | 69.1 | 0.1 | Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveGraphicsAbi 0.0 | | title | 0.1 (0 %) | 0.0 (0 %) | 69.1 | 0.0 | Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveGraphicsAbi 0.0 | | gpu | 35.5 (51 %) | 0.0 (0 %) | 33.7 | 0.0 | batch 35.5 | **Largest slices** (ms per frame, inclusive, all threads): batch 35.5, Graphics.Draw 27.4, Graphics.Draw.draw_and_resource_release 21.4, Driver.Packet 16.6, Driver.Packet.draw 12.7, Driver.Draw 12.3, VideoOut.Flip 9.5, Driver.Present 9.4, VideoOut.Flip.present 9.4, Recorder.WaitSerial 9.3 **Longest waits** - Recorder.WaitSerial (title) 11.1 ms at 3710 ms, present 4623 - Recorder.WaitSerial (title) 11.0 ms at 2619 ms, present 4606 - Recorder.WaitSerial (title) 10.8 ms at 14410 ms, present 4776 - Recorder.WaitSerial (title) 10.8 ms at 8501 ms, present 4692 - Recorder.WaitSerial (title) 10.8 ms at 9986 ms, present 4715 - Recorder.WaitSerial (title) 10.8 ms at 4526 ms, present 4635 - Recorder.WaitSerial (title) 10.8 ms at 10833 ms, present 4726 - Recorder.WaitSerial (title) 10.8 ms at 4593 ms, present 4635 - Recorder.WaitSerial (title) 10.7 ms at 7943 ms, present 4684 - Recorder.WaitSerial (title) 10.7 ms at 1639 ms, present 4592 **Largest GPU batches** (GPU ranges inside, and the CPU slices that recorded each, inclusive) - batch 9868: 10.4 ms at 11244 ms, present 4732: GPU no ranges; recorded by Graphics.Draw (draw committer) 0.5, Graphics.Draw.draw_and_resource_release (draw committer) 0.5, Resources.Complete (draw committer) 0.1 - batch 9623: 9.9 ms at 10961 ms, present 4728: GPU no ranges; recorded by Graphics.Draw (draw committer) 0.5, Graphics.Draw.draw_and_resource_release (draw committer) 0.5, Resources.Complete (draw committer) 0.1 - batch 10053: 9.8 ms at 11459 ms, present 4735: GPU no ranges; recorded by Graphics.Draw (draw committer) 0.6, Graphics.Draw.draw_and_resource_release (draw committer) 0.6, Resources.Complete (draw committer) 0.1 - batch 2283: 9.6 ms at 2609 ms, present 4606: GPU no ranges; recorded by Graphics.Draw (draw committer) 0.5, Graphics.Draw.draw_and_resource_release (draw committer) 0.5, Resources.Complete (draw committer) 0.1 - batch 9504: 9.6 ms at 10824 ms, present 4726: GPU no ranges; recorded by Graphics.Draw (draw committer) 0.5, Graphics.Draw.draw_and_resource_release (draw committer) 0.5, Resources.Complete (draw committer) 0.1 </details> ### Checklist <!-- Rules behind each item: https://github.com/boykopovar/AnyPS5/blob/main/CONTRIBUTING.md --> - [x] Based on current `main`; no other open PR implements the same functions - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except [technical debt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/CONVENTIONS.md) - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed under Silent stubs in their library's [technical debt](https://github.com/boykopovar/AnyPS5/tree/main/docs/dev/debt) file - [x] No notes, investigation `.md` files or images added to the repository (attach them to this PR) - [x] New third-party code is a submodule built from source - [x] Generic behaviour, not specific to one title - [x] Depends on: none - [x] Fixes: none - [x] Unblocks: none - [x] GPUs tested: NVIDIA GeForce RTX 2080 Ti, driver 617.14, Windows 11 (10.0.26300) - [x] AI-assisted: yes
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
boykopovar/AnyPS5!18010
No description provided.