Add optional live memory breakdown to release logs #4085

Open
github-bot wants to merge 1 commit from github-bot/gh-4085 into main AGit
Owner

@⁠john-9474 on GitHub · 2026-11-30 15:46 UTC · original
john-9474:codex/release-memory-breakdown → main · +37 −0 · 3 files · 1 commits · open

Release memory logs show process commit and cumulative placement totals, which can make old allocation traffic look like storage still retained. VICTORY_MEMORY_BREAKDOWN=1 adds an optional live-storage line to the existing once-per-second memory report, including scratch and its spare subset, other list uploads, idle snapshots, texture staging, system-memory GPU copies and CPU mirrors. It is off by default and works without the diagnostics feature.

The existing counters keep their meanings. These categories overlap and do not reconcile all process commit; file-backed mirror capacity is not private commit, and idle snapshots exclude snapshots held by submissions. The snapshot helper only samples capacity under the existing pool lock. Allocation, reclamation, synchronization and rendering policies are unchanged.

Validation on release main c71899d9 / v2026.11.30.01:

  • The exact 27-line source change built successfully in an optimized local release build (SHA256 ec96efc816bf748fa448cca1000882d51b56873c07a7214a0a56042aa5949a11). A native Series X opt-in probe emitted the fields and helped distinguish a large private-memory total from the much smaller idle snapshot/scratch pools. That build also had local background audio, native file-backing and depth-fix test support, which are excluded from this PR.
  • On the clean contribution branch, cargo check --locked -p victory-gpu --lib passed. A fresh xtask built from that tree passed policy --staged for all three changed files; git diff --cached --check also passed. The normal check reports the pre-existing unused Shadow::ranged warning.
  • A 15-second native smoke run of that same binary with VICTORY_MEMORY_BREAKDOWN=0 emitted zero breakdown events and 12 ordinary memory reports, then ended at its timer. The startup header confirmed the disabled flag.
  • The full cargo test suite was not run for this reporting-only change. No FPS, memory-saving or gameplay-rendering improvement is claimed for the diagnostic.

The Windows CI check stopped at workspace Clippy before diagnostics or tests ran: unused Lowered::loop_caps, two missing card_pass capture arguments, and unused Shadow::ranged. The clean release-main check reports the same four errors. The affected shader file, GPU test and function bodies/signature are unchanged from c71899d9; #4018 already addresses the missing test arguments. These upstream failures remain visible rather than being bundled into this reporting change.

Overlap checked:

  • Searched current open PRs for the switch, helper and touched reporting areas.
  • #3869 adds a diagnostics-only census of actual D3D12 allocation lifetimes by heap. This uses existing role counters in release builds and makes no new resource-lifetime hooks.
  • #3703 adds paging and long-frame causes beside the memory report; those are different metrics.
  • #4016 repairs resource state, lifetime and allocation behavior. This change only reports existing storage counters.
  • #2960 and #3271 observe memory-bridge/refresh work; this reports retained storage capacity rather than access events or ownership.

Only the two source files and the short docs/windows-memory.md explanation are included. No game data, vendor binaries, local launch configuration or dependency changes are included.

**@⁠john-9474** on GitHub · 2026-11-30 15:46 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/4085) `john-9474:codex/release-memory-breakdown` → `main` · +37 −0 · 3 files · 1 commits · open Release memory logs show process commit and cumulative placement totals, which can make old allocation traffic look like storage still retained. `VICTORY_MEMORY_BREAKDOWN=1` adds an optional live-storage line to the existing once-per-second memory report, including scratch and its spare subset, other list uploads, idle snapshots, texture staging, system-memory GPU copies and CPU mirrors. It is off by default and works without the diagnostics feature. The existing counters keep their meanings. These categories overlap and do not reconcile all process commit; file-backed mirror capacity is not private commit, and idle snapshots exclude snapshots held by submissions. The snapshot helper only samples capacity under the existing pool lock. Allocation, reclamation, synchronization and rendering policies are unchanged. Validation on release main `c71899d9` / `v2026.11.30.01`: - The exact 27-line source change built successfully in an optimized local release build (SHA256 `ec96efc816bf748fa448cca1000882d51b56873c07a7214a0a56042aa5949a11`). A native Series X opt-in probe emitted the fields and helped distinguish a large private-memory total from the much smaller idle snapshot/scratch pools. That build also had local background audio, native file-backing and depth-fix test support, which are excluded from this PR. - On the clean contribution branch, `cargo check --locked -p victory-gpu --lib` passed. A fresh `xtask` built from that tree passed `policy --staged` for all three changed files; `git diff --cached --check` also passed. The normal check reports the pre-existing unused `Shadow::ranged` warning. - A 15-second native smoke run of that same binary with `VICTORY_MEMORY_BREAKDOWN=0` emitted zero breakdown events and 12 ordinary memory reports, then ended at its timer. The startup header confirmed the disabled flag. - The full `cargo test` suite was not run for this reporting-only change. No FPS, memory-saving or gameplay-rendering improvement is claimed for the diagnostic. The [Windows CI check](https://github.com/trustno1-coder/VIctory-NVIDIA/actions/runs/46454130481/job/141972322744) stopped at workspace Clippy before diagnostics or tests ran: unused `Lowered::loop_caps`, two missing `card_pass` capture arguments, and unused `Shadow::ranged`. The [clean release-main check](https://github.com/trustno1-coder/VIctory-NVIDIA/actions/runs/46436299889/job/141909075238) reports the same four errors. The affected shader file, GPU test and function bodies/signature are unchanged from `c71899d9`; #4018 already addresses the missing test arguments. These upstream failures remain visible rather than being bundled into this reporting change. Overlap checked: - [x] Searched current open PRs for the switch, helper and touched reporting areas. - #3869 adds a diagnostics-only census of actual D3D12 allocation lifetimes by heap. This uses existing role counters in release builds and makes no new resource-lifetime hooks. - #3703 adds paging and long-frame causes beside the memory report; those are different metrics. - #4016 repairs resource state, lifetime and allocation behavior. This change only reports existing storage counters. - #2960 and #3271 observe memory-bridge/refresh work; this reports retained storage capacity rather than access events or ownership. Only the two source files and the short `docs/windows-memory.md` explanation are included. No game data, vendor binaries, local launch configuration or dependency changes are included.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-30 15:47:27 +00:00
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/4085/head:github-bot/gh-4085'
git switch 'github-bot/gh-4085'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-4085'
git switch 'github-bot/gh-4085'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-4085'
git switch 'github-bot/gh-4085'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-4085'
git switch 'main'
git merge --squash 'github-bot/gh-4085'
git switch 'main'
git merge --ff-only 'github-bot/gh-4085'
git switch 'main'
git merge 'github-bot/gh-4085'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No reviewers
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.

Dependencies

No dependencies set

Reference
github/trustno1-coder--VIctory-NVIDIA!4085
No description provided.