perf(agc): move hot flush-hook and SRT walk thread-locals to TEB slots #16420

Merged
17bryen merged 2 commits from upstream-pr/16420 into main 2026-11-07 12:37:20 +00:00
17bryen commented 2026-11-06 16:57:07 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by 17bryen on 2026-11-06T16:57:07Z.


What

With MinGW every thread_local access goes through __emutls_get_address, and with winpthreads that ends in pthread_getspecific, whose thread lookup takes one process-wide spin lock. #6615 moved the revalidation path's thread-locals to TEB slots (HostThreadSlot, ThreadScratch) and left the rest as they were. Sampling Echoes of Aincrad (PPSA22969)'s queue worker in a 5.9k-draw cave scene (APS5_SAMPLE_WORKER, 30 s) still showed 9.6 to 12.9 samples per frame in __emutls_get_address, 5.5 to 7.2 of them in the spin lock, reached from the sites below, so this moves them too:

  • SrtEvaluatingBranch (SrtWalker.cpp), read on every pending-page shader read and set and restored by every SrtBranchScope of an SRT walk, is a HostThreadSlot<bool>; the reference-returning accessor becomes a getter and a setter, and SrtBranchScope uses them. HostThreadSlot.hpp joins shaderCacheKeySources, as the cache key check requires for a header the recompiler includes.
  • completionDepth (Recorder.cpp), read three times by every flush-hook access and by SyncThrough, is a HostThreadSlot<int> behind completionDepth(); finish()'s InCompletion guard sets it.
  • threadWaitedMs (Recorder.cpp) is a HostThreadSlot<double>.
  • onOwnLiveStack's stack bounds, CounterFor's per-thread memory counters and epochCollectMap's map (GuestMemory.cpp) go through ThreadScratch: created on first use and destroyed with the thread by ThreadOwned, as before.
  • FlushDepthPlanes's re-entry flag (DepthSurface.cpp) is a HostThreadSlot<bool>.
  • Driver::timed's per-worker profile (PacketExecution.cpp, APS5_PROFILE_DRAW only) goes through ThreadScratch.

Every slot starts zeroed, which is each variable's former initial value. Thread-locals elsewhere stay as they are.

The second commit gives tools/tests/test_shader_cache_runtime_sources.py's fixture a stand-in HostThreadSlot.hpp beside its HostThreadLocal.hpp and AtomicSharedPtr.hpp, since the fixture configures the recompiler's CMakeLists.txt and that now lists the header.

Tested

Windows 11 (10.0.26200), WinLibs GCC 15.2.0 (UCRT), Release, NVIDIA GeForce RTX 5090, driver 617.14, AMD Ryzen 9 9950X3D. main is 6ed10ccd1f, this PR 31dde4f9e1 on it (the measured driver commit is 135d481eb1; the second commit touches only the test).

  • Full suite on this PR, 4,357 tests: the 2,873 tests outside the GPU patterns with VK_DRIVER_FILES pointing at no ICD all pass; the 1,484 tests matching ^(agc|shader|recompiler|videoout|video_out|guest_video_out|vulkan)|gpu with ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation at -j 4 pass except two:

    • agc_driver_direct_write_completion fails 3 of 3 alone on this PR and 3 of 3 alone on untouched main 6ed10ccd1f ("the completion of a buffer write dropped image results recorded after it"); not this change.
    • agc_driver_unregistered_label_on_gpu failed once under the parallel run and passes 4 of 4 alone on this PR and 3 of 3 alone on main.
    • The seven shader_cache_runtime_sources shards pass with the second commit; without it they fail at configure, as the NVIDIA run below found.
  • Validation comparison on the focused set, ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation VK_LOADER_DEBUG=layer, ctest --test-dir build -R 'agc_driver_(shader_memory|guest_memory|depth_plane|image_memory_hooks|pipelined_dispatch|storage_flush|direct_write_completion)|agc_shader_srt|agc_collect|agc_private_collect|agc_unwatch_hook|agc_recorder_completion|shader_memory' -V (36 tests), on main and on this PR: 35 of 36 pass on each. The loader inserted VK_LAYER_KHRONOS_validation (SDK 1.4.363.1) in 31 test processes in each log, was not found but was requested appears 0 times in each, and neither log contains a VUID- line, so the change adds none.

  • python3 tools/check_conventions.py --base upstream/main passes. python3 tools/pr_overlap.py --branch perf/agc-hot-thread-locals-teb (1,886 open PRs) finds one textual overlap: #16088 adds RemoveTree.hpp on the line next to this PR's HostThreadSlot.hpp in shaderCacheKeySources; whichever lands second keeps both lines. 42 PRs that share a file could not be compared because they no longer merge with main; none of them, nor any other open PR, moves these thread-locals (the open PRs were searched for the variable names, HostThreadSlot, ThreadScratch, emutls and TEB).

  • Echoes of Aincrad (PPSA22969), the first cave after loading the save, standing still, 3840x2160, two captures each of main (baseline) and this PR, alternating, same session, warm shader cache. APS5_TRACE_SECONDS=1:30 opened by APS5_TRACE_TRIGGER_FILE 90 s after the load, APS5_SAMPLE_WORKER on, no other APS5_* switch, log not redirected. Summary lines, digests, traces and the worker's collapsed stacks are below the checklist.

per frame baseline run 1 baseline run 2 PR run 1 PR run 2 avg. change
presents in 30 s 74 74 78 82 +8.1%
frame p50 (ms) 394.4 403.2 375.4 348.4 -9.3%
frame p90 (ms) 470.0 450.4 440.0 407.2 -8.0%
mean frame (ms) 408.6 407.4 388.1 377.1 -6.2%
GPU busy per present (ms) 185.0 n/a 184.1 177.2 -2.4%
Driver.Packet.draw (ms) 270.4 271.2 256.0 250.6 -6.5%
Driver.Packet (ms) 738.7 739.1 704.4 684.3 -6.0%
worker samples in __emutls_get_address 9.6 12.9 4.0 5.5 -57.8%
worker samples in pthread_spin_lock 5.5 7.2 2.0 3.1 -59.8%
  • The queue worker is 98% busy in all four; the frame is its packet time. Baseline run 2 recorded no GPU timestamps (0.0 in its summary line), so its GPU change is against run 1 alone; its frame times are unaffected.
  • The sample counts come from the worker.collapsed.txt files, symbolized with nm against the respective libSceAgcDriver.prx and the system libraries' export tables (about 1 kHz, so about 550 samples per frame; a third of them in the worker's waits).
  • tools/performance_compare.py, run 1 against run 1: frame p50 -4.8%, p90 -6.4%, mean -5.0%, Driver.Packet.draw -5.3%, GPU busy -0.4%; run 2 against run 2: p50 -13.6%, p90 -9.6%, mean -7.4%, Driver.Packet.draw -7.6%. The mean frame moved 20 and 30 ms in the two pairs; the p50 difference between the pairs (19 and 55 ms) shows the single-capture noise, so the mean is the figure to read.
  • No draw-cache path changes; the draw count (about 5.9k per frame) comes from earlier APS5_PROFILE_DRAW captures of the same view, not from these four, which ran with profiling off as the issue form asks.

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 5090, driver 617.14, Windows 11 10.0.26200
  • AI-assisted: yes

Traces and the worker's collapsed stacks (one zip, a folder per run with its aps5-summary.jsonl): aincrad-teb-traces.zip (attached)

The four summary lines, with tools/trace_digest.py --stacks worker.collapsed.txt for each trace:

Baseline run 1 (main 6ed10ccd1f)

seconds 1:30 from present 1378: 74 presents, frame p50 394.4 / p90 470.0 / p99 712.4 / max 712.4 ms, GPU busy 185.0 ms per present
NVIDIA GeForce RTX 5090, NVIDIA 617.14, Windows 10.0.26200, 3840x2160, commit 6ed10ccd1f, dropped: yes

{"commit":"6ed10ccd1fd3","dirty":false,"env":{"APS5_PAD_INPUT_FILE":"<path>","APS5_SAMPLE_WORKER":"<path>","APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"1:30","APS5_TRACE_TRIGGER_FILE":"<path>"},"gpu":"NVIDIA GeForce RTX 5090","driver":"NVIDIA 617.14","os":"Windows 10.0.26200","cpu":"AMD Ryzen 9 9950X3D 16-Core Processor","cpu_threads":32,"memory_mib":64900,"title_id":"PPSA22969","title":"Echoes of Aincrad","content_version":"01.000.006","resolution":"3840x2160","window":{"spec":"seconds 1:30","first_present":1378,"ms":30239.256},"presents":74,"frame_ms":{"p50":394.413,"p90":469.969,"p99":712.359,"max":712.359},"gpu_busy_ms_per_present":184.963,"worker_busy_pct":{"queue worker 0x0":98.127,"queue worker 0x20":82.926},"top_phases_ms_per_frame":{"Driver.Packet":738.667,"Driver.Packet.memory_wait":284.488,"Driver.Packet.draw":270.422,"Driver.Draw":269.225,"Graphics.Draw":184.287,"Graphics.Draw.draw_and_resource_release":146.403,"Driver.Packet.dispatch":135.311,"Driver.Draw.shader_compile_and_link":104.608},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":5.157,"events_lost":1226280,"totals_full":false}},"trace":"aps5-trace-6ed10ccd1fd3-933144.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: 1226280 events lost; buffer full at 5157.3 ms

Slowest frames (largest slices inside each, inclusive)

  • present 1435: 712.4 ms at 23139 ms: Driver.Packet (queue worker 0x20) 635.9, Driver.Packet.memory_wait (queue worker 0x20) 576.6, batch (gpu) 177.2, Driver.WorkerWait (queue worker 0x20) 73.4
  • present 1424: 635.5 ms at 18718 ms: Driver.Packet (queue worker 0x20) 574.0, Driver.Packet.memory_wait (queue worker 0x20) 499.8, batch (gpu) 177.8, Graphics.Draw (draw committer) 71.5
  • present 1421: 581.2 ms at 17362 ms: Driver.Packet (queue worker 0x20) 418.1, Driver.Packet.memory_wait (queue worker 0x20) 349.3, batch (gpu) 174.6, Driver.WorkerWait (queue worker 0x20) 160.4
  • present 1418: 512.5 ms at 16039 ms: Driver.Packet (queue worker 0x20) 347.0, Driver.Packet.memory_wait (queue worker 0x20) 276.2, batch (gpu) 172.2, Driver.WorkerWait (queue worker 0x20) 162.8
  • present 1439: 506.0 ms at 25052 ms: Driver.Packet (queue worker 0x20) 338.7, Driver.Packet.memory_wait (queue worker 0x20) 262.2, batch (gpu) 186.4, Driver.WorkerWait (queue worker 0x20) 164.4

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

  • present 1435: 712.4 ms at 23139 ms, persistence 362.2 ms
  • present 1424: 635.5 ms at 18718 ms, persistence 285.4 ms
  • present 1421: 581.2 ms at 17362 ms, persistence 219.8 ms
  • present 1439: 506.0 ms at 25052 ms, persistence 152.2 ms
  • present 1402: 477.6 ms at 9601 ms, persistence 125.9 ms
  • present 1418: 512.5 ms at 16039 ms, persistence 122.1 ms
  • present 1391: 474.0 ms at 5071 ms, persistence 102.6 ms
  • present 1444: 442.2 ms at 27142 ms, persistence 91.5 ms
  • present 1428: 446.3 ms at 20490 ms, persistence 80.9 ms
  • present 1447: 428.7 ms at 28329 ms, persistence 77.3 ms

Threads (ms per frame)

thread busy wait untraced in slices < 20 us largest
queue worker 0x0 50.2 (12 %) 8.6 (2 %) 349.8 75.0 Driver.Packet 58.7, Driver.EndSubmission 0.0
draw committer 79.2 (19 %) 6.2 (2 %) 323.2 77.3 Graphics.Draw 64.7, Recorder.Submit 8.3
title 0.0 (0 %) 0.0 (0 %) 408.6 0.0 Shader.ResolveGraphicsStagesAbi 0.0
presenter 1.2 (0 %) 0.1 (0 %) 407.4 0.1 VideoOut.Flip 1.3, Driver.Present 0.0
title 0.0 (0 %) 0.0 (0 %) 408.6 0.0 Shader.ResolveGraphicsStagesAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 408.6 0.0 Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveGraphicsAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 408.6 0.0 Shader.ResolveGraphicsAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 408.6 0.0 Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveGraphicsAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 408.6 0.0 Shader.ResolveGraphicsAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 408.6 0.0 Shader.ResolveGraphicsStagesAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 408.6 0.0 Shader.ResolveGraphicsStagesAbi 0.0
queue worker 0x20 67.6 (17 %) 338.7 (83 %) 2.4 12.3 Driver.Packet 336.0, Driver.EndSubmission 0.8
gpu 184.6 (45 %) 0.0 (0 %) 224.0 0.0 batch 184.6

