perf(agc): log storage image and storage-viewed texture creation only with APS5_DEBUG_LOG #6473

Merged
ahir061 merged 1 commit from upstream-pr/6473 into main 2026-10-19 01:26:54 +00:00
ahir061 commented 2026-10-15 16:36:16 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by ahir061 on 2026-10-15T16:36:16Z.


What

StorageTexture and the sampled Texture viewed from a storage image wrote one unconditional APS5_LOG_OUT line each time they were created. A title whose dynamic resolution keeps re-creating storage images (#6099) turns that into a log flood on the queue workers: Marvel's Wolverine wrote 1,175,006 lines to stdout in a 25-minute run, 99.7 % of them these two (Texture.cpp "viewed from storage image" 653,217, StorageTexture 514,596). They now use APS5_LOG_OUT_DEBUG, as other per-object traces do, so they are printed only in builds with APS5_DEBUG_LOG.

Tested

Marvel's Wolverine PPSA03671 01.001.005, Windows 11 26200, Ryzen 7 5800X3D, 16 GiB RAM, RX 6600 XT 8 GB (AMD 26.9.2), --windows, warm shader cache, the "Sony Interactive Entertainment presents" card. main alone aborts earlier on this card (device memory, #5961), so both runs use the same local branch (main a5e2a80c6 + #5998, #6340, #5987, #6174 and local memory budgets), with and without this commit, same environment (APS5_STORAGE_CACHE_MIB=4096 APS5_HOST_IMPORT_MIB=4096 APS5_PROFILE_DRAW=1 APS5_TRACE_SUMMARY_EVERY=30):

without with this PR
stdout lines 1,175,006 in 1505 s 7,167 in 904 s
frame time p50, last 7 summary intervals at the card 15.5–16.1 s 13.6–14.3 s (one interval 24.9 s)
Resources.Complete per frame, last interval 15.3 s 13.1 s
summary-without-this-pr.txt
summary-with-this-pr.txt

A worker-0 sample (APS5_SAMPLE_WORKER, 44,670 samples) without this PR had 11.3 % of queue worker 0 in __mingw_fprintf under these two lines. The summary lines are attached: without this PR summary-without-this-pr.txt, with it summary-with-this-pr.txt. The run with it reports commit afffb8ae8 as dirty because it was built before this change was committed; the uncommitted change is this commit. I did not capture APS5_TRACE_FRAMES traces, and can if wanted.

  • agc_driver_graphics (GCC 15.2.0 UCRT, Release): passes. The build has no new warnings.
  • python tools/check_conventions.py --base upstream/main: passes.

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
  • Unblocks: none
  • GPUs tested: AMD Radeon RX 6600 XT, AMD proprietary driver 26.9.2, Windows 11 26200
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4876610097 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6473). Originally posted by [ahir061](https://github.com/ahir061) on 2026-10-15T16:36:16Z. --- ### What `StorageTexture` and the sampled `Texture` viewed from a storage image wrote one unconditional `APS5_LOG_OUT` line each time they were created. A title whose dynamic resolution keeps re-creating storage images (#6099) turns that into a log flood on the queue workers: Marvel's Wolverine wrote 1,175,006 lines to stdout in a 25-minute run, 99.7 % of them these two (`Texture.cpp` "viewed from storage image" 653,217, `StorageTexture` 514,596). They now use `APS5_LOG_OUT_DEBUG`, as other per-object traces do, so they are printed only in builds with `APS5_DEBUG_LOG`. ### Tested Marvel's Wolverine PPSA03671 01.001.005, Windows 11 26200, Ryzen 7 5800X3D, 16 GiB RAM, RX 6600 XT 8 GB (AMD 26.9.2), `--windows`, warm shader cache, the "Sony Interactive Entertainment presents" card. `main` alone aborts earlier on this card (device memory, #5961), so both runs use the same local branch (`main` a5e2a80c6 + #5998, #6340, #5987, #6174 and local memory budgets), with and without this commit, same environment (`APS5_STORAGE_CACHE_MIB=4096 APS5_HOST_IMPORT_MIB=4096 APS5_PROFILE_DRAW=1 APS5_TRACE_SUMMARY_EVERY=30`): | | without | with this PR | |---|---|---| | stdout lines | 1,175,006 in 1505 s | 7,167 in 904 s | | frame time p50, last 7 summary intervals at the card | 15.5–16.1 s | 13.6–14.3 s (one interval 24.9 s) | | `Resources.Complete` per frame, last interval | 15.3 s | 13.1 s | [summary-without-this-pr.txt](https://github.com/user-attachments/files/33504703/summary-without-this-pr.txt) [summary-with-this-pr.txt](https://github.com/user-attachments/files/33504709/summary-with-this-pr.txt) A worker-0 sample (`APS5_SAMPLE_WORKER`, 44,670 samples) without this PR had 11.3 % of queue worker 0 in `__mingw_fprintf` under these two lines. The summary lines are attached: without this PR [summary-without-this-pr.txt](https://github.com/user-attachments/files/33504382/summary-without-this-pr.txt), with it [summary-with-this-pr.txt](https://github.com/user-attachments/files/33504383/summary-with-this-pr.txt). The run with it reports commit afffb8ae8 as dirty because it was built before this change was committed; the uncommitted change is this commit. I did not capture `APS5_TRACE_FRAMES` traces, and can if wanted. - `agc_driver_graphics` (GCC 15.2.0 UCRT, Release): passes. The build has no new warnings. - `python tools/check_conventions.py --base upstream/main`: passes. ### Checklist - [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] Unblocks: none - [x] GPUs tested: AMD Radeon RX 6600 XT, AMD proprietary driver 26.9.2, Windows 11 26200 - [x] AI-assisted: yes
github-actions[bot] commented 2026-10-15 16:44:45 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-15T16:44:45Z.


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 1368 core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 1395 core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 4448 core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 5609 core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 6188 core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 6192 core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 6197 core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 6202 core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 6280 core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 6481 core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 6539 core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 6615 core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 6718 core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 6820 core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 6946 core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 6947 core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 6960 core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 6971 core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 6977 core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 7154 core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 7254 core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 7256 core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 7332 core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 7604 core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 7642 core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6197337718 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6473#issuecomment-6197337718). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-15T16:44:45Z. --- <!-- pr-overlap --> 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 1368](https://www.github.com/boykopovar/AnyPS5/pull/1368) | `core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp` | | [PR 1395](https://www.github.com/boykopovar/AnyPS5/pull/1395) | `core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp` | | [PR 4448](https://www.github.com/boykopovar/AnyPS5/pull/4448) | `core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp` | | [PR 5609](https://www.github.com/boykopovar/AnyPS5/pull/5609) | `core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp` | | [PR 6188](https://www.github.com/boykopovar/AnyPS5/pull/6188) | `core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp` | | [PR 6192](https://www.github.com/boykopovar/AnyPS5/pull/6192) | `core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp` | | [PR 6197](https://www.github.com/boykopovar/AnyPS5/pull/6197) | `core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp` | | [PR 6202](https://www.github.com/boykopovar/AnyPS5/pull/6202) | `core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp` | | [PR 6280](https://www.github.com/boykopovar/AnyPS5/pull/6280) | `core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp` | | [PR 6481](https://www.github.com/boykopovar/AnyPS5/pull/6481) | `core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp` | | [PR 6539](https://www.github.com/boykopovar/AnyPS5/pull/6539) | `core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp` | | [PR 6615](https://www.github.com/boykopovar/AnyPS5/pull/6615) | `core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp` | | [PR 6718](https://www.github.com/boykopovar/AnyPS5/pull/6718) | `core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp` | | [PR 6820](https://www.github.com/boykopovar/AnyPS5/pull/6820) | `core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp` | | [PR 6946](https://www.github.com/boykopovar/AnyPS5/pull/6946) | `core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp` | | [PR 6947](https://www.github.com/boykopovar/AnyPS5/pull/6947) | `core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp` | | [PR 6960](https://www.github.com/boykopovar/AnyPS5/pull/6960) | `core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp` | | [PR 6971](https://www.github.com/boykopovar/AnyPS5/pull/6971) | `core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp` | | [PR 6977](https://www.github.com/boykopovar/AnyPS5/pull/6977) | `core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp` | | [PR 7154](https://www.github.com/boykopovar/AnyPS5/pull/7154) | `core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp` | | [PR 7254](https://www.github.com/boykopovar/AnyPS5/pull/7254) | `core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp` | | [PR 7256](https://www.github.com/boykopovar/AnyPS5/pull/7256) | `core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp` | | [PR 7332](https://www.github.com/boykopovar/AnyPS5/pull/7332) | `core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp` | | [PR 7604](https://www.github.com/boykopovar/AnyPS5/pull/7604) | `core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp` | | [PR 7642](https://www.github.com/boykopovar/AnyPS5/pull/7642) | `core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp` |
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!6473
No description provided.