Skip to content

perf(libkernel): pin guest threads to the efficiency cores on request - #12544

Open
XairRrR wants to merge 2 commits into
boykopovar:mainfrom
XairRrR:perf/libkernel-guest-thread-affinity
Open

XairRrR wants to merge 2 commits into
boykopovar:mainfrom
XairRrR:perf/libkernel-guest-thread-affinity

Conversation

@XairRrR

@XairRrR XairRrR commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

What

On a hybrid CPU the queue workers and the presenter run on the performance cores by default on Linux (#626). Guest threads have no host affinity: the affinity a title sets is kept for its getters but never applied to the host thread. A title whose job workers spin at full load on every core they own therefore puts those spinners on the same performance cores, often on the second hardware thread of a core a queue worker runs on.

APS5_GUEST_AFFINITY=1 now pins every guest thread to the efficiency cores of a hybrid CPU when it starts, on Linux and Windows. APS5_GUEST_AFFINITY_MASK=<hex> picks the cores instead. Both are off by default, like APS5_JOB_AFFINITY. That variable selects threads by one title's job worker name and is Windows only; the new one does not look at thread names.

Tested

Arch Linux 7.2.11-zen, GCC 16.2.1, Ninja, Release, on main 3a2b919, Intel Core i9-14900KF (8 performance cores with 2 threads each, 16 efficiency cores):

  • New guest_thread_host_affinity (Linux): sets APS5_GUEST_AFFINITY_MASK to one core of the process and checks that two guest threads run on exactly that core, and that the creating thread keeps its mask. With Thread.cpp from main it fails: a guest thread does not run on the cores APS5_GUEST_AFFINITY_MASK names.

  • Full ctest -j8 on the first base (main 3b362ba): all 2741 tests pass (60 skipped). Rebased on 3a2b919: guest_thread_host_affinity and the guest_pthread* tests pass (56/56).

  • tools/check_conventions.py --base origin/main passes.

  • PPSA05684 (Uncharted: Legacy of Thieves Collection): its 13 job workers (NdJobWorkerThread 0..12) spin with pause at 100 % each. With APS5_GUEST_AFFINITY=1 they run on the efficiency cores.

    The captures below follow the Performance report form. They come from clean builds of main 3a2b919 and of this branch, fda3f6c ("dirty": false in both), captured on the same machine in the same session, with warm caches. Both capture the Uncharted 4 prison yard fight, reached through the developer menu by the same scripted inputs, with APS5_TRACE_SECONDS=195:8 and no other APS5_TRACE_* or APS5_PROFILE_* switch. The environments differ only in APS5_GUEST_AFFINITY. The APS5_LOCAL_* names come from my launch script and do not exist on main.

    The 8 s window keeps queue 0 inside its default event buffer, so neither trace drops events. The launch script writes the log to a file in both runs; the logger reports 0.2 to 4.4 KiB per 10 s there.

    main 3a2b919 This branch with APS5_GUEST_AFFINITY=1
    Presents in 8 s 28 32
    Frame p50 / p90 / p99 282.4 / 308.3 / 359.7 ms 250.1 / 278.1 / 302.5 ms
    GPU busy per present 104.7 ms 93.9 ms
    queue worker 0x0 busy 140.2 ms per frame 127.3 ms per frame
    Dropped trace events none none

    Clean main does not reach this scene every time. Over 7 attempts in this session on the two builds, 5 ended early:

    • 3 times, a sampled view of 2.5 to 40 GiB (2560x1440 or 1280x720 arrays with hundreds of slices, in no guest allocation) ran out of memory, killed by my memory watchdog or as std::bad_alloc.
    • Once, vkWaitForFences returned VK_ERROR_DEVICE_LOST.
    • Once, my memory watchdog killed the run without a view in the log.

    The oversized views and the device loss do not happen on the local stack.

    The captures are from the runs that reached the fight.

    Traces: main, this branch

    Summary line, main:

    {"commit":"3a2b91981651","dirty":false,"env":{"APS5_DISPATCH_CACHE_ENTRIES":"4096","APS5_DUMP_FRAMES":"0","APS5_DUMP_FRAMES_EVERY":"99999","APS5_HOST_IMPORT_MIB":"16384","APS5_IMAGE_TABLE_KEY_SCAN":"262144","APS5_LAZY_SHADER_PREPARE":"1","APS5_LOCAL_NULL_INVALID_BUFFERS":"1","APS5_LOCAL_REBASE_HUGE_ARRAYS":"1","APS5_NO_LIBRARY_PREBUILD":"1","APS5_NO_PIPELINE_LTO":"1","APS5_NO_SNAPSHOT_CHECK":"1","APS5_PAD_INPUT_FILE":"<path>","APS5_TRACE_SECONDS":"195:8"},"gpu":"NVIDIA GeForce RTX 4070 Ti SUPER","driver":"NVIDIA 615.78.08","os":"Linux 7.2.11-zen1-1-zen","cpu":"Intel(R) Core(TM) i9-14900KF","cpu_threads":32,"memory_mib":31906,"title_id":"PPSA05684","title":"Uncharted™: Legacy of Thieves Collection","content_version":"01.002.000","resolution":"2560x1440","window":{"spec":"seconds 195:8","first_present":2410,"ms":8012.792},"presents":28,"frame_ms":{"p50":282.420,"p90":308.327,"p99":359.737,"max":359.737},"gpu_busy_ms_per_present":104.734,"worker_busy_pct":{"queue worker 0x0":72.598,"queue worker 0x43":77.285,"queue worker 0x21":12.541,"queue worker 0x50":0.192,"queue worker 0x52":0.244,"queue worker 0x29":20.896,"queue worker 0x56":96.338,"queue worker 0x31":36.244,"queue worker 0x39":45.045,"queue worker 0x49":19.195,"queue worker 0x41":35.466},"top_phases_ms_per_frame":{"Driver.Packet":1186.075,"Driver.Packet.memory_wait":758.571,"Driver.Packet.dispatch":276.247,"Driver.Dispatch":244.039,"Driver.Packet.draw":118.164,"Driver.Draw":117.662,"Graphics.Draw":96.348,"Graphics.Draw.draw_and_resource_release":92.135},"trace_dropped":false,"trace":"aps5-trace-3a2b91981651-1495087.json.gz"}

    Summary line, this branch:

    {"commit":"fda3f6ca6c0c","dirty":false,"env":{"APS5_DISPATCH_CACHE_ENTRIES":"4096","APS5_DUMP_FRAMES":"0","APS5_DUMP_FRAMES_EVERY":"99999","APS5_GUEST_AFFINITY":"1","APS5_HOST_IMPORT_MIB":"16384","APS5_IMAGE_TABLE_KEY_SCAN":"262144","APS5_LAZY_SHADER_PREPARE":"1","APS5_LOCAL_NULL_INVALID_BUFFERS":"1","APS5_LOCAL_REBASE_HUGE_ARRAYS":"1","APS5_NO_LIBRARY_PREBUILD":"1","APS5_NO_PIPELINE_LTO":"1","APS5_NO_SNAPSHOT_CHECK":"1","APS5_PAD_INPUT_FILE":"<path>","APS5_TRACE_SECONDS":"195:8"},"gpu":"NVIDIA GeForce RTX 4070 Ti SUPER","driver":"NVIDIA 615.78.08","os":"Linux 7.2.11-zen1-1-zen","cpu":"Intel(R) Core(TM) i9-14900KF","cpu_threads":32,"memory_mib":31906,"title_id":"PPSA05684","title":"Uncharted™: Legacy of Thieves Collection","content_version":"01.002.000","resolution":"2560x1440","window":{"spec":"seconds 195:8","first_present":2503,"ms":8103.759},"presents":32,"frame_ms":{"p50":250.076,"p90":278.090,"p99":302.491,"max":302.491},"gpu_busy_ms_per_present":93.863,"worker_busy_pct":{"queue worker 0x0":73.316,"queue worker 0x43":77.340,"queue worker 0x21":10.509,"queue worker 0x52":0.250,"queue worker 0x50":0.187,"queue worker 0x29":9.595,"queue worker 0x56":96.463,"queue worker 0x49":35.609,"queue worker 0x41":32.881,"queue worker 0x31":14.157,"queue worker 0x39":43.454},"top_phases_ms_per_frame":{"Driver.Packet":993.112,"Driver.Packet.memory_wait":620.976,"Driver.Packet.dispatch":235.123,"Driver.Dispatch":205.303,"Driver.Packet.draw":107.265,"Driver.Draw":106.820,"Graphics.Draw":86.683,"Graphics.Draw.draw_and_resource_release":82.868},"trace_dropped":false,"trace":"aps5-trace-fda3f6ca6c0c-1527350.json.gz"}
    tools/trace_digest.py, main

seconds 195:8 from present 2410: 28 presents, frame p50 282.4 / p90 308.3 / p99 359.7 / max 359.7 ms, GPU busy 104.7 ms per present
NVIDIA GeForce RTX 4070 Ti SUPER, NVIDIA 615.78.08, Linux 7.2.11-zen1-1-zen, 2560x1440, commit 3a2b919, dropped: no

{"commit":"3a2b91981651","dirty":false,"env":{"APS5_DISPATCH_CACHE_ENTRIES":"4096","APS5_DUMP_FRAMES":"0","APS5_DUMP_FRAMES_EVERY":"99999","APS5_HOST_IMPORT_MIB":"16384","APS5_IMAGE_TABLE_KEY_SCAN":"262144","APS5_LAZY_SHADER_PREPARE":"1","APS5_LOCAL_NULL_INVALID_BUFFERS":"1","APS5_LOCAL_REBASE_HUGE_ARRAYS":"1","APS5_NO_LIBRARY_PREBUILD":"1","APS5_NO_PIPELINE_LTO":"1","APS5_NO_SNAPSHOT_CHECK":"1","APS5_PAD_INPUT_FILE":"<path>","APS5_TRACE_SECONDS":"195:8"},"gpu":"NVIDIA GeForce RTX 4070 Ti SUPER","driver":"NVIDIA 615.78.08","os":"Linux 7.2.11-zen1-1-zen","cpu":"Intel(R) Core(TM) i9-14900KF","cpu_threads":32,"memory_mib":31906,"title_id":"PPSA05684","title":"Uncharted\u2122: Legacy of Thieves Collection","content_version":"01.002.000","resolution":"2560x1440","window":{"spec":"seconds 195:8","first_present":2410,"ms":8012.792},"presents":28,"frame_ms":{"p50":282.42,"p90":308.327,"p99":359.737,"max":359.737},"gpu_busy_ms_per_present":104.734,"worker_busy_pct":{"queue worker 0x0":72.598,"queue worker 0x43":77.285,"queue worker 0x21":12.541,"queue worker 0x50":0.192,"queue worker 0x52":0.244,"queue worker 0x29":20.896,"queue worker 0x56":96.338,"queue worker 0x31":36.244,"queue worker 0x39":45.045,"queue worker 0x49":19.195,"queue worker 0x41":35.466},"top_phases_ms_per_frame":{"Driver.Packet":1186.075,"Driver.Packet.memory_wait":758.571,"Driver.Packet.dispatch":276.247,"Driver.Dispatch":244.039,"Driver.Packet.draw":118.164,"Driver.Draw":117.662,"Graphics.Draw":96.348,"Graphics.Draw.draw_and_resource_release":92.135},"trace_dropped":false,"trace":"aps5-trace-3a2b91981651-1495087.json.gz"}

Slowest frames (largest slices inside each, inclusive)

  • present 2412: 359.7 ms at 561 ms: Driver.Packet (queue worker 0x56) 359.5, Driver.WorkerWait (queue worker 0x52) 359.2, Driver.WorkerWait (queue worker 0x50) 358.7, Driver.Packet.memory_wait (queue worker 0x56) 357.5
  • present 2431: 342.6 ms at 5988 ms: Driver.WorkerWait (queue worker 0x52) 342.6, Driver.Packet (queue worker 0x56) 342.4, Driver.Packet (queue worker 0x31) 342.0, Driver.WorkerWait (queue worker 0x50) 341.9
  • present 2417: 308.3 ms at 2009 ms: Driver.Packet (queue worker 0x56) 308.2, Driver.WorkerWait (queue worker 0x52) 307.7, Driver.WorkerWait (queue worker 0x50) 307.6, Driver.Packet (queue worker 0x39) 307.4
  • present 2426: 305.1 ms at 4539 ms: Driver.Packet (queue worker 0x56) 304.9, Driver.WorkerWait (queue worker 0x52) 304.6, Driver.WorkerWait (queue worker 0x50) 304.5, Driver.Packet (queue worker 0x41) 304.4
  • present 2432: 300.0 ms at 6330 ms: Driver.Packet (queue worker 0x56) 299.8, Driver.WorkerWait (queue worker 0x52) 299.3, Driver.Packet (queue worker 0x39) 299.2, Driver.WorkerWait (queue worker 0x50) 298.5

Threads (ms per frame)

thread busy wait untraced in slices < 20 us largest
title 0.1 (0 %) 0.0 (0 %) 286.1 0.1 Shader.ResolveGraphicsStagesAbi 0.1
title 0.1 (0 %) 0.0 (0 %) 286.1 0.1 Shader.ResolveGraphicsStagesAbi 0.1
title 0.0 (0 %) 0.0 (0 %) 286.1 0.1 Shader.ResolveGraphicsStagesAbi 0.0
title 0.1 (0 %) 0.0 (0 %) 286.1 0.1 Shader.ResolveGraphicsStagesAbi 0.1
title 0.1 (0 %) 0.0 (0 %) 286.1 0.1 Shader.ResolveGraphicsStagesAbi 0.1
title 0.1 (0 %) 0.0 (0 %) 286.1 0.1 Shader.ResolveGraphicsStagesAbi 0.1
title 0.1 (0 %) 0.0 (0 %) 286.1 0.1 Shader.ResolveGraphicsStagesAbi 0.1
title 0.1 (0 %) 0.0 (0 %) 286.1 0.1 Shader.ResolveGraphicsStagesAbi 0.1
title 0.1 (0 %) 0.0 (0 %) 286.1 0.1 Shader.ResolveGraphicsStagesAbi 0.1
title 0.1 (0 %) 0.0 (0 %) 286.1 0.1 Shader.ResolveGraphicsStagesAbi 0.1
title 0.1 (0 %) 0.0 (0 %) 286.1 0.1 Shader.ResolveGraphicsStagesAbi 0.1
title 0.1 (0 %) 0.0 (0 %) 286.1 0.1 Shader.ResolveGraphicsStagesAbi 0.1
queue worker 0x0 140.2 (49 %) 114.5 (40 %) 31.4 158.5 Driver.Packet 179.0, Driver.Rewind 0.3
title 0.1 (0 %) 0.0 (0 %) 286.1 0.1 Shader.ResolveGraphicsStagesAbi 0.1
draw committer 45.4 (16 %) 0.7 (0 %) 240.1 25.8 Graphics.Draw 35.0, Recorder.Sync 9.6
presenter 0.7 (0 %) 0.5 (0 %) 284.9 0.1 VideoOut.Flip 1.1, Driver.Present 0.2
queue worker 0x43 79.8 (28 %) 203.3 (71 %) 3.1 3.3 Driver.Packet 220.0, Driver.EndSubmission 0.3
shader prepare 0.0 (0 %) 0.0 (0 %) 286.2 0.0 Vulkan.ComputePipeline 0.0
shader prepare 0.0 (0 %) 0.0 (0 %) 286.2 0.0 Vulkan.ComputePipeline 0.0
shader prepare 0.0 (0 %) 0.0 (0 %) 286.2 0.0 Vulkan.ComputePipeline 0.0
shader prepare 0.0 (0 %) 0.0 (0 %) 286.2 0.0 Vulkan.ComputePipeline 0.0
shader prepare 0.0 (0 %) 0.0 (0 %) 286.2 0.0 Vulkan.ComputePipeline 0.0
shader prepare 0.0 (0 %) 0.0 (0 %) 286.2 0.0 Vulkan.ComputePipeline 0.0
shader prepare 0.0 (0 %) 0.0 (0 %) 286.2 0.0 Vulkan.ComputePipeline 0.0
shader prepare 0.0 (0 %) 0.0 (0 %) 286.2 0.0 Vulkan.ComputePipeline 0.0
shader prepare 0.0 (0 %) 0.0 (0 %) 286.2 0.0 Vulkan.ComputePipeline 0.0
shader prepare 0.0 (0 %) 0.0 (0 %) 286.2 0.0 Vulkan.ComputePipeline 0.0
shader prepare 0.0 (0 %) 0.0 (0 %) 286.2 0.0 Vulkan.ComputePipeline 0.0
queue worker 0x21 14.7 (5 %) 268.9 (94 %) 2.5 6.2 Driver.Packet 35.0, Driver.EndSubmission 0.5
queue worker 0x50 0.4 (0 %) 275.9 (96 %) 9.9 0.2 Driver.Packet 0.4, Driver.EndSubmission 0.0
queue worker 0x52 0.4 (0 %) 275.9 (96 %) 9.9 0.2 Driver.Packet 0.6
queue worker 0x29 15.0 (5 %) 261.2 (91 %) 10.0 6.2 Driver.Packet 58.9, Driver.EndSubmission 0.5
queue worker 0x56 1.2 (0 %) 274.3 (96 %) 10.6 0.9 Driver.Packet 275.5, Driver.EndSubmission 0.0
queue worker 0x31 15.2 (5 %) 261.3 (91 %) 9.7 6.1 Driver.Packet 102.5, Driver.EndSubmission 0.8
queue worker 0x39 14.7 (5 %) 262.2 (92 %) 9.3 6.1 Driver.Packet 127.9, Driver.EndSubmission 0.7
queue worker 0x49 11.2 (4 %) 265.5 (93 %) 9.5 4.4 Driver.Packet 54.1, Driver.EndSubmission 0.5
queue worker 0x41 14.4 (5 %) 269.3 (94 %) 2.5 6.0 Driver.Packet 100.6, Driver.EndSubmission 0.5
gpu 104.5 (37 %) 0.0 (0 %) 181.7 0.0 batch 104.5

Largest slices (ms per frame, inclusive, all threads): Driver.WorkerWait 1880.2, Driver.WorkerWait.dequeue_order 1848.5, Driver.Packet 1154.7, Driver.Packet.memory_wait 758.2, Driver.Packet.dispatch 274.9, Driver.Dispatch 237.3, batch 104.5, Driver.Packet.draw 102.6, Driver.Draw 102.3, Graphics.Draw 84.3

Longest waits

  • Driver.WorkerWait (queue worker 0x52) 396.9 ms at 5933 ms, present 2430
  • Driver.WorkerWait (queue worker 0x52) 359.3 ms at 561 ms, present 2412
  • Driver.Packet.memory_wait (queue worker 0x56) 355.7 ms at 363 ms, present 2411
  • Driver.WorkerWait (queue worker 0x50) 341.9 ms at 5988 ms, present 2431
  • Driver.WorkerWait (queue worker 0x49) 334.7 ms at 586 ms, present 2412
  • Driver.Packet.memory_wait (queue worker 0x56) 330.8 ms at 6073 ms, present 2431
  • Driver.WorkerWait (queue worker 0x50) 330.5 ms at 874 ms, present 2412
  • Driver.WorkerWait (queue worker 0x50) 325.4 ms at 1429 ms, present 2414
  • Driver.WorkerWait (queue worker 0x29) 322.7 ms at 598 ms, present 2412
  • Driver.Packet.memory_wait (queue worker 0x41) 317.4 ms at 6026 ms, present 2431

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

  • batch 662: 6.4 ms at 1521 ms, present 2415: GPU no ranges; recorded by Driver.WorkerWait (queue worker 0x0) 29.6, Driver.WorkerWait.dequeue_order (queue worker 0x0) 29.6, Driver.Packet (queue worker 0x0) 2.6, Driver.Packet.pipeline_drain (queue worker 0x0) 1.3

  • batch 358: 6.1 ms at 863 ms, present 2412: GPU no ranges; recorded by Driver.Packet (queue worker 0x0) 7.4, Driver.Packet.draw (queue worker 0x0) 6.4, Driver.Draw (queue worker 0x0) 6.4, Driver.Draw.shader_compile_and_link (queue worker 0x0) 3.4

  • batch 2184: 6.1 ms at 4894 ms, present 2427: GPU no ranges; recorded by Recorder.Submit (draw committer) 2.0, Recorder.Reap (draw committer) 0.1, Graphics.Draw (draw committer) 0.0, Graphics.Draw.draw_and_resource_release (draw committer) 0.0

  • batch 3183: 6.0 ms at 7212 ms, present 2435: GPU no ranges; recorded by Driver.WorkerWait (queue worker 0x0) 44.8, Driver.WorkerWait.dequeue_order (queue worker 0x0) 44.8, Driver.Packet (queue worker 0x0) 2.9, Driver.Packet.draw (queue worker 0x0) 1.2

  • batch 2435: 6.0 ms at 5445 ms, present 2429: GPU no ranges; recorded by Driver.WorkerWait (queue worker 0x0) 46.0, Driver.WorkerWait.dequeue_order (queue worker 0x0) 46.0, Driver.Packet (queue worker 0x0) 1.9, Driver.Packet.pipeline_drain (queue worker 0x0) 0.8

    tools/trace_digest.py, this branch

seconds 195:8 from present 2503: 32 presents, frame p50 250.1 / p90 278.1 / p99 302.5 / max 302.5 ms, GPU busy 93.9 ms per present
NVIDIA GeForce RTX 4070 Ti SUPER, NVIDIA 615.78.08, Linux 7.2.11-zen1-1-zen, 2560x1440, commit fda3f6c, dropped: no

{"commit":"fda3f6ca6c0c","dirty":false,"env":{"APS5_DISPATCH_CACHE_ENTRIES":"4096","APS5_DUMP_FRAMES":"0","APS5_DUMP_FRAMES_EVERY":"99999","APS5_GUEST_AFFINITY":"1","APS5_HOST_IMPORT_MIB":"16384","APS5_IMAGE_TABLE_KEY_SCAN":"262144","APS5_LAZY_SHADER_PREPARE":"1","APS5_LOCAL_NULL_INVALID_BUFFERS":"1","APS5_LOCAL_REBASE_HUGE_ARRAYS":"1","APS5_NO_LIBRARY_PREBUILD":"1","APS5_NO_PIPELINE_LTO":"1","APS5_NO_SNAPSHOT_CHECK":"1","APS5_PAD_INPUT_FILE":"<path>","APS5_TRACE_SECONDS":"195:8"},"gpu":"NVIDIA GeForce RTX 4070 Ti SUPER","driver":"NVIDIA 615.78.08","os":"Linux 7.2.11-zen1-1-zen","cpu":"Intel(R) Core(TM) i9-14900KF","cpu_threads":32,"memory_mib":31906,"title_id":"PPSA05684","title":"Uncharted\u2122: Legacy of Thieves Collection","content_version":"01.002.000","resolution":"2560x1440","window":{"spec":"seconds 195:8","first_present":2503,"ms":8103.759},"presents":32,"frame_ms":{"p50":250.076,"p90":278.09,"p99":302.491,"max":302.491},"gpu_busy_ms_per_present":93.863,"worker_busy_pct":{"queue worker 0x0":73.316,"queue worker 0x43":77.34,"queue worker 0x21":10.509,"queue worker 0x52":0.25,"queue worker 0x50":0.187,"queue worker 0x29":9.595,"queue worker 0x56":96.463,"queue worker 0x49":35.609,"queue worker 0x41":32.881,"queue worker 0x31":14.157,"queue worker 0x39":43.454},"top_phases_ms_per_frame":{"Driver.Packet":993.112,"Driver.Packet.memory_wait":620.976,"Driver.Packet.dispatch":235.123,"Driver.Dispatch":205.303,"Driver.Packet.draw":107.265,"Driver.Draw":106.82,"Graphics.Draw":86.683,"Graphics.Draw.draw_and_resource_release":82.868},"trace_dropped":false,"trace":"aps5-trace-fda3f6ca6c0c-1527350.json.gz"}

Slowest frames (largest slices inside each, inclusive)

  • present 2534: 302.5 ms at 7801 ms: Driver.Packet (queue worker 0x39) 230.9, Driver.Packet (queue worker 0x43) 224.8, Driver.Packet (queue worker 0x0) 191.6, Driver.WorkerWait (queue worker 0x21) 191.3
  • present 2503: 291.2 ms at 0 ms: Driver.WorkerWait (queue worker 0x52) 290.5, Driver.WorkerWait (queue worker 0x50) 290.5, Driver.WorkerWait.dequeue_order (queue worker 0x50) 281.6, Driver.WorkerWait.dequeue_order (queue worker 0x52) 281.4
  • present 2520: 282.3 ms at 4240 ms: Driver.Packet (queue worker 0x56) 282.1, Driver.Packet (queue worker 0x49) 281.8, Driver.WorkerWait (queue worker 0x52) 281.8, Driver.WorkerWait (queue worker 0x50) 281.8
  • present 2532: 278.1 ms at 7263 ms: Driver.Packet (queue worker 0x56) 278.0, Driver.Packet (queue worker 0x49) 277.9, Driver.WorkerWait (queue worker 0x52) 277.5, Driver.WorkerWait (queue worker 0x50) 277.5
  • present 2531: 273.8 ms at 6989 ms: Driver.Packet (queue worker 0x56) 273.6, Driver.WorkerWait (queue worker 0x50) 273.3, Driver.WorkerWait (queue worker 0x52) 273.2, Driver.Packet.memory_wait (queue worker 0x56) 271.8

Threads (ms per frame)

thread busy wait untraced in slices < 20 us largest
title 0.1 (0 %) 0.0 (0 %) 253.2 0.1 Shader.ResolveGraphicsStagesAbi 0.1
title 0.1 (0 %) 0.0 (0 %) 253.2 0.1 Shader.ResolveGraphicsStagesAbi 0.1
title 0.1 (0 %) 0.0 (0 %) 253.2 0.1 Shader.ResolveGraphicsStagesAbi 0.1
title 0.1 (0 %) 0.0 (0 %) 253.2 0.1 Shader.ResolveGraphicsStagesAbi 0.1
title 0.1 (0 %) 0.0 (0 %) 253.2 0.1 Shader.ResolveGraphicsStagesAbi 0.1
title 0.1 (0 %) 0.0 (0 %) 253.1 0.1 Shader.ResolveGraphicsStagesAbi 0.1
title 0.1 (0 %) 0.0 (0 %) 253.1 0.1 Shader.ResolveGraphicsStagesAbi 0.1
title 0.1 (0 %) 0.0 (0 %) 253.1 0.1 Shader.ResolveGraphicsStagesAbi 0.1
title 0.1 (0 %) 0.0 (0 %) 253.2 0.1 Shader.ResolveGraphicsStagesAbi 0.1
title 0.1 (0 %) 0.0 (0 %) 253.2 0.1 Shader.ResolveGraphicsStagesAbi 0.1
title 0.1 (0 %) 0.0 (0 %) 253.2 0.1 Shader.ResolveGraphicsStagesAbi 0.1
title 0.1 (0 %) 0.0 (0 %) 253.1 0.1 Shader.ResolveGraphicsStagesAbi 0.1
queue worker 0x0 127.3 (50 %) 97.0 (38 %) 28.9 152.3 Driver.Packet 159.1, Driver.Rewind 0.3
title 0.1 (0 %) 0.0 (0 %) 253.2 0.1 Shader.ResolveGraphicsStagesAbi 0.1
presenter 0.4 (0 %) 0.2 (0 %) 252.7 0.1 VideoOut.Flip 0.6, Driver.Present 0.0
draw committer 39.8 (16 %) 0.6 (0 %) 212.9 25.1 Graphics.Draw 30.4, Recorder.Sync 8.6
queue worker 0x43 68.1 (27 %) 182.1 (72 %) 3.1 3.3 Driver.Packet 194.9, Driver.EndSubmission 0.1
shader prepare 0.0 (0 %) 0.0 (0 %) 253.2 0.0 Vulkan.ComputePipeline 0.0
shader prepare 0.0 (0 %) 0.0 (0 %) 253.2 0.0 Vulkan.ComputePipeline 0.0
shader prepare 0.0 (0 %) 0.0 (0 %) 253.2 0.0 Vulkan.ComputePipeline 0.0
shader prepare 0.0 (0 %) 0.0 (0 %) 253.2 0.0 Vulkan.ComputePipeline 0.0
shader prepare 0.0 (0 %) 0.0 (0 %) 253.2 0.0 Vulkan.ComputePipeline 0.0
shader prepare 0.0 (0 %) 0.0 (0 %) 253.2 0.0 Vulkan.ComputePipeline 0.0
shader prepare 0.0 (0 %) 0.0 (0 %) 253.2 0.0 Vulkan.ComputePipeline 0.0
shader prepare 0.0 (0 %) 0.0 (0 %) 253.2 0.0 Vulkan.ComputePipeline 0.0
shader prepare 0.0 (0 %) 0.0 (0 %) 253.2 0.0 Vulkan.ComputePipeline 0.0
shader prepare 0.0 (0 %) 0.0 (0 %) 253.2 0.0 Vulkan.ComputePipeline 0.0
shader prepare 0.0 (0 %) 0.0 (0 %) 253.2 0.0 Vulkan.ComputePipeline 0.0
shader prepare 0.0 (0 %) 0.0 (0 %) 253.2 0.0 Vulkan.ComputePipeline 0.0
shader prepare 0.0 (0 %) 0.0 (0 %) 253.2 0.0 Vulkan.ComputePipeline 0.0
queue worker 0x21 12.8 (5 %) 238.0 (94 %) 2.4 6.1 Driver.Packet 25.5, Driver.EndSubmission 0.7
queue worker 0x52 0.4 (0 %) 244.5 (97 %) 8.3 0.2 Driver.Packet 0.6, Driver.EndSubmission 0.0
queue worker 0x50 0.3 (0 %) 244.6 (97 %) 8.3 0.3 Driver.Packet 0.3, Driver.EndSubmission 0.1
queue worker 0x29 12.5 (5 %) 232.1 (92 %) 8.6 6.3 Driver.Packet 23.4, Driver.EndSubmission 0.5
queue worker 0x56 1.1 (0 %) 243.1 (96 %) 9.1 0.8 Driver.Packet 244.1, Driver.EndSubmission 0.0
queue worker 0x49 10.5 (4 %) 234.3 (93 %) 8.5 4.6 Driver.Packet 89.4, Driver.EndSubmission 0.5
queue worker 0x41 12.0 (5 %) 232.7 (92 %) 8.6 5.9 Driver.Packet 82.6, Driver.EndSubmission 0.3
queue worker 0x31 12.7 (5 %) 232.1 (92 %) 8.4 6.3 Driver.Packet 34.9, Driver.EndSubmission 0.6
queue worker 0x39 13.5 (5 %) 237.2 (94 %) 2.6 6.3 Driver.Packet 109.1, Driver.EndSubmission 0.6
gpu 93.9 (37 %) 0.0 (0 %) 159.4 0.0 batch 93.9

Largest slices (ms per frame, inclusive, all threads): Driver.WorkerWait 1718.2, Driver.WorkerWait.dequeue_order 1684.3, Driver.Packet 963.9, Driver.Packet.memory_wait 620.6, Driver.Packet.dispatch 233.7, Driver.Dispatch 198.5, batch 93.9, Driver.Packet.draw 92.8, Driver.Draw 92.6, Graphics.Draw 74.4

Longest waits

  • Driver.WorkerWait (queue worker 0x50) 315.4 ms at 3193 ms, present 2515
  • Driver.WorkerWait (queue worker 0x52) 293.4 ms at 994 ms, present 2506
  • Driver.Packet.memory_wait (queue worker 0x56) 291.0 ms at 4307 ms, present 2520
  • Driver.WorkerWait (queue worker 0x52) 290.5 ms at 1 ms, present 2503
  • Driver.WorkerWait (queue worker 0x50) 290.5 ms at 1 ms, present 2503
  • Driver.Packet.memory_wait (queue worker 0x56) 288.1 ms at 7062 ms, present 2531
  • Driver.WorkerWait (queue worker 0x52) 281.8 ms at 4241 ms, present 2520
  • Driver.WorkerWait (queue worker 0x50) 281.8 ms at 4241 ms, present 2520
  • Driver.Packet.memory_wait (queue worker 0x56) 279.9 ms at 78 ms, present 2503
  • Driver.WorkerWait (queue worker 0x52) 277.5 ms at 7263 ms, present 2532

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

  • batch 218: 5.5 ms at 482 ms, present 2504: GPU no ranges; recorded by Driver.Packet (queue worker 0x0) 5.7, Driver.Packet.draw (queue worker 0x0) 5.1, Driver.Draw (queue worker 0x0) 5.0, Driver.Draw.shader_compile_and_link (queue worker 0x0) 2.4

  • batch 515: 5.4 ms at 1091 ms, present 2507: GPU no ranges; recorded by no CPU slices

  • batch 1408: 5.2 ms at 2940 ms, present 2514: GPU no ranges; recorded by Driver.Packet (queue worker 0x0) 5.7, Driver.Packet.draw (queue worker 0x0) 5.1, Driver.Draw (queue worker 0x0) 5.1, Driver.Draw.shader_compile_and_link (queue worker 0x0) 2.6

  • batch 266: 5.1 ms at 569 ms, present 2505: GPU no ranges; recorded by no CPU slices

  • batch 1904: 5.1 ms at 3990 ms, present 2519: GPU no ranges; recorded by Driver.Packet (queue worker 0x39) 9.5, Driver.Packet.dispatch (queue worker 0x39) 9.5, Driver.Dispatch (queue worker 0x39) 9.0, GpuMutex.wait.dispatch (queue worker 0x39) 7.2

    Toggling the variable on one build of a local stack of open PRs gave the same direction: 36.2 vs 40.4 presents per 10 s in the prison, and 13.3 vs 14.8 in The Lost Legacy's Sri Lanka.

The variable stays opt-in because APS5_JOB_AFFINITY measured 0 to -9 % at a video stage in the title it was written for.

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: PPSA05684 Uncharted: Legacy of Thieves Collection (PPSA05684) on Linux / NVIDIA #4001 (frame rate)
  • GPUs tested: NVIDIA GeForce RTX 4070 Ti SUPER, driver 615.78.08, Arch Linux 7.2.11-zen
  • AI-assisted: yes

@github-actions github-actions Bot added perf Performance change perf numbers missing perf pull request without a before and after summary line unblocks title Names a title ID on the Unblocks line labels Oct 28, 2026
@github-actions

Copy link
Copy Markdown

This pull request is labeled perf, so it needs the summary line of a capture on main and one with the change, from the same title, scene and machine, as the Performance report form asks. Please paste both aps5-summary.jsonl lines, attach the two traces and add the output of tools/trace_digest.py.

@adriadam10 adriadam10 self-assigned this Oct 28, 2026

@adriadam10 adriadam10 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

The code and the test look right (guest_thread_host_affinity fails without the Thread.cpp change), and keeping it opt-in is reasonable. One thing is missing before merging:

  • The perf label needs the evidence the Performance report form asks for (see the bot comment above): the aps5-summary.jsonl line of a capture on main and one with the change, from the same title, scene and machine, both traces attached, and the output of tools/trace_digest.py for each. The table in ### Tested has the numbers but not the captures behind them. Please paste those and the PR can go on.

@MarcZX10 MarcZX10 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Reviewed — changes requested

The affinity change and its focused test build successfully, but this perf PR is missing the paired trace evidence required by the repository's performance-report rules.

What I ran

Reviewed exact head d74683cb2b088c1d2c596e47b92a437cd4dd994e against current main 319621ba2e578bd053b0baba2877fe70520e0737; the merge tree is clean. Environment: Debian 12 x86_64, GCC 12.2.0, CMake, Ninja.

git diff --check refs/review/current-main...refs/review/12544
git merge-tree --write-tree refs/review/current-main refs/review/12544
cmake -S /tmp/AnyPS5-review-12544 -B /tmp/AnyPS5-review-12544/build -G Ninja -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=ON
cmake --build /tmp/AnyPS5-review-12544/build --target guest_thread_host_affinity_tests -j4
ctest --test-dir /tmp/AnyPS5-review-12544/build -R '^guest_thread_host_affinity$' --output-on-failure
gh pr checks 12544 --repo boykopovar/AnyPS5

Results

Check Result
Merge with current main Clean
Diff check Passed; no output
CMake configure Passed
guest_thread_host_affinity_tests build Passed, 196/196 build steps
guest_thread_host_affinity Did not reach assertions: the host CPU guard aborts on this Xeon E5-1620 v2, which lacks required AVX2/FMA and other extensions
Conventions, eligibility, intake, labels, report Passed
Hosted Windows Job passed; changed test selection and CTest were skipped, and changed host-only test executables linked
Hosted Linux, register-context, relinker, ASan, write-watch Skipped by workflow
Raw output
3f32fd9561cfb012905bcb98478f740733bfa66e
[195/196] Building CXX object core/libs/prx/libkernel/CMakeFiles/libkernel.dir/Time/Time.cpp.o
[196/196] Linking CXX executable tests/guest_thread_host_affinity_tests
1/1 Test #2311: guest_thread_host_affinity .......Subprocess aborted***Exception:   0.01 sec
[src/HostCpu.cpp:193 operator()] host CPU Intel(R) Xeon(R) CPU E5-1620 v2 @ 3.70GHz: has SSE, SSE2, SSE3, SSSE3, SSE4.1, SSE4.2, POPCNT, CMPXCHG16B, LAHF/SAHF, AVX, F16C, AES, PCLMULQDQ, RDRAND, XSAVEOPT, OS AVX state (XCR0); lacks LZCNT, BMI1, BMI2, MOVBE, AVX2, FMA, RDSEED, ADX, SHA, CLFLUSHOPT, CLWB, RDPID, XSAVEC, SSE4A, PREFETCHW, CLZERO
[libc] unhandled exception 'St13runtime_error' thrown from 0x7f86db880e4d
terminate called after throwing an instance of 'std::runtime_error'
  what():  The host CPU (Intel(R) Xeon(R) CPU E5-1620 v2 @ 3.70GHz) lacks LZCNT, BMI1, BMI2, MOVBE, AVX2, FMA. The PS5's Zen 2 CPU has these extensions and titles run their instructions natively, so this CPU cannot run them.
labels	pass	11s
windows	pass	9m35s
linux	skipping	0
register-context	skipping	0
relinker	skipping	0
relinker-asan	skipping	0
write-watch	skipping	0
conventions	pass	15s
eligibility	pass	5s
intake	pass	6s
report	pass	40s

Negative control

Assertion Change made to code under test Did the new test fail?
A guest thread receives the requested host CPU mask while the creating thread keeps its mask. No mutation; the test aborted in the project CPU guard before assertions. Not exercised.

Findings

Blocking: The PR is labeled perf, but it does not include the two aps5-summary.jsonl lines for main and the change, the matching trace attachments, or tools/trace_digest.py output. The report form requires those captures from the same machine, title, scene, and settings; the current presents-per-10-second table does not provide the requested capture data. Please attach both traces, paste both summary lines, and include each digest output.

Non-blocking: This host cannot run the focused test because it fails the project's CPU-feature guard before reaching test assertions. The hosted Windows job linked changed host-only test targets but skipped CTest; the Linux and specialized jobs were skipped. The PR description reports separate Linux test runs and title measurements, which I did not independently reproduce.

Sources

Not verified

I could not run the test assertions on this CPU, independently verify the hybrid-core behavior on supported hardware, reproduce the title captures, or verify the reported performance delta. A QEMU rerun was unavailable because the temporary worktree and executable were no longer present after the first CTest attempt.

To get this to a good state

Attach the paired base/change traces, paste their aps5-summary.jsonl lines, and add the output of python3 tools/trace_digest.py for each trace. Please also run guest_thread_host_affinity on a CPU that passes the project's feature guard. I will rerun the same review commands against the updated head.

@github-actions

github-actions Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

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

Pull request Shared files not compared
PR 1896 docs/dev/ENVIRONMENT.md
PR 3986 core/libs/prx/libkernel/Pthread/src/Thread.cpp
PR 4472 docs/dev/ENVIRONMENT.md
PR 4563 core/libs/prx/libkernel/CMakeLists.txt
core/libs/prx/libkernel/Pthread/src/Thread.cpp
PR 5021 core/libs/prx/libkernel/CMakeLists.txt
core/libs/prx/libkernel/Pthread/src/Thread.cpp
PR 6149 core/libs/prx/libkernel/CMakeLists.txt
PR 6186 docs/dev/ENVIRONMENT.md
PR 6924 docs/dev/ENVIRONMENT.md
PR 6936 core/libs/prx/libkernel/CMakeLists.txt
PR 7149 core/libs/prx/libkernel/Pthread/src/Thread.cpp
PR 7449 docs/dev/ENVIRONMENT.md
PR 7457 docs/dev/ENVIRONMENT.md
PR 7514 docs/dev/ENVIRONMENT.md
PR 7565 core/libs/prx/libkernel/Pthread/src/Thread.cpp
PR 7604 docs/dev/ENVIRONMENT.md
PR 7642 docs/dev/ENVIRONMENT.md
PR 7643 docs/dev/ENVIRONMENT.md
PR 7645 core/libs/prx/libkernel/CMakeLists.txt
PR 7804 core/libs/prx/libkernel/Pthread/src/Thread.cpp
PR 8004 docs/dev/ENVIRONMENT.md
PR 8041 core/libs/prx/libkernel/CMakeLists.txt
core/libs/prx/libkernel/Pthread/src/Thread.cpp
PR 8246 docs/dev/ENVIRONMENT.md
PR 8463 core/libs/prx/libkernel/CMakeLists.txt
PR 8484 docs/dev/ENVIRONMENT.md
PR 8592 core/libs/prx/libkernel/Pthread/src/Thread.cpp
PR 9012 docs/dev/ENVIRONMENT.md
PR 9156 core/libs/prx/libkernel/CMakeLists.txt
PR 9248 docs/dev/ENVIRONMENT.md
PR 9289 docs/dev/ENVIRONMENT.md
PR 9293 core/libs/prx/libkernel/CMakeLists.txt
PR 9297 core/libs/prx/libkernel/CMakeLists.txt
PR 9302 core/libs/prx/libkernel/CMakeLists.txt
PR 9345 docs/dev/ENVIRONMENT.md
PR 9356 docs/dev/ENVIRONMENT.md
PR 9383 core/libs/prx/libkernel/CMakeLists.txt
PR 9387 docs/dev/ENVIRONMENT.md
PR 9389 core/libs/prx/libkernel/CMakeLists.txt
PR 9508 docs/dev/ENVIRONMENT.md
PR 9557 core/libs/prx/libkernel/CMakeLists.txt
PR 9566 core/libs/prx/libkernel/CMakeLists.txt
PR 9676 docs/dev/ENVIRONMENT.md
PR 9684 core/libs/prx/libkernel/CMakeLists.txt
core/libs/prx/libkernel/Pthread/src/Thread.cpp
PR 9712 docs/dev/ENVIRONMENT.md
PR 9852 docs/dev/ENVIRONMENT.md
PR 9875 docs/dev/ENVIRONMENT.md
PR 9938 core/libs/prx/libkernel/CMakeLists.txt
core/libs/prx/libkernel/Pthread/src/Thread.cpp
PR 9947 core/libs/prx/libkernel/CMakeLists.txt
PR 10043 docs/dev/ENVIRONMENT.md
PR 10193 docs/dev/ENVIRONMENT.md
PR 10442 docs/dev/ENVIRONMENT.md
PR 10443 docs/dev/ENVIRONMENT.md
PR 10645 core/libs/prx/libkernel/CMakeLists.txt
PR 10678 docs/dev/ENVIRONMENT.md
PR 10757 docs/dev/ENVIRONMENT.md
PR 10806 core/libs/prx/libkernel/CMakeLists.txt
PR 10894 docs/dev/ENVIRONMENT.md
PR 11435 docs/dev/ENVIRONMENT.md
PR 11436 docs/dev/ENVIRONMENT.md
PR 11446 core/libs/prx/libkernel/CMakeLists.txt
PR 11625 core/libs/prx/libkernel/CMakeLists.txt
PR 11891 core/libs/prx/libkernel/CMakeLists.txt
PR 11896 core/libs/prx/libkernel/CMakeLists.txt
PR 11939 core/libs/prx/libkernel/CMakeLists.txt
PR 12130 core/libs/prx/libkernel/Pthread/src/Thread.cpp
PR 12324 docs/dev/ENVIRONMENT.md
PR 12642 core/libs/prx/libkernel/Pthread/src/Thread.cpp
PR 12682 core/libs/prx/libkernel/CMakeLists.txt
core/libs/prx/libkernel/Pthread/src/Thread.cpp
PR 12688 core/libs/prx/libkernel/CMakeLists.txt
core/libs/prx/libkernel/Pthread/src/Thread.cpp
PR 12700 core/libs/prx/libkernel/CMakeLists.txt
core/libs/prx/libkernel/Pthread/src/Thread.cpp
PR 12745 docs/dev/ENVIRONMENT.md
PR 12746 docs/dev/ENVIRONMENT.md
PR 12840 docs/dev/ENVIRONMENT.md
PR 12848 docs/dev/ENVIRONMENT.md
PR 12849 docs/dev/ENVIRONMENT.md
PR 12863 docs/dev/ENVIRONMENT.md
PR 12895 docs/dev/ENVIRONMENT.md
PR 12930 docs/dev/ENVIRONMENT.md
PR 12965 core/libs/prx/libkernel/CMakeLists.txt
core/libs/prx/libkernel/Pthread/src/Thread.cpp
PR 12970 core/libs/prx/libkernel/CMakeLists.txt
docs/dev/ENVIRONMENT.md
PR 13263 docs/dev/ENVIRONMENT.md
PR 13486 core/libs/prx/libkernel/CMakeLists.txt
core/libs/prx/libkernel/Pthread/src/Thread.cpp
docs/dev/ENVIRONMENT.md
PR 13582 core/libs/prx/libkernel/Pthread/src/Thread.cpp
PR 13707 docs/dev/ENVIRONMENT.md
PR 13793 docs/dev/ENVIRONMENT.md
PR 13809 docs/dev/ENVIRONMENT.md
PR 13863 docs/dev/ENVIRONMENT.md
PR 13920 docs/dev/ENVIRONMENT.md
PR 13928 docs/dev/ENVIRONMENT.md
PR 13929 docs/dev/ENVIRONMENT.md
PR 14051 docs/dev/ENVIRONMENT.md
PR 14190 core/libs/prx/libkernel/Pthread/src/Thread.cpp
PR 14220 docs/dev/ENVIRONMENT.md
PR 14228 core/libs/prx/libkernel/CMakeLists.txt
PR 14260 docs/dev/ENVIRONMENT.md
PR 14262 docs/dev/ENVIRONMENT.md
PR 14344 docs/dev/ENVIRONMENT.md
PR 14367 docs/dev/ENVIRONMENT.md
PR 14557 core/libs/prx/libkernel/CMakeLists.txt
PR 14794 docs/dev/ENVIRONMENT.md
PR 14841 core/libs/prx/libkernel/CMakeLists.txt
PR 14970 core/libs/prx/libkernel/CMakeLists.txt
PR 15015 docs/dev/ENVIRONMENT.md
PR 15040 core/libs/prx/libkernel/Pthread/src/Thread.cpp
PR 15046 core/libs/prx/libkernel/CMakeLists.txt
PR 15059 docs/dev/ENVIRONMENT.md
PR 15095 core/libs/prx/libkernel/CMakeLists.txt
PR 15135 core/libs/prx/libkernel/CMakeLists.txt
PR 15136 docs/dev/ENVIRONMENT.md
PR 15169 docs/dev/ENVIRONMENT.md
PR 15456 docs/dev/ENVIRONMENT.md
PR 15520 docs/dev/ENVIRONMENT.md
PR 15529 docs/dev/ENVIRONMENT.md
PR 15548 docs/dev/ENVIRONMENT.md
PR 15561 core/libs/prx/libkernel/CMakeLists.txt
PR 15567 core/libs/prx/libkernel/Pthread/src/Thread.cpp
PR 15569 docs/dev/ENVIRONMENT.md
PR 15570 docs/dev/ENVIRONMENT.md
PR 15571 core/libs/prx/libkernel/Pthread/src/Thread.cpp
PR 15572 docs/dev/ENVIRONMENT.md
PR 15671 docs/dev/ENVIRONMENT.md
PR 15674 docs/dev/ENVIRONMENT.md
PR 15691 core/libs/prx/libkernel/Pthread/src/Thread.cpp
PR 15719 docs/dev/ENVIRONMENT.md
PR 15738 docs/dev/ENVIRONMENT.md
PR 15775 core/libs/prx/libkernel/CMakeLists.txt
PR 15776 core/libs/prx/libkernel/CMakeLists.txt
PR 15803 core/libs/prx/libkernel/Pthread/src/Thread.cpp
PR 15804 core/libs/prx/libkernel/Pthread/src/Thread.cpp
PR 15807 core/libs/prx/libkernel/Pthread/src/Thread.cpp
PR 15917 docs/dev/ENVIRONMENT.md
PR 15918 docs/dev/ENVIRONMENT.md
PR 15919 docs/dev/ENVIRONMENT.md
PR 15974 docs/dev/ENVIRONMENT.md
PR 16070 core/libs/prx/libkernel/CMakeLists.txt
PR 16089 core/libs/prx/libkernel/CMakeLists.txt
PR 16115 docs/dev/ENVIRONMENT.md
PR 16116 docs/dev/ENVIRONMENT.md
PR 16217 docs/dev/ENVIRONMENT.md
PR 16243 core/libs/prx/libkernel/CMakeLists.txt
PR 16270 core/libs/prx/libkernel/CMakeLists.txt
PR 16286 docs/dev/ENVIRONMENT.md
PR 16294 docs/dev/ENVIRONMENT.md
PR 16371 docs/dev/ENVIRONMENT.md
PR 16372 core/libs/prx/libkernel/CMakeLists.txt
docs/dev/ENVIRONMENT.md
PR 16380 core/libs/prx/libkernel/CMakeLists.txt

@XairRrR

XairRrR commented Oct 29, 2026

Copy link
Copy Markdown
Contributor Author

Paired captures are below: same build, title, scene and machine. The only difference between them is APS5_GUEST_AFFINITY.

They are not from a build of main itself. PPSA05684 reaches this scene only on a local stack of open PRs (#12206, #12207, #12208, #12210, #12238 and others) and local patches. With the variable unset, ApplyGuestAffinity returns before it pins anything, so the capture without it runs the same code path as main.

Both captures use commit 4fd12fcaa9d4 of that stack ("dirty" is only the 3rdparty/vorbis submodule pointer), on an Intel Core i9-14900KF with an RTX 4070 Ti SUPER (NVIDIA 615.78.08), Arch Linux 7.2.11-zen. The scene is the Uncharted 4 prison yard fight, reached through the developer menu by the same scripted inputs, captured with APS5_TRACE_SECONDS=115:15 and APS5_TRACE_SUMMARY_EVERY=10.

Without (main's path) With APS5_GUEST_AFFINITY=1
Presents in 15 s 54 60
Frame p50 / p90 / p99 274.7 / 311.1 / 355.0 ms 248.8 / 274.8 / 294.3 ms
GPU busy per present 103.5 ms 98.6 ms
queue worker 0x0 busy 112.6 ms per frame 96.8 ms per frame

The 10 s summary intervals around the captures agree: 35 to 37 presents without the variable, 38 to 41 with it.

Traces: without, with

Summary line without:

{"commit":"4fd12fcaa9d4","dirty":true,"env":{"APS5_DISPATCH_CACHE_ENTRIES":"4096","APS5_DUMP_FRAMES":"0","APS5_DUMP_FRAMES_EVERY":"99999","APS5_HOST_IMPORT_MIB":"16384","APS5_IMAGE_TABLE_KEY_SCAN":"262144","APS5_LAZY_SHADER_PREPARE":"1","APS5_LOCAL_NULL_INVALID_BUFFERS":"1","APS5_LOCAL_REBASE_HUGE_ARRAYS":"1","APS5_NO_LIBRARY_PREBUILD":"1","APS5_NO_PIPELINE_LTO":"1","APS5_NO_SNAPSHOT_CHECK":"1","APS5_PAD_INPUT_FILE":"<path>","APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"115:15","APS5_TRACE_SUMMARY_EVERY":"10"},"gpu":"NVIDIA GeForce RTX 4070 Ti SUPER","driver":"NVIDIA 615.78.08","os":"Linux 7.2.11-zen1-1-zen","cpu":"Intel(R) Core(TM) i9-14900KF","cpu_threads":32,"memory_mib":31906,"title_id":"PPSA05684","title":"Uncharted™: Legacy of Thieves Collection","content_version":"01.002.000","resolution":"2560x1440","window":{"spec":"seconds 115:15","first_present":2035,"ms":15010.576},"presents":54,"frame_ms":{"p50":274.747,"p90":311.123,"p99":355.030,"max":355.030},"gpu_busy_ms_per_present":103.516,"worker_busy_pct":{"queue worker 0x0":73.501,"queue worker 0x43":77.755,"queue worker 0x21":10.866,"queue worker 0x52":0.195,"queue worker 0x50":0.175,"queue worker 0x29":14.694,"queue worker 0x56":99.897,"queue worker 0x39":42.680,"queue worker 0x49":34.319,"queue worker 0x31":32.003,"queue worker 0x41":32.799},"top_phases_ms_per_frame":{"Driver.Packet":1159.480,"Driver.Packet.memory_wait":746.334,"Driver.Packet.dispatch":258.444,"Driver.Dispatch":223.868,"Driver.Packet.draw":121.516,"Driver.Draw":120.990,"Graphics.Draw":97.047,"Graphics.Draw.draw_and_resource_release":92.772},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":11.470,"events_lost":80478,"totals_full":false}},"trace":"aps5-trace-4fd12fcaa9d4-1208546.json.gz"}

Summary line with:

{"commit":"4fd12fcaa9d4","dirty":true,"env":{"APS5_DISPATCH_CACHE_ENTRIES":"4096","APS5_DUMP_FRAMES":"0","APS5_DUMP_FRAMES_EVERY":"99999","APS5_GUEST_AFFINITY":"1","APS5_HOST_IMPORT_MIB":"16384","APS5_IMAGE_TABLE_KEY_SCAN":"262144","APS5_LAZY_SHADER_PREPARE":"1","APS5_LOCAL_NULL_INVALID_BUFFERS":"1","APS5_LOCAL_REBASE_HUGE_ARRAYS":"1","APS5_NO_LIBRARY_PREBUILD":"1","APS5_NO_PIPELINE_LTO":"1","APS5_NO_SNAPSHOT_CHECK":"1","APS5_PAD_INPUT_FILE":"<path>","APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"115:15","APS5_TRACE_SUMMARY_EVERY":"10"},"gpu":"NVIDIA GeForce RTX 4070 Ti SUPER","driver":"NVIDIA 615.78.08","os":"Linux 7.2.11-zen1-1-zen","cpu":"Intel(R) Core(TM) i9-14900KF","cpu_threads":32,"memory_mib":31906,"title_id":"PPSA05684","title":"Uncharted™: Legacy of Thieves Collection","content_version":"01.002.000","resolution":"2560x1440","window":{"spec":"seconds 115:15","first_present":2148,"ms":15011.492},"presents":60,"frame_ms":{"p50":248.756,"p90":274.771,"p99":294.253,"max":294.253},"gpu_busy_ms_per_present":98.558,"worker_busy_pct":{"queue worker 0x0":73.454,"queue worker 0x43":77.199,"queue worker 0x21":11.619,"queue worker 0x50":0.250,"queue worker 0x52":0.191,"queue worker 0x29":17.039,"queue worker 0x56":99.980,"queue worker 0x41":38.626,"queue worker 0x39":38.527,"queue worker 0x49":33.558,"queue worker 0x31":37.132},"top_phases_ms_per_frame":{"Driver.Packet":1065.943,"Driver.Packet.memory_wait":690.066,"Driver.Packet.dispatch":241.375,"Driver.Dispatch":206.140,"Driver.Packet.draw":106.747,"Driver.Draw":106.308,"Graphics.Draw":88.036,"Graphics.Draw.draw_and_resource_release":84.402},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":11.060,"events_lost":95808,"totals_full":false}},"trace":"aps5-trace-4fd12fcaa9d4-1217548.json.gz"}
tools/trace_digest.py, without

seconds 115:15 from present 2035: 54 presents, frame p50 274.7 / p90 311.1 / p99 355.0 / max 355.0 ms, GPU busy 103.5 ms per present
NVIDIA GeForce RTX 4070 Ti SUPER, NVIDIA 615.78.08, Linux 7.2.11-zen1-1-zen, 2560x1440, commit 4fd12fcaa9d4 (dirty), dropped: yes

{"commit":"4fd12fcaa9d4","dirty":true,"env":{"APS5_DISPATCH_CACHE_ENTRIES":"4096","APS5_DUMP_FRAMES":"0","APS5_DUMP_FRAMES_EVERY":"99999","APS5_HOST_IMPORT_MIB":"16384","APS5_IMAGE_TABLE_KEY_SCAN":"262144","APS5_LAZY_SHADER_PREPARE":"1","APS5_LOCAL_NULL_INVALID_BUFFERS":"1","APS5_LOCAL_REBASE_HUGE_ARRAYS":"1","APS5_NO_LIBRARY_PREBUILD":"1","APS5_NO_PIPELINE_LTO":"1","APS5_NO_SNAPSHOT_CHECK":"1","APS5_PAD_INPUT_FILE":"<path>","APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"115:15","APS5_TRACE_SUMMARY_EVERY":"10"},"gpu":"NVIDIA GeForce RTX 4070 Ti SUPER","driver":"NVIDIA 615.78.08","os":"Linux 7.2.11-zen1-1-zen","cpu":"Intel(R) Core(TM) i9-14900KF","cpu_threads":32,"memory_mib":31906,"title_id":"PPSA05684","title":"Uncharted\u2122: Legacy of Thieves Collection","content_version":"01.002.000","resolution":"2560x1440","window":{"spec":"seconds 115:15","first_present":2035,"ms":15010.576},"presents":54,"frame_ms":{"p50":274.747,"p90":311.123,"p99":355.03,"max":355.03},"gpu_busy_ms_per_present":103.516,"worker_busy_pct":{"queue worker 0x0":73.501,"queue worker 0x43":77.755,"queue worker 0x21":10.866,"queue worker 0x52":0.195,"queue worker 0x50":0.175,"queue worker 0x29":14.694,"queue worker 0x56":99.897,"queue worker 0x39":42.68,"queue worker 0x49":34.319,"queue worker 0x31":32.003,"queue worker 0x41":32.799},"top_phases_ms_per_frame":{"Driver.Packet":1159.48,"Driver.Packet.memory_wait":746.334,"Driver.Packet.dispatch":258.444,"Driver.Dispatch":223.868,"Driver.Packet.draw":121.516,"Driver.Draw":120.99,"Graphics.Draw":97.047,"Graphics.Draw.draw_and_resource_release":92.772},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":11.47,"events_lost":80478,"totals_full":false}},"trace":"aps5-trace-4fd12fcaa9d4-1208546.json.gz"}

