feat(diagnostics): trace Xbox physical page backing lifetimes #1545

Merged
jeremygold02 merged 1 commit from upstream-pr/1545 into main 2026-11-29 08:16:55 +00:00
jeremygold02 commented 2026-11-28 21:28:42 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by jeremygold02 on 2026-11-28T21:28:42Z.


Why

The existing memory-pressure log reports when the host is low on RAM. It gives little visibility into the lifetime of an individual Windows backing section, including whether the game has returned its physical pages while VIctory still holds the section. Correlating these events can help investigate RAM retention during scene transitions.

What changed

Set VICTORY_XMEM_SECTIONS=1 to emit info-level events when Xbox physical pages are allocated or freed and when VIctory is about to close its Windows backing-section handle. The events share a process-local section handle. Free events aggregate removed pages by section, and logging runs outside the page-table lock.

The flag defaults to off. Allocation, mapping, and cleanup behavior are unchanged. This is diagnostic instrumentation. Section size describes its allocation span, while resident RAM needs a separate measurement.

Verification

  • Windows 11 Home build 26200, Intel Core Ultra 7 265K, 32 GB RAM, GeForce RTX 5070 12 GB, driver 621.40.
  • Tested the release build on Series X at 1440p with DLSS Quality and frame generation off. The prior release log showed aggregate host-memory pressure. With the flag enabled, the instrumented run logged three physical-page allocation events with their section handles, starting page numbers, and page counts.
  • cargo build --release --locked -p victory passed.
  • VICTORY_XMEM_SECTIONS=1 was set for cargo test --release --locked -p victory-hle physical_pages_map_alias_and_unmap. The focused test passed.
  • Live-game verification of free and close events across a scene transition is pending.
<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:issue:5544743757 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/1545). Originally posted by [jeremygold02](https://github.com/jeremygold02) on 2026-11-28T21:28:42Z. --- ## Why The existing memory-pressure log reports when the host is low on RAM. It gives little visibility into the lifetime of an individual Windows backing section, including whether the game has returned its physical pages while VIctory still holds the section. Correlating these events can help investigate RAM retention during scene transitions. ## What changed Set `VICTORY_XMEM_SECTIONS=1` to emit info-level events when Xbox physical pages are allocated or freed and when VIctory is about to close its Windows backing-section handle. The events share a process-local section handle. Free events aggregate removed pages by section, and logging runs outside the page-table lock. The flag defaults to off. Allocation, mapping, and cleanup behavior are unchanged. This is diagnostic instrumentation. Section size describes its allocation span, while resident RAM needs a separate measurement. ## Verification - Windows 11 Home build 26200, Intel Core Ultra 7 265K, 32 GB RAM, GeForce RTX 5070 12 GB, driver 621.40. - Tested the release build on Series X at 1440p with DLSS Quality and frame generation off. The prior release log showed aggregate host-memory pressure. With the flag enabled, the instrumented run logged three physical-page allocation events with their section handles, starting page numbers, and page counts. - `cargo build --release --locked -p victory` passed. - `VICTORY_XMEM_SECTIONS=1` was set for `cargo test --release --locked -p victory-hle physical_pages_map_alias_and_unmap`. The focused test passed. - Live-game verification of free and close events across a scene transition is pending.
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
trustno1-coder/VIctory-NVIDIA!1545
No description provided.