ENV Cleanup Step 14: Gate HAKMEM_TINY_HEAP_V2_DEBUG

Gate the HeapV2 push debug logging behind #if !HAKMEM_BUILD_RELEASE:
- HAKMEM_TINY_HEAP_V2_DEBUG: Controls magazine push event tracing
- File: core/front/tiny_heap_v2.h:117-130

Wraps the ENV check and debug output that logs the first 5 push
operations per size class for HeapV2 magazine diagnostics.

Performance: 29.6M ops/s (within baseline range)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Moe Charm (CI)
2025-11-28 04:33:39 +09:00
parent be9bdd7812
commit 679c821573

View File

@ -114,6 +114,7 @@ static inline int tiny_heap_v2_try_push(int class_idx, void* base) {
mag->items[mag->top++] = base;
// DEBUG: Log push events
#if !HAKMEM_BUILD_RELEASE
static int g_push_dbg = -1;
if (g_push_dbg == -1) {
const char* e = getenv("HAKMEM_TINY_HEAP_V2_DEBUG");
@ -126,6 +127,7 @@ static inline int tiny_heap_v2_try_push(int class_idx, void* base) {
class_idx, g_push_count[class_idx]++, base, mag->top);
}
}
#endif
return 1; // Success
}