Largest slices (ms per frame, inclusive, all threads): Driver.Packet 394.7, Driver.Packet.memory_wait 261.9, batch 184.6, Driver.Packet.dispatch 80.7, Graphics.Draw 79.0, Driver.WorkerWait 69.5, Driver.WorkerWait.dequeue_order 69.5, Graphics.Draw.draw_and_resource_release 56.7, Driver.Dispatch 46.8, Driver.Packet.draw 40.2

Longest waits

  • Driver.Packet.memory_wait (queue worker 0x20) 396.4 ms at 23141 ms, present 1435
  • Driver.Packet.memory_wait (queue worker 0x20) 238.2 ms at 18885 ms, present 1424
  • Driver.Packet.memory_wait (queue worker 0x20) 234.0 ms at 17525 ms, present 1421
  • Driver.Packet.memory_wait (queue worker 0x20) 173.8 ms at 13852 ms, present 1412
  • Driver.Packet.memory_wait (queue worker 0x20) 171.8 ms at 8926 ms, present 1400
  • Driver.Packet.memory_wait (queue worker 0x20) 171.3 ms at 6525 ms, present 1394
  • Driver.Packet.memory_wait (queue worker 0x20) 168.1 ms at 5261 ms, present 1391
  • Driver.WorkerWait (queue worker 0x20) 164.4 ms at 25391 ms, present 1439
  • Driver.WorkerWait (queue worker 0x20) 162.8 ms at 16386 ms, present 1418
  • Driver.WorkerWait (queue worker 0x20) 160.4 ms at 17780 ms, present 1421

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

  • batch 813: 18.7 ms at 1239 ms, present 1381: GPU no ranges; recorded by Driver.Packet (queue worker 0x20) 1.6, Driver.Packet.memory_wait (queue worker 0x20) 1.6, Driver.Dispatch (queue worker 0x20) 0.6, Driver.Dispatch.capture_resources (queue worker 0x20) 0.3
  • batch 3253: 17.5 ms at 4976 ms, present 1390: GPU no ranges; recorded by Driver.Packet (queue worker 0x0) 4.0, Driver.Packet.dispatch (queue worker 0x0) 2.1, Driver.Packet.draw (queue worker 0x0) 1.6, Driver.Draw (queue worker 0x0) 1.6
  • batch 569: 17.3 ms at 847 ms, present 1380: GPU no ranges; recorded by Driver.Packet (queue worker 0x20) 1.6, Driver.Packet.memory_wait (queue worker 0x20) 1.6, Recorder.Submit (queue worker 0x20) 0.0
  • batch 1342: 17.3 ms at 2047 ms, present 1383: GPU no ranges; recorded by Driver.Packet (queue worker 0x20) 1.6, Driver.Packet.memory_wait (queue worker 0x20) 1.6, Driver.Dispatch (queue worker 0x20) 0.2, GpuMutex.wait.hook (queue worker 0x20) 0.1
  • batch 8845: 17.2 ms at 13768 ms, present 1412: GPU no ranges; recorded by Driver.Packet (queue worker 0x20) 1.8, Driver.Packet.memory_wait (queue worker 0x20) 1.8, GpuMutex.wait.hook (queue worker 0x20) 0.1, Recorder.Submit (queue worker 0x20) 0.1

Worker stacks (40960 samples, 12.6 % truncated; total leaves out the 6 frames every complete stack shares)

  • self: ntdll.dll+0x160bb4 33.3 %, ntdll.dll+0x1600e4 5.3 %, ntdll.dll+0x1a90d 2.7 %, ntdll.dll+0x1620d4 1.7 %, ntdll.dll+0x6b6fb 1.1 %, ntdll.dll+0x557a0 1.0 %, ucrtbase.dll+0xee606 0.9 %, ucrtbase.dll+0xee616 0.9 %, libSceAgcDriver.prx+0x115b5b 0.8 %, libwinpthread-1.dll+0x6be0 0.8 %
  • total: libSceAgcDriver.prx+0xbddd9 60.7 %, libSceAgcDriver.prx+0xaadb0 34.1 %, libSceAgcDriver.prx+0xa5c39 34.1 %, KERNELBASE.dll+0x228c1 33.3 %, KERNELBASE.dll+0x229f3 33.3 %, ntdll.dll+0x160bb4 33.3 %, libSceAgcDriver.prx+0x42154 28.4 %, libwinpthread-1.dll+0x3935 26.3 %, libwinpthread-1.dll+0x3a6f 26.3 %, libwinpthread-1.dll+0x32e8 25.7 %
Baseline run 2 (main 6ed10ccd1f)

seconds 1:30 from present 1383: 74 presents, frame p50 403.2 / p90 450.4 / p99 609.9 / max 609.9 ms, GPU busy 0.0 ms per present
NVIDIA GeForce RTX 5090, NVIDIA 617.14, Windows 10.0.26200, 3840x2160, commit 6ed10ccd1f, dropped: yes

{"commit":"6ed10ccd1fd3","dirty":false,"env":{"APS5_PAD_INPUT_FILE":"<path>","APS5_SAMPLE_WORKER":"<path>","APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"1:30","APS5_TRACE_TRIGGER_FILE":"<path>"},"gpu":"NVIDIA GeForce RTX 5090","driver":"NVIDIA 617.14","os":"Windows 10.0.26200","cpu":"AMD Ryzen 9 9950X3D 16-Core Processor","cpu_threads":32,"memory_mib":64900,"title_id":"PPSA22969","title":"Echoes of Aincrad","content_version":"01.000.006","resolution":"3840x2160","window":{"spec":"seconds 1:30","first_present":1383,"ms":30148.376},"presents":74,"frame_ms":{"p50":403.221,"p90":450.384,"p99":609.932,"max":609.932},"gpu_busy_ms_per_present":0.000,"worker_busy_pct":{"queue worker 0x0":98.234,"queue worker 0x20":83.501},"top_phases_ms_per_frame":{"Driver.Packet":739.061,"Driver.Packet.memory_wait":286.960,"Driver.Packet.draw":271.221,"Driver.Draw":269.977,"Graphics.Draw":192.456,"Graphics.Draw.draw_and_resource_release":153.359,"Driver.Packet.dispatch":132.750,"Driver.Draw.shader_compile_and_link":98.829},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":5.198,"events_lost":1242231,"totals_full":false}},"trace":"aps5-trace-6ed10ccd1fd3-873216.json.gz"}
{"commit":"6ed10ccd1fd3","dirty":false,"env":{"APS5_PAD_INPUT_FILE":"<path>","APS5_SAMPLE_WORKER":"<path>","APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"1:30","APS5_TRACE_TRIGGER_FILE":"<path>"},"gpu":"NVIDIA GeForce RTX 5090","driver":"NVIDIA 617.14","os":"Windows 10.0.26200","cpu":"AMD Ryzen 9 9950X3D 16-Core Processor","cpu_threads":32,"memory_mib":64900,"title_id":"PPSA22969","title":"Echoes of Aincrad","content_version":"01.000.006","resolution":"3840x2160","window":{"spec":"seconds 1:30","first_present":1383,"ms":30148.376},"presents":74,"frame_ms":{"p50":403.221,"p90":450.384,"p99":609.932,"max":609.932},"gpu_busy_ms_per_present":0.0,"worker_busy_pct":{"queue worker 0x0":98.234,"queue worker 0x20":83.501},"top_phases_ms_per_frame":{"Driver.Packet":739.061,"Driver.Packet.memory_wait":286.96,"Driver.Packet.draw":271.221,"Driver.Draw":269.977,"Graphics.Draw":192.456,"Graphics.Draw.draw_and_resource_release":153.359,"Driver.Packet.dispatch":132.75,"Driver.Draw.shader_compile_and_link":98.829},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":5.198,"events_lost":1242231,"totals_full":false}},"trace":"aps5-trace-6ed10ccd1fd3-873216.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: 1242231 events lost; buffer full at 5197.7 ms

Slowest frames (largest slices inside each, inclusive)

  • present 1452: 609.9 ms at 27945 ms: Driver.Packet (queue worker 0x20) 557.8, Driver.Packet.memory_wait (queue worker 0x20) 450.7, batch (gpu) 208.7, Driver.Packet.dispatch (queue worker 0x20) 99.6
  • present 1386: 508.8 ms at 1214 ms: Driver.Packet (queue worker 0x0) 449.0, Driver.Packet (queue worker 0x20) 422.5, Driver.Packet.memory_wait (queue worker 0x20) 338.2, Driver.Packet.draw (queue worker 0x0) 311.4
  • present 1446: 476.6 ms at 25534 ms: Driver.Packet (queue worker 0x20) 416.4, Driver.Packet.memory_wait (queue worker 0x20) 346.0, batch (gpu) 168.4, Driver.Packet.dispatch (queue worker 0x20) 63.7
  • present 1444: 470.7 ms at 24613 ms: Driver.Packet (queue worker 0x20) 408.5, Driver.Packet.memory_wait (queue worker 0x20) 335.0, batch (gpu) 174.6, Graphics.Draw (draw committer) 74.7
  • present 1428: 466.9 ms at 18299 ms: Driver.Packet (queue worker 0x20) 344.1, Driver.Packet.memory_wait (queue worker 0x20) 249.1, batch (gpu) 200.4, Driver.WorkerWait (queue worker 0x20) 119.4

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

  • present 1452: 609.9 ms at 27945 ms, persistence 266.5 ms
  • present 1386: 508.8 ms at 1214 ms, persistence 165.3 ms
  • present 1446: 476.6 ms at 25534 ms, persistence 129.2 ms
  • present 1428: 466.9 ms at 18299 ms, persistence 110.5 ms
  • present 1423: 457.9 ms at 16273 ms, persistence 101.6 ms
  • present 1411: 446.8 ms at 11505 ms, persistence 87.8 ms
  • present 1398: 444.2 ms at 6164 ms, persistence 68.2 ms
  • present 1435: 427.5 ms at 21042 ms, persistence 60.8 ms
  • present 1395: 440.4 ms at 4955 ms, persistence 60.3 ms
  • present 1425: 438.0 ms at 17109 ms, persistence 60.2 ms

Threads (ms per frame)

thread busy wait untraced in slices < 20 us largest
queue worker 0x0 51.3 (13 %) 8.5 (2 %) 347.6 71.3 Driver.Packet 59.7, Driver.EndSubmission 0.0
draw committer 84.1 (21 %) 5.9 (1 %) 317.5 77.3 Graphics.Draw 70.2, Recorder.Submit 8.1
title 0.0 (0 %) 0.0 (0 %) 407.4 0.0 Shader.ResolveGraphicsStagesAbi 0.0
presenter 0.2 (0 %) 0.0 (0 %) 407.2 0.0 VideoOut.Flip 0.2
title 0.0 (0 %) 0.0 (0 %) 407.4 0.0 Shader.ResolveGraphicsStagesAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 407.4 0.0 Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveGraphicsAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 407.4 0.0 Shader.ResolveGraphicsAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
queue worker 0x20 66.5 (16 %) 338.5 (83 %) 2.4 12.3 Driver.Packet 337.2, Driver.EndSubmission 1.0
gpu 188.6 (46 %) 0.0 (0 %) 218.8 0.0 batch 188.6

Largest slices (ms per frame, inclusive, all threads): Driver.Packet 396.8, Driver.Packet.memory_wait 262.9, batch 188.6, Graphics.Draw 84.5, Driver.Packet.dispatch 80.9, Driver.WorkerWait 67.0, Driver.WorkerWait.dequeue_order 67.0, Graphics.Draw.draw_and_resource_release 62.9, Driver.Dispatch 46.6, Driver.Packet.draw 41.3

