ENV Cleanup Step 17: Gate HAKMEM_TINY_RF_TRACE
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 <noreply@anthropic.com>
This commit is contained in:
@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user