feat(agc): retain all recorded phase totals in trace summaries #15952

Merged
JJenkx merged 1 commit from upstream-pr/15952 into main 2026-11-12 21:54:03 +00:00
JJenkx commented 2026-11-05 02:21:50 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by JJenkx on 2026-11-05T02:21:50Z.


What

Periodic and windowed summaries retain only the eight largest CPU scopes/stages. A compile phase can disappear below that limit, so summing the available per-frame values across a cold load understates its recorded duration.

Add phase_totals_ms, containing the raw inclusive milliseconds for every recorded scope/stage, summed across threads and excluding Driver.WorkerWait. Keep the existing eight-entry top_phases_ms_per_frame unchanged. Raw totals remain available without presents. This reuses the existing totals; it adds no per-scope clock reads or event recording.

Document that nested/parallel durations overlap, totals-table overflow remains reported, and uninstrumented background work is not measured. This does not claim a title speedup or total/exclusive compiler CPU time.

Tested

Linux 7.2.11, GCC16.2 Release, AMD Radeon RX6650XT (RADV NAVI23), Mesa26.2.6. Exact main acac7c854182a1674162f5e623aa25a6469985ae and change cd849a832356b3f321def909b1531c1b1a497237:

  • Full libs and relinker builds complete on both sides.
  • Root-registered focused ctest -V: 8/8 per side, zero failures/skips, four actual validation-layer instance loads per side, no missing-layer diagnostics and zero VUIDs. Same ANYPS5_REQUIRE_VULKAN=1, ANYPS5_NO_SHADER_CACHE=1, validation layer, GPU and machine. Includes agc_performance_trace, guarded memory loads, embedded vertex fetch/aliasing, vertex fetch, zero-stride fetch, guarded null pointer and prepared graphics. Some cases are CPU fixtures; this is not a claim that every case executes Vulkan.
  • Direct compilation of the repository CPU suite also passes main/change; change tests against main's old header fail at the intended summary assertion. Covers totals beyond the top eight, cross-thread aggregation, raw units, no presents and empty totals.
  • Source and library hashes remain unchanged during both focused runs. Conventions/whitespace and guest-runner checks pass. Official overlap scan checked1,897 open PRs; all eight fail-closed shared-file peers were manually reviewed, with no equivalent raw phase-total behavior or dependency.

Source patch, exact pins, build logs, CPU negative control, verbose focused logs/JUnit, integrity receipts and overlap review — SHA-256 986adb5f4d5402c9686d3896885975a629450d0a0bde1dc8ec32f3c986fb1d9a (download verified).

No native title, FPS/loading improvement, Windows or NVIDIA execution is claimed.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Fixes: none
  • Unblocks: none; diagnostic output only
  • GPUs tested: AMD Radeon RX 6650 XT, RADV Mesa 26.2.6, Linux 7.2.11
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5164996235 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/15952). Originally posted by [JJenkx](https://github.com/JJenkx) on 2026-11-05T02:21:50Z. --- ### What Periodic and windowed summaries retain only the eight largest CPU scopes/stages. A compile phase can disappear below that limit, so summing the available per-frame values across a cold load understates its recorded duration. Add `phase_totals_ms`, containing the raw inclusive milliseconds for every recorded scope/stage, summed across threads and excluding `Driver.WorkerWait`. Keep the existing eight-entry `top_phases_ms_per_frame` unchanged. Raw totals remain available without presents. This reuses the existing totals; it adds no per-scope clock reads or event recording. Document that nested/parallel durations overlap, totals-table overflow remains reported, and uninstrumented background work is not measured. This does not claim a title speedup or total/exclusive compiler CPU time. ### Tested Linux 7.2.11, GCC16.2 Release, AMD Radeon RX6650XT (RADV NAVI23), Mesa26.2.6. Exact main `acac7c854182a1674162f5e623aa25a6469985ae` and change `cd849a832356b3f321def909b1531c1b1a497237`: - Full `libs` and `relinker` builds complete on both sides. - Root-registered focused `ctest -V`: **8/8 per side**, zero failures/skips, four actual validation-layer instance loads per side, no missing-layer diagnostics and **zero VUIDs**. Same `ANYPS5_REQUIRE_VULKAN=1`, `ANYPS5_NO_SHADER_CACHE=1`, validation layer, GPU and machine. Includes `agc_performance_trace`, guarded memory loads, embedded vertex fetch/aliasing, vertex fetch, zero-stride fetch, guarded null pointer and prepared graphics. Some cases are CPU fixtures; this is not a claim that every case executes Vulkan. - Direct compilation of the repository CPU suite also passes main/change; change tests against main's old header fail at the intended summary assertion. Covers totals beyond the top eight, cross-thread aggregation, raw units, no presents and empty totals. - Source and library hashes remain unchanged during both focused runs. Conventions/whitespace and guest-runner checks pass. Official overlap scan checked1,897 open PRs; all eight fail-closed shared-file peers were manually reviewed, with no equivalent raw phase-total behavior or dependency. [Source patch, exact pins, build logs, CPU negative control, verbose focused logs/JUnit, integrity receipts and overlap review](https://github.com/JJenkx/AnyPS5/releases/download/linux-validation-20261023/agc-trace-phase-totals-cd849a83-mainacac-linux-20261105.tar.gz) — SHA-256 `986adb5f4d5402c9686d3896885975a629450d0a0bde1dc8ec32f3c986fb1d9a` (download verified). No native title, FPS/loading improvement, Windows or NVIDIA execution is claimed. <!-- OS, title or homebrew, what was checked. "Not tested" is a valid answer. A performance change: the summary lines of main and of this PR from the same machine and scene, with the traces attached, captured as the Performance report issue form describes. --> ### Checklist <!-- Rules behind each item: https://github.com/boykopovar/AnyPS5/blob/main/CONTRIBUTING.md --> - [x] Based on current `main`; no other open PR implements the same functions - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except [technical debt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/CONVENTIONS.md) - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed under Silent stubs in their library's [technical debt](https://github.com/boykopovar/AnyPS5/tree/main/docs/dev/debt) file - [x] No notes, investigation `.md` files or images added to the repository (attach them to this PR) - [x] New third-party code is a submodule built from source - [x] Generic behaviour, not specific to one title - [x] Depends on: none - [x] Fixes: none - [x] Unblocks: none; diagnostic output only - [x] GPUs tested: AMD Radeon RX 6650 XT, RADV Mesa 26.2.6, Linux 7.2.11 - [x] AI-assisted: yes
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
boykopovar/AnyPS5!15952
No description provided.