Commit Graph

1 Commits

Author SHA1 Message Date
8eda018475 Doc: Unify debug logging policy with HAKMEM_BUILD_RELEASE
Policy:
=======
All diagnostic logging must be controlled by HAKMEM_BUILD_RELEASE flag.

Build Modes:
- Release (HAKMEM_BUILD_RELEASE=1): All diagnostics disabled
- Debug (HAKMEM_BUILD_RELEASE=0): Diagnostics enabled (env var controlled)

Implementation Pattern:
- Use guard functions that check HAKMEM_BUILD_RELEASE at compile time
- Example: trc_refill_guard_enabled() (already implemented)
- Avoid direct fprintf() calls in hot paths

Status:
-  Hot path (refill) unified with trc_refill_guard_enabled()
-  92 other diagnostic locations to convert as needed
- 📊 Result: +3.1% performance improvement

See DEBUG_LOGGING_POLICY.md for full guidelines.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-08 01:48:40 +09:00