Slowest frames (largest slices inside each, inclusive)

  • present 2078: 355.0 ms at 11789 ms: Driver.Packet (queue worker 0x56) 354.9, Driver.WorkerWait (queue worker 0x52) 354.5, Driver.WorkerWait (queue worker 0x50) 354.5, Driver.Packet.memory_wait (queue worker 0x56) 352.6
  • present 2083: 327.1 ms at 13253 ms: Driver.Packet (queue worker 0x56) 326.9, Driver.WorkerWait (queue worker 0x50) 326.5, Driver.WorkerWait (queue worker 0x52) 326.5, Driver.Packet (queue worker 0x31) 326.3
  • present 2063: 318.0 ms at 7698 ms: Driver.Packet (queue worker 0x56) 317.8, Driver.WorkerWait (queue worker 0x52) 317.7, Driver.WorkerWait (queue worker 0x50) 317.7, Driver.Packet.memory_wait (queue worker 0x56) 315.5
  • present 2057: 316.2 ms at 6033 ms: Driver.WorkerWait (queue worker 0x52) 316.2, Driver.Packet (queue worker 0x56) 316.0, Driver.WorkerWait (queue worker 0x50) 315.7, Driver.Packet (queue worker 0x39) 315.6
  • present 2037: 314.9 ms at 564 ms: Driver.Packet (queue worker 0x56) 314.7, Driver.WorkerWait (queue worker 0x52) 314.2, Driver.WorkerWait (queue worker 0x50) 313.7, Driver.Packet.memory_wait (queue worker 0x56) 312.5

