compilemem: skip learning when private bytes are unavailable (#2408) #2586
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2586"
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 trustno1-coder/VIctory-NVIDIA. Originally posted by fainty0 on 2026-11-29T14:40:11Z.
Fixes #2408
What it changes
Wine can return a short response and leave
PrivateUsageunwritten. Check the returned size and a sentinel; skip estimator updates when either endpoint is unavailable, but still retire the compile. Genuine zero remains valid. Do not substitutePagefileUsage: on Wine the issue's synthetic control saw it rise only after touching the pages, not on commit.How it was tested
829188e: default 5→5 and all-features 4→4 with--keep-going, no added or removed diagnostics. GPU-only Clippy also had no diagnostic changes. Staged asset policy passed.cargo testpassed for the crates it touches: no. The isolated parser unit test passed viarustc --test; full Linux workspace tests are blocked by existing Windows-only imports. Windows tests not run (no Windows); no Proton/runtime verification.Checked for overlap
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by fretuil on 2026-11-29T14:43:55Z.
Review: APPROVED
Reviewed
a1f619d— looks solid and well-tested overall.What looks good:
PROCESS_MEMORY_COUNTERS_EXresponses via both the returnedcbsize check and theUNWRITTENsentinel safely covers both ways Wine can leavePrivateUsageunpopulated.State::finishwhen either endpoint isNoneprevents polluting the estimator while keepingfinishedcounters accurate.Processandprocess_memoryvisibility to module-private and adding unit tests for shortcbresponses and missing endpoints is very clean.Minor nits (optional):
State::try_start, initializingpeak_private: private.unwrap_or(0)instead of0would keeppeak_private >= private_at_starttrue before the firstsample()call (even thoughsaturating_subinfinishalready produces the right result).line(), whenp.privateisNone, the log reads"process unavailable private";"process N/A private"or"process private unavailable"might scan a bit more naturally in logs.Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by ArturoWolff on 2026-11-30T18:38:07Z.
Thanks for addressing #2408. I checked your exact head
76fe0e0ea8c43af5da559a21d13a25ecc247cf01against current main84bd61e2c73e84933796bf8ede1a3343e64b26b1. The returned-size/sentinel check and optional endpoints work in a controlled test of the actual reader and estimator logic.One thing to preserve when bringing this forward to main: 64818e37 changed
State::finishto subtractmax(private_at_start, private_now), excluding persistent growth. Your branch predates that change, so this is a rebase/integration concern, not a new defect introduced by your PR.I compiled the exact extracted reader, State, Estimator, admission logic and locked counter layouts for both revisions with Rust 1.98.1. Both used the same 11 behavioural tests. The Windows API response fields were supplied by a deterministic CPU-only fixture; these are not new live Wine API observations or allocated multi-GiB buffers.
The admission fixture uses physical 16 GiB, free physical 2 GiB, free commit 32 GiB and the receiver's unchanged default floors. The common contract passed 7/11 on each original arm: main failed four counter-validity cases, your head failed four current-main transient-accounting cases. The local adaptation keeps your parser, uses optional endpoints with normal interval retirement, and retains main's
max(start,end)baseline. It passed all 25 extracted tests (14 source tests, including the parser, plus the same 11 contract cases) withrustc --test -D warnings.I would keep the existing persistent-growth, fast-compile and overlap tests from
64818e37when updating this PR, along with the missing-counter and genuine-zero tests. The earlier real GE-Proton 11-14 ABI evidence remains in #2408. The new comparison is an isolated source-level regression check: I have not run the adapted full crate, native Windows, or a new retail comparison. No gameplay/FPS or host-OOM fix is established by it.AI assistance: Hermes Agent, working on behalf of ArturoWolff. (GPT 6.2 Sol High).
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.