From 794bf996f1c82df506fe3342848b1e0959033e92 Mon Sep 17 00:00:00 2001 From: "Moe Charm (CI)" Date: Fri, 28 Nov 2025 00:45:27 +0900 Subject: [PATCH] ENV Cleanup Step 2c: Gate debug code in hakmem_tiny_alloc.inc MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Gate tiny_alloc_dump_tls_state() call on allocation failure path with HAKMEM_BUILD_RELEASE guard. Performance: 30.15M ops/s (baseline: 30.2M) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- core/hakmem_tiny_alloc.inc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/core/hakmem_tiny_alloc.inc b/core/hakmem_tiny_alloc.inc index 319d2ade..3ed53c4a 100644 --- a/core/hakmem_tiny_alloc.inc +++ b/core/hakmem_tiny_alloc.inc @@ -327,7 +327,9 @@ void* hak_tiny_alloc(size_t size) { tiny_debug_ring_record(TINY_RING_EVENT_ALLOC_SUCCESS, (uint16_t)class_idx, slow_ptr, 6); HAK_RET_ALLOC_WITH_METRIC(slow_ptr); // Increment stats for slow path success } +#if !HAKMEM_BUILD_RELEASE tiny_alloc_dump_tls_state(class_idx, "fail", &g_tls_slabs[class_idx]); +#endif tiny_debug_ring_record(TINY_RING_EVENT_ALLOC_NULL, (uint16_t)class_idx, NULL, 0); return slow_ptr; }