Threads (ms per frame)

thread busy wait untraced in slices < 20 us largest
title 0.1 (0 %) 0.0 (0 %) 277.9 0.1 Shader.ResolveGraphicsStagesAbi 0.1
title 0.0 (0 %) 0.0 (0 %) 277.9 0.1 Shader.ResolveGraphicsStagesAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 277.9 0.1 Shader.ResolveGraphicsStagesAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 277.9 0.1 Shader.ResolveGraphicsStagesAbi 0.0
title 0.1 (0 %) 0.0 (0 %) 277.9 0.1 Shader.ResolveGraphicsStagesAbi 0.1
title 0.1 (0 %) 0.0 (0 %) 277.9 0.1 Shader.ResolveGraphicsStagesAbi 0.1
title 0.0 (0 %) 0.0 (0 %) 277.9 0.1 Shader.ResolveGraphicsStagesAbi 0.0
title 0.1 (0 %) 0.0 (0 %) 277.9 0.1 Shader.ResolveGraphicsStagesAbi 0.1
title 0.1 (0 %) 0.0 (0 %) 277.9 0.1 Shader.ResolveGraphicsStagesAbi 0.1
title 0.1 (0 %) 0.0 (0 %) 277.9 0.1 Shader.ResolveGraphicsStagesAbi 0.1
title 0.1 (0 %) 0.0 (0 %) 277.9 0.1 Shader.ResolveGraphicsStagesAbi 0.1
title 0.1 (0 %) 0.0 (0 %) 277.9 0.1 Shader.ResolveGraphicsStagesAbi 0.1
queue worker 0x0 112.6 (41 %) 76.8 (28 %) 88.5 122.0 Driver.Packet 134.2, Driver.Rewind 0.2
title 0.1 (0 %) 0.0 (0 %) 277.9 0.1 Shader.ResolveGraphicsStagesAbi 0.1
draw committer 44.5 (16 %) 1.0 (0 %) 232.5 27.1 Graphics.Draw 33.4, Recorder.Sync 10.3
presenter 0.4 (0 %) 0.1 (0 %) 277.5 0.1 VideoOut.Flip 0.5
queue worker 0x43 68.0 (24 %) 208.5 (75 %) 1.5 3.4 Driver.Packet 215.1, Driver.EndSubmission 0.1
shader prepare 0.0 (0 %) 0.0 (0 %) 278.0 0.0 Vulkan.ComputePipeline 0.0
shader prepare 0.0 (0 %) 0.0 (0 %) 278.0 0.0 Vulkan.ComputePipeline 0.0
shader prepare 0.0 (0 %) 0.0 (0 %) 278.0 0.0 Vulkan.ComputePipeline 0.0
shader prepare 0.0 (0 %) 0.0 (0 %) 278.0 0.0 Vulkan.ComputePipeline 0.0
shader prepare 0.0 (0 %) 0.0 (0 %) 278.0 0.0 Vulkan.ComputePipeline 0.0
shader prepare 0.0 (0 %) 0.0 (0 %) 278.0 0.0 Vulkan.ComputePipeline 0.0
shader prepare 0.0 (0 %) 0.0 (0 %) 278.0 0.0 Vulkan.ComputePipeline 0.0
shader prepare 0.0 (0 %) 0.0 (0 %) 278.0 0.0 Vulkan.ComputePipeline 0.0
shader prepare 0.0 (0 %) 0.0 (0 %) 278.0 0.0 Vulkan.ComputePipeline 0.0
shader prepare 0.0 (0 %) 0.0 (0 %) 278.0 0.0 Vulkan.ComputePipeline 0.0
shader prepare 0.0 (0 %) 0.0 (0 %) 278.0 0.0 Vulkan.ComputePipeline 0.0
shader prepare 0.0 (0 %) 0.0 (0 %) 278.0 0.0 Vulkan.ComputePipeline 0.0
shader prepare 0.0 (0 %) 0.0 (0 %) 278.0 0.0 Vulkan.ComputePipeline 0.0
shader prepare 0.0 (0 %) 0.0 (0 %) 278.0 0.0 Vulkan.ComputePipeline 0.0
shader prepare 0.0 (0 %) 0.0 (0 %) 278.0 0.0 Vulkan.ComputePipeline 0.0
shader prepare 0.0 (0 %) 0.0 (0 %) 278.0 0.0 Vulkan.ComputePipeline 0.0
queue worker 0x21 13.4 (5 %) 259.4 (93 %) 5.1 6.5 Driver.Packet 29.2, Driver.EndSubmission 0.6
queue worker 0x52 0.3 (0 %) 272.4 (98 %) 5.2 0.2 Driver.Packet 0.4, Driver.EndSubmission 0.1
queue worker 0x50 0.4 (0 %) 272.4 (98 %) 5.2 0.3 Driver.Packet 0.4, Driver.EndSubmission 0.0
queue worker 0x29 14.1 (5 %) 262.6 (94 %) 1.3 6.4 Driver.Packet 39.1, Driver.EndSubmission 0.6
queue worker 0x56 1.3 (0 %) 272.9 (98 %) 3.8 0.9 Driver.Packet 274.2, Driver.EndSubmission 0.0
queue worker 0x39 14.0 (5 %) 258.8 (93 %) 5.1 6.4 Driver.Packet 117.6, Driver.EndSubmission 0.6
queue worker 0x49 10.8 (4 %) 262.0 (94 %) 5.2 4.5 Driver.Packet 94.6, Driver.EndSubmission 0.5
queue worker 0x31 14.9 (5 %) 258.0 (93 %) 5.2 6.4 Driver.Packet 87.5, Driver.EndSubmission 1.1
queue worker 0x41 13.4 (5 %) 263.3 (95 %) 1.2 5.7 Driver.Packet 89.4, Driver.EndSubmission 0.6
gpu 103.8 (37 %) 0.0 (0 %) 174.2 0.0 batch 103.8

