Put the commit census and the per-pool traffic log after the comments they had split from their functions.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
chrg6
2026-11-09 08:20:32 -05:00
parent 567cbada21
commit 2d94ede66a
2 changed files with 3 additions and 3 deletions

View File

@@ -392,8 +392,6 @@ int prof_sampler_start(void) {
return 1;
}
// perf_present, every present: the frame the sampler's NX2NAVI_PROFILE_FRAMES window counts, and a NX2NAVI_PROFILE_SLOW
// dump of a present at least slow_ns after the previous one (d 0 on the first present).
// NX2NAVI_TRACE=perf (perf.c): the process's committed memory by kind, and outside the guest's address range the
// allocations holding the most private memory, so a log shows what grows: guest memory, a heap, the graphics driver's
// mappings or loaded images. A walk of the address space with VirtualQuery: tens of milliseconds, so only now and then.
@@ -456,6 +454,8 @@ void prof_commit_census(uint64_t frame) {
(unsigned long)top[i].protect);
}
// perf_present, every present: the frame the sampler's NX2NAVI_PROFILE_FRAMES window counts, and a NX2NAVI_PROFILE_SLOW
// dump of a present at least slow_ns after the previous one (d 0 on the first present).
void prof_sampler_frame(uint64_t frame, uint64_t now, uint64_t d) {
cur_frame = frame;
// the end of a NX2NAVI_PROFILE_FRAMES window writes the profile then: a test run ended by a timeout never reaches

View File

@@ -2327,7 +2327,6 @@ int vk_mem_mirror_end(VkCommandBuffer cb, uint64_t fence) {
return rec;
}
// One summary line: with NX2NAVI_TRACE=perf every 60 frames, else at frames 600 and 1800.
// NX2NAVI_TRACE=perf, every 600 frames: the mirrored pools that moved the most bytes since the last list, per frame: what
// their CPU writes and flushes copied up, how often a submission synced them, and what the GPU's writes sent back
// (merged or copied). A pool whose upload is close to its size every frame is rewritten whole each frame.
@@ -2368,6 +2367,7 @@ static void mirror_pool_log(uint64_t frame) {
plat_mutex_unlock_shared(&pool_lock);
}
// One summary line: with NX2NAVI_TRACE=perf every 60 frames, else at frames 600 and 1800.
static void mirror_log(uint64_t frame) {
if (gw_on == 1) {
static uint64_t gw_last;