release: silence runtime logs and stabilize benches
- Fix HAKMEM_LOG gating to use (numeric) so release builds compile out logs. - Switch remaining prints to HAKMEM_LOG or guard with : - core/box/hak_core_init.inc.h (EVO sample warning, shutdown banner) - core/hakmem_config.c (config/feature prints) - core/hakmem.c (BigCache eviction prints) - core/hakmem_tiny_superslab.c (OOM, head init/expand, C7 init diagnostics) - core/hakmem_elo.c (init/evolution) - core/hakmem_batch.c (init/flush/stats) - core/hakmem_ace.c (33KB route diagnostics) - core/hakmem_ace_controller.c (ACE logs macro → no-op in release) - core/hakmem_site_rules.c (init banner) - core/box/hak_free_api.inc.h (unknown method error → release-gated) - Rebuilt benches and verified quiet output for release: - bench_fixed_size_hakmem/system - bench_random_mixed_hakmem/system - bench_mid_large_mt_hakmem/system - bench_comprehensive_hakmem/system Note: Kept debug logs available in debug builds and when explicitly toggled via env.
This commit is contained in:
@ -1,4 +1,5 @@
|
||||
#include <stdio.h>
|
||||
#include "hakmem_internal.h"
|
||||
#include "hakmem_ace.h"
|
||||
#include "hakmem_pool.h"
|
||||
#include "hakmem_l25_pool.h"
|
||||
@ -52,12 +53,16 @@ void* hkm_ace_alloc(size_t size, uintptr_t site_id, const FrozenPolicy* pol) {
|
||||
|
||||
// MidPool: 2–52KiB (Phase 6.21: with Bridge classes for W_MAX rounding)
|
||||
if (size >= 33000 && size <= 34000) {
|
||||
#if !HAKMEM_BUILD_RELEASE
|
||||
fprintf(stderr, "[ACE] Processing 33KB: size=%zu, POOL_MAX_SIZE=%d\n", size, POOL_MAX_SIZE);
|
||||
#endif
|
||||
}
|
||||
if (size <= POOL_MAX_SIZE) {
|
||||
size_t r = round_to_mid_class(size, wmax_mid, pol);
|
||||
if (size >= 33000 && size <= 34000) {
|
||||
#if !HAKMEM_BUILD_RELEASE
|
||||
fprintf(stderr, "[ACE] round_to_mid_class returned: %zu (0 means no valid class)\n", r);
|
||||
#endif
|
||||
}
|
||||
if (r != 0) {
|
||||
// Debug: Log 33KB allocation routing (only in debug builds)
|
||||
@ -67,7 +72,9 @@ void* hkm_ace_alloc(size_t size, uintptr_t site_id, const FrozenPolicy* pol) {
|
||||
}
|
||||
#endif
|
||||
if (size >= 33000 && size <= 34000) {
|
||||
#if !HAKMEM_BUILD_RELEASE
|
||||
fprintf(stderr, "[ACE] Calling hak_pool_try_alloc with size=%zu\n", r);
|
||||
#endif
|
||||
}
|
||||
HKM_TIME_START(t_mid_get);
|
||||
void* p = hak_pool_try_alloc(r, site_id);
|
||||
|
||||
Reference in New Issue
Block a user