mirror of
https://github.com/tangerineturtle1/NX2navi.git
synced 2026-11-16 15:59:59 -04:00
The review of the B-4 change found that nothing measured the pool destroys any more. Before it, pool_retire ran destroy_rec inside a completion callback, which trace=perf timed per callback; now pool_dead_drain runs the destroys untimed, and the line only counted them. The drain also runs on whichever collect swaps the list out first, so part of the work can fall on the game's thread in pool_fini's vk_mem_collect, and the play-test the finding plans could not tell where the cost went. pool_dead_drain now times its destroy loop with plat_now_ns and keeps the records, their time and the longest drain apart for the completion thread's vk_mem_collect_try and for vk_mem_collect, whose only caller is pool_fini. The trace=perf "mem: sizes" GPU line gives them since the last line: "of them since the last line: N on the completion thread (X ms, longest drain Y ms), M by pool_fini (X ms, longest drain Y ms)". Diagnostics only: two clock reads per drain that destroys something, and no lock or wait added. Checks that passed: pass_cc_check on vk_memory.c, no new -Wall -Wextra warnings, sync_hw_check, gpa_check, mem_budget_check, tex_release_check, wb_lazy_check, mem_growth_check. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
357 KiB
357 KiB