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

@@ -300,8 +300,9 @@ void stutter_frame(uint64_t frame, uint64_t now, uint64_t d, const uint64_t *par
}
}
// In the order of perf.c's causes (FT_C_*); "census" is NX2NAVI_MEM_CENSUS's walk of the address space.
static const char *const cause_short[SM_CAUSES] = {"pipeline", "translation", "texture", "fence", "pacing", "replay",
"unattributed", "?"};
"census", "unattributed"};
static int area_cmp(const void *x, const void *y) {
const Area *a = &areas[*(const int *)x], *b = &areas[*(const int *)y];