Make the memory census walk once and fire on the process's own commit, not on its private bytes.

With mem_census = 1 the census trigger compared the private bytes with the last census, and Windows charges the video memory to them, so every gigabyte of textures started another 130-260 ms walk on the presenting thread: 22 of the 33 walks of the 2026-11-13 session came from that trigger, while the process's own commit grew 307 MiB in play. The trigger now reads the private bytes less the write-combined memory of the last walk (and what the driver's device-local figure grew since), compares them with the highest figure seen at a census, and waits 60 s after the last walk; the 3600-frame censuses stay.

On Windows one walk of the address space now gives both the commit census and the guest regions' committed bytes, which mem_guest_census walked a second time. The census counts the driver's write-combined views apart instead of as guest memory, counts as guest only the reserved guest regions and the loaded modules, and ranks the process's own allocations wherever they lie. The frame after a walk charges its time to a new "census" cause in the frame-time summary and the stutter map instead of "unattributed".

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
chrg6
2026-11-13 12:25:33 -05:00
parent f1a2a64e83
commit f7487ceee5
9 changed files with 195 additions and 49 deletions

View File

@@ -996,9 +996,10 @@
# fps or more with Link on the floor. Each pass slows the game for its few seconds. 0 is off.
# floor_watch = 0
# 1: with trace = perf, walks of the process's address space count its private and write-combined memory every 600
# frames (the "mem: process" line) and where its committed memory lies every 3600 frames (the "commit census" lines).
# Each walk holds the address-space lock for 100-240 ms and delays the next frame by as much, so they are off unless
# asked for.
# frames (the "mem: process" line) and where its committed memory lies every 3600 frames, and when the process's own
# commit (without the video memory Windows charges to it) rose 1 GiB over the highest it was, at most once a minute
# (the "commit census" lines). Each walk holds the address-space lock for 100-260 ms and delays the next frame by as
# much, so they are off unless asked for: leave it off in a run whose smoothness is judged.
# mem_census = 0
# The memory the game is taken to need, in MB of commit (RAM plus page file not yet promised to a program). When less
# is free at the start, the log gets a warning line: short of memory the game stutters, loses textures or stops with