xmem: trace the title budget once #553
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/553"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from brcly/TuxBox. Originally posted by csj0oe on 2026-11-29T22:34:07Z.
What
TUXBOX_TRACE_XMEM=1prints the title memory budget once, on stderr, the first time a title asks for the working-set statistics:This is the observable that the budget change needs: without it a launch cannot report
GameLimit,GameUsed, the high-water mark or the live 64 KiB page count, so a with/without run has nothing to compare.docs/ENVIRONMENT.mdbesideTUXBOX_TRACE_XMEM_BACKING.Verification
python build.py xmem;tuxbox.py verify --only xmem --backend wine— 12/12 PASS.python tuxbox.py check --no-gpu— 9/9.Not run
lanes-selftestand the buffer cases of the D3D12 regression controls; NVIDIA is not available on this machine.Imported from brcly/TuxBox. Originally posted by brcly on 2026-11-30T04:12:12Z.
Heads-up: main just landed a large cleanup (up to
e5d2e913), so this PR needs a rebase.rustfmt.toml).unwrap(), lossyascasts and undocumentedunsafeoutside tests.cargo fmt --check, rustdoc with warnings denied, and Miri on the providers' unit tests.The least painful way is to format your branch first, so the rebase only shows real changes:
Then run
python tuxbox.py check --no-gpu, which now includes the format step.If clippy flags something new:
Fromfor widening,TryFromfor narrowing, and a mask for bit fields.unwrap(): use?, orexpectwith the reason it can't fail.unsafeblock: it needs a// SAFETY:comment.CONTRIBUTING's "Code checks" section lists the commands. Thanks!
Imported from brcly/TuxBox. Originally posted by brcly on 2026-11-30T11:45:39Z.
Thanks for the rebase. The problem is when the line prints. It prints once, the first time the title asks for its statistics, which is at startup, before it has allocated anything. The example in the description shows exactly that:
used=0 peak=0 physical_pages=0. So the one line a run gets reports only the limit, which is a constant. It can't show a with/without difference in what the title uses, and that difference is what you say the budget work needs.For it to be the observable you describe, it needs to report use over the run. For example:
TUXBOX_XCRD_LOGdoes.Then please include the lines from one real run in the PR, so we can see it measure something. Until then I'm holding this, like the other diagnostic-only PRs.
Imported from brcly/TuxBox. Originally posted by brcly on 2026-12-02T21:31:01Z.
Thanks, this looks good and we'd like to take it. It now conflicts with main:
03bf6918(xmem: honor GDK allocation contracts and title memory profiles) changedruntime/xmem/src/title_memory.rs, anddocs/ENVIRONMENT.mdhas moved too. Your new tests buildSnapshotwith the old fields and theLIMIT/GPU_LIMITconstants, so they'll need updating to the new snapshot. Could you rebase onto main? We'll merge once it's clean and CI is green.View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.