Moe Charm (CI)
6570f52f7b
Remove debug overhead from release builds (19 hotspots)
Problem:
- Release builds (-DHAKMEM_BUILD_RELEASE=1) still execute debug code
- fprintf, getenv(), atomic counters in hot paths
- Performance: 9M ops/s vs System malloc 43M ops/s (4.8x slower)
Fixed hotspots:
1. hak_alloc_api.inc.h - atomic_fetch_add + fprintf every alloc
2. hak_free_api.inc.h - Free wrapper trace + route trace
3. hak_wrappers.inc.h - Malloc wrapper logs
4. tiny_free_fast.inc.h - getenv() every free (CRITICAL!)
5. hakmem_tiny_refill.inc.h - Expensive validation
6. hakmem_tiny_sfc.c - SFC initialization logs
7. tiny_alloc_fast_sfc.inc.h - getenv() caching
Changes:
- Guard all fprintf/printf with #if !HAKMEM_BUILD_RELEASE
- Cache getenv() results in TLS variables (debug builds only)
- Remove atomic counters from hot paths in release builds
- Add no-op stubs for release builds
Impact:
- All debug code completely eliminated in release builds
- Expected improvement: Limited (deeper profiling needed)
- Root cause: Performance bottleneck exists beyond debug overhead
Note: Benchmark results show debug removal alone insufficient for
performance goals. Further investigation required with perf profiling.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-13 13:32:58 +09:00
..
2025-11-13 13:32:58 +09:00
2025-11-13 06:50:20 +09:00
2025-11-11 01:47:06 +09:00
2025-11-05 12:31:14 +09:00
2025-11-05 12:31:14 +09:00
2025-11-05 12:31:14 +09:00
2025-11-05 12:31:14 +09:00
2025-11-05 12:31:14 +09:00
2025-11-05 12:31:14 +09:00
2025-11-05 12:31:14 +09:00
2025-11-11 01:47:06 +09:00
2025-11-05 12:31:14 +09:00
2025-11-11 01:47:06 +09:00
2025-11-05 12:31:14 +09:00
2025-11-08 17:08:00 +09:00
2025-11-08 17:08:00 +09:00
2025-11-11 21:49:05 +09:00
2025-11-11 01:47:06 +09:00
2025-11-05 12:31:14 +09:00
2025-11-05 12:31:14 +09:00
2025-11-05 12:31:14 +09:00
2025-11-11 01:47:06 +09:00
2025-11-05 12:31:14 +09:00
2025-11-05 12:31:14 +09:00
2025-11-05 12:31:14 +09:00
2025-11-05 12:31:14 +09:00
2025-11-11 01:47:06 +09:00
2025-11-05 12:31:14 +09:00
2025-11-05 12:31:14 +09:00
2025-11-05 12:31:14 +09:00
2025-11-05 12:31:14 +09:00
2025-11-05 12:31:14 +09:00
2025-11-05 12:31:14 +09:00
2025-11-05 12:31:14 +09:00
2025-11-05 12:31:14 +09:00
2025-11-05 12:31:14 +09:00
2025-11-05 12:31:14 +09:00
2025-11-05 12:31:14 +09:00
2025-11-08 12:54:52 +09:00
2025-11-05 12:31:14 +09:00
2025-11-05 12:31:14 +09:00
2025-11-06 21:54:12 +09:00
2025-11-07 01:27:04 +09:00
2025-11-07 01:27:04 +09:00
2025-11-07 01:27:04 +09:00
2025-11-05 12:31:14 +09:00
2025-11-05 12:31:14 +09:00
2025-11-05 12:31:14 +09:00
2025-11-11 01:47:06 +09:00
2025-11-05 12:31:14 +09:00
2025-11-05 12:31:14 +09:00
2025-11-05 12:31:14 +09:00
2025-11-05 12:31:14 +09:00
2025-11-05 12:31:14 +09:00
2025-11-07 18:07:48 +09:00
2025-11-07 18:07:48 +09:00
2025-11-05 12:31:14 +09:00
2025-11-05 12:31:14 +09:00
2025-11-05 12:31:14 +09:00
2025-11-05 12:31:14 +09:00
2025-11-13 06:50:20 +09:00
2025-11-05 12:31:14 +09:00
2025-11-13 06:50:20 +09:00
2025-11-13 06:50:20 +09:00
2025-11-13 06:50:20 +09:00
2025-11-05 12:31:14 +09:00
2025-11-13 06:50:20 +09:00
2025-11-13 06:50:20 +09:00
2025-11-13 06:50:20 +09:00
2025-11-07 01:27:04 +09:00
2025-11-11 21:49:05 +09:00
2025-11-07 01:27:04 +09:00
2025-11-05 12:31:14 +09:00
2025-11-13 06:50:20 +09:00
2025-11-13 05:21:36 +09:00
2025-11-07 01:27:04 +09:00
2025-11-13 06:50:20 +09:00
2025-11-13 06:50:20 +09:00
2025-11-13 06:50:20 +09:00
2025-11-13 01:45:30 +09:00
2025-11-12 13:57:46 +09:00
2025-11-05 12:31:14 +09:00
2025-11-13 06:50:20 +09:00
2025-11-13 06:50:20 +09:00
2025-11-05 12:31:14 +09:00
2025-11-10 16:48:20 +09:00
2025-11-05 12:31:14 +09:00
2025-11-05 12:31:14 +09:00
2025-11-13 06:50:20 +09:00
2025-11-13 06:50:20 +09:00
2025-11-13 13:32:58 +09:00
2025-11-05 12:31:14 +09:00
2025-11-05 12:31:14 +09:00
2025-11-05 12:31:14 +09:00
2025-11-05 12:31:14 +09:00
2025-11-05 12:31:14 +09:00
2025-11-05 12:31:14 +09:00
2025-11-05 12:31:14 +09:00
2025-11-13 13:32:58 +09:00
2025-11-05 12:31:14 +09:00
2025-11-05 12:31:14 +09:00
2025-11-05 12:31:14 +09:00
2025-11-11 10:00:36 +09:00
2025-11-07 01:27:04 +09:00
2025-11-05 12:31:14 +09:00
2025-11-05 12:31:14 +09:00
2025-11-07 01:27:04 +09:00
2025-11-10 03:00:00 +09:00
2025-11-11 00:02:24 +09:00
2025-11-07 21:45:20 +09:00
2025-11-13 06:50:20 +09:00
2025-11-13 06:50:20 +09:00
2025-11-13 05:43:31 +09:00
2025-11-13 06:50:20 +09:00
2025-11-10 16:48:20 +09:00
2025-11-13 05:21:36 +09:00
2025-11-13 05:21:36 +09:00
2025-11-13 06:50:20 +09:00
2025-11-13 06:50:20 +09:00
2025-11-05 12:31:14 +09:00
2025-11-05 12:31:14 +09:00
2025-11-05 12:31:14 +09:00
2025-11-05 12:31:14 +09:00
2025-11-11 01:47:06 +09:00
2025-11-05 12:31:14 +09:00
2025-11-11 01:47:06 +09:00
2025-11-10 18:04:08 +09:00
2025-11-05 12:31:14 +09:00
2025-11-09 18:55:50 +09:00
2025-11-09 16:49:34 +09:00
2025-11-08 23:53:25 +09:00
2025-11-09 18:55:50 +09:00
2025-11-09 18:55:50 +09:00
2025-11-09 18:55:50 +09:00
2025-11-09 18:55:50 +09:00
2025-11-09 18:55:50 +09:00
2025-11-09 18:55:50 +09:00
2025-11-09 18:55:50 +09:00
2025-11-09 18:55:50 +09:00
2025-11-09 18:55:50 +09:00
2025-11-13 06:50:20 +09:00
2025-11-13 06:50:20 +09:00
2025-11-13 03:53:01 +09:00
2025-11-13 06:50:20 +09:00
2025-11-08 17:08:00 +09:00
2025-11-13 07:43:30 +09:00
2025-11-13 13:32:58 +09:00
2025-11-13 06:50:20 +09:00
2025-11-06 21:54:12 +09:00
2025-11-05 12:31:14 +09:00
2025-11-13 06:50:20 +09:00
2025-11-13 03:53:01 +09:00
2025-11-13 03:53:01 +09:00
2025-11-05 12:31:14 +09:00
2025-11-13 06:50:20 +09:00
2025-11-13 06:50:20 +09:00
2025-11-09 23:15:02 +09:00
2025-11-13 01:45:30 +09:00
2025-11-13 13:32:58 +09:00
2025-11-13 06:50:20 +09:00
2025-11-07 01:27:04 +09:00
2025-11-13 06:50:20 +09:00
2025-11-07 01:27:04 +09:00
2025-11-05 12:31:14 +09:00
2025-11-07 01:27:04 +09:00
2025-11-07 18:07:48 +09:00
2025-11-13 06:50:20 +09:00
2025-11-07 18:07:48 +09:00
2025-11-13 06:50:20 +09:00
2025-11-07 01:27:04 +09:00
2025-11-11 00:02:24 +09:00
2025-11-05 12:31:14 +09:00
2025-11-11 21:49:05 +09:00
2025-11-07 01:27:04 +09:00
2025-11-05 12:31:14 +09:00
2025-11-13 01:45:30 +09:00
2025-11-13 06:50:20 +09:00
2025-11-06 21:54:12 +09:00
2025-11-07 22:34:24 +09:00
2025-11-05 12:31:14 +09:00