From e5c032c89e4939d0230e5613597ea1eb5349ffdf Mon Sep 17 00:00:00 2001 From: Swung0x48 Date: Sun, 6 Sep 2026 11:29:34 -0400 Subject: [PATCH] [Fix] (Magma): log the mint's high-water at a level a shipped build keeps - The live-object high-water mark is the number review v2's MAJOR 1 wants measured on minecraft-1.21.4-in-world and ...-sodium-in-world, and no desktop gate can produce it. It was emitted at MGLOG_D, which is compiled out of every build that ships and of every build P2 measures, so the line existed only in a configuration nobody runs. - MGLOG_I instead, still only on the allocate-a-new-slot branch and still only at powers of two from 1024 up: at most a handful of lines for a whole session, never one on a draw (ROADMAP.md:7). Declared as a narrow deviation from D20's "MGLOG_D for anything non-critical" in the comment beside it. --- .../DirectVulkan/Renderer/MagmaPipeArms.h | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/MobileGL/MG_Backend/DirectVulkan/Renderer/MagmaPipeArms.h b/MobileGL/MG_Backend/DirectVulkan/Renderer/MagmaPipeArms.h index 34a46b57..f9591b46 100644 --- a/MobileGL/MG_Backend/DirectVulkan/Renderer/MagmaPipeArms.h +++ b/MobileGL/MG_Backend/DirectVulkan/Renderer/MagmaPipeArms.h @@ -295,13 +295,21 @@ namespace MobileGL::MG_Backend::DirectVulkan { const Uint32 index = static_cast(m_entries.size()); m_entries.push_back(Entry{}); m_entries[index].Gen = 1; - // The high-water mark, at powers of two from 1024 up. Once per NEW slot, which is - // once per object this backend has ever seen - never on a draw. This is the number - // D.4.2 should read out of a device log to size anything that ever does need a - // capacity (ROADMAP.md:7: no instrumentation on the hot path). + // The high-water mark, at powers of two from 1024 up: at most a handful of lines + // for a whole session, emitted from the allocate-a-NEW-slot branch, i.e. once per + // object this backend has ever seen and never on a draw (ROADMAP.md:7). + // + // [narrow, declared deviation from D20's "MGLOG_D for anything non-critical"] This + // one is I, not D, because D is compiled out of every build that ships and of every + // build P2 measures, and this line IS the measurement review v2's MAJOR 1 asks for: + // the live-object high-water mark of minecraft-1.21.4-in-world and + // ...-sodium-in-world, which nothing on desktop reaches and no gate here can see. + // The structure no longer has a capacity to size off it, so the number is evidence + // rather than a tuning input - but D.4.2 should still read it out of the device log, + // and it cannot read a line that was compiled away. const SizeT minted = m_entries.size(); if (minted >= 1024 && (minted & (minted - 1)) == 0) { - MGLOG_D("MagmaPipeIdentityTable(%s): high-water %zu slots minted, %u live", + MGLOG_I("MagmaPipeIdentityTable(%s): high-water %zu slots minted, %u live", m_kindName, minted, LiveCount()); } return index;