Longest waits

  • Driver.Packet.memory_wait (queue worker 0x20) 328.9 ms at 28116 ms, present 1452
  • Driver.Packet.memory_wait (queue worker 0x20) 209.7 ms at 24781 ms, present 1444
  • Driver.Packet.memory_wait (queue worker 0x20) 175.2 ms at 1424 ms, present 1386
  • Driver.Packet.memory_wait (queue worker 0x20) 174.3 ms at 11682 ms, present 1411
  • Driver.Packet.memory_wait (queue worker 0x20) 172.6 ms at 25752 ms, present 1446
  • Driver.Packet.memory_wait (queue worker 0x20) 169.2 ms at 2354 ms, present 1388
  • Driver.Packet.memory_wait (queue worker 0x20) 164.2 ms at 25272 ms, present 1445
  • Driver.Packet.memory_wait (queue worker 0x20) 154.8 ms at 11258 ms, present 1410
  • Driver.Packet.memory_wait (queue worker 0x20) 147.5 ms at 7984 ms, present 1402
  • Driver.Packet.memory_wait (queue worker 0x20) 147.1 ms at 570 ms, present 1384

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

  • batch 10561: 19.0 ms at 16371 ms, present 1423: GPU no ranges; recorded by Driver.Packet (queue worker 0x20) 1.8, Driver.Packet.memory_wait (queue worker 0x20) 1.8, GpuMutex.wait.hook (queue worker 0x20) 0.1, Recorder.Submit (queue worker 0x20) 0.1
  • batch 11084: 18.8 ms at 17210 ms, present 1425: GPU no ranges; recorded by Driver.Packet (queue worker 0x20) 1.6, Driver.Packet.memory_wait (queue worker 0x20) 1.6, Driver.Dispatch (queue worker 0x20) 0.4, GpuMutex.wait.hook (queue worker 0x20) 0.3
  • batch 10832: 18.0 ms at 16816 ms, present 1424: GPU no ranges; recorded by Driver.Packet (queue worker 0x20) 1.9, Driver.Packet.memory_wait (queue worker 0x20) 1.9, Driver.Dispatch (queue worker 0x20) 0.3, Driver.Dispatch.capture_resources (queue worker 0x20) 0.1
  • batch 9388: 17.7 ms at 14642 ms, present 1418: GPU no ranges; recorded by no CPU slices
  • batch 8745: 17.6 ms at 13619 ms, present 1416: GPU no ranges; recorded by Driver.Packet (queue worker 0x20) 1.5, Driver.Packet.memory_wait (queue worker 0x20) 1.5, Driver.Dispatch (queue worker 0x20) 0.4, GpuMutex.wait.hook (queue worker 0x20) 0.1

Worker stacks (37148 samples, 12.6 % truncated; total leaves out the 0 frames every complete stack shares)

  • self: ntdll.dll+0x160bb4 16.7 %, ntdll.dll+0x1600e4 7.1 %, ntdll.dll+0x1a90d 3.7 %, ntdll.dll+0x1620d4 2.0 %, ntdll.dll+0x557a0 1.3 %, libwinpthread-1.dll+0x6be0 1.2 %, libSceAgcDriver.prx+0x115b5b 1.1 %, ntdll.dll+0x2116e 1.0 %, ntdll.dll+0x211be 0.9 %, ntdll.dll+0x21228 0.8 %
  • total: libwinpthread-1.dll+0x9f6a 87.4 %, libSceAgcDriver.prx+0xbffe1 87.4 %, KERNEL32.DLL+0x2e957 87.4 %, libstdc++-6.dll+0x13d4cf 87.4 %, ntdll.dll+0xaad6c 87.4 %, ucrtbase.dll+0x2cd30 87.4 %, libSceAgcDriver.prx+0xbddd9 85.8 %, libSceAgcDriver.prx+0xaadb0 51.0 %, libSceAgcDriver.prx+0xa5c39 51.0 %, libSceAgcDriver.prx+0x42154 41.7 %
This PR run 1 (135d481eb1)

seconds 1:30 from present 1191: 78 presents, frame p50 375.4 / p90 440.0 / p99 580.7 / max 580.7 ms, GPU busy 184.1 ms per present
NVIDIA GeForce RTX 5090, NVIDIA 617.14, Windows 10.0.26200, 3840x2160, commit 135d481eb1, dropped: yes

{"commit":"135d481eb1f4","dirty":false,"env":{"APS5_PAD_INPUT_FILE":"<path>","APS5_SAMPLE_WORKER":"<path>","APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"1:30","APS5_TRACE_TRIGGER_FILE":"<path>"},"gpu":"NVIDIA GeForce RTX 5090","driver":"NVIDIA 617.14","os":"Windows 10.0.26200","cpu":"AMD Ryzen 9 9950X3D 16-Core Processor","cpu_threads":32,"memory_mib":64900,"title_id":"PPSA22969","title":"Echoes of Aincrad","content_version":"01.000.006","resolution":"3840x2160","window":{"spec":"seconds 1:30","first_present":1191,"ms":30270.074},"presents":78,"frame_ms":{"p50":375.352,"p90":439.962,"p99":580.657,"max":580.657},"gpu_busy_ms_per_present":184.149,"worker_busy_pct":{"queue worker 0x0":98.033,"queue worker 0x20":83.803},"top_phases_ms_per_frame":{"Driver.Packet":704.412,"Driver.Packet.memory_wait":271.766,"Driver.Packet.draw":255.990,"Driver.Draw":254.815,"Graphics.Draw":181.002,"Graphics.Draw.draw_and_resource_release":144.157,"Driver.Packet.dispatch":129.428,"Driver.Draw.shader_compile_and_link":100.200},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":5.537,"events_lost":1226718,"totals_full":false}},"trace":"aps5-trace-135d481eb1f4-845412.json.gz"}
{"commit":"135d481eb1f4","dirty":false,"env":{"APS5_PAD_INPUT_FILE":"<path>","APS5_SAMPLE_WORKER":"<path>","APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"1:30","APS5_TRACE_TRIGGER_FILE":"<path>"},"gpu":"NVIDIA GeForce RTX 5090","driver":"NVIDIA 617.14","os":"Windows 10.0.26200","cpu":"AMD Ryzen 9 9950X3D 16-Core Processor","cpu_threads":32,"memory_mib":64900,"title_id":"PPSA22969","title":"Echoes of Aincrad","content_version":"01.000.006","resolution":"3840x2160","window":{"spec":"seconds 1:30","first_present":1191,"ms":30270.074},"presents":78,"frame_ms":{"p50":375.352,"p90":439.962,"p99":580.657,"max":580.657},"gpu_busy_ms_per_present":184.149,"worker_busy_pct":{"queue worker 0x0":98.033,"queue worker 0x20":83.803},"top_phases_ms_per_frame":{"Driver.Packet":704.412,"Driver.Packet.memory_wait":271.766,"Driver.Packet.draw":255.99,"Driver.Draw":254.815,"Graphics.Draw":181.002,"Graphics.Draw.draw_and_resource_release":144.157,"Driver.Packet.dispatch":129.428,"Driver.Draw.shader_compile_and_link":100.2},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":5.537,"events_lost":1226718,"totals_full":false}},"trace":"aps5-trace-135d481eb1f4-845412.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: 1226718 events lost; buffer full at 5536.8 ms

Slowest frames (largest slices inside each, inclusive)

  • present 1222: 580.7 ms at 12563 ms: Driver.Packet (queue worker 0x20) 522.0, Driver.Packet.memory_wait (queue worker 0x20) 454.5, batch (gpu) 186.9, Driver.Packet.dispatch (queue worker 0x20) 60.0
  • present 1194: 571.3 ms at 1279 ms: Driver.Packet (queue worker 0x20) 509.5, Driver.Packet (queue worker 0x0) 506.6, Driver.Packet.memory_wait (queue worker 0x20) 431.3, Driver.Packet.draw (queue worker 0x0) 403.4
  • present 1203: 503.9 ms at 5178 ms: Driver.Packet (queue worker 0x20) 446.7, Driver.Packet.memory_wait (queue worker 0x20) 368.6, Driver.Packet (queue worker 0x0) 305.0, Driver.Packet.draw (queue worker 0x0) 247.8
  • present 1232: 486.0 ms at 16614 ms: Driver.Packet (queue worker 0x20) 362.3, Driver.Packet.memory_wait (queue worker 0x20) 283.2, batch (gpu) 186.5, Driver.WorkerWait (queue worker 0x20) 120.8
  • present 1198: 482.6 ms at 3009 ms: Driver.Packet (queue worker 0x0) 412.7, Driver.Packet (queue worker 0x20) 388.6, Driver.Packet.memory_wait (queue worker 0x20) 260.5, Driver.Packet.draw (queue worker 0x0) 247.8

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

  • present 1222: 580.7 ms at 12563 ms, persistence 247.8 ms
  • present 1194: 571.3 ms at 1279 ms, persistence 220.6 ms
  • present 1203: 503.9 ms at 5178 ms, persistence 147.8 ms
  • present 1232: 486.0 ms at 16614 ms, persistence 133.3 ms
  • present 1265: 419.9 ms at 28813 ms, persistence 87.1 ms
  • present 1198: 482.6 ms at 3009 ms, persistence 78.9 ms
  • present 1248: 411.8 ms at 22512 ms, persistence 69.1 ms
  • present 1215: 426.6 ms at 9882 ms, persistence 68.1 ms
  • present 1235: 400.3 ms at 17798 ms, persistence 65.5 ms
  • present 1239: 394.7 ms at 19273 ms, persistence 54.7 ms

Threads (ms per frame)

thread busy wait untraced in slices < 20 us largest
queue worker 0x0 52.5 (14 %) 7.7 (2 %) 327.9 70.7 Driver.Packet 60.0, Driver.EndSubmission 0.0
draw committer 75.1 (19 %) 6.0 (2 %) 306.9 78.4 Graphics.Draw 61.9, Recorder.Submit 7.8
title 0.0 (0 %) 0.0 (0 %) 388.1 0.0 Shader.ResolveGraphicsStagesAbi 0.0
presenter 1.1 (0 %) 0.1 (0 %) 386.9 0.1 VideoOut.Flip 1.1, Driver.Present 0.0
title 0.0 (0 %) 0.0 (0 %) 388.1 0.0 Shader.ResolveGraphicsStagesAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 388.1 0.0 Shader.ResolveGraphicsStagesAbi 0.0
queue worker 0x20 65.3 (17 %) 320.3 (83 %) 2.5 12.5 Driver.Packet 322.2, Driver.EndSubmission 0.9
gpu 184.7 (48 %) 0.0 (0 %) 203.3 0.0 batch 184.7

Largest slices (ms per frame, inclusive, all threads): Driver.Packet 382.2, Driver.Packet.memory_wait 248.5, batch 184.7, Driver.Packet.dispatch 79.6, Graphics.Draw 75.7, Driver.WorkerWait 62.6, Driver.WorkerWait.dequeue_order 62.6, Graphics.Draw.draw_and_resource_release 55.8, Driver.Dispatch 46.5, Driver.Packet.draw 42.4

Longest waits

  • Driver.Packet.memory_wait (queue worker 0x20) 236.9 ms at 1524 ms, present 1194
  • Driver.Packet.memory_wait (queue worker 0x20) 227.0 ms at 12709 ms, present 1222
  • Driver.Packet.memory_wait (queue worker 0x20) 201.8 ms at 5180 ms, present 1203
  • Driver.Packet.memory_wait (queue worker 0x20) 158.2 ms at 4502 ms, present 1201
  • Driver.WorkerWait (queue worker 0x20) 158.0 ms at 13458 ms, present 1223
  • Driver.Packet.memory_wait (queue worker 0x20) 138.4 ms at 3681 ms, present 1199
  • Driver.Packet.memory_wait (queue worker 0x20) 137.4 ms at 6247 ms, present 1205
  • Driver.Packet.memory_wait (queue worker 0x20) 136.7 ms at 7056 ms, present 1207
  • Driver.Packet.memory_wait (queue worker 0x20) 135.8 ms at 4947 ms, present 1202
  • Driver.Packet.memory_wait (queue worker 0x20) 133.0 ms at 584 ms, present 1192

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

  • batch 11795: 18.6 ms at 18100 ms, present 1235: GPU no ranges; recorded by no CPU slices
  • batch 9360: 18.1 ms at 14444 ms, present 1226: GPU no ranges; recorded by Driver.Packet (queue worker 0x20) 2.2, Driver.Packet.memory_wait (queue worker 0x20) 2.2, Driver.Dispatch (queue worker 0x20) 0.5, Driver.Dispatch.capture_resources (queue worker 0x20) 0.1
  • batch 9508: 17.7 ms at 14676 ms, present 1226: GPU no ranges; recorded by GpuMutex.wait.other (draw committer) 0.2, Recorder.Submit (draw committer) 0.1, GpuMutex.wait.label (draw committer) 0.1, Recorder.Reap (draw committer) 0.1
  • batch 7037: 17.3 ms at 10775 ms, present 1217: GPU no ranges; recorded by Driver.Packet (queue worker 0x20) 1.5, Driver.Packet.memory_wait (queue worker 0x20) 1.5, Driver.Dispatch (queue worker 0x20) 0.3, GpuMutex.wait.hook (queue worker 0x20) 0.2
  • batch 7293: 17.3 ms at 11138 ms, present 1218: GPU no ranges; recorded by Driver.Packet (queue worker 0x20) 1.6, Driver.Packet.memory_wait (queue worker 0x20) 1.6, Driver.Dispatch (queue worker 0x20) 0.3, Resources.Prepare (queue worker 0x20) 0.1