Largest slices (ms per frame, inclusive, all threads): Driver.WorkerWait 1843.3, Driver.WorkerWait.dequeue_order 1802.1, Driver.Packet 1081.6, Driver.Packet.memory_wait 734.4, Driver.Packet.dispatch 249.8, Driver.Dispatch 214.1, batch 103.8, Driver.Packet.draw 81.3, Driver.Draw 81.0, Graphics.Draw 72.7

Longest waits

  • Driver.WorkerWait (queue worker 0x52) 369.9 ms at 5980 ms, present 2056
  • Driver.WorkerWait (queue worker 0x52) 354.5 ms at 11790 ms, present 2078
  • Driver.WorkerWait (queue worker 0x50) 354.5 ms at 11790 ms, present 2078
  • Driver.WorkerWait (queue worker 0x31) 343.2 ms at 11801 ms, present 2078
  • Driver.Packet.memory_wait (queue worker 0x56) 343.1 ms at 13329 ms, present 2083
  • Driver.WorkerWait (queue worker 0x50) 341.9 ms at 4637 ms, present 2051
  • Driver.WorkerWait (queue worker 0x52) 341.5 ms at 7357 ms, present 2061
  • Driver.WorkerWait (queue worker 0x52) 340.4 ms at 14095 ms, present 2085
  • Driver.WorkerWait (queue worker 0x52) 332.9 ms at 4353 ms, present 2050
  • Driver.WorkerWait (queue worker 0x52) 330.5 ms at 3544 ms, present 2047

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

  • batch 81789: 6.2 ms at 12795 ms, present 2081: GPU no ranges; recorded by no CPU slices
  • batch 81662: 6.2 ms at 12527 ms, present 2080: GPU no ranges; recorded by no CPU slices
  • batch 78197: 6.2 ms at 4795 ms, present 2052: GPU no ranges; recorded by Driver.Packet (queue worker 0x0) 7.9, Driver.Packet.dispatch (queue worker 0x0) 5.2, Driver.Dispatch (queue worker 0x0) 5.2, Vulkan.DispatchRecipe (queue worker 0x0) 5.1
  • batch 79691: 6.2 ms at 8100 ms, present 2064: GPU no ranges; recorded by Driver.Packet (queue worker 0x0) 7.9, Driver.Packet.dispatch (queue worker 0x0) 5.3, Driver.Dispatch (queue worker 0x0) 5.3, Vulkan.DispatchRecipe (queue worker 0x0) 5.2
  • batch 77954: 6.2 ms at 4225 ms, present 2050: GPU no ranges; recorded by Driver.Packet (queue worker 0x0) 7.6, Driver.Packet.dispatch (queue worker 0x0) 5.4, Driver.Dispatch (queue worker 0x0) 5.3, Vulkan.DispatchRecipe (queue worker 0x0) 5.2
tools/trace_digest.py, with

seconds 115:15 from present 2148: 60 presents, frame p50 248.8 / p90 274.8 / p99 294.3 / max 294.3 ms, GPU busy 98.6 ms per present
NVIDIA GeForce RTX 4070 Ti SUPER, NVIDIA 615.78.08, Linux 7.2.11-zen1-1-zen, 2560x1440, commit 4fd12fcaa9d4 (dirty), dropped: yes

