tooling: summarize startup GPU memory budget pressure #2510

Merged
RonLogic merged 1 commit from upstream-pr/2518 into main 2026-11-25 19:41:25 +00:00
RonLogic commented 2026-11-25 19:29:54 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by RonLogic on 2026-11-25T19:29:54Z.


Change

Refs #2379 and #870. Summarize the opt-in x2w-budget samples in startup triage. The report counts complete samples above the local DXGI budget and shows two observations: the highest local usage-to-budget ratio and the largest retained-texture allocation. Each row keeps the budget and texture counts from that same heartbeat. Unavailable or zero budgets still contribute to the texture observation. The report copies only the aggregate fields it needs.

Verification

Windows 11 x64 build 26300.10075, Python 3.12, base bfba03c9.

python -B tests/startup_triage_run_check.py
python -B tests/startup_live_view_check.py
python -B tests/startup_archive_requests_check.py
python -B tests/docs_links_check.py
python -B tests/bidi_controls_check.py
git diff --check

All passed. With the parser from main the new regression check fails six assertions. The covered cases include a highest ratio reached at a lower absolute usage, a separate retention peak, unavailable and zero budgets, mirrored lines and malformed rows.

I also confirmed that the CLI parsed both native heartbeat lines from the source-built indexed-draw fixture, one each on in-box WARP and RTX 4070. I temporarily held that fixture across the five-second heartbeat interval to obtain the lines and restored it afterward.

I used Codex to implement the change and ran the checks on my Windows workstation.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:6612100288 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2518). Originally posted by [RonLogic](https://github.com/RonLogic) on 2026-11-25T19:29:54Z. --- ## Change Refs #2379 and #870. Summarize the opt-in `x2w-budget` samples in startup triage. The report counts complete samples above the local DXGI budget and shows two observations: the highest local usage-to-budget ratio and the largest retained-texture allocation. Each row keeps the budget and texture counts from that same heartbeat. Unavailable or zero budgets still contribute to the texture observation. The report copies only the aggregate fields it needs. ## Verification Windows 11 x64 build 26300.10075, Python 3.12, base `bfba03c9`. ```powershell python -B tests/startup_triage_run_check.py python -B tests/startup_live_view_check.py python -B tests/startup_archive_requests_check.py python -B tests/docs_links_check.py python -B tests/bidi_controls_check.py git diff --check ``` All passed. With the parser from `main` the new regression check fails six assertions. The covered cases include a highest ratio reached at a lower absolute usage, a separate retention peak, unavailable and zero budgets, mirrored lines and malformed rows. I also confirmed that the CLI parsed both native heartbeat lines from the source-built indexed-draw fixture, one each on in-box WARP and RTX 4070. I temporarily held that fixture across the five-second heartbeat interval to obtain the lines and restored it afterward. I used Codex to implement the change and ran the checks on my Windows workstation.
upstream-sync closed this pull request 2026-11-25 20:04:36 +00:00
tedin7 commented 2026-11-25 20:04:36 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-25T19:38:45Z.

Review: COMMENTED


Review of head aff1371c (comment only, no approval).

Code: sound.

  • The line format in RE_GPU_BUDGET matches the producer, report_budget() in src/startup_stubs/d3d12_xs_device.cpp:5077 (local=%s nonlocal=%s plus name=live/objs+held/objs per category, then unmeasured=).
  • The "highest ratio" compare uses a cross-multiplication, so there is no float rounding or divide by zero. Zero and n/a budgets still feed the retained-texture peak, as the body says.
  • Only aggregate numbers are copied into the report. Malformed lines fall through to the old handling.
  • No other open or merged PR covers this slice (checked by title search).

Commands run in a worktree at this head (Linux):

  • tests/startup_triage_run_check.py: 0 failed. tests/startup_archive_requests_check.py: passed.
  • tests/docs_links_check.py and tests/bidi_controls_check.py: passed. git diff --check origin/main...HEAD: clean.
  • Mutations, each made startup_triage_run_check.py fail (then reverted): > changed to >= for "above budget"; the ratio peak replaced by a plain usage compare.
  • tests/startup_live_view_check.py fails on Linux with a Windows path expectation (G:\... file opens). It fails the same way on current main, so it is not caused by this PR.

Notes:

  • Tooling only (Python parser, docs, a test). No GPU path, so no WARP run was needed. The tooling claims are about the log parser; I did not run the game and make no executable claim.

AI-assisted; commands listed were executed locally.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:review:6063856025 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2518#pullrequestreview-6063856025). Originally posted by [tedin7](https://github.com/tedin7) on 2026-11-25T19:38:45Z. **Review:** COMMENTED --- Review of head aff1371c (comment only, no approval). Code: sound. - The line format in `RE_GPU_BUDGET` matches the producer, `report_budget()` in `src/startup_stubs/d3d12_xs_device.cpp:5077` (`local=%s nonlocal=%s` plus `name=live/objs+held/objs` per category, then `unmeasured=`). - The "highest ratio" compare uses a cross-multiplication, so there is no float rounding or divide by zero. Zero and `n/a` budgets still feed the retained-texture peak, as the body says. - Only aggregate numbers are copied into the report. Malformed lines fall through to the old handling. - No other open or merged PR covers this slice (checked by title search). Commands run in a worktree at this head (Linux): - `tests/startup_triage_run_check.py`: 0 failed. `tests/startup_archive_requests_check.py`: passed. - `tests/docs_links_check.py` and `tests/bidi_controls_check.py`: passed. `git diff --check origin/main...HEAD`: clean. - Mutations, each made `startup_triage_run_check.py` fail (then reverted): `>` changed to `>=` for "above budget"; the ratio peak replaced by a plain usage compare. - `tests/startup_live_view_check.py` fails on Linux with a Windows path expectation (`G:\...` file opens). It fails the same way on current main, so it is not caused by this PR. Notes: - Tooling only (Python parser, docs, a test). No GPU path, so no WARP run was needed. The tooling claims are about the log parser; I did not run the game and make no executable claim. AI-assisted; commands listed were executed locally.
tedin7 commented 2026-11-25 20:04:45 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-25T19:39:40Z.


Win2025 WARP receipt for head aff1371c.

Verified on Windows Server 2025 (Build 26100, MSVC 14.44.35207 + D3D12 WARP) at commit aff1371ce310d165d01d6ff62a4167e4dee43c21:

  • Debug (--preset dev):
    • Build (cmake --build --preset dev --target d3d12_xs_device_obj d3d12_xs_shim startup_memory_srv_census_check startup_stub_xcrdapi -- -j 2): 1.37s (configure 3.18s)
  • Release /O2 (--preset release):
    • Build (cmake --build --preset release --target d3d12_xs_device_obj d3d12_xs_shim startup_memory_srv_census_check startup_stub_xcrdapi -- -j 2): 2.10s (configure 3.37s)
  • Windows Python checks: tests/startup_buffer_address_check.py ok (0.7s), tests/startup_triage_run_check.py ok (0.6s)
  • sccache: 23/82 hits; wall 19.3s

AI-assisted; commands listed were executed locally.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7172599935 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2518#issuecomment-7172599935). Originally posted by [tedin7](https://github.com/tedin7) on 2026-11-25T19:39:40Z. --- Win2025 WARP receipt for head aff1371c. Verified on Windows Server 2025 (Build 26100, MSVC 14.44.35207 + D3D12 WARP) at commit `aff1371ce310d165d01d6ff62a4167e4dee43c21`: - **Debug (`--preset dev`)**: - Build (`cmake --build --preset dev --target d3d12_xs_device_obj d3d12_xs_shim startup_memory_srv_census_check startup_stub_xcrdapi -- -j 2`): `1.37s` (configure `3.18s`) - **Release `/O2` (`--preset release`)**: - Build (`cmake --build --preset release --target d3d12_xs_device_obj d3d12_xs_shim startup_memory_srv_census_check startup_stub_xcrdapi -- -j 2`): `2.10s` (configure `3.37s`) - **Windows Python checks**: `tests/startup_buffer_address_check.py` ok (`0.7s`), `tests/startup_triage_run_check.py` ok (`0.6s`) - `sccache`: 23/82 hits; wall `19.3s` AI-assisted; commands listed were executed locally.
tedin7 commented 2026-11-25 20:04:45 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-25T19:41:11Z.


Win2025 WARP receipt for head aff1371c.

Verified on Windows Server 2025 (Build 26100, MSVC 14.44.35207 + D3D12 WARP) at commit aff1371ce310d165d01d6ff62a4167e4dee43c21:

  • Debug (--preset dev):
    • Build (cmake --build --preset dev --target d3d12_xs_device_obj d3d12_xs_shim startup_memory_srv_census_check startup_stub_xcrdapi -- -j 2): 3.53s (configure 0.00s)
    • Test (ctest --preset dev -R 'startup_triage_run|startup_live_view|startup_archive_requests' --parallel 2 --no-tests=error --output-on-failure): 3/3 passed (8.32s: startup_archive_requests 1.17s, startup_triage_run 0.67s, startup_live_view 8.18s)
  • Release /O2 (--preset release):
    • Build (cmake --build --preset release --target d3d12_xs_device_obj d3d12_xs_shim startup_memory_srv_census_check startup_stub_xcrdapi -- -j 2): 8.33s (configure 0.00s)
    • Test (ctest --preset release -R 'startup_triage_run|startup_live_view|startup_archive_requests' --parallel 2 --no-tests=error --output-on-failure): 3/3 passed (8.14s: startup_triage_run 0.45s, startup_archive_requests 1.02s, startup_live_view 8.02s)
  • Windows Python checks: tests/startup_buffer_address_check.py ok (0.5s), tests/startup_triage_run_check.py ok (0.4s)
  • sccache: 4/4 hits; wall 28.7s

AI-assisted; commands listed were executed locally.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7172632998 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2518#issuecomment-7172632998). Originally posted by [tedin7](https://github.com/tedin7) on 2026-11-25T19:41:11Z. --- Win2025 WARP receipt for head aff1371c. Verified on Windows Server 2025 (Build 26100, MSVC 14.44.35207 + D3D12 WARP) at commit `aff1371ce310d165d01d6ff62a4167e4dee43c21`: - **Debug (`--preset dev`)**: - Build (`cmake --build --preset dev --target d3d12_xs_device_obj d3d12_xs_shim startup_memory_srv_census_check startup_stub_xcrdapi -- -j 2`): `3.53s` (configure `0.00s`) - Test (`ctest --preset dev -R 'startup_triage_run|startup_live_view|startup_archive_requests' --parallel 2 --no-tests=error --output-on-failure`): **3/3 passed** (`8.32s`: `startup_archive_requests` `1.17s`, `startup_triage_run` `0.67s`, `startup_live_view` `8.18s`) - **Release `/O2` (`--preset release`)**: - Build (`cmake --build --preset release --target d3d12_xs_device_obj d3d12_xs_shim startup_memory_srv_census_check startup_stub_xcrdapi -- -j 2`): `8.33s` (configure `0.00s`) - Test (`ctest --preset release -R 'startup_triage_run|startup_live_view|startup_archive_requests' --parallel 2 --no-tests=error --output-on-failure`): **3/3 passed** (`8.14s`: `startup_triage_run` `0.45s`, `startup_archive_requests` `1.02s`, `startup_live_view` `8.02s`) - **Windows Python checks**: `tests/startup_buffer_address_check.py` ok (`0.5s`), `tests/startup_triage_run_check.py` ok (`0.4s`) - `sccache`: 4/4 hits; wall `28.7s` AI-assisted; commands listed were executed locally.
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
R0Y00/Xbox2Windows!2510
No description provided.