Worker stacks (39707 samples, 13.3 % truncated; total leaves out the 6 frames every complete stack shares)

  • self: ntdll.dll+0x160bb4 29.5 %, ntdll.dll+0x1600e4 5.9 %, ntdll.dll+0x1a90d 2.9 %, ntdll.dll+0x1620d4 1.7 %, ntdll.dll+0x6b6fb 1.1 %, ntdll.dll+0x557a0 1.0 %, libSceAgcDriver.prx+0x11609b 1.0 %, ucrtbase.dll+0xee606 0.8 %, ntdll.dll+0x2116e 0.8 %, ntdll.dll+0x211be 0.8 %
  • total: libSceAgcDriver.prx+0xbe319 64.8 %, libSceAgcDriver.prx+0xaad31 37.0 %, libSceAgcDriver.prx+0xa5d19 37.0 %, libSceAgcDriver.prx+0x42154 32.1 %, KERNELBASE.dll+0x228c1 29.5 %, KERNELBASE.dll+0x229f3 29.5 %, ntdll.dll+0x160bb4 29.5 %, libwinpthread-1.dll+0x3935 22.3 %, libwinpthread-1.dll+0x3a6f 22.3 %, libwinpthread-1.dll+0x32e8 21.8 %
This PR run 2 (135d481eb1)

seconds 1:30 from present 1504: 82 presents, frame p50 348.4 / p90 407.2 / p99 1016.6 / max 1016.6 ms, GPU busy 177.2 ms per present
NVIDIA GeForce RTX 5090, NVIDIA 617.14, Windows 10.0.26200, 3840x2160, commit 135d481eb1, dropped: yes

{"commit":"135d481eb1f4","dirty":false,"env":{"APS5_PAD_INPUT_FILE":"<path>","APS5_SAMPLE_WORKER":"<path>","APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"1:30","APS5_TRACE_TRIGGER_FILE":"<path>"},"gpu":"NVIDIA GeForce RTX 5090","driver":"NVIDIA 617.14","os":"Windows 10.0.26200","cpu":"AMD Ryzen 9 9950X3D 16-Core Processor","cpu_threads":32,"memory_mib":64900,"title_id":"PPSA22969","title":"Echoes of Aincrad","content_version":"01.000.006","resolution":"3840x2160","window":{"spec":"seconds 1:30","first_present":1504,"ms":30924.804},"presents":82,"frame_ms":{"p50":348.378,"p90":407.213,"p99":1016.632,"max":1016.632},"gpu_busy_ms_per_present":177.182,"worker_busy_pct":{"queue worker 0x0":98.084,"queue worker 0x20":83.652},"top_phases_ms_per_frame":{"Driver.Packet":684.341,"Driver.Packet.memory_wait":267.697,"Driver.Packet.draw":250.576,"Driver.Draw":249.514,"Graphics.Draw":162.747,"Graphics.Draw.draw_and_resource_release":129.161,"Driver.Packet.dispatch":123.132,"Driver.Draw.shader_compile_and_link":95.071},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":5.432,"events_lost":1167451,"totals_full":false}},"trace":"aps5-trace-135d481eb1f4-809468.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: 1167451 events lost; buffer full at 5432.3 ms

Slowest frames (largest slices inside each, inclusive)

  • present 1585: 1016.6 ms at 29908 ms: Driver.Packet (queue worker 0x20) 956.2, Driver.Packet.memory_wait (queue worker 0x20) 891.5, batch (gpu) 168.0, Driver.Packet.dispatch (queue worker 0x20) 60.5
  • present 1530: 827.2 ms at 9314 ms: Driver.Packet (queue worker 0x20) 711.4, Driver.Packet.memory_wait (queue worker 0x20) 648.4, batch (gpu) 171.3, Driver.WorkerWait (queue worker 0x20) 112.6
  • present 1529: 743.6 ms at 8571 ms: Driver.Packet (queue worker 0x20) 666.9, Driver.Packet.memory_wait (queue worker 0x20) 592.5, batch (gpu) 174.7, Graphics.Draw (draw committer) 77.5
  • present 1580: 644.1 ms at 27707 ms: Driver.Packet (queue worker 0x20) 582.7, Driver.Packet.memory_wait (queue worker 0x20) 520.1, batch (gpu) 156.5, Driver.WorkerWait (queue worker 0x20) 57.0
  • present 1577: 485.9 ms at 26531 ms: Driver.Packet (queue worker 0x20) 431.0, Driver.Packet.memory_wait (queue worker 0x20) 376.5, batch (gpu) 165.4, Graphics.Draw (draw committer) 53.4

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

  • present 1585: 1016.6 ms at 29908 ms, persistence 718.1 ms
  • present 1530: 827.2 ms at 9314 ms, persistence 528.6 ms
  • present 1580: 644.1 ms at 27707 ms, persistence 322.5 ms
  • present 1577: 485.9 ms at 26531 ms, persistence 179.3 ms
  • present 1569: 473.8 ms at 23581 ms, persistence 163.2 ms
  • present 1517: 462.5 ms at 4489 ms, persistence 150.0 ms
  • present 1553: 401.0 ms at 17755 ms, persistence 92.9 ms
  • present 1582: 478.5 ms at 28745 ms, persistence 84.6 ms
  • present 1559: 386.6 ms at 19930 ms, persistence 70.6 ms
  • present 1538: 389.4 ms at 12502 ms, persistence 66.4 ms

Threads (ms per frame)

thread busy wait untraced in slices < 20 us largest
queue worker 0x0 46.3 (12 %) 7.6 (2 %) 323.2 80.5 Driver.Packet 53.8, Driver.EndSubmission 0.0
draw committer 62.3 (17 %) 5.1 (1 %) 309.6 78.9 Graphics.Draw 50.9, Recorder.Submit 6.5
title 0.0 (0 %) 0.0 (0 %) 377.1 0.0 Shader.ResolveGraphicsStagesAbi 0.0
presenter 1.0 (0 %) 0.0 (0 %) 376.1 0.1 VideoOut.Flip 1.0, Driver.Present 0.0
title 0.0 (0 %) 0.0 (0 %) 377.1 0.0
title 0.0 (0 %) 0.0 (0 %) 377.1 0.0 Shader.ResolveGraphicsAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 377.1 0.0 Shader.ResolveGraphicsAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 377.1 0.0 Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveGraphicsAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 377.1 0.0 Shader.ResolveGraphicsAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 377.1 0.0
queue worker 0x20 60.1 (16 %) 314.7 (83 %) 2.4 12.4 Driver.Packet 312.7, Driver.EndSubmission 0.7
gpu 176.8 (47 %) 0.0 (0 %) 200.3 0.0 batch 176.8

Largest slices (ms per frame, inclusive, all threads): Driver.Packet 366.5, Driver.Packet.memory_wait 246.3, batch 176.8, Driver.Packet.dispatch 73.2, Graphics.Draw 62.8, Driver.WorkerWait 61.4, Driver.WorkerWait.dequeue_order 61.4, Graphics.Draw.draw_and_resource_release 45.7, Driver.Dispatch 41.5, Driver.Packet.draw 37.0

Longest waits

  • Driver.Packet.memory_wait (queue worker 0x20) 473.1 ms at 8734 ms, present 1529
  • Driver.Packet.memory_wait (queue worker 0x20) 419.2 ms at 9461 ms, present 1530
  • Driver.Packet.memory_wait (queue worker 0x20) 414.0 ms at 30032 ms, present 1585
  • Driver.Packet.memory_wait (queue worker 0x20) 377.6 ms at 30459 ms, present 1585
  • Driver.Packet.memory_wait (queue worker 0x20) 331.4 ms at 27832 ms, present 1580
  • Driver.Packet.memory_wait (queue worker 0x20) 252.2 ms at 26689 ms, present 1577
  • Driver.Packet.memory_wait (queue worker 0x20) 238.6 ms at 4637 ms, present 1517
  • Driver.WorkerWait (queue worker 0x20) 177.7 ms at 23875 ms, present 1569
  • Driver.Packet.memory_wait (queue worker 0x20) 166.2 ms at 22205 ms, present 1565
  • Driver.WorkerWait (queue worker 0x20) 162.7 ms at 29058 ms, present 1582

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

  • batch 18316: 17.2 ms at 26264 ms, present 1576: GPU no ranges; recorded by Driver.Packet (queue worker 0x20) 1.4, Driver.Packet.memory_wait (queue worker 0x20) 1.4, Recorder.Submit (queue worker 0x20) 0.0, GpuMutex.wait.hook (queue worker 0x20) 0.0
  • batch 314: 17.0 ms at 443 ms, present 1505: GPU no ranges; recorded by Driver.Packet (queue worker 0x20) 1.5, Driver.Packet.memory_wait (queue worker 0x20) 1.5, Driver.Dispatch (queue worker 0x20) 0.2, GpuMutex.wait.hook (queue worker 0x20) 0.2
  • batch 795: 16.7 ms at 1101 ms, present 1507: GPU no ranges; recorded by Driver.Packet (queue worker 0x20) 1.5, Driver.Packet.memory_wait (queue worker 0x20) 1.5, Driver.Dispatch (queue worker 0x20) 0.4, Driver.Dispatch.capture_resources (queue worker 0x20) 0.1
  • batch 18054: 16.7 ms at 25858 ms, present 1575: GPU no ranges; recorded by Driver.Packet (queue worker 0x20) 1.7, Driver.Packet.memory_wait (queue worker 0x20) 1.7, Driver.Dispatch (queue worker 0x20) 0.2, GpuMutex.wait.hook (queue worker 0x20) 0.1
  • batch 66: 15.9 ms at 93 ms, present 1504: GPU no ranges; recorded by Driver.Packet (queue worker 0x20) 1.3, Driver.Packet.memory_wait (queue worker 0x20) 1.3, GpuMutex.wait.hook (queue worker 0x20) 0.1, Recorder.Submit (queue worker 0x20) 0.0