{"commit":"4fd12fcaa9d4","dirty":true,"env":{"APS5_DISPATCH_CACHE_ENTRIES":"4096","APS5_DUMP_FRAMES":"0","APS5_DUMP_FRAMES_EVERY":"99999","APS5_GUEST_AFFINITY":"1","APS5_HOST_IMPORT_MIB":"16384","APS5_IMAGE_TABLE_KEY_SCAN":"262144","APS5_LAZY_SHADER_PREPARE":"1","APS5_LOCAL_NULL_INVALID_BUFFERS":"1","APS5_LOCAL_REBASE_HUGE_ARRAYS":"1","APS5_NO_LIBRARY_PREBUILD":"1","APS5_NO_PIPELINE_LTO":"1","APS5_NO_SNAPSHOT_CHECK":"1","APS5_PAD_INPUT_FILE":"<path>","APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"115:15","APS5_TRACE_SUMMARY_EVERY":"10"},"gpu":"NVIDIA GeForce RTX 4070 Ti SUPER","driver":"NVIDIA 615.78.08","os":"Linux 7.2.11-zen1-1-zen","cpu":"Intel(R) Core(TM) i9-14900KF","cpu_threads":32,"memory_mib":31906,"title_id":"PPSA05684","title":"Uncharted\u2122: Legacy of Thieves Collection","content_version":"01.002.000","resolution":"2560x1440","window":{"spec":"seconds 115:15","first_present":2148,"ms":15011.492},"presents":60,"frame_ms":{"p50":248.756,"p90":274.771,"p99":294.253,"max":294.253},"gpu_busy_ms_per_present":98.558,"worker_busy_pct":{"queue worker 0x0":73.454,"queue worker 0x43":77.199,"queue worker 0x21":11.619,"queue worker 0x50":0.25,"queue worker 0x52":0.191,"queue worker 0x29":17.039,"queue worker 0x56":99.98,"queue worker 0x41":38.626,"queue worker 0x39":38.527,"queue worker 0x49":33.558,"queue worker 0x31":37.132},"top_phases_ms_per_frame":{"Driver.Packet":1065.943,"Driver.Packet.memory_wait":690.066,"Driver.Packet.dispatch":241.375,"Driver.Dispatch":206.14,"Driver.Packet.draw":106.747,"Driver.Draw":106.308,"Graphics.Draw":88.036,"Graphics.Draw.draw_and_resource_release":84.402},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":11.06,"events_lost":95808,"totals_full":false}},"trace":"aps5-trace-4fd12fcaa9d4-1217548.json.gz"}

Slowest frames (largest slices inside each, inclusive)

  • present 2158: 294.3 ms at 2515 ms: Driver.Packet (queue worker 0x56) 294.1, Driver.WorkerWait (queue worker 0x52) 293.5, Driver.WorkerWait (queue worker 0x50) 293.4, Driver.Packet (queue worker 0x39) 293.2
  • present 2181: 283.4 ms at 8256 ms: Driver.Packet (queue worker 0x56) 283.3, Driver.WorkerWait (queue worker 0x52) 282.9, Driver.WorkerWait (queue worker 0x50) 282.9, Driver.Packet (queue worker 0x39) 282.7
  • present 2159: 282.5 ms at 2809 ms: Driver.Packet (queue worker 0x56) 282.3, Driver.Packet (queue worker 0x29) 281.7, Driver.WorkerWait (queue worker 0x50) 281.6, Driver.WorkerWait (queue worker 0x52) 281.5
  • present 2199: 277.7 ms at 12751 ms: Driver.WorkerWait (queue worker 0x52) 277.7, Driver.Packet (queue worker 0x56) 277.5, Driver.WorkerWait (queue worker 0x50) 277.2, Driver.Packet (queue worker 0x39) 277.0
  • present 2167: 276.5 ms at 4761 ms: Driver.Packet (queue worker 0x56) 276.4, Driver.WorkerWait (queue worker 0x50) 275.8, Driver.WorkerWait (queue worker 0x52) 275.6, Driver.Packet.memory_wait (queue worker 0x56) 274.2

Threads (ms per frame)

thread busy wait untraced in slices < 20 us largest
title 0.1 (0 %) 0.0 (0 %) 250.1 0.1 Shader.ResolveGraphicsStagesAbi 0.1
title 0.1 (0 %) 0.0 (0 %) 250.1 0.1 Shader.ResolveGraphicsStagesAbi 0.1
title 0.1 (0 %) 0.0 (0 %) 250.1 0.1 Shader.ResolveGraphicsStagesAbi 0.1
title 0.1 (0 %) 0.0 (0 %) 250.1 0.1 Shader.ResolveGraphicsStagesAbi 0.1
title 0.1 (0 %) 0.0 (0 %) 250.1 0.1 Shader.ResolveGraphicsStagesAbi 0.1
title 0.1 (0 %) 0.0 (0 %) 250.1 0.1 Shader.ResolveGraphicsStagesAbi 0.1
title 0.1 (0 %) 0.0 (0 %) 250.1 0.1 Shader.ResolveGraphicsStagesAbi 0.1
title 0.1 (0 %) 0.0 (0 %) 250.1 0.1 Shader.ResolveGraphicsStagesAbi 0.1
title 0.1 (0 %) 0.0 (0 %) 250.1 0.1 Shader.ResolveGraphicsStagesAbi 0.1
title 0.1 (0 %) 0.0 (0 %) 250.1 0.1 Shader.ResolveGraphicsStagesAbi 0.1
title 0.1 (0 %) 0.0 (0 %) 250.1 0.1 Shader.ResolveGraphicsStagesAbi 0.1
title 0.1 (0 %) 0.0 (0 %) 250.1 0.1 Shader.ResolveGraphicsStagesAbi 0.1
queue worker 0x0 96.8 (39 %) 67.5 (27 %) 85.8 110.2 Driver.Packet 115.4, Driver.Rewind 0.2
title 0.1 (0 %) 0.0 (0 %) 250.1 0.1 Shader.ResolveGraphicsStagesAbi 0.1
presenter 0.4 (0 %) 0.2 (0 %) 249.6 0.1 VideoOut.Flip 0.6
draw committer 41.7 (17 %) 0.9 (0 %) 207.7 25.5 Graphics.Draw 30.9, Recorder.Sync 10.1
queue worker 0x43 62.4 (25 %) 186.4 (75 %) 1.3 3.2 Driver.Packet 192.2, Driver.EndSubmission 0.1
shader prepare 0.0 (0 %) 0.0 (0 %) 250.2 0.0 Vulkan.ComputePipeline 0.0
shader prepare 0.0 (0 %) 0.0 (0 %) 250.2 0.0 Vulkan.ComputePipeline 0.0
shader prepare 0.0 (0 %) 0.0 (0 %) 250.2 0.0 Vulkan.ComputePipeline 0.0
shader prepare 0.0 (0 %) 0.0 (0 %) 250.2 0.0 Vulkan.ComputePipeline 0.0
shader prepare 0.0 (0 %) 0.0 (0 %) 250.2 0.0 Vulkan.ComputePipeline 0.0
shader prepare 0.0 (0 %) 0.0 (0 %) 250.2 0.0 Vulkan.ComputePipeline 0.0
shader prepare 0.0 (0 %) 0.0 (0 %) 250.2 0.0 Vulkan.ComputePipeline 0.0
shader prepare 0.0 (0 %) 0.0 (0 %) 250.2 0.0 Vulkan.ComputePipeline 0.0
shader prepare 0.0 (0 %) 0.0 (0 %) 250.2 0.0 Vulkan.ComputePipeline 0.0
shader prepare 0.0 (0 %) 0.0 (0 %) 250.2 0.0 Vulkan.ComputePipeline 0.0
shader prepare 0.0 (0 %) 0.0 (0 %) 250.2 0.0 Vulkan.ComputePipeline 0.0
shader prepare 0.0 (0 %) 0.0 (0 %) 250.2 0.0 Vulkan.ComputePipeline 0.0
shader prepare 0.0 (0 %) 0.0 (0 %) 250.2 0.0 Vulkan.ComputePipeline 0.0
shader prepare 0.0 (0 %) 0.0 (0 %) 250.2 0.0 Vulkan.ComputePipeline 0.0
shader prepare 0.0 (0 %) 0.0 (0 %) 250.2 0.0 Vulkan.ComputePipeline 0.0
shader prepare 0.0 (0 %) 0.0 (0 %) 250.2 0.0 Vulkan.ComputePipeline 0.0
queue worker 0x21 13.1 (5 %) 233.0 (93 %) 4.1 6.2 Driver.Packet 28.2, Driver.EndSubmission 0.5
queue worker 0x50 0.4 (0 %) 245.6 (98 %) 4.2 0.3 Driver.Packet 0.5, Driver.EndSubmission 0.1
queue worker 0x52 0.4 (0 %) 245.7 (98 %) 4.2 0.3 Driver.Packet 0.4, Driver.EndSubmission 0.0
queue worker 0x29 13.2 (5 %) 232.9 (93 %) 4.1 6.2 Driver.Packet 41.7, Driver.EndSubmission 0.5
queue worker 0x56 1.1 (0 %) 246.0 (98 %) 3.1 0.8 Driver.Packet 247.1, Driver.EndSubmission 0.0
queue worker 0x41 12.0 (5 %) 234.0 (94 %) 4.1 5.6 Driver.Packet 95.8, Driver.EndSubmission 0.5
queue worker 0x39 13.1 (5 %) 233.0 (93 %) 4.1 6.3 Driver.Packet 91.9, Driver.EndSubmission 0.6
queue worker 0x49 10.2 (4 %) 236.0 (94 %) 4.0 4.3 Driver.Packet 83.3, Driver.EndSubmission 0.4
queue worker 0x31 13.7 (5 %) 232.4 (93 %) 4.1 6.2 Driver.Packet 92.0, Driver.EndSubmission 0.5
gpu 98.6 (39 %) 0.0 (0 %) 151.6 0.0 batch 98.6

Largest slices (ms per frame, inclusive, all threads): Driver.WorkerWait 1636.7, Driver.WorkerWait.dequeue_order 1596.8, Driver.Packet 988.6, Driver.Packet.memory_wait 675.7, Driver.Packet.dispatch 232.1, Driver.Dispatch 196.4, batch 98.6, Driver.Packet.draw 68.1, Driver.Draw 67.9, GpuMutex.wait.dispatch 66.1

Longest waits

  • Driver.WorkerWait (queue worker 0x52) 323.5 ms at 12705 ms, present 2198
  • Driver.WorkerWait (queue worker 0x50) 312.3 ms at 14451 ms, present 2205
  • Driver.WorkerWait (queue worker 0x50) 309.8 ms at 11440 ms, present 2193
  • Driver.Packet.memory_wait (queue worker 0x56) 300.3 ms at 2617 ms, present 2158
  • Driver.Packet.memory_wait (queue worker 0x56) 300.1 ms at 8319 ms, present 2181
  • Driver.WorkerWait (queue worker 0x50) 298.9 ms at 1718 ms, present 2154
  • Driver.Packet.memory_wait (queue worker 0x56) 296.6 ms at 12815 ms, present 2199
  • Driver.WorkerWait (queue worker 0x52) 295.7 ms at 5984 ms, present 2171
  • Driver.WorkerWait (queue worker 0x52) 294.8 ms at 9240 ms, present 2184
  • Driver.WorkerWait (queue worker 0x50) 293.9 ms at 9732 ms, present 2186

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

  • batch 82529: 5.9 ms at 2935 ms, present 2159: GPU no ranges; recorded by Driver.Packet (queue worker 0x0) 7.0, Driver.Packet.dispatch (queue worker 0x0) 5.4, Driver.Dispatch (queue worker 0x0) 5.4, Vulkan.DispatchRecipe (queue worker 0x0) 5.3
  • batch 82644: 5.8 ms at 3153 ms, present 2160: GPU no ranges; recorded by Driver.Packet (queue worker 0x0) 7.0, Driver.Packet.dispatch (queue worker 0x0) 5.4, Driver.Dispatch (queue worker 0x0) 5.4, Vulkan.DispatchRecipe (queue worker 0x0) 5.3
  • batch 85347: 5.8 ms at 8636 ms, present 2182: GPU no ranges; recorded by Driver.Packet (queue worker 0x0) 6.9, Driver.Packet.dispatch (queue worker 0x0) 5.5, Driver.Dispatch (queue worker 0x0) 5.5, Vulkan.DispatchRecipe (queue worker 0x0) 5.4
  • batch 82406: 5.8 ms at 2633 ms, present 2158: GPU no ranges; recorded by Driver.Packet (queue worker 0x0) 7.1, Driver.Packet.dispatch (queue worker 0x0) 5.0, Driver.Dispatch (queue worker 0x0) 5.0, Vulkan.DispatchRecipe (queue worker 0x0) 4.8
  • batch 82286: 5.8 ms at 2359 ms, present 2157: GPU no ranges; recorded by Driver.Packet (queue worker 0x0) 6.8, Driver.Packet.dispatch (queue worker 0x0) 5.4, Driver.Dispatch (queue worker 0x0) 5.4, Vulkan.DispatchRecipe (queue worker 0x0) 5.3

@MarcZX10 on the test: guest_thread_host_affinity runs on the i9-14900KF above. It passes, and it fails with main's Thread.cpp.

AI-assisted: yes

@MarcZX10

Copy link
Copy Markdown
Contributor

Re-checked — changes still requested

The paired captures, traces, and trace_digest.py output now provide useful same-machine measurements, but they do not meet the repository's perf report requirement because both summaries are from dirty stack commit 4fd12fcaa9d4, rather than one capture from main and one from the change.

What I checked

  • Read the new report at PR head d74683cb2b088c1d2c596e47b92a437cd4dd994e and checked the current perf numbers missing label and hosted checks.
  • Compared the report with the performance-report rule in CONTRIBUTING.md and the bot's requested fields.

Results

Item Result
Same scene, title, machine, and GPU
Reported valuesUncharted 4 prison yard; PPSA05684; Core i9-14900KF; RTX 4070 Ti SUPER, driver 615.78.08; 54 vs 60 presents in 15 seconds.
Trace attachments and digest output
Reported statusBoth trace links and tools/trace_digest.py sections are present.
Required baseline and candidate commits
Reported valuesBoth summary lines identify commit 4fd12fcaa9d4 with dirty:true; the only reported difference is APS5_GUEST_AFFINITY.
Hosted CI
Raw statuseswindows pass; conventions pass; labels pass; eligibility pass; intake pass; report pass; linux skipping; register-context skipping; relinker skipping; relinker-asan skipping; write-watch skipping

Negative control

Your comment reports guest_thread_host_affinity passes on the i9-14900KF and fails with main's Thread.cpp. That supports the functional change; it does not make the performance capture without the variable a capture from main.

Findings

Blocking

  • The repository rule requires a summary line from main and one from the change, using the same title, scene, and machine. The two lines currently come from the same dirty stack commit, so the perf numbers missing label correctly remains. The code-path equivalence you describe is a useful controlled toggle comparison, but it does not satisfy the required baseline provenance.

Non-blocking

  • The reported A/B numbers are directionally useful (54 vs 60 presents; p50 274.7 vs 248.8 ms), with the caveat that both trace digests report dropped trace events.

Sources

  • PR report reviewed at d74683cb2b088c1d2c596e47b92a437cd4dd994e.
  • CONTRIBUTING.md at current main 3a2b91981651569163768854a1fcdc7193b6667b.

Not verified

I did not run the game, rebuild either capture, or independently run tools/trace_digest.py. I am assessing the attached report and the required provenance, not independently validating its measurements.

To get this to a good state

Please provide a capture and summary line from a clean/current main build and a capture and summary line from the PR change, with the same title, scene, and machine; retain the trace attachments and digest output for both. If the scene cannot be reached on main, document that limitation and coordinate with maintainers on an acceptable report before relying on the perf label.

APS5_GUEST_AFFINITY=1 pins every guest thread to the efficiency cores of a
hybrid CPU (APS5_GUEST_AFFINITY_MASK=<hex> picks the cores), leaving the
performance cores the queue workers are pinned to free of the title's
spinning job workers.
@XairRrR
XairRrR force-pushed the perf/libkernel-guest-thread-affinity branch from d74683c to fda3f6c Compare October 29, 2026 01:20
@XairRrR

XairRrR commented Oct 29, 2026

Copy link
Copy Markdown
Contributor Author

@MarcZX10 @adriadam10 the description now holds captures from clean builds, as asked:

  • main 3a2b919: 54 presents in 15 s, frame p50 278.5 ms.
  • This branch, rebased on it (fda3f6c), with APS5_GUEST_AFFINITY=1: 62 presents in 15 s, frame p50 243.6 ms.

Both are from the same machine and the same prison yard fight, with "dirty": false. Both summary lines, both traces and both trace_digest.py outputs are in the description.

The windows differ (195:15 and 115:15) because main reaches the steady fight about 75 s later after the first present. The 10 s intervals around each window show it is the steady fight on both builds: 35 to 37 presents on main, 40 to 42 on the branch.

guest_thread_host_affinity and the guest_pthread* tests pass on the rebased head (56/56).

AI-assisted: yes

@github-actions github-actions Bot removed the perf numbers missing perf pull request without a before and after summary line label Oct 29, 2026

@MarcZX10 MarcZX10 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Re-checked — changes requested for the performance report

The code branch is now based on current main, and the new captures match their summary lines, but both captures use extra APS5_TRACE_* switches excluded by the required performance protocol.

What I ran

  • Reviewed exact head fda3f6ca6c0cbf3370ecd5fb580312f707ecc082 against main 3a2b91981651569163768854a1fcdc7193b6667b.
  • git diff --check upstream/main...refs/remotes/review/12544.
  • git merge-tree --write-tree upstream/main refs/remotes/review/12544.
  • python3 tools/check_conventions.py --base upstream/main --head refs/remotes/review/12544.
  • Downloaded the two attached trace assets and ran python3 tools/trace_digest.py <trace> --frames 2 --top 3, matching each provided summary line to its trace.

Results

