Skip to content

Add optional live memory breakdown to release logs - #4085

Open
john-9474 wants to merge 1 commit into
trustno1-coder:mainfrom
john-9474:codex/release-memory-breakdown
Open

john-9474 wants to merge 1 commit into
trustno1-coder:mainfrom
john-9474:codex/release-memory-breakdown

Conversation

@john-9474

@john-9474 john-9474 commented Nov 30, 2026 •

Copy link
Copy Markdown
Contributor

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:

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-actions github-actions Bot added the pr-diagnostics Pull request: adds logging, counters or tools label Nov 30, 2026
@github-actions github-actions Bot changed the title [pr-diagnostics] Add optional live memory breakdown to release logs Add optional live memory breakdown to release logs Nov 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-diagnostics Pull request: adds logging, counters or tools

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant