From 7d0782d5b6feb4b69736b3b6ae77a3616cce61b6 Mon Sep 17 00:00:00 2001 From: "Moe Charm (CI)" Date: Fri, 28 Nov 2025 04:36:37 +0900 Subject: [PATCH] ENV Cleanup Step 17: Gate HAKMEM_TINY_RF_TRACE MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Gate the refill trace debug variable behind #if !HAKMEM_BUILD_RELEASE: - HAKMEM_TINY_RF_TRACE: Controls refill/mailbox publish path tracing - File: core/tiny_publish.c:21-34 (1 call site gated) Other 2 call sites already gated: - core/tiny_refill.h:94 (already inside #if !HAKMEM_BUILD_RELEASE) - core/box/mailbox_box.c:64 (already inside #if !HAKMEM_BUILD_RELEASE) Performance: 30.7M ops/s avg (baseline maintained, 3 runs: 30.6M, 30.9M, 30.7M) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- core/tiny_publish.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/core/tiny_publish.c b/core/tiny_publish.c index 9e2d1ff0..a1925d0d 100644 --- a/core/tiny_publish.c +++ b/core/tiny_publish.c @@ -18,6 +18,7 @@ void tiny_publish_notify(int class_idx, SuperSlab* ss, int slab_idx) { g_pub_notify_calls[class_idx]++; tiny_debug_ring_record(TINY_RING_EVENT_SUPERSLAB_PUBLISH, (uint16_t)class_idx, ss, (uintptr_t)slab_idx); // One-shot visibility trace (env: HAKMEM_TINY_RF_TRACE) +#if !HAKMEM_BUILD_RELEASE static int trace_en = -1; if (__builtin_expect(trace_en == -1, 0)) { const char* e = getenv("HAKMEM_TINY_RF_TRACE"); @@ -30,5 +31,6 @@ void tiny_publish_notify(int class_idx, SuperSlab* ss, int slab_idx) { fprintf(stderr, "[PUBTRACE] notify class=%d ss=%p slab=%d\n", class_idx, (void*)ss, slab_idx); } } +#endif mailbox_box_publish(class_idx, ss, slab_idx); }