Check Result
Current-main merge preview Clean; tree f0e052678e77fe66adfbceccab77b3f6ba4ce16c
Diff check Passed; no output
Conventions Passed
Main trace digest 54 presents; p50 278.5 ms; summary matches the attached trace; trace reports dropped events
Change trace digest 62 presents; p50 243.6 ms; summary matches the attached trace; trace reports dropped events
Updated-head focused tests 56/56 for guest_thread_host_affinity and guest_pthread*, author-reported; not rerun locally
Hosted checks at review time Windows build pending; Linux product and specialized jobs skipped; conventions, labels, eligibility, and report passed
Raw trace-digest output excerpts
**seconds 195:15** from present 2391: 54 presents, frame p50 278.5 / p90 313.4 / p99 342.6 / max 342.6 ms, GPU busy 93.2 ms per present
NVIDIA GeForce RTX 4070 Ti SUPER, NVIDIA 615.78.08, Linux 7.2.11-zen1-1-zen, 2560x1440, commit 3a2b91981651, dropped: yes
**seconds 115:15** from present 2238: 62 presents, frame p50 243.6 / p90 264.0 / p99 335.2 / max 335.2 ms, GPU busy 89.7 ms per present
NVIDIA GeForce RTX 4070 Ti SUPER, NVIDIA 615.78.08, Linux 7.2.11-zen1-1-zen, 2560x1440, commit fda3f6ca6c0c, dropped: yes

Negative control

No independent negative control was run on this rebased head. My prior local run on the earlier head built the test executable but stopped at the project CPU-feature guard before its assertions.

Findings

Blocking

  • Both summary lines set APS5_TRACE_SUMMARY_EVERY=10 and APS5_TRACE_DIR=<path>. The repository’s Performance report form requires no additional APS5_TRACE_* or APS5_PROFILE_* switches. Please recapture main and this head with only the required capture setting, then replace the summaries, traces, and digests. Both current digests also report dropped trace events; please check whether the prescribed recapture avoids that loss.

Non-blocking

  • The rebase brings the branch directly onto current main and preserves the single-topic diff. I independently checked the trace files and summary records, but did not rerun the affinity CTests on this host.
  • The reported single-run p50 improves from 278.5 ms to 243.6 ms; I am not treating that number as independently reproduced.

Sources

Not verified

  • Affinity assertions on this host or on a hybrid CPU.
  • PS5 behavior.
  • The updated hosted Windows build, which was pending when checked.
  • The reported title run independently.

To get this to a good state

Recapture both builds with the documented capture settings and no extra trace/profile switches, include the refreshed summary lines, traces, and digests, and confirm the digests no longer report dropped events if possible. I will recheck the updated report and hosted build on the new head.

@XairRrR

XairRrR commented Oct 29, 2026

Copy link
Copy Markdown
Contributor Author

@MarcZX10 recaptured as the form describes, and the description holds the new pair:

  • Clean main 3a2b919 and this branch fda3f6c, same machine and session, warm caches.
  • APS5_TRACE_SECONDS=195:8 only, with no other APS5_TRACE_* or APS5_PROFILE_* switch. The environments differ only in APS5_GUEST_AFFINITY.
  • main: 28 presents in 8 s, frame p50 282.4 ms. This branch: 32 presents, p50 250.1 ms.
  • Neither trace drops events: the 8 s window keeps queue 0 inside its default buffer.

The summary lines, traces and digests in the description are replaced. One point I can't meet literally: the launch script writes the log to a file in both runs. The logger reports 0.2 to 4.4 KiB per 10 s there.

AI-assisted: yes

@MarcZX10 MarcZX10 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Re-checked — changes requested

I reviewed the performance report at exact head fda3f6ca6c0cbf3370ecd5fb580312f707ecc082. The new main-versus-change pair fixes the commit-provenance problem from my prior review, and both published digest sections reproduce exactly. Two capture-form requirements remain unmet.

What I ran

On Linux, I downloaded the two trace assets linked by the PR and ran the trace_digest.py version from current main (3a2b91981651569163768854a1fcdc7193b6667b) with each matching summary line extracted from the PR description:

python3 tools/trace_digest.py aps5-trace-3a2b91981651-1495087.json.gz --summary main-summary.jsonl
python3 tools/trace_digest.py aps5-trace-fda3f6ca6c0c-1527350.json.gz --summary pr-summary.jsonl

I also checked the current performance-report form and hosted checks. I did not rebuild the project or rerun the game or unit tests.

Results

Check Result
Baseline/candidate provenance Summary lines identify clean main 3a2b91981651 and clean PR commit fda3f6ca6c0c
Capture match Both summaries report the same title, scene, machine, GPU, driver, resolution, and capture window; the reported environment difference is APS5_GUEST_AFFINITY
Trace integrity/digest Both traces report no dropped events; both independently generated digest outputs exactly match the PR's posted outputs
Trace attachment The two files are linked from a separate fork release; they are not attached to this PR as the form requests
Capture logging The PR says the launch script writes the log to a file, contrary to the form's instruction not to redirect it
Hosted checks Windows, conventions, labels, eligibility, and report pass; Linux and specialized jobs are skipped
Focused tests The description reports 56/56 guest_thread_host_affinity and guest_pthread* tests on the rebased head; I did not rerun them

Negative control

The main capture is the requested baseline: 28 presents and 282.4 ms frame-time p50. The candidate reports 32 presents and 250.1 ms p50. This review verifies the supplied trace and summary artifacts, not an independently repeated performance run.

Findings

Blocking

  • The traces are not attached to the PR. The current form asks for each aps5-trace-<commit>-<pid>.json.gz to be attached in its Traces field. The description instead links the assets from a separate fork release. Please attach both files to this PR.
  • The capture log was redirected. The form explicitly says not to redirect the log because it costs time, and the report says the launcher wrote it to a file for both captures. Please recapture without redirecting the log, then replace the affected summary lines, trace attachments, and digest output. If maintainers want to accept an exception, that decision should be recorded before treating this as a compliant performance report.

Non-blocking

  • The actual paired data is internally consistent: the exact trace digests match the posted output, and neither trace reports dropped events.
  • The hosted Linux and specialized checks were skipped; the Windows workflow passed. The reported focused test result is useful but was not independently rerun here.

Sources

Not verified

I did not build the PR, rerun its CTest targets, or reproduce the game captures. Linux and specialized hosted jobs were skipped.

To get this to a good state

Attach both traces directly to the PR and provide a fresh pair captured without log redirection, with matching summary lines and newly generated digests. Then I can recheck the report against the same requirements.

@MarcZX10

Copy link
Copy Markdown
Contributor