Worker stacks (37149 samples, 12.1 % truncated; total leaves out the 6 frames every complete stack shares)

  • self: ntdll.dll+0x160bb4 15.6 %, ntdll.dll+0x1600e4 7.1 %, ntdll.dll+0x1a90d 3.5 %, ntdll.dll+0x1620d4 2.3 %, ntdll.dll+0x557a0 1.3 %, ntdll.dll+0x2116e 1.2 %, libSceAgcDriver.prx+0x11609b 1.1 %, ntdll.dll+0x211be 1.0 %, ntdll.dll+0x21228 0.7 %, ntdll.dll+0x6b6fb 0.7 %
  • total: libSceAgcDriver.prx+0xbe319 85.9 %, libSceAgcDriver.prx+0xaad31 51.7 %, libSceAgcDriver.prx+0xa5d19 51.7 %, libSceAgcDriver.prx+0x42154 41.1 %, libSceAgcDriver.prx+0x47bc2 18.0 %, libSceAgcDriver.prx+0x1a55c7 18.0 %, KERNELBASE.dll+0x228c1 15.6 %, ntdll.dll+0x160bb4 15.6 %, KERNELBASE.dll+0x229f3 15.6 %, libSceAgcDriver.prx+0x454ce 14.8 %
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5191506263 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/16420). Originally posted by [17bryen](https://github.com/17bryen) on 2026-11-06T16:57:07Z. --- ### What With MinGW every `thread_local` access goes through `__emutls_get_address`, and with winpthreads that ends in `pthread_getspecific`, whose thread lookup takes one process-wide spin lock. #6615 moved the revalidation path's thread-locals to TEB slots (`HostThreadSlot`, `ThreadScratch`) and left the rest as they were. Sampling Echoes of Aincrad (PPSA22969)'s queue worker in a 5.9k-draw cave scene (`APS5_SAMPLE_WORKER`, 30 s) still showed 9.6 to 12.9 samples per frame in `__emutls_get_address`, 5.5 to 7.2 of them in the spin lock, reached from the sites below, so this moves them too: - `SrtEvaluatingBranch` (`SrtWalker.cpp`), read on every pending-page shader read and set and restored by every `SrtBranchScope` of an SRT walk, is a `HostThreadSlot<bool>`; the reference-returning accessor becomes a getter and a setter, and `SrtBranchScope` uses them. `HostThreadSlot.hpp` joins `shaderCacheKeySources`, as the cache key check requires for a header the recompiler includes. - `completionDepth` (`Recorder.cpp`), read three times by every flush-hook access and by `SyncThrough`, is a `HostThreadSlot<int>` behind `completionDepth()`; `finish()`'s `InCompletion` guard sets it. - `threadWaitedMs` (`Recorder.cpp`) is a `HostThreadSlot<double>`. - `onOwnLiveStack`'s stack bounds, `CounterFor`'s per-thread memory counters and `epochCollectMap`'s map (`GuestMemory.cpp`) go through `ThreadScratch`: created on first use and destroyed with the thread by `ThreadOwned`, as before. - `FlushDepthPlanes`'s re-entry flag (`DepthSurface.cpp`) is a `HostThreadSlot<bool>`. - `Driver::timed`'s per-worker profile (`PacketExecution.cpp`, `APS5_PROFILE_DRAW` only) goes through `ThreadScratch`. Every slot starts zeroed, which is each variable's former initial value. Thread-locals elsewhere stay as they are. The second commit gives `tools/tests/test_shader_cache_runtime_sources.py`'s fixture a stand-in `HostThreadSlot.hpp` beside its `HostThreadLocal.hpp` and `AtomicSharedPtr.hpp`, since the fixture configures the recompiler's `CMakeLists.txt` and that now lists the header. ### Tested Windows 11 (10.0.26200), WinLibs GCC 15.2.0 (UCRT), Release, NVIDIA GeForce RTX 5090, driver 617.14, AMD Ryzen 9 9950X3D. `main` is 6ed10ccd1f, this PR 31dde4f9e1 on it (the measured driver commit is 135d481eb1; the second commit touches only the test). - Full suite on this PR, 4,357 tests: the 2,873 tests outside the GPU patterns with `VK_DRIVER_FILES` pointing at no ICD all pass; the 1,484 tests matching `^(agc|shader|recompiler|videoout|video_out|guest_video_out|vulkan)|gpu` with `ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation` at `-j 4` pass except two: - `agc_driver_direct_write_completion` fails 3 of 3 alone on this PR and 3 of 3 alone on untouched `main` 6ed10ccd1f ("the completion of a buffer write dropped image results recorded after it"); not this change. - `agc_driver_unregistered_label_on_gpu` failed once under the parallel run and passes 4 of 4 alone on this PR and 3 of 3 alone on `main`. - The seven `shader_cache_runtime_sources` shards pass with the second commit; without it they fail at configure, as the NVIDIA run below found. - Validation comparison on the focused set, `ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation VK_LOADER_DEBUG=layer`, `ctest --test-dir build -R 'agc_driver_(shader_memory|guest_memory|depth_plane|image_memory_hooks|pipelined_dispatch|storage_flush|direct_write_completion)|agc_shader_srt|agc_collect|agc_private_collect|agc_unwatch_hook|agc_recorder_completion|shader_memory' -V` (36 tests), on `main` and on this PR: 35 of 36 pass on each. The loader inserted `VK_LAYER_KHRONOS_validation` (SDK 1.4.363.1) in 31 test processes in each log, `was not found but was requested` appears 0 times in each, and neither log contains a `VUID-` line, so the change adds none. - `python3 tools/check_conventions.py --base upstream/main` passes. `python3 tools/pr_overlap.py --branch perf/agc-hot-thread-locals-teb` (1,886 open PRs) finds one textual overlap: #16088 adds `RemoveTree.hpp` on the line next to this PR's `HostThreadSlot.hpp` in `shaderCacheKeySources`; whichever lands second keeps both lines. 42 PRs that share a file could not be compared because they no longer merge with `main`; none of them, nor any other open PR, moves these thread-locals (the open PRs were searched for the variable names, `HostThreadSlot`, `ThreadScratch`, `emutls` and `TEB`). - Echoes of Aincrad (PPSA22969), the first cave after loading the save, standing still, 3840x2160, two captures each of `main` (baseline) and this PR, alternating, same session, warm shader cache. `APS5_TRACE_SECONDS=1:30` opened by `APS5_TRACE_TRIGGER_FILE` 90 s after the load, `APS5_SAMPLE_WORKER` on, no other `APS5_*` switch, log not redirected. Summary lines, digests, traces and the worker's collapsed stacks are below the checklist. | per frame | baseline run 1 | baseline run 2 | PR run 1 | PR run 2 | avg. change | | --- | ---: | ---: | ---: | ---: | ---: | | presents in 30 s | 74 | 74 | 78 | 82 | +8.1% | | frame p50 (ms) | 394.4 | 403.2 | 375.4 | 348.4 | -9.3% | | frame p90 (ms) | 470.0 | 450.4 | 440.0 | 407.2 | -8.0% | | mean frame (ms) | 408.6 | 407.4 | 388.1 | 377.1 | -6.2% | | GPU busy per present (ms) | 185.0 | n/a | 184.1 | 177.2 | -2.4% | | `Driver.Packet.draw` (ms) | 270.4 | 271.2 | 256.0 | 250.6 | -6.5% | | `Driver.Packet` (ms) | 738.7 | 739.1 | 704.4 | 684.3 | -6.0% | | worker samples in `__emutls_get_address` | 9.6 | 12.9 | 4.0 | 5.5 | -57.8% | | worker samples in `pthread_spin_lock` | 5.5 | 7.2 | 2.0 | 3.1 | -59.8% | - The queue worker is 98% busy in all four; the frame is its packet time. Baseline run 2 recorded no GPU timestamps (0.0 in its summary line), so its GPU change is against run 1 alone; its frame times are unaffected. - The sample counts come from the `worker.collapsed.txt` files, symbolized with `nm` against the respective `libSceAgcDriver.prx` and the system libraries' export tables (about 1 kHz, so about 550 samples per frame; a third of them in the worker's waits). - `tools/performance_compare.py`, run 1 against run 1: frame p50 -4.8%, p90 -6.4%, mean -5.0%, `Driver.Packet.draw` -5.3%, GPU busy -0.4%; run 2 against run 2: p50 -13.6%, p90 -9.6%, mean -7.4%, `Driver.Packet.draw` -7.6%. The mean frame moved 20 and 30 ms in the two pairs; the p50 difference between the pairs (19 and 55 ms) shows the single-capture noise, so the mean is the figure to read. - No draw-cache path changes; the draw count (about 5.9k per frame) comes from earlier `APS5_PROFILE_DRAW` captures of the same view, not from these four, which ran with profiling off as the issue form asks. ### 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 5090, driver 617.14, Windows 11 10.0.26200 - [x] AI-assisted: yes Traces and the worker's collapsed stacks (one zip, a folder per run with its `aps5-summary.jsonl`): `aincrad-teb-traces.zip` (attached) The four summary lines, with `tools/trace_digest.py --stacks worker.collapsed.txt` for each trace: <details><summary>Baseline run 1 (main 6ed10ccd1f)</summary> **seconds 1:30** from present 1378: 74 presents, frame p50 394.4 / p90 470.0 / p99 712.4 / max 712.4 ms, GPU busy 185.0 ms per present NVIDIA GeForce RTX 5090, NVIDIA 617.14, Windows 10.0.26200, 3840x2160, commit 6ed10ccd1fd3, dropped: yes ```json {"commit":"6ed10ccd1fd3","dirty":false,"env":{"APS5_PAD_INPUT_FILE":"<path>","APS5_SAMPLE_WORKER":"<path>","APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"1:30","APS5_TRACE_TRIGGER_FILE":"<path>"},"gpu":"NVIDIA GeForce RTX 5090","driver":"NVIDIA 617.14","os":"Windows 10.0.26200","cpu":"AMD Ryzen 9 9950X3D 16-Core Processor","cpu_threads":32,"memory_mib":64900,"title_id":"PPSA22969","title":"Echoes of Aincrad","content_version":"01.000.006","resolution":"3840x2160","window":{"spec":"seconds 1:30","first_present":1378,"ms":30239.256},"presents":74,"frame_ms":{"p50":394.413,"p90":469.969,"p99":712.359,"max":712.359},"gpu_busy_ms_per_present":184.963,"worker_busy_pct":{"queue worker 0x0":98.127,"queue worker 0x20":82.926},"top_phases_ms_per_frame":{"Driver.Packet":738.667,"Driver.Packet.memory_wait":284.488,"Driver.Packet.draw":270.422,"Driver.Draw":269.225,"Graphics.Draw":184.287,"Graphics.Draw.draw_and_resource_release":146.403,"Driver.Packet.dispatch":135.311,"Driver.Draw.shader_compile_and_link":104.608},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":5.157,"events_lost":1226280,"totals_full":false}},"trace":"aps5-trace-6ed10ccd1fd3-933144.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: 1226280 events lost; buffer full at 5157.3 ms **Slowest frames** (largest slices inside each, inclusive) - present 1435: 712.4 ms at 23139 ms: Driver.Packet (queue worker 0x20) 635.9, Driver.Packet.memory_wait (queue worker 0x20) 576.6, batch (gpu) 177.2, Driver.WorkerWait (queue worker 0x20) 73.4 - present 1424: 635.5 ms at 18718 ms: Driver.Packet (queue worker 0x20) 574.0, Driver.Packet.memory_wait (queue worker 0x20) 499.8, batch (gpu) 177.8, Graphics.Draw (draw committer) 71.5 - present 1421: 581.2 ms at 17362 ms: Driver.Packet (queue worker 0x20) 418.1, Driver.Packet.memory_wait (queue worker 0x20) 349.3, batch (gpu) 174.6, Driver.WorkerWait (queue worker 0x20) 160.4 - present 1418: 512.5 ms at 16039 ms: Driver.Packet (queue worker 0x20) 347.0, Driver.Packet.memory_wait (queue worker 0x20) 276.2, batch (gpu) 172.2, Driver.WorkerWait (queue worker 0x20) 162.8 - present 1439: 506.0 ms at 25052 ms: Driver.Packet (queue worker 0x20) 338.7, Driver.Packet.memory_wait (queue worker 0x20) 262.2, batch (gpu) 186.4, Driver.WorkerWait (queue worker 0x20) 164.4 **Persistent spikes** (frame time above the fastest frame that separates it from a longer frame; one entry per stall, not per frame) - present 1435: 712.4 ms at 23139 ms, persistence 362.2 ms - present 1424: 635.5 ms at 18718 ms, persistence 285.4 ms - present 1421: 581.2 ms at 17362 ms, persistence 219.8 ms - present 1439: 506.0 ms at 25052 ms, persistence 152.2 ms - present 1402: 477.6 ms at 9601 ms, persistence 125.9 ms - present 1418: 512.5 ms at 16039 ms, persistence 122.1 ms - present 1391: 474.0 ms at 5071 ms, persistence 102.6 ms - present 1444: 442.2 ms at 27142 ms, persistence 91.5 ms - present 1428: 446.3 ms at 20490 ms, persistence 80.9 ms - present 1447: 428.7 ms at 28329 ms, persistence 77.3 ms **Threads** (ms per frame) | thread | busy | wait | untraced | in slices < 20 us | largest | |---|---|---|---|---|---| | queue worker 0x0 | 50.2 (12 %) | 8.6 (2 %) | 349.8 | 75.0 | Driver.Packet 58.7, Driver.EndSubmission 0.0 | | draw committer | 79.2 (19 %) | 6.2 (2 %) | 323.2 | 77.3 | Graphics.Draw 64.7, Recorder.Submit 8.3 | | title | 0.0 (0 %) | 0.0 (0 %) | 408.6 | 0.0 | Shader.ResolveGraphicsStagesAbi 0.0 | | presenter | 1.2 (0 %) | 0.1 (0 %) | 407.4 | 0.1 | VideoOut.Flip 1.3, Driver.Present 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 408.6 | 0.0 | Shader.ResolveGraphicsStagesAbi 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 408.6 | 0.0 | Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveGraphicsAbi 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 408.6 | 0.0 | Shader.ResolveGraphicsAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 408.6 | 0.0 | Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveGraphicsAbi 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 408.6 | 0.0 | Shader.ResolveGraphicsAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 408.6 | 0.0 | Shader.ResolveGraphicsStagesAbi 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 408.6 | 0.0 | Shader.ResolveGraphicsStagesAbi 0.0 | | queue worker 0x20 | 67.6 (17 %) | 338.7 (83 %) | 2.4 | 12.3 | Driver.Packet 336.0, Driver.EndSubmission 0.8 | | gpu | 184.6 (45 %) | 0.0 (0 %) | 224.0 | 0.0 | batch 184.6 | **Largest slices** (ms per frame, inclusive, all threads): Driver.Packet 394.7, Driver.Packet.memory_wait 261.9, batch 184.6, Driver.Packet.dispatch 80.7, Graphics.Draw 79.0, Driver.WorkerWait 69.5, Driver.WorkerWait.dequeue_order 69.5, Graphics.Draw.draw_and_resource_release 56.7, Driver.Dispatch 46.8, Driver.Packet.draw 40.2 **Longest waits** - Driver.Packet.memory_wait (queue worker 0x20) 396.4 ms at 23141 ms, present 1435 - Driver.Packet.memory_wait (queue worker 0x20) 238.2 ms at 18885 ms, present 1424 - Driver.Packet.memory_wait (queue worker 0x20) 234.0 ms at 17525 ms, present 1421 - Driver.Packet.memory_wait (queue worker 0x20) 173.8 ms at 13852 ms, present 1412 - Driver.Packet.memory_wait (queue worker 0x20) 171.8 ms at 8926 ms, present 1400 - Driver.Packet.memory_wait (queue worker 0x20) 171.3 ms at 6525 ms, present 1394 - Driver.Packet.memory_wait (queue worker 0x20) 168.1 ms at 5261 ms, present 1391 - Driver.WorkerWait (queue worker 0x20) 164.4 ms at 25391 ms, present 1439 - Driver.WorkerWait (queue worker 0x20) 162.8 ms at 16386 ms, present 1418 - Driver.WorkerWait (queue worker 0x20) 160.4 ms at 17780 ms, present 1421 **Largest GPU batches** (GPU ranges inside, and the CPU slices that recorded each, inclusive) - batch 813: 18.7 ms at 1239 ms, present 1381: GPU no ranges; recorded by Driver.Packet (queue worker 0x20) 1.6, Driver.Packet.memory_wait (queue worker 0x20) 1.6, Driver.Dispatch (queue worker 0x20) 0.6, Driver.Dispatch.capture_resources (queue worker 0x20) 0.3 - batch 3253: 17.5 ms at 4976 ms, present 1390: GPU no ranges; recorded by Driver.Packet (queue worker 0x0) 4.0, Driver.Packet.dispatch (queue worker 0x0) 2.1, Driver.Packet.draw (queue worker 0x0) 1.6, Driver.Draw (queue worker 0x0) 1.6 - batch 569: 17.3 ms at 847 ms, present 1380: GPU no ranges; recorded by Driver.Packet (queue worker 0x20) 1.6, Driver.Packet.memory_wait (queue worker 0x20) 1.6, Recorder.Submit (queue worker 0x20) 0.0 - batch 1342: 17.3 ms at 2047 ms, present 1383: GPU no ranges; recorded by Driver.Packet (queue worker 0x20) 1.6, Driver.Packet.memory_wait (queue worker 0x20) 1.6, Driver.Dispatch (queue worker 0x20) 0.2, GpuMutex.wait.hook (queue worker 0x20) 0.1 - batch 8845: 17.2 ms at 13768 ms, present 1412: GPU no ranges; recorded by Driver.Packet (queue worker 0x20) 1.8, Driver.Packet.memory_wait (queue worker 0x20) 1.8, GpuMutex.wait.hook (queue worker 0x20) 0.1, Recorder.Submit (queue worker 0x20) 0.1 **Worker stacks** (40960 samples, 12.6 % truncated; total leaves out the 6 frames every complete stack shares) - self: ntdll.dll+0x160bb4 33.3 %, ntdll.dll+0x1600e4 5.3 %, ntdll.dll+0x1a90d 2.7 %, ntdll.dll+0x1620d4 1.7 %, ntdll.dll+0x6b6fb 1.1 %, ntdll.dll+0x557a0 1.0 %, ucrtbase.dll+0xee606 0.9 %, ucrtbase.dll+0xee616 0.9 %, libSceAgcDriver.prx+0x115b5b 0.8 %, libwinpthread-1.dll+0x6be0 0.8 % - total: libSceAgcDriver.prx+0xbddd9 60.7 %, libSceAgcDriver.prx+0xaadb0 34.1 %, libSceAgcDriver.prx+0xa5c39 34.1 %, KERNELBASE.dll+0x228c1 33.3 %, KERNELBASE.dll+0x229f3 33.3 %, ntdll.dll+0x160bb4 33.3 %, libSceAgcDriver.prx+0x42154 28.4 %, libwinpthread-1.dll+0x3935 26.3 %, libwinpthread-1.dll+0x3a6f 26.3 %, libwinpthread-1.dll+0x32e8 25.7 % </details> <details><summary>Baseline run 2 (main 6ed10ccd1f)</summary> **seconds 1:30** from present 1383: 74 presents, frame p50 403.2 / p90 450.4 / p99 609.9 / max 609.9 ms, GPU busy 0.0 ms per present NVIDIA GeForce RTX 5090, NVIDIA 617.14, Windows 10.0.26200, 3840x2160, commit 6ed10ccd1fd3, dropped: yes ```json {"commit":"6ed10ccd1fd3","dirty":false,"env":{"APS5_PAD_INPUT_FILE":"<path>","APS5_SAMPLE_WORKER":"<path>","APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"1:30","APS5_TRACE_TRIGGER_FILE":"<path>"},"gpu":"NVIDIA GeForce RTX 5090","driver":"NVIDIA 617.14","os":"Windows 10.0.26200","cpu":"AMD Ryzen 9 9950X3D 16-Core Processor","cpu_threads":32,"memory_mib":64900,"title_id":"PPSA22969","title":"Echoes of Aincrad","content_version":"01.000.006","resolution":"3840x2160","window":{"spec":"seconds 1:30","first_present":1383,"ms":30148.376},"presents":74,"frame_ms":{"p50":403.221,"p90":450.384,"p99":609.932,"max":609.932},"gpu_busy_ms_per_present":0.000,"worker_busy_pct":{"queue worker 0x0":98.234,"queue worker 0x20":83.501},"top_phases_ms_per_frame":{"Driver.Packet":739.061,"Driver.Packet.memory_wait":286.960,"Driver.Packet.draw":271.221,"Driver.Draw":269.977,"Graphics.Draw":192.456,"Graphics.Draw.draw_and_resource_release":153.359,"Driver.Packet.dispatch":132.750,"Driver.Draw.shader_compile_and_link":98.829},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":5.198,"events_lost":1242231,"totals_full":false}},"trace":"aps5-trace-6ed10ccd1fd3-873216.json.gz"} ``` ```json {"commit":"6ed10ccd1fd3","dirty":false,"env":{"APS5_PAD_INPUT_FILE":"<path>","APS5_SAMPLE_WORKER":"<path>","APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"1:30","APS5_TRACE_TRIGGER_FILE":"<path>"},"gpu":"NVIDIA GeForce RTX 5090","driver":"NVIDIA 617.14","os":"Windows 10.0.26200","cpu":"AMD Ryzen 9 9950X3D 16-Core Processor","cpu_threads":32,"memory_mib":64900,"title_id":"PPSA22969","title":"Echoes of Aincrad","content_version":"01.000.006","resolution":"3840x2160","window":{"spec":"seconds 1:30","first_present":1383,"ms":30148.376},"presents":74,"frame_ms":{"p50":403.221,"p90":450.384,"p99":609.932,"max":609.932},"gpu_busy_ms_per_present":0.0,"worker_busy_pct":{"queue worker 0x0":98.234,"queue worker 0x20":83.501},"top_phases_ms_per_frame":{"Driver.Packet":739.061,"Driver.Packet.memory_wait":286.96,"Driver.Packet.draw":271.221,"Driver.Draw":269.977,"Graphics.Draw":192.456,"Graphics.Draw.draw_and_resource_release":153.359,"Driver.Packet.dispatch":132.75,"Driver.Draw.shader_compile_and_link":98.829},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":5.198,"events_lost":1242231,"totals_full":false}},"trace":"aps5-trace-6ed10ccd1fd3-873216.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: 1242231 events lost; buffer full at 5197.7 ms **Slowest frames** (largest slices inside each, inclusive) - present 1452: 609.9 ms at 27945 ms: Driver.Packet (queue worker 0x20) 557.8, Driver.Packet.memory_wait (queue worker 0x20) 450.7, batch (gpu) 208.7, Driver.Packet.dispatch (queue worker 0x20) 99.6 - present 1386: 508.8 ms at 1214 ms: Driver.Packet (queue worker 0x0) 449.0, Driver.Packet (queue worker 0x20) 422.5, Driver.Packet.memory_wait (queue worker 0x20) 338.2, Driver.Packet.draw (queue worker 0x0) 311.4 - present 1446: 476.6 ms at 25534 ms: Driver.Packet (queue worker 0x20) 416.4, Driver.Packet.memory_wait (queue worker 0x20) 346.0, batch (gpu) 168.4, Driver.Packet.dispatch (queue worker 0x20) 63.7 - present 1444: 470.7 ms at 24613 ms: Driver.Packet (queue worker 0x20) 408.5, Driver.Packet.memory_wait (queue worker 0x20) 335.0, batch (gpu) 174.6, Graphics.Draw (draw committer) 74.7 - present 1428: 466.9 ms at 18299 ms: Driver.Packet (queue worker 0x20) 344.1, Driver.Packet.memory_wait (queue worker 0x20) 249.1, batch (gpu) 200.4, Driver.WorkerWait (queue worker 0x20) 119.4 **Persistent spikes** (frame time above the fastest frame that separates it from a longer frame; one entry per stall, not per frame) - present 1452: 609.9 ms at 27945 ms, persistence 266.5 ms - present 1386: 508.8 ms at 1214 ms, persistence 165.3 ms - present 1446: 476.6 ms at 25534 ms, persistence 129.2 ms - present 1428: 466.9 ms at 18299 ms, persistence 110.5 ms - present 1423: 457.9 ms at 16273 ms, persistence 101.6 ms - present 1411: 446.8 ms at 11505 ms, persistence 87.8 ms - present 1398: 444.2 ms at 6164 ms, persistence 68.2 ms - present 1435: 427.5 ms at 21042 ms, persistence 60.8 ms - present 1395: 440.4 ms at 4955 ms, persistence 60.3 ms - present 1425: 438.0 ms at 17109 ms, persistence 60.2 ms **Threads** (ms per frame) | thread | busy | wait | untraced | in slices < 20 us | largest | |---|---|---|---|---|---| | queue worker 0x0 | 51.3 (13 %) | 8.5 (2 %) | 347.6 | 71.3 | Driver.Packet 59.7, Driver.EndSubmission 0.0 | | draw committer | 84.1 (21 %) | 5.9 (1 %) | 317.5 | 77.3 | Graphics.Draw 70.2, Recorder.Submit 8.1 | | title | 0.0 (0 %) | 0.0 (0 %) | 407.4 | 0.0 | Shader.ResolveGraphicsStagesAbi 0.0 | | presenter | 0.2 (0 %) | 0.0 (0 %) | 407.2 | 0.0 | VideoOut.Flip 0.2 | | title | 0.0 (0 %) | 0.0 (0 %) | 407.4 | 0.0 | Shader.ResolveGraphicsStagesAbi 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 407.4 | 0.0 | Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveGraphicsAbi 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 407.4 | 0.0 | Shader.ResolveGraphicsAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0 | | queue worker 0x20 | 66.5 (16 %) | 338.5 (83 %) | 2.4 | 12.3 | Driver.Packet 337.2, Driver.EndSubmission 1.0 | | gpu | 188.6 (46 %) | 0.0 (0 %) | 218.8 | 0.0 | batch 188.6 | **Largest slices** (ms per frame, inclusive, all threads): Driver.Packet 396.8, Driver.Packet.memory_wait 262.9, batch 188.6, Graphics.Draw 84.5, Driver.Packet.dispatch 80.9, Driver.WorkerWait 67.0, Driver.WorkerWait.dequeue_order 67.0, Graphics.Draw.draw_and_resource_release 62.9, Driver.Dispatch 46.6, Driver.Packet.draw 41.3 **Longest waits** - Driver.Packet.memory_wait (queue worker 0x20) 328.9 ms at 28116 ms, present 1452 - Driver.Packet.memory_wait (queue worker 0x20) 209.7 ms at 24781 ms, present 1444 - Driver.Packet.memory_wait (queue worker 0x20) 175.2 ms at 1424 ms, present 1386 - Driver.Packet.memory_wait (queue worker 0x20) 174.3 ms at 11682 ms, present 1411 - Driver.Packet.memory_wait (queue worker 0x20) 172.6 ms at 25752 ms, present 1446 - Driver.Packet.memory_wait (queue worker 0x20) 169.2 ms at 2354 ms, present 1388 - Driver.Packet.memory_wait (queue worker 0x20) 164.2 ms at 25272 ms, present 1445 - Driver.Packet.memory_wait (queue worker 0x20) 154.8 ms at 11258 ms, present 1410 - Driver.Packet.memory_wait (queue worker 0x20) 147.5 ms at 7984 ms, present 1402 - Driver.Packet.memory_wait (queue worker 0x20) 147.1 ms at 570 ms, present 1384 **Largest GPU batches** (GPU ranges inside, and the CPU slices that recorded each, inclusive) - batch 10561: 19.0 ms at 16371 ms, present 1423: GPU no ranges; recorded by Driver.Packet (queue worker 0x20) 1.8, Driver.Packet.memory_wait (queue worker 0x20) 1.8, GpuMutex.wait.hook (queue worker 0x20) 0.1, Recorder.Submit (queue worker 0x20) 0.1 - batch 11084: 18.8 ms at 17210 ms, present 1425: GPU no ranges; recorded by Driver.Packet (queue worker 0x20) 1.6, Driver.Packet.memory_wait (queue worker 0x20) 1.6, Driver.Dispatch (queue worker 0x20) 0.4, GpuMutex.wait.hook (queue worker 0x20) 0.3 - batch 10832: 18.0 ms at 16816 ms, present 1424: GPU no ranges; recorded by Driver.Packet (queue worker 0x20) 1.9, Driver.Packet.memory_wait (queue worker 0x20) 1.9, Driver.Dispatch (queue worker 0x20) 0.3, Driver.Dispatch.capture_resources (queue worker 0x20) 0.1 - batch 9388: 17.7 ms at 14642 ms, present 1418: GPU no ranges; recorded by no CPU slices - batch 8745: 17.6 ms at 13619 ms, present 1416: GPU no ranges; recorded by Driver.Packet (queue worker 0x20) 1.5, Driver.Packet.memory_wait (queue worker 0x20) 1.5, Driver.Dispatch (queue worker 0x20) 0.4, GpuMutex.wait.hook (queue worker 0x20) 0.1 **Worker stacks** (37148 samples, 12.6 % truncated; total leaves out the 0 frames every complete stack shares) - self: ntdll.dll+0x160bb4 16.7 %, ntdll.dll+0x1600e4 7.1 %, ntdll.dll+0x1a90d 3.7 %, ntdll.dll+0x1620d4 2.0 %, ntdll.dll+0x557a0 1.3 %, libwinpthread-1.dll+0x6be0 1.2 %, libSceAgcDriver.prx+0x115b5b 1.1 %, ntdll.dll+0x2116e 1.0 %, ntdll.dll+0x211be 0.9 %, ntdll.dll+0x21228 0.8 % - total: libwinpthread-1.dll+0x9f6a 87.4 %, libSceAgcDriver.prx+0xbffe1 87.4 %, KERNEL32.DLL+0x2e957 87.4 %, libstdc++-6.dll+0x13d4cf 87.4 %, ntdll.dll+0xaad6c 87.4 %, ucrtbase.dll+0x2cd30 87.4 %, libSceAgcDriver.prx+0xbddd9 85.8 %, libSceAgcDriver.prx+0xaadb0 51.0 %, libSceAgcDriver.prx+0xa5c39 51.0 %, libSceAgcDriver.prx+0x42154 41.7 % </details> <details><summary>This PR run 1 (135d481eb1)</summary> **seconds 1:30** from present 1191: 78 presents, frame p50 375.4 / p90 440.0 / p99 580.7 / max 580.7 ms, GPU busy 184.1 ms per present NVIDIA GeForce RTX 5090, NVIDIA 617.14, Windows 10.0.26200, 3840x2160, commit 135d481eb1f4, dropped: yes ```json {"commit":"135d481eb1f4","dirty":false,"env":{"APS5_PAD_INPUT_FILE":"<path>","APS5_SAMPLE_WORKER":"<path>","APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"1:30","APS5_TRACE_TRIGGER_FILE":"<path>"},"gpu":"NVIDIA GeForce RTX 5090","driver":"NVIDIA 617.14","os":"Windows 10.0.26200","cpu":"AMD Ryzen 9 9950X3D 16-Core Processor","cpu_threads":32,"memory_mib":64900,"title_id":"PPSA22969","title":"Echoes of Aincrad","content_version":"01.000.006","resolution":"3840x2160","window":{"spec":"seconds 1:30","first_present":1191,"ms":30270.074},"presents":78,"frame_ms":{"p50":375.352,"p90":439.962,"p99":580.657,"max":580.657},"gpu_busy_ms_per_present":184.149,"worker_busy_pct":{"queue worker 0x0":98.033,"queue worker 0x20":83.803},"top_phases_ms_per_frame":{"Driver.Packet":704.412,"Driver.Packet.memory_wait":271.766,"Driver.Packet.draw":255.990,"Driver.Draw":254.815,"Graphics.Draw":181.002,"Graphics.Draw.draw_and_resource_release":144.157,"Driver.Packet.dispatch":129.428,"Driver.Draw.shader_compile_and_link":100.200},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":5.537,"events_lost":1226718,"totals_full":false}},"trace":"aps5-trace-135d481eb1f4-845412.json.gz"} ``` ```json {"commit":"135d481eb1f4","dirty":false,"env":{"APS5_PAD_INPUT_FILE":"<path>","APS5_SAMPLE_WORKER":"<path>","APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"1:30","APS5_TRACE_TRIGGER_FILE":"<path>"},"gpu":"NVIDIA GeForce RTX 5090","driver":"NVIDIA 617.14","os":"Windows 10.0.26200","cpu":"AMD Ryzen 9 9950X3D 16-Core Processor","cpu_threads":32,"memory_mib":64900,"title_id":"PPSA22969","title":"Echoes of Aincrad","content_version":"01.000.006","resolution":"3840x2160","window":{"spec":"seconds 1:30","first_present":1191,"ms":30270.074},"presents":78,"frame_ms":{"p50":375.352,"p90":439.962,"p99":580.657,"max":580.657},"gpu_busy_ms_per_present":184.149,"worker_busy_pct":{"queue worker 0x0":98.033,"queue worker 0x20":83.803},"top_phases_ms_per_frame":{"Driver.Packet":704.412,"Driver.Packet.memory_wait":271.766,"Driver.Packet.draw":255.99,"Driver.Draw":254.815,"Graphics.Draw":181.002,"Graphics.Draw.draw_and_resource_release":144.157,"Driver.Packet.dispatch":129.428,"Driver.Draw.shader_compile_and_link":100.2},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":5.537,"events_lost":1226718,"totals_full":false}},"trace":"aps5-trace-135d481eb1f4-845412.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: 1226718 events lost; buffer full at 5536.8 ms **Slowest frames** (largest slices inside each, inclusive) - present 1222: 580.7 ms at 12563 ms: Driver.Packet (queue worker 0x20) 522.0, Driver.Packet.memory_wait (queue worker 0x20) 454.5, batch (gpu) 186.9, Driver.Packet.dispatch (queue worker 0x20) 60.0 - present 1194: 571.3 ms at 1279 ms: Driver.Packet (queue worker 0x20) 509.5, Driver.Packet (queue worker 0x0) 506.6, Driver.Packet.memory_wait (queue worker 0x20) 431.3, Driver.Packet.draw (queue worker 0x0) 403.4 - present 1203: 503.9 ms at 5178 ms: Driver.Packet (queue worker 0x20) 446.7, Driver.Packet.memory_wait (queue worker 0x20) 368.6, Driver.Packet (queue worker 0x0) 305.0, Driver.Packet.draw (queue worker 0x0) 247.8 - present 1232: 486.0 ms at 16614 ms: Driver.Packet (queue worker 0x20) 362.3, Driver.Packet.memory_wait (queue worker 0x20) 283.2, batch (gpu) 186.5, Driver.WorkerWait (queue worker 0x20) 120.8 - present 1198: 482.6 ms at 3009 ms: Driver.Packet (queue worker 0x0) 412.7, Driver.Packet (queue worker 0x20) 388.6, Driver.Packet.memory_wait (queue worker 0x20) 260.5, Driver.Packet.draw (queue worker 0x0) 247.8 **Persistent spikes** (frame time above the fastest frame that separates it from a longer frame; one entry per stall, not per frame) - present 1222: 580.7 ms at 12563 ms, persistence 247.8 ms - present 1194: 571.3 ms at 1279 ms, persistence 220.6 ms - present 1203: 503.9 ms at 5178 ms, persistence 147.8 ms - present 1232: 486.0 ms at 16614 ms, persistence 133.3 ms - present 1265: 419.9 ms at 28813 ms, persistence 87.1 ms - present 1198: 482.6 ms at 3009 ms, persistence 78.9 ms - present 1248: 411.8 ms at 22512 ms, persistence 69.1 ms - present 1215: 426.6 ms at 9882 ms, persistence 68.1 ms - present 1235: 400.3 ms at 17798 ms, persistence 65.5 ms - present 1239: 394.7 ms at 19273 ms, persistence 54.7 ms **Threads** (ms per frame) | thread | busy | wait | untraced | in slices < 20 us | largest | |---|---|---|---|---|---| | queue worker 0x0 | 52.5 (14 %) | 7.7 (2 %) | 327.9 | 70.7 | Driver.Packet 60.0, Driver.EndSubmission 0.0 | | draw committer | 75.1 (19 %) | 6.0 (2 %) | 306.9 | 78.4 | Graphics.Draw 61.9, Recorder.Submit 7.8 | | title | 0.0 (0 %) | 0.0 (0 %) | 388.1 | 0.0 | Shader.ResolveGraphicsStagesAbi 0.0 | | presenter | 1.1 (0 %) | 0.1 (0 %) | 386.9 | 0.1 | VideoOut.Flip 1.1, Driver.Present 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 388.1 | 0.0 | Shader.ResolveGraphicsStagesAbi 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 388.1 | 0.0 | Shader.ResolveGraphicsStagesAbi 0.0 | | queue worker 0x20 | 65.3 (17 %) | 320.3 (83 %) | 2.5 | 12.5 | Driver.Packet 322.2, Driver.EndSubmission 0.9 | | gpu | 184.7 (48 %) | 0.0 (0 %) | 203.3 | 0.0 | batch 184.7 | **Largest slices** (ms per frame, inclusive, all threads): Driver.Packet 382.2, Driver.Packet.memory_wait 248.5, batch 184.7, Driver.Packet.dispatch 79.6, Graphics.Draw 75.7, Driver.WorkerWait 62.6, Driver.WorkerWait.dequeue_order 62.6, Graphics.Draw.draw_and_resource_release 55.8, Driver.Dispatch 46.5, Driver.Packet.draw 42.4 **Longest waits** - Driver.Packet.memory_wait (queue worker 0x20) 236.9 ms at 1524 ms, present 1194 - Driver.Packet.memory_wait (queue worker 0x20) 227.0 ms at 12709 ms, present 1222 - Driver.Packet.memory_wait (queue worker 0x20) 201.8 ms at 5180 ms, present 1203 - Driver.Packet.memory_wait (queue worker 0x20) 158.2 ms at 4502 ms, present 1201 - Driver.WorkerWait (queue worker 0x20) 158.0 ms at 13458 ms, present 1223 - Driver.Packet.memory_wait (queue worker 0x20) 138.4 ms at 3681 ms, present 1199 - Driver.Packet.memory_wait (queue worker 0x20) 137.4 ms at 6247 ms, present 1205 - Driver.Packet.memory_wait (queue worker 0x20) 136.7 ms at 7056 ms, present 1207 - Driver.Packet.memory_wait (queue worker 0x20) 135.8 ms at 4947 ms, present 1202 - Driver.Packet.memory_wait (queue worker 0x20) 133.0 ms at 584 ms, present 1192 **Largest GPU batches** (GPU ranges inside, and the CPU slices that recorded each, inclusive) - batch 11795: 18.6 ms at 18100 ms, present 1235: GPU no ranges; recorded by no CPU slices - batch 9360: 18.1 ms at 14444 ms, present 1226: GPU no ranges; recorded by Driver.Packet (queue worker 0x20) 2.2, Driver.Packet.memory_wait (queue worker 0x20) 2.2, Driver.Dispatch (queue worker 0x20) 0.5, Driver.Dispatch.capture_resources (queue worker 0x20) 0.1 - batch 9508: 17.7 ms at 14676 ms, present 1226: GPU no ranges; recorded by GpuMutex.wait.other (draw committer) 0.2, Recorder.Submit (draw committer) 0.1, GpuMutex.wait.label (draw committer) 0.1, Recorder.Reap (draw committer) 0.1 - batch 7037: 17.3 ms at 10775 ms, present 1217: GPU no ranges; recorded by Driver.Packet (queue worker 0x20) 1.5, Driver.Packet.memory_wait (queue worker 0x20) 1.5, Driver.Dispatch (queue worker 0x20) 0.3, GpuMutex.wait.hook (queue worker 0x20) 0.2 - batch 7293: 17.3 ms at 11138 ms, present 1218: GPU no ranges; recorded by Driver.Packet (queue worker 0x20) 1.6, Driver.Packet.memory_wait (queue worker 0x20) 1.6, Driver.Dispatch (queue worker 0x20) 0.3, Resources.Prepare (queue worker 0x20) 0.1 **Worker stacks** (39707 samples, 13.3 % truncated; total leaves out the 6 frames every complete stack shares) - self: ntdll.dll+0x160bb4 29.5 %, ntdll.dll+0x1600e4 5.9 %, ntdll.dll+0x1a90d 2.9 %, ntdll.dll+0x1620d4 1.7 %, ntdll.dll+0x6b6fb 1.1 %, ntdll.dll+0x557a0 1.0 %, libSceAgcDriver.prx+0x11609b 1.0 %, ucrtbase.dll+0xee606 0.8 %, ntdll.dll+0x2116e 0.8 %, ntdll.dll+0x211be 0.8 % - total: libSceAgcDriver.prx+0xbe319 64.8 %, libSceAgcDriver.prx+0xaad31 37.0 %, libSceAgcDriver.prx+0xa5d19 37.0 %, libSceAgcDriver.prx+0x42154 32.1 %, KERNELBASE.dll+0x228c1 29.5 %, KERNELBASE.dll+0x229f3 29.5 %, ntdll.dll+0x160bb4 29.5 %, libwinpthread-1.dll+0x3935 22.3 %, libwinpthread-1.dll+0x3a6f 22.3 %, libwinpthread-1.dll+0x32e8 21.8 % </details> <details><summary>This PR run 2 (135d481eb1)</summary> **seconds 1:30** from present 1504: 82 presents, frame p50 348.4 / p90 407.2 / p99 1016.6 / max 1016.6 ms, GPU busy 177.2 ms per present NVIDIA GeForce RTX 5090, NVIDIA 617.14, Windows 10.0.26200, 3840x2160, commit 135d481eb1f4, dropped: yes ```json {"commit":"135d481eb1f4","dirty":false,"env":{"APS5_PAD_INPUT_FILE":"<path>","APS5_SAMPLE_WORKER":"<path>","APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"1:30","APS5_TRACE_TRIGGER_FILE":"<path>"},"gpu":"NVIDIA GeForce RTX 5090","driver":"NVIDIA 617.14","os":"Windows 10.0.26200","cpu":"AMD Ryzen 9 9950X3D 16-Core Processor","cpu_threads":32,"memory_mib":64900,"title_id":"PPSA22969","title":"Echoes of Aincrad","content_version":"01.000.006","resolution":"3840x2160","window":{"spec":"seconds 1:30","first_present":1504,"ms":30924.804},"presents":82,"frame_ms":{"p50":348.378,"p90":407.213,"p99":1016.632,"max":1016.632},"gpu_busy_ms_per_present":177.182,"worker_busy_pct":{"queue worker 0x0":98.084,"queue worker 0x20":83.652},"top_phases_ms_per_frame":{"Driver.Packet":684.341,"Driver.Packet.memory_wait":267.697,"Driver.Packet.draw":250.576,"Driver.Draw":249.514,"Graphics.Draw":162.747,"Graphics.Draw.draw_and_resource_release":129.161,"Driver.Packet.dispatch":123.132,"Driver.Draw.shader_compile_and_link":95.071},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":5.432,"events_lost":1167451,"totals_full":false}},"trace":"aps5-trace-135d481eb1f4-809468.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: 1167451 events lost; buffer full at 5432.3 ms **Slowest frames** (largest slices inside each, inclusive) - present 1585: 1016.6 ms at 29908 ms: Driver.Packet (queue worker 0x20) 956.2, Driver.Packet.memory_wait (queue worker 0x20) 891.5, batch (gpu) 168.0, Driver.Packet.dispatch (queue worker 0x20) 60.5 - present 1530: 827.2 ms at 9314 ms: Driver.Packet (queue worker 0x20) 711.4, Driver.Packet.memory_wait (queue worker 0x20) 648.4, batch (gpu) 171.3, Driver.WorkerWait (queue worker 0x20) 112.6 - present 1529: 743.6 ms at 8571 ms: Driver.Packet (queue worker 0x20) 666.9, Driver.Packet.memory_wait (queue worker 0x20) 592.5, batch (gpu) 174.7, Graphics.Draw (draw committer) 77.5 - present 1580: 644.1 ms at 27707 ms: Driver.Packet (queue worker 0x20) 582.7, Driver.Packet.memory_wait (queue worker 0x20) 520.1, batch (gpu) 156.5, Driver.WorkerWait (queue worker 0x20) 57.0 - present 1577: 485.9 ms at 26531 ms: Driver.Packet (queue worker 0x20) 431.0, Driver.Packet.memory_wait (queue worker 0x20) 376.5, batch (gpu) 165.4, Graphics.Draw (draw committer) 53.4 **Persistent spikes** (frame time above the fastest frame that separates it from a longer frame; one entry per stall, not per frame) - present 1585: 1016.6 ms at 29908 ms, persistence 718.1 ms - present 1530: 827.2 ms at 9314 ms, persistence 528.6 ms - present 1580: 644.1 ms at 27707 ms, persistence 322.5 ms - present 1577: 485.9 ms at 26531 ms, persistence 179.3 ms - present 1569: 473.8 ms at 23581 ms, persistence 163.2 ms - present 1517: 462.5 ms at 4489 ms, persistence 150.0 ms - present 1553: 401.0 ms at 17755 ms, persistence 92.9 ms - present 1582: 478.5 ms at 28745 ms, persistence 84.6 ms - present 1559: 386.6 ms at 19930 ms, persistence 70.6 ms - present 1538: 389.4 ms at 12502 ms, persistence 66.4 ms **Threads** (ms per frame) | thread | busy | wait | untraced | in slices < 20 us | largest | |---|---|---|---|---|---| | queue worker 0x0 | 46.3 (12 %) | 7.6 (2 %) | 323.2 | 80.5 | Driver.Packet 53.8, Driver.EndSubmission 0.0 | | draw committer | 62.3 (17 %) | 5.1 (1 %) | 309.6 | 78.9 | Graphics.Draw 50.9, Recorder.Submit 6.5 | | title | 0.0 (0 %) | 0.0 (0 %) | 377.1 | 0.0 | Shader.ResolveGraphicsStagesAbi 0.0 | | presenter | 1.0 (0 %) | 0.0 (0 %) | 376.1 | 0.1 | VideoOut.Flip 1.0, Driver.Present 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 377.1 | 0.0 | | | title | 0.0 (0 %) | 0.0 (0 %) | 377.1 | 0.0 | Shader.ResolveGraphicsAbi 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 377.1 | 0.0 | Shader.ResolveGraphicsAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 377.1 | 0.0 | Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveGraphicsAbi 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 377.1 | 0.0 | Shader.ResolveGraphicsAbi 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 377.1 | 0.0 | | | queue worker 0x20 | 60.1 (16 %) | 314.7 (83 %) | 2.4 | 12.4 | Driver.Packet 312.7, Driver.EndSubmission 0.7 | | gpu | 176.8 (47 %) | 0.0 (0 %) | 200.3 | 0.0 | batch 176.8 | **Largest slices** (ms per frame, inclusive, all threads): Driver.Packet 366.5, Driver.Packet.memory_wait 246.3, batch 176.8, Driver.Packet.dispatch 73.2, Graphics.Draw 62.8, Driver.WorkerWait 61.4, Driver.WorkerWait.dequeue_order 61.4, Graphics.Draw.draw_and_resource_release 45.7, Driver.Dispatch 41.5, Driver.Packet.draw 37.0 **Longest waits** - Driver.Packet.memory_wait (queue worker 0x20) 473.1 ms at 8734 ms, present 1529 - Driver.Packet.memory_wait (queue worker 0x20) 419.2 ms at 9461 ms, present 1530 - Driver.Packet.memory_wait (queue worker 0x20) 414.0 ms at 30032 ms, present 1585 - Driver.Packet.memory_wait (queue worker 0x20) 377.6 ms at 30459 ms, present 1585 - Driver.Packet.memory_wait (queue worker 0x20) 331.4 ms at 27832 ms, present 1580 - Driver.Packet.memory_wait (queue worker 0x20) 252.2 ms at 26689 ms, present 1577 - Driver.Packet.memory_wait (queue worker 0x20) 238.6 ms at 4637 ms, present 1517 - Driver.WorkerWait (queue worker 0x20) 177.7 ms at 23875 ms, present 1569 - Driver.Packet.memory_wait (queue worker 0x20) 166.2 ms at 22205 ms, present 1565 - Driver.WorkerWait (queue worker 0x20) 162.7 ms at 29058 ms, present 1582 **Largest GPU batches** (GPU ranges inside, and the CPU slices that recorded each, inclusive) - batch 18316: 17.2 ms at 26264 ms, present 1576: GPU no ranges; recorded by Driver.Packet (queue worker 0x20) 1.4, Driver.Packet.memory_wait (queue worker 0x20) 1.4, Recorder.Submit (queue worker 0x20) 0.0, GpuMutex.wait.hook (queue worker 0x20) 0.0 - batch 314: 17.0 ms at 443 ms, present 1505: GPU no ranges; recorded by Driver.Packet (queue worker 0x20) 1.5, Driver.Packet.memory_wait (queue worker 0x20) 1.5, Driver.Dispatch (queue worker 0x20) 0.2, GpuMutex.wait.hook (queue worker 0x20) 0.2 - batch 795: 16.7 ms at 1101 ms, present 1507: GPU no ranges; recorded by Driver.Packet (queue worker 0x20) 1.5, Driver.Packet.memory_wait (queue worker 0x20) 1.5, Driver.Dispatch (queue worker 0x20) 0.4, Driver.Dispatch.capture_resources (queue worker 0x20) 0.1 - batch 18054: 16.7 ms at 25858 ms, present 1575: GPU no ranges; recorded by Driver.Packet (queue worker 0x20) 1.7, Driver.Packet.memory_wait (queue worker 0x20) 1.7, Driver.Dispatch (queue worker 0x20) 0.2, GpuMutex.wait.hook (queue worker 0x20) 0.1 - batch 66: 15.9 ms at 93 ms, present 1504: GPU no ranges; recorded by Driver.Packet (queue worker 0x20) 1.3, Driver.Packet.memory_wait (queue worker 0x20) 1.3, GpuMutex.wait.hook (queue worker 0x20) 0.1, Recorder.Submit (queue worker 0x20) 0.0 **Worker stacks** (37149 samples, 12.1 % truncated; total leaves out the 6 frames every complete stack shares) - self: ntdll.dll+0x160bb4 15.6 %, ntdll.dll+0x1600e4 7.1 %, ntdll.dll+0x1a90d 3.5 %, ntdll.dll+0x1620d4 2.3 %, ntdll.dll+0x557a0 1.3 %, ntdll.dll+0x2116e 1.2 %, libSceAgcDriver.prx+0x11609b 1.1 %, ntdll.dll+0x211be 1.0 %, ntdll.dll+0x21228 0.7 %, ntdll.dll+0x6b6fb 0.7 % - total: libSceAgcDriver.prx+0xbe319 85.9 %, libSceAgcDriver.prx+0xaad31 51.7 %, libSceAgcDriver.prx+0xa5d19 51.7 %, libSceAgcDriver.prx+0x42154 41.1 %, libSceAgcDriver.prx+0x47bc2 18.0 %, libSceAgcDriver.prx+0x1a55c7 18.0 %, KERNELBASE.dll+0x228c1 15.6 %, ntdll.dll+0x160bb4 15.6 %, KERNELBASE.dll+0x229f3 15.6 %, libSceAgcDriver.prx+0x454ce 14.8 % </details>
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!16420
No description provided.