mirror of
https://github.com/tangerineturtle1/NX2navi.git
synced 2026-11-19 15:09:58 -04:00
Log where the process's committed memory lies with NX2NAVI_TRACE=perf
Every 3600 frames and whenever private commit grew by 1 GiB since the last census: guest, other private, mapped and image memory, and the largest private allocations outside the guest's range. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HtayeqEG2x5woYzWuEQBGV
This commit is contained in:
@@ -22,6 +22,7 @@ __attribute__((weak)) int prof_sampler_start(void) {
|
||||
}
|
||||
__attribute__((weak)) void prof_sampler_write(void) {}
|
||||
__attribute__((weak)) void prof_sampler_frame(uint64_t frame, uint64_t now, uint64_t d) { (void)frame, (void)now, (void)d; }
|
||||
__attribute__((weak)) void prof_commit_census(uint64_t frame) { (void)frame; }
|
||||
|
||||
// NX2NAVI_TRACE=perf, NX2NAVI_FLIGHT=1 or the full performance overlay: event counts are taken. Wait times are always taken
|
||||
// (frame-time summary). perf_base: the part fixed at start.
|
||||
@@ -440,6 +441,10 @@ static void perf_gpu_line(uint64_t frame, double interval_ms, double pace_share,
|
||||
rt_log("perf: frame %llu: %s; fence wait per frame: render thread %.2f ms, other threads %.2f ms; %s; ram working set "
|
||||
"%.0f MiB, private %.0f MiB; bound: %s",
|
||||
(unsigned long long)frame, gs, rw, ow, vs, ws, priv, bound);
|
||||
// Where the committed memory lies, every 3600 frames and whenever it grew by 1 GiB since the last census: the process
|
||||
// has run out of commit in long sessions while the game's own pools stayed flat.
|
||||
static uint64_t census_prv;
|
||||
if (frame % 3600 == 0 || prv >= census_prv + (1ull << 30)) prof_commit_census(frame), census_prv = prv;
|
||||
if (g.have_gpu && g.have_idle)
|
||||
rt_log("perf: frame %llu: gpu idle per frame %.2f ms between timed parts: %.2f ms waiting for the next submission, "
|
||||
"%.2f ms with it queued (untimed work or waits); %.1f gaps over 0.5 ms, longest %.2f ms; submit to start avg %.2f ms",
|
||||
|
||||
Reference in New Issue
Block a user