{"body": "# Re-checked \u2014 new head, changes requested\n\nThis evidence addendum is for exact PR head fda3f6ca6c0cbf3370ecd5fb580312f707ecc082; the pair and digests validate, while the trace attachment and log-capture requirements remain outstanding.\n\n## What I ran\n\nEnvironment: Linux 6.1.0-54-amd64 x86_64, Python 3.11.2, GitHub CLI 2.23.0. No C++ compiler or product build was used.\n\n~~~sh\ngh release download perf-12544-traces --repo XairRrR/AnyPS5 --dir /tmp/anyps5-review-12544-assets --skip-existing\ncurl -fsSL https://raw.githubusercontent.com/boykopovar/AnyPS5/3a2b91981651569163768854a1fcdc7193b6667b/tools/trace_digest.py -o /tmp/anyps5-review-12544-assets/trace_digest.py\npython3 /tmp/anyps5-review-12544-assets/trace_digest.py /tmp/anyps5-review-12544-assets/aps5-trace-3a2b91981651-1495087.json.gz --summary /tmp/anyps5-review-12544-assets/main-summary.jsonl\npython3 /tmp/anyps5-review-12544-assets/trace_digest.py /tmp/anyps5-review-12544-assets/aps5-trace-fda3f6ca6c0c-1527350.json.gz --summary /tmp/anyps5-review-12544-assets/pr-summary.jsonl\ngh pr checks 12544 --repo boykopovar/AnyPS5\n~~~\n\nThe summary JSONL files came from the corresponding 8-second summary lines in the PR description. I checked the PR body for trace attachments and read the author\u2019s note about logging; I did not recapture either run.\n\n## Results\n\n| Check | Result |\n|---|---|\n| Baseline/candidate summaries | Clean commits 3a2b91981651 and fda3f6ca6c0c; same title, scene, machine, GPU, driver, resolution, and 8-second window; reported environment difference is APS5_GUEST_AFFINITY |\n| Trace parsing | 27 and 31 frames parsed; each digest exactly matches the corresponding posted output |\n| Dropped events | Neither trace reports dropped events |\n| Trace attachment | Zero GitHub user-attachment URLs in the PR body; the trace files are linked from a separate fork release |\n| Log capture | The PR says the launcher writes the log to a file in both captures; the form says not to redirect the log |\n| Hosted checks | Windows, conventions, labels, eligibility, and report pass; Linux and specialized jobs skip |\n| Focused tests | The PR description reports 56/56 affinity and pthread tests on the rebased head; not independently rerun here |\n\n

Raw trace-digest output\n\n~~~text\nseconds 195:8 from present 2410: 28 presents, frame p50 282.4 / p90 308.3 / p99 359.7 / max 359.7 ms, GPU busy 104.7 ms per present\nNVIDIA GeForce RTX 4070 Ti SUPER, NVIDIA 615.78.08, Linux 7.2.11-zen1-1-zen, 2560x1440, commit 3a2b919, dropped: no\n\njson\n{\"commit\":\"3a2b91981651\",\"dirty\":false,\"env\":{\"APS5_DISPATCH_CACHE_ENTRIES\":\"4096\",\"APS5_DUMP_FRAMES\":\"0\",\"APS5_DUMP_FRAMES_EVERY\":\"99999\",\"APS5_HOST_IMPORT_MIB\":\"16384\",\"APS5_IMAGE_TABLE_KEY_SCAN\":\"262144\",\"APS5_LAZY_SHADER_PREPARE\":\"1\",\"APS5_LOCAL_NULL_INVALID_BUFFERS\":\"1\",\"APS5_LOCAL_REBASE_HUGE_ARRAYS\":\"1\",\"APS5_NO_LIBRARY_PREBUILD\":\"1\",\"APS5_NO_PIPELINE_LTO\":\"1\",\"APS5_NO_SNAPSHOT_CHECK\":\"1\",\"APS5_PAD_INPUT_FILE\":\"<path>\",\"APS5_TRACE_SECONDS\":\"195:8\"},\"gpu\":\"NVIDIA GeForce RTX 4070 Ti SUPER\",\"driver\":\"NVIDIA 615.78.08\",\"os\":\"Linux 7.2.11-zen1-1-zen\",\"cpu\":\"Intel(R) Core(TM) i9-14900KF\",\"cpu_threads\":32,\"memory_mib\":31906,\"title_id\":\"PPSA05684\",\"title\":\"Uncharted\\u2122: Legacy of Thieves Collection\",\"content_version\":\"01.002.000\",\"resolution\":\"2560x1440\",\"window\":{\"spec\":\"seconds 195:8\",\"first_present\":2410,\"ms\":8012.792},\"presents\":28,\"frame_ms\":{\"p50\":282.42,\"p90\":308.327,\"p99\":359.737,\"max\":359.737},\"gpu_busy_ms_per_present\":104.734,\"worker_busy_pct\":{\"queue worker 0x0\":72.598,\"queue worker 0x43\":77.285,\"queue worker 0x21\":12.541,\"queue worker 0x50\":0.192,\"queue worker 0x52\":0.244,\"queue worker 0x29\":20.896,\"queue worker 0x56\":96.338,\"queue worker 0x31\":36.244,\"queue worker 0x39\":45.045,\"queue worker 0x49\":19.195,\"queue worker 0x41\":35.466},\"top_phases_ms_per_frame\":{\"Driver.Packet\":1186.075,\"Driver.Packet.memory_wait\":758.571,\"Driver.Packet.dispatch\":276.247,\"Driver.Dispatch\":244.039,\"Driver.Packet.draw\":118.164,\"Driver.Draw\":117.662,\"Graphics.Draw\":96.348,\"Graphics.Draw.draw_and_resource_release\":92.135},\"trace_dropped\":false,\"trace\":\"aps5-trace-3a2b91981651-1495087.json.gz\"}\n\n\nSlowest frames (largest slices inside each, inclusive)\n\n- present 2412: 359.7 ms at 561 ms: Driver.Packet (queue worker 0x56) 359.5, Driver.WorkerWait (queue worker 0x52) 359.2, Driver.WorkerWait (queue worker 0x50) 358.7, Driver.Packet.memory_wait (queue worker 0x56) 357.5\n- present 2431: 342.6 ms at 5988 ms: Driver.WorkerWait (queue worker 0x52) 342.6, Driver.Packet (queue worker 0x56) 342.4, Driver.Packet (queue worker 0x31) 342.0, Driver.WorkerWait (queue worker 0x50) 341.9\n- present 2417: 308.3 ms at 2009 ms: Driver.Packet (queue worker 0x56) 308.2, Driver.WorkerWait (queue worker 0x52) 307.7, Driver.WorkerWait (queue worker 0x50) 307.6, Driver.Packet (queue worker 0x39) 307.4\n- present 2426: 305.1 ms at 4539 ms: Driver.Packet (queue worker 0x56) 304.9, Driver.WorkerWait (queue worker 0x52) 304.6, Driver.WorkerWait (queue worker 0x50) 304.5, Driver.Packet (queue worker 0x41) 304.4\n- present 2432: 300.0 ms at 6330 ms: Driver.Packet (queue worker 0x56) 299.8, Driver.WorkerWait (queue worker 0x52) 299.3, Driver.Packet (queue worker 0x39) 299.2, Driver.WorkerWait (queue worker 0x50) 298.5\n\nThreads (ms per frame)\n\n| thread | busy | wait | untraced | in slices < 20 us | largest |\n|---|---|---|---|---|---|\n| title | 0.1 (0 %) | 0.0 (0 %) | 286.1 | 0.1 | Shader.ResolveGraphicsStagesAbi 0.1 |\n| title | 0.1 (0 %) | 0.0 (0 %) | 286.1 | 0.1 | Shader.ResolveGraphicsStagesAbi 0.1 |\n| title | 0.0 (0 %) | 0.0 (0 %) | 286.1 | 0.1 | Shader.ResolveGraphicsStagesAbi 0.0 |\n| title | 0.1 (0 %) | 0.0 (0 %) | 286.1 | 0.1 | Shader.ResolveGraphicsStagesAbi 0.1 |\n| title | 0.1 (0 %) | 0.0 (0 %) | 286.1 | 0.1 | Shader.ResolveGraphicsStagesAbi 0.1 |\n| title | 0.1 (0 %) | 0.0 (0 %) | 286.1 | 0.1 | Shader.ResolveGraphicsStagesAbi 0.1 |\n| title | 0.1 (0 %) | 0.0 (0 %) | 286.1 | 0.1 | Shader.ResolveGraphicsStagesAbi 0.1 |\n| title | 0.1 (0 %) | 0.0 (0 %) | 286.1 | 0.1 | Shader.ResolveGraphicsStagesAbi 0.1 |\n| title | 0.1 (0 %) | 0.0 (0 %) | 286.1 | 0.1 | Shader.ResolveGraphicsStagesAbi 0.1 |\n| title | 0.1 (0 %) | 0.0 (0 %) | 286.1 | 0.1 | Shader.ResolveGraphicsStagesAbi 0.1 |\n| title | 0.1 (0 %) | 0.0 (0 %) | 286.1 | 0.1 | Shader.ResolveGraphicsStagesAbi 0.1 |\n| title | 0.1 (0 %) | 0.0 (0 %) | 286.1 | 0.1 | Shader.ResolveGraphicsStagesAbi 0.1 |\n| queue worker 0x0 | 140.2 (49 %) | 114.5 (40 %) | 31.4 | 158.5 | Driver.Packet 179.0, Driver.Rewind 0.3 |\n| title | 0.1 (0 %) | 0.0 (0 %) | 286.1 | 0.1 | Shader.ResolveGraphicsStagesAbi 0.1 |\n| draw committer | 45.4 (16 %) | 0.7 (0 %) | 240.1 | 25.8 | Graphics.Draw 35.0, Recorder.Sync 9.6 |\n| presenter | 0.7 (0 %) | 0.5 (0 %) | 284.9 | 0.1 | VideoOut.Flip 1.1, Driver.Present 0.2 |\n| queue worker 0x43 | 79.8 (28 %) | 203.3 (71 %) | 3.1 | 3.3 | Driver.Packet 220.0, Driver.EndSubmission 0.3 |\n| shader prepare | 0.0 (0 %) | 0.0 (0 %) | 286.2 | 0.0 | Vulkan.ComputePipeline 0.0 |\n| shader prepare | 0.0 (0 %) | 0.0 (0 %) | 286.2 | 0.0 | Vulkan.ComputePipeline 0.0 |\n| shader prepare | 0.0 (0 %) | 0.0 (0 %) | 286.2 | 0.0 | Vulkan.ComputePipeline 0.0 |\n| shader prepare | 0.0 (0 %) | 0.0 (0 %) | 286.2 | 0.0 | Vulkan.ComputePipeline 0.0 |\n| shader prepare | 0.0 (0 %) | 0.0 (0 %) | 286.2 | 0.0 | Vulkan.ComputePipeline 0.0 |\n| shader prepare | 0.0 (0 %) | 0.0 (0 %) | 286.2 | 0.0 | Vulkan.ComputePipeline 0.0 |\n| shader prepare | 0.0 (0 %) | 0.0 (0 %) | 286.2 | 0.0 | Vulkan.ComputePipeline 0.0 |\n| shader prepare | 0.0 (0 %) | 0.0 (0 %) | 286.2 | 0.0 | Vulkan.ComputePipeline 0.0 |\n| shader prepare | 0.0 (0 %) | 0.0 (0 %) | 286.2 | 0.0 | Vulkan.ComputePipeline 0.0 |\n| shader prepare | 0.0 (0 %) | 0.0 (0 %) | 286.2 | 0.0 | Vulkan.ComputePipeline 0.0 |\n| shader prepare | 0.0 (0 %) | 0.0 (0 %) | 286.2 | 0.0 | Vulkan.ComputePipeline 0.0 |\n| queue worker 0x21 | 14.7 (5 %) | 268.9 (94 %) | 2.5 | 6.2 | Driver.Packet 35.0, Driver.EndSubmission 0.5 |\n| queue worker 0x50 | 0.4 (0 %) | 275.9 (96 %) | 9.9 | 0.2 | Driver.Packet 0.4, Driver.EndSubmission 0.0 |\n| queue worker 0x52 | 0.4 (0 %) | 275.9 (96 %) | 9.9 | 0.2 | Driver.Packet 0.6 |\n| queue worker 0x29 | 15.0 (5 %) | 261.2 (91 %) | 10.0 | 6.2 | Driver.Packet 58.9, Driver.EndSubmission 0.5 |\n| queue worker 0x56 | 1.2 (0 %) | 274.3 (96 %) | 10.6 | 0.9 | Driver.Packet 275.5, Driver.EndSubmission 0.0 |\n| queue worker 0x31 | 15.2 (5 %) | 261.3 (91 %) | 9.7 | 6.1 | Driver.Packet 102.5, Driver.EndSubmission 0.8 |\n| queue worker 0x39 | 14.7 (5 %) | 262.2 (92 %) | 9.3 | 6.1 | Driver.Packet 127.9, Driver.EndSubmission 0.7 |\n| queue worker 0x49 | 11.2 (4 %) | 265.5 (93 %) | 9.5 | 4.4 | Driver.Packet 54.1, Driver.EndSubmission 0.5 |\n| queue worker 0x41 | 14.4 (5 %) | 269.3 (94 %) | 2.5 | 6.0 | Driver.Packet 100.6, Driver.EndSubmission 0.5 |\n| gpu | 104.5 (37 %) | 0.0 (0 %) | 181.7 | 0.0 | batch 104.5 |\n\nLargest slices (ms per frame, inclusive, all threads): Driver.WorkerWait 1880.2, Driver.WorkerWait.dequeue_order 1848.5, Driver.Packet 1154.7, Driver.Packet.memory_wait 758.2, Driver.Packet.dispatch 274.9, Driver.Dispatch 237.3, batch 104.5, Driver.Packet.draw 102.6, Driver.Draw 102.3, Graphics.Draw 84.3\n\nLongest waits\n\n- Driver.WorkerWait (queue worker 0x52) 396.9 ms at 5933 ms, present 2430\n- Driver.WorkerWait (queue worker 0x52) 359.3 ms at 561 ms, present 2412\n- Driver.Packet.memory_wait (queue worker 0x56) 355.7 ms at 363 ms, present 2411\n- Driver.WorkerWait (queue worker 0x50) 341.9 ms at 5988 ms, present 2431\n- Driver.WorkerWait (queue worker 0x49) 334.7 ms at 586 ms, present 2412\n- Driver.Packet.memory_wait (queue worker 0x56) 330.8 ms at 6073 ms, present 2431\n- Driver.WorkerWait (queue worker 0x50) 330.5 ms at 874 ms, present 2412\n- Driver.WorkerWait (queue worker 0x50) 325.4 ms at 1429 ms, present 2414\n- Driver.WorkerWait (queue worker 0x29) 322.7 ms at 598 ms, present 2412\n- Driver.Packet.memory_wait (queue worker 0x41) 317.4 ms at 6026 ms, present 2431\n\nLargest GPU batches (GPU ranges inside, and the CPU slices that recorded each, inclusive)\n\n- batch 662: 6.4 ms at 1521 ms, present 2415: GPU no ranges; recorded by Driver.WorkerWait (queue worker 0x0) 29.6, Driver.WorkerWait.dequeue_order (queue worker 0x0) 29.6, Driver.Packet (queue worker 0x0) 2.6, Driver.Packet.pipeline_drain (queue worker 0x0) 1.3\n- batch 358: 6.1 ms at 863 ms, present 2412: GPU no ranges; recorded by Driver.Packet (queue worker 0x0) 7.4, Driver.Packet.draw (queue worker 0x0) 6.4, Driver.Draw (queue worker 0x0) 6.4, Driver.Draw.shader_compile_and_link (queue worker 0x0) 3.4\n- batch 2184: 6.1 ms at 4894 ms, present 2427: GPU no ranges; recorded by Recorder.Submit (draw committer) 2.0, Recorder.Reap (draw committer) 0.1, Graphics.Draw (draw committer) 0.0, Graphics.Draw.draw_and_resource_release (draw committer) 0.0\n- batch 3183: 6.0 ms at 7212 ms, present 2435: GPU no ranges; recorded by Driver.WorkerWait (queue worker 0x0) 44.8, Driver.WorkerWait.dequeue_order (queue worker 0x0) 44.8, Driver.Packet (queue worker 0x0) 2.9, Driver.Packet.draw (queue worker 0x0) 1.2\n- batch 2435: 6.0 ms at 5445 ms, present 2429: GPU no ranges; recorded by Driver.WorkerWait (queue worker 0x0) 46.0, Driver.WorkerWait.dequeue_order (queue worker 0x0) 46.0, Driver.Packet (queue worker 0x0) 1.9, Driver.Packet.pipeline_drain (queue worker 0x0) 0.8\n\n\nseconds 195:8 from present 2503: 32 presents, frame p50 250.1 / p90 278.1 / p99 302.5 / max 302.5 ms, GPU busy 93.9 ms per present\nNVIDIA GeForce RTX 4070 Ti SUPER, NVIDIA 615.78.08, Linux 7.2.11-zen1-1-zen, 2560x1440, commit fda3f6c, dropped: no\n\njson\n{\"commit\":\"fda3f6ca6c0c\",\"dirty\":false,\"env\":{\"APS5_DISPATCH_CACHE_ENTRIES\":\"4096\",\"APS5_DUMP_FRAMES\":\"0\",\"APS5_DUMP_FRAMES_EVERY\":\"99999\",\"APS5_GUEST_AFFINITY\":\"1\",\"APS5_HOST_IMPORT_MIB\":\"16384\",\"APS5_IMAGE_TABLE_KEY_SCAN\":\"262144\",\"APS5_LAZY_SHADER_PREPARE\":\"1\",\"APS5_LOCAL_NULL_INVALID_BUFFERS\":\"1\",\"APS5_LOCAL_REBASE_HUGE_ARRAYS\":\"1\",\"APS5_NO_LIBRARY_PREBUILD\":\"1\",\"APS5_NO_PIPELINE_LTO\":\"1\",\"APS5_NO_SNAPSHOT_CHECK\":\"1\",\"APS5_PAD_INPUT_FILE\":\"<path>\",\"APS5_TRACE_SECONDS\":\"195:8\"},\"gpu\":\"NVIDIA GeForce RTX 4070 Ti SUPER\",\"driver\":\"NVIDIA 615.78.08\",\"os\":\"Linux 7.2.11-zen1-1-zen\",\"cpu\":\"Intel(R) Core(TM) i9-14900KF\",\"cpu_threads\":32,\"memory_mib\":31906,\"title_id\":\"PPSA05684\",\"title\":\"Uncharted\\u2122: Legacy of Thieves Collection\",\"content_version\":\"01.002.000\",\"resolution\":\"2560x1440\",\"window\":{\"spec\":\"seconds 195:8\",\"first_present\":2503,\"ms\":8103.759},\"presents\":32,\"frame_ms\":{\"p50\":250.076,\"p90\":278.09,\"p99\":302.491,\"max\":302.491},\"gpu_busy_ms_per_present\":93.863,\"worker_busy_pct\":{\"queue worker 0x0\":73.316,\"queue worker 0x43\":77.34,\"queue worker 0x21\":10.509,\"queue worker 0x52\":0.25,\"queue worker 0x50\":0.187,\"queue worker 0x29\":9.595,\"queue worker 0x56\":96.463,\"queue worker 0x49\":35.609,\"queue worker 0x41\":32.881,\"queue worker 0x31\":14.157,\"queue worker 0x39\":43.454},\"top_phases_ms_per_frame\":{\"Driver.Packet\":993.112,\"Driver.Packet.memory_wait\":620.976,\"Driver.Packet.dispatch\":235.123,\"Driver.Dispatch\":205.303,\"Driver.Packet.draw\":107.265,\"Driver.Draw\":106.82,\"Graphics.Draw\":86.683,\"Graphics.Draw.draw_and_resource_release\":82.868},\"trace_dropped\":false,\"trace\":\"aps5-trace-fda3f6ca6c0c-1527350.json.gz\"}\n\n\nSlowest frames (largest slices inside each, inclusive)\n\n- present 2534: 302.5 ms at 7801 ms: Driver.Packet (queue worker 0x39) 230.9, Driver.Packet (queue worker 0x43) 224.8, Driver.Packet (queue worker 0x0) 191.6, Driver.WorkerWait (queue worker 0x21) 191.3\n- present 2503: 291.2 ms at 0 ms: Driver.WorkerWait (queue worker 0x52) 290.5, Driver.WorkerWait (queue worker 0x50) 290.5, Driver.WorkerWait.dequeue_order (queue worker 0x50) 281.6, Driver.WorkerWait.dequeue_order (queue worker 0x52) 281.4\n- present 2520: 282.3 ms at 4240 ms: Driver.Packet (queue worker 0x56) 282.1, Driver.Packet (queue worker 0x49) 281.8, Driver.WorkerWait (queue worker 0x52) 281.8, Driver.WorkerWait (queue worker 0x50) 281.8\n- present 2532: 278.1 ms at 7263 ms: Driver.Packet (queue worker 0x56) 278.0, Driver.Packet (queue worker 0x49) 277.9, Driver.WorkerWait (queue worker 0x52) 277.5, Driver.WorkerWait (queue worker 0x50) 277.5\n- present 2531: 273.8 ms at 6989 ms: Driver.Packet (queue worker 0x56) 273.6, Driver.WorkerWait (queue worker 0x50) 273.3, Driver.WorkerWait (queue worker 0x52) 273.2, Driver.Packet.memory_wait (queue worker 0x56) 271.8\n\nThreads (ms per frame)\n\n| thread | busy | wait | untraced | in slices < 20 us | largest |\n|---|---|---|---|---|---|\n| title | 0.1 (0 %) | 0.0 (0 %) | 253.2 | 0.1 | Shader.ResolveGraphicsStagesAbi 0.1 |\n| title | 0.1 (0 %) | 0.0 (0 %) | 253.2 | 0.1 | Shader.ResolveGraphicsStagesAbi 0.1 |\n| title | 0.1 (0 %) | 0.0 (0 %) | 253.2 | 0.1 | Shader.ResolveGraphicsStagesAbi 0.1 |\n| title | 0.1 (0 %) | 0.0 (0 %) | 253.2 | 0.1 | Shader.ResolveGraphicsStagesAbi 0.1 |\n| title | 0.1 (0 %) | 0.0 (0 %) | 253.2 | 0.1 | Shader.ResolveGraphicsStagesAbi 0.1 |\n| title | 0.1 (0 %) | 0.0 (0 %) | 253.1 | 0.1 | Shader.ResolveGraphicsStagesAbi 0.1 |\n| title | 0.1 (0 %) | 0.0 (0 %) | 253.1 | 0.1 | Shader.ResolveGraphicsStagesAbi 0.1 |\n| title | 0.1 (0 %) | 0.0 (0 %) | 253.1 | 0.1 | Shader.ResolveGraphicsStagesAbi 0.1 |\n| title | 0.1 (0 %) | 0.0 (0 %) | 253.2 | 0.1 | Shader.ResolveGraphicsStagesAbi 0.1 |\n| title | 0.1 (0 %) | 0.0 (0 %) | 253.2 | 0.1 | Shader.ResolveGraphicsStagesAbi 0.1 |\n| title | 0.1 (0 %) | 0.0 (0 %) | 253.2 | 0.1 | Shader.ResolveGraphicsStagesAbi 0.1 |\n| title | 0.1 (0 %) | 0.0 (0 %) | 253.1 | 0.1 | Shader.ResolveGraphicsStagesAbi 0.1 |\n| queue worker 0x0 | 127.3 (50 %) | 97.0 (38 %) | 28.9 | 152.3 | Driver.Packet 159.1, Driver.Rewind 0.3 |\n| title | 0.1 (0 %) | 0.0 (0 %) | 253.2 | 0.1 | Shader.ResolveGraphicsStagesAbi 0.1 |\n| presenter | 0.4 (0 %) | 0.2 (0 %) | 252.7 | 0.1 | VideoOut.Flip 0.6, Driver.Present 0.0 |\n| draw committer | 39.8 (16 %) | 0.6 (0 %) | 212.9 | 25.1 | Graphics.Draw 30.4, Recorder.Sync 8.6 |\n| queue worker 0x43 | 68.1 (27 %) | 182.1 (72 %) | 3.1 | 3.3 | Driver.Packet 194.9, Driver.EndSubmission 0.1 |\n| shader prepare | 0.0 (0 %) | 0.0 (0 %) | 253.2 | 0.0 | Vulkan.ComputePipeline 0.0 |\n| shader prepare | 0.0 (0 %) | 0.0 (0 %) | 253.2 | 0.0 | Vulkan.ComputePipeline 0.0 |\n| shader prepare | 0.0 (0 %) | 0.0 (0 %) | 253.2 | 0.0 | Vulkan.ComputePipeline 0.0 |\n| shader prepare | 0.0 (0 %) | 0.0 (0 %) | 253.2 | 0.0 | Vulkan.ComputePipeline 0.0 |\n| shader prepare | 0.0 (0 %) | 0.0 (0 %) | 253.2 | 0.0 | Vulkan.ComputePipeline 0.0 |\n| shader prepare | 0.0 (0 %) | 0.0 (0 %) | 253.2 | 0.0 | Vulkan.ComputePipeline 0.0 |\n| shader prepare | 0.0 (0 %) | 0.0 (0 %) | 253.2 | 0.0 | Vulkan.ComputePipeline 0.0 |\n| shader prepare | 0.0 (0 %) | 0.0 (0 %) | 253.2 | 0.0 | Vulkan.ComputePipeline 0.0 |\n| shader prepare | 0.0 (0 %) | 0.0 (0 %) | 253.2 | 0.0 | Vulkan.ComputePipeline 0.0 |\n| shader prepare | 0.0 (0 %) | 0.0 (0 %) | 253.2 | 0.0 | Vulkan.ComputePipeline 0.0 |\n| shader prepare | 0.0 (0 %) | 0.0 (0 %) | 253.2 | 0.0 | Vulkan.ComputePipeline 0.0 |\n| shader prepare | 0.0 (0 %) | 0.0 (0 %) | 253.2 | 0.0 | Vulkan.ComputePipeline 0.0 |\n| shader prepare | 0.0 (0 %) | 0.0 (0 %) | 253.2 | 0.0 | Vulkan.ComputePipeline 0.0 |\n| queue worker 0x21 | 12.8 (5 %) | 238.0 (94 %) | 2.4 | 6.1 | Driver.Packet 25.5, Driver.EndSubmission 0.7 |\n| queue worker 0x52 | 0.4 (0 %) | 244.5 (97 %) | 8.3 | 0.2 | Driver.Packet 0.6, Driver.EndSubmission 0.0 |\n| queue worker 0x50 | 0.3 (0 %) | 244.6 (97 %) | 8.3 | 0.3 | Driver.Packet 0.3, Driver.EndSubmission 0.1 |\n| queue worker 0x29 | 12.5 (5 %) | 232.1 (92 %) | 8.6 | 6.3 | Driver.Packet 23.4, Driver.EndSubmission 0.5 |\n| queue worker 0x56 | 1.1 (0 %) | 243.1 (96 %) | 9.1 | 0.8 | Driver.Packet 244.1, Driver.EndSubmission 0.0 |\n| queue worker 0x49 | 10.5 (4 %) | 234.3 (93 %) | 8.5 | 4.6 | Driver.Packet 89.4, Driver.EndSubmission 0.5 |\n| queue worker 0x41 | 12.0 (5 %) | 232.7 (92 %) | 8.6 | 5.9 | Driver.Packet 82.6, Driver.EndSubmission 0.3 |\n| queue worker 0x31 | 12.7 (5 %) | 232.1 (92 %) | 8.4 | 6.3 | Driver.Packet 34.9, Driver.EndSubmission 0.6 |\n| queue worker 0x39 | 13.5 (5 %) | 237.2 (94 %) | 2.6 | 6.3 | Driver.Packet 109.1, Driver.EndSubmission 0.6 |\n| gpu | 93.9 (37 %) | 0.0 (0 %) | 159.4 | 0.0 | batch 93.9 |\n\nLargest slices (ms per frame, inclusive, all threads): Driver.WorkerWait 1718.2, Driver.WorkerWait.dequeue_order 1684.3, Driver.Packet 963.9, Driver.Packet.memory_wait 620.6, Driver.Packet.dispatch 233.7, Driver.Dispatch 198.5, batch 93.9, Driver.Packet.draw 92.8, Driver.Draw 92.6, Graphics.Draw 74.4\n\nLongest waits\n\n- Driver.WorkerWait (queue worker 0x50) 315.4 ms at 3193 ms, present 2515\n- Driver.WorkerWait (queue worker 0x52) 293.4 ms at 994 ms, present 2506\n- Driver.Packet.memory_wait (queue worker 0x56) 291.0 ms at 4307 ms, present 2520\n- Driver.WorkerWait (queue worker 0x52) 290.5 ms at 1 ms, present 2503\n- Driver.WorkerWait (queue worker 0x50) 290.5 ms at 1 ms, present 2503\n- Driver.Packet.memory_wait (queue worker 0x56) 288.1 ms at 7062 ms, present 2531\n- Driver.WorkerWait (queue worker 0x52) 281.8 ms at 4241 ms, present 2520\n- Driver.WorkerWait (queue worker 0x50) 281.8 ms at 4241 ms, present 2520\n- Driver.Packet.memory_wait (queue worker 0x56) 279.9 ms at 78 ms, present 2503\n- Driver.WorkerWait (queue worker 0x52) 277.5 ms at 7263 ms, present 2532\n\nLargest GPU batches (GPU ranges inside, and the CPU slices that recorded each, inclusive)\n\n- batch 218: 5.5 ms at 482 ms, present 2504: GPU no ranges; recorded by Driver.Packet (queue worker 0x0) 5.7, Driver.Packet.draw (queue worker 0x0) 5.1, Driver.Draw (queue worker 0x0) 5.0, Driver.Draw.shader_compile_and_link (queue worker 0x0) 2.4\n- batch 515: 5.4 ms at 1091 ms, present 2507: GPU no ranges; recorded by no CPU slices\n- batch 1408: 5.2 ms at 2940 ms, present 2514: GPU no ranges; recorded by Driver.Packet (queue worker 0x0) 5.7, Driver.Packet.draw (queue worker 0x0) 5.1, Driver.Draw (queue worker 0x0) 5.1, Driver.Draw.shader_compile_and_link (queue worker 0x0) 2.6\n- batch 266: 5.1 ms at 569 ms, present 2505: GPU no ranges; recorded by no CPU slices\n- batch 1904: 5.1 ms at 3990 ms, present 2519: GPU no ranges; recorded by Driver.Packet (queue worker 0x39) 9.5, Driver.Packet.dispatch (queue worker 0x39) 9.5, Driver.Dispatch (queue worker 0x39) 9.0, GpuMutex.wait.dispatch (queue worker 0x39) 7.2\n~~~\n\n
\n\n
Raw hosted-check output\n\n~~~text\nconventions\tpass\t14s\thttps://github.com/boykopovar/AnyPS5/actions/runs/40806002604/job/123224999334\nlabels\tpass\t7s\thttps://github.com/boykopovar/AnyPS5/actions/runs/40806002950/job/123224999579\nwindows\tpass\t18m48s\thttps://github.com/boykopovar/AnyPS5/actions/runs/40799786629/job/123204892251\nlinux\tskipping\t0\thttps://github.com/boykopovar/AnyPS5/actions/runs/40799786629/job/123204894774\nregister-context\tskipping\t0\thttps://github.com/boykopovar/AnyPS5/actions/runs/40799786629/job/123204894024\nrelinker\tskipping\t0\thttps://github.com/boykopovar/AnyPS5/actions/runs/40799786629/job/123204893949\nrelinker-asan\tskipping\t0\thttps://github.com/boykopovar/AnyPS5/actions/runs/40799786629/job/123204894048\nwrite-watch\tskipping\t0\thttps://github.com/boykopovar/AnyPS5/actions/runs/40799786629/job/123204894216\neligibility\tpass\t4s\thttps://github.com/boykopovar/AnyPS5/actions/runs/40799786629/job/123204856468\nreport\tpass\t49s\thttps://github.com/boykopovar/AnyPS5/actions/runs/40799786707/job/123204856542\n~~~\n\n
\n\n
Raw attachment/log inspection output\n\n~~~text\nattachment URLs: 0\nlog-to-file statement in PR body: True\n~~~\n\n
\n\n## Negative control\n\nNo code-level negative control was run for this report review. The main capture is the supplied baseline (28 presents, frame p50 282.4 ms); the candidate reports 32 presents and p50 250.1 ms. This is reported A/B evidence, not an independently repeated run.\n\n## Findings\n\n### Blocking\n\n- The trace files are not attached to the PR. The form requests each trace in its Traces field. The PR links them from a separate fork release. Please attach both current trace files directly to this PR.\n- The launcher writes the log to a file. The form says not to redirect the log because it costs time. The author\u2019s latest note says the launcher writes it to a file in both runs. Please recapture without redirecting the log and replace the summary lines, traces, and digests. If that cannot be changed, ask the maintainers whether they will accept an exception before relying on this report.\n\n### Non-blocking\n\nThe paired summaries and traces are internally consistent, and the independently generated digests exactly match the posted outputs. The hosted Windows workflow passed; the hosted Linux product job was skipped.\n\n## Sources\n\n- Performance capture form at baseline commit 3a2b91981651569163768854a1fcdc7193b6667b\n- Trace-digest code at the baseline commit\n- PR report at reviewed head fda3f6ca6c0cbf3370ecd5fb580312f707ecc082\n- Main trace asset\n- Candidate trace asset\n- Author\u2019s note about log output\n\n## Not verified\n\nI did not build the PR, run its CTest targets, reproduce the game captures, or independently verify the reported 56 test executions. Linux and specialized hosted jobs are skipped.\n\n## To get this to a good state\n\nAttach both trace files to the PR, recapture without log redirection, and update the summary lines and digest output. I will rerun the same digest commands and recheck hosted status on the new report.\n"}

@Mouhand-Kaddo

Copy link
Copy Markdown
Contributor

Note

🤖 Claude Opus 5.5 responding on behalf of Mouhand-Kaddo

Another title with the same pattern, measured on Linux: moving the spinning job workers to the efficiency cores makes Demon's Souls (PPSA01342) about 15 % faster in the world.

This is not a run of this branch. It is the same idea applied locally on main 88e804b: the 13 BPE JobWorkerThread threads were pinned to the efficiency cores with sched_setaffinity when they start. The live check below (taskset on the running process) gives the same number.

Setup: Intel Core i7-13700K (8 performance cores with 2 threads each, 8 efficiency cores), AMD Radeon RX 6900 XT, RADV Mesa 26.2.6, Linux 7.2.14, Release build. The title was relinked with --to-intel and run with APS5_OUTPUT_RESOLUTION=1920x1080 and APS5_TRACE_SUMMARY_EVERY=20. The scene is Boletarian Palace, "Outpost Passage", standing at the spawn point, with a warm shader cache.

Why it helps here: on main the 13 job workers float over all 24 hardware threads and spin at 90 to 100 % each. A stack sample showed queue worker 0x0 on CPU 4 with a job worker spinning on its sibling CPU 5, and the draw committer on CPU 10 next to another one on CPU 11.

tools/trace_digest.py, steady state in the world, 20 s intervals:

frame p50 p90 p99 GPU busy per present
main (6 intervals) 941 to 968 ms 997 to 1068 ms 1045 to 1130 ms 430 ms
job workers on the efficiency cores (9 intervals) 790 to 803 ms 809 to 870 ms 846 to 991 ms 419 to 457 ms

The live check: in a main run, taskset -p 0xff0000 on the 13 spinning threads moved frame p50 from 941 to 951 ms in the three intervals before to 808 to 844 ms in the four after, in the same session and scene.

The Windows comment on APS5_JOB_AFFINITY in Thread.cpp reports 0 to -9 % at the video stage. In the world on Linux the effect goes the other way for this title. The video stage was not measured here.

@Mouhand-Kaddo

Copy link
Copy Markdown
Contributor

Note

🤖 Claude Opus 5.5 responding on behalf of Mouhand-Kaddo

Follow-up with this branch itself: fda3f6c cherry-picked onto main 88e804b and run with APS5_GUEST_AFFINITY=1 gives frame p50 779 to 786 ms on Demon's Souls, against 941 to 968 ms on main. Same machine and scene as above. The image is correct.

  • guest_thread_host_affinity and cpu_topology pass on this machine.
  • APS5_TRACE_AFFINITY=1 shows the guest threads pinned to 0xff0000, the 8 efficiency cores.
  • Steady intervals, 20 s each, frame p50 / p90: 786.7 / 835.1, 779.4 / 820.4, 785.4 / 832.3, 779.6 / 813.3 ms. GPU busy is 416 to 452 ms per present.
  • The cherry-pick conflicts only in docs/dev/ENVIRONMENT.md with main's new APS5_GAME_MODE row. Keeping both rows resolves it.

@github-actions github-actions Bot removed the needs rebase Conflicts with main, rebase needed label Nov 3, 2026
@oneandonlydean

Copy link
Copy Markdown
Collaborator

Hi adriadam10,

Your change request from 10-28 (at d74683cb2b) asked for the evidence the Performance report form requires. As far as we can tell, the description now holds it at the live head 5b62751c44. Could you take another look?

  • Same title, scene and machine, main and the change: PPSA05684, clean main 3a2b919816 against this branch fda3f6ca6c, same session, warm caches, an 8 s APS5_TRACE_SECONDS window. The only environment difference is APS5_GUEST_AFFINITY=1.
  • Both aps5-summary.jsonl lines are pasted ("commit":"3a2b91981651" and "commit":"fda3f6ca6c0c").
  • tools/trace_digest.py output for each is in the two collapsed sections. Frame p50 / p90 / p99 go from 282.4 / 308.3 / 359.7 ms to 250.1 / 278.1 / 302.5 ms, and GPU busy per present from 104.7 to 93.9 ms.
  • Both traces are linked under "Traces". They are release assets on the author's fork (perf-12544-traces), not GitHub user attachments. MarcZX10 downloaded both on 10-29 and reports that each digest matches the posted output exactly, with no dropped events. If you need them as attachments on this PR, say so and that can be done.
  • fda3f6ca6c is the PR's own commit. The live head adds only a merge of main, whose one hand-resolved file is docs/dev/ENVIRONMENT.md. The head merges cleanly into current main 4f41f4c375.

@TechLevelZero

Copy link
Copy Markdown
Contributor

✅ AMD GPU test: passed

PR head 5b62751 merged onto main 4f41f4c · tested 2026-11-03 14:08 UTC · 30 min

GPU AMD Radeon RX 6300 (RADV NAVI24), driver Mesa 25.2.8-0ubuntu0.24.04.4, Vulkan 1.4.318
Host Ubuntu 26.04.1 LTS, kernel 7.0.0-42-generic, container ubuntu:24.04
Logs build and test logs for this run
Build ✅ passed (Release, -DANYPS5_ENABLE_SPIRV_TOOLS=ON)
Tests ✅ 3,698 passed · 16 failed (0 new, 13 also fail on main, 3 unstable on main) · 60 skipped (ANYPS5_REQUIRE_VULKAN=1)
Test setup CPU-only tests without a GPU; GPU tests (and any CPU-only test that failed or skipped without one) once on the GPU with VK_LAYER_KHRONOS_validation and ANYPS5_NO_SHADER_CACHE=1; main ran the same way
Test selection 3,774 of 3,811 tests run: the ones this change can reach, chosen by tools/select_tests.py from main's build graph
Vulkan validation ✅ no new validation IDs vs main (1334 tests run on the GPU)
Slow tests (>30 s, GPU tests timed with validation layers) ⚠️ agc_driver_graphics_maps_fallback 120.1 s, ⚠️ agc_driver_pipeline_journal 120.1 s, ⚠️ agc_driver_graphics 114.0 s, ⚠️ agc_driver_bda_device 54.6 s, ⚠️ agc_driver_lazy_resolved_abi_switch_set 43.6 s
Unstable on main (3, these also failed in recent main runs on this machine; not counted against this PR)
agc_driver_graphics_maps_fallback: failed in 1 of the last 9 main runs
agc_driver_pipeline_journal: failed in 7 of the last 9 main runs
agc_driver_two_sample_alpha_to_coverage_sample_mask_export: failed in 1 of the last 9 main runs
Failing on main too (13, not counted against this PR)
agc_driver_alpha_to_coverage_sample_mask_export
agc_driver_guest_memory_lifetime_direct
agc_driver_image_table
agc_driver_job_manager_compute_capacity
agc_driver_native_depth_bda_clear
agc_driver_native_depth_buffer_clear
agc_driver_native_depth_clears
agc_driver_native_multisample_depth
agc_driver_submit_progress
agc_submit_progress
agc_submit_progress_no_timeline
guest_mmap_executable
guest_socket_options_multicast
Validation IDs already present on main (4 IDs in 767 tests)
VUID-VkDeviceCreateInfo-pNext-pNext (767 tests): agc_compute_pipeline_replay, agc_driver, agc_driver_address_passes, agc_driver_address_passes_draw_transitions, agc_driver_address_passes_targets_split, agc_driver_alias_copy_label, agc_driver_alpha_to_coverage, agc_driver_alpha_to_coverage_sample_mask_export, and 759 more
VUID-vkCmdCopyImage-srcImage-01548 (12 tests): agc_driver_depth_clear_hle, agc_driver_depth_plane_buffer_memory, agc_driver_depth_plane_cpu_write_after_memo, agc_driver_depth_plane_cpu_write_after_page_unwatch, agc_driver_depth_plane_cpu_write_after_partial_unwatch, agc_driver_depth_plane_partial_store, agc_driver_depth_plane_partial_store_unimported, agc_driver_depth_storage_dispatch, and 4 more
VUID-vkCmdCopyImage-srcImage-01551 (12 tests): agc_driver_depth_clear_hle, agc_driver_depth_plane_buffer_memory, agc_driver_depth_plane_cpu_write_after_memo, agc_driver_depth_plane_cpu_write_after_page_unwatch, agc_driver_depth_plane_cpu_write_after_partial_unwatch, agc_driver_depth_plane_partial_store, agc_driver_depth_plane_partial_store_unimported, agc_driver_depth_storage_dispatch, and 4 more
VUID-VkPipelineColorBlendStateCreateInfo-pAttachments-00605 (1 test): agc_driver_srgb8_color_target
Skipped (60)
agc_driver_bda_reads_shadowed_results: skipped, the device reports watched host memory written when it imports or reads it
agc_driver_bda_reads_shadowed_results_per_build: skipped, the device reports watched host memory written when it imports or reads it
agc_driver_copied_writer_label_order: skipped, the device reports a minStorageBufferOffsetAlignment of 4, so the dispatch binds its record at +0x1004 in place and nothing is written back; the test needs an alignment above 4
agc_driver_copied_writer_label_order_drain: skipped, the device reports a minStorageBufferOffsetAlignment of 4, so the dispatch binds its record at +0x1004 in place and nothing is written back; the test needs an alignment above 4
agc_driver_float16_unused_nan_payloads: skipped, the device has no native f16 conversions with RTE rounding and kept f16 denormals
agc_driver_image_table_vouched_lookups: skipped, the device reports 4 of 4 host-imported pages written after a GPU read, so a watched imported table cannot be vouched for
agc_driver_linear_target_direct_write_completion: skipped, the device does not keep host imports write-watched, so no completion stamp over the target is tracked
agc_driver_ngg_vertex_wave_reduction: skipped, s3 describes a 32-lane wave only on 32-lane subgroups, and the device has 64 lanes
agc_driver_scattered_runs: skipped, host imports are unavailable: /dev/udmabuf is not accessible
agc_driver_sparse_dma_buf_import: skipped, host imports are unavailable: /dev/udmabuf is not accessible
agc_driver_unit_shadow: skipped, the device does not import watched host memory for unit shadows
agc_driver_unit_shadow_budget: skipped, the device does not import watched host memory for unit shadows
agc_driver_vertex_elected_atomic_max: skipped, the device runs vertex programs in subgroups, so they keep their cross-lane reductions
agc_host_import_sparse: skipped, host imports are unavailable: /dev/udmabuf is not accessible
agc_idle_publish_wait: skipped, the device reports 4 of 4 host-imported pages written after a GPU read, so a forced watch of the import reads its submissions as CPU stores
agc_import_settle_initial_dcc: skipped, the device has no deferred settle of host imports: imports under 1 MiB wait for one only on Windows
agc_shadowed_key_stores: skipped, the device imports no watched host memory under a unit shadow
agc_small_tiled_shadow_label: skipped, host imports are unavailable: the test block is not imported and watched
agc_storage_clear_hand_over: skipped, the device imports no watched host memory for the clear-key hand-over
agc_unit_shadow: skipped, the device does not import watched host memory for unit shadows
agc_unit_shadow_completion_store: skipped, the device reports watched host memory written when it imports or reads it
guest_http_uri_locale: 
guest_net_ctl: skipped, the host has no IPv4 address
guest_video_out_color_space: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_hdr: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_high_frame_rate: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_output_mode: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_resolution_status: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_wqhd_detection: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
video_out_flip_aftergpu: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_backtoback: skipped, no display or Vulkan device: DisplayWindow: Vulkan support i
Reproduce
git fetch origin 5b62751c444b5c0af772df0f6ebe43540358875e 4f41f4c375f5abb487dbd184fbc150f31994d762
git checkout 4f41f4c375f5abb487dbd184fbc150f31994d762 && git merge --no-ff 5b62751c444b5c0af772df0f6ebe43540358875e
git submodule update --init --recursive
cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=ON -DANYPS5_ENABLE_SPIRV_TOOLS=ON
cmake --build build && cmake --build build --target libs
VK_DRIVER_FILES=/nonexistent/icd.json ctest --test-dir build -E '^(agc|shader|recompiler|videoout|video_out|guest_video_out|vulkan)|gpu' --timeout 120 --parallel 12 --output-on-failure
ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation \
  ctest --test-dir build -R '^(agc|shader|recompiler|videoout|video_out|guest_video_out|vulkan)|gpu' --timeout 120 --parallel 16 --output-on-failure
# failures are then re-run alone: --timeout 360 --parallel 2; new validation IDs: the test alone, twice, --parallel 1

Automated build and test on a contributor's AMD machine; it does not replace upstream CI. A new comment is posted for each new push. Full logs.

@github-actions github-actions Bot added the needs rebase Conflicts with main, rebase needed label Nov 6, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build docs libkernel needs rebase Conflicts with main, rebase needed perf Performance change unblocks title Names a title ID on the Unblocks line

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants