diff --git a/core/tiny_alloc_fast.inc.h b/core/tiny_alloc_fast.inc.h index 2f9f09a6..1d31a004 100644 --- a/core/tiny_alloc_fast.inc.h +++ b/core/tiny_alloc_fast.inc.h @@ -417,7 +417,8 @@ static inline void* tiny_alloc_fast_pop(int class_idx) { #endif // Phase 1: Try array stack (FastCache) first for hottest tiny classes (C0–C3) - if (__builtin_expect(g_fastcache_enable && class_idx <= 3, 1)) { + // Phase 7-Step4: Use config macro for dead code elimination in PGO mode + if (__builtin_expect(TINY_FRONT_FASTCACHE_ENABLED && class_idx <= 3, 1)) { void* fc = fastcache_pop(class_idx); if (__builtin_expect(fc != NULL, 1)) { // Frontend FastCache hit (already tracked by g_front_fc_hit) @@ -752,7 +753,8 @@ static inline void* tiny_alloc_fast(size_t size) { } #endif - if (__builtin_expect(ultra_slim_mode_enabled(), 0)) { + // Phase 7-Step4: Use config macro for dead code elimination in PGO mode + if (__builtin_expect(TINY_FRONT_ULTRA_SLIM_ENABLED, 0)) { return ultra_slim_alloc_with_refill(size); } // ========== End Phase 19-2: Ultra SLIM ========== @@ -804,7 +806,8 @@ static inline void* tiny_alloc_fast(size_t size) { void* ptr = NULL; // Front-V2: TLS magazine front (A/B, default OFF) - if (__builtin_expect(tiny_heap_v2_enabled() && front_prune_heapv2_enabled() && class_idx <= 3, 0)) { + // Phase 7-Step4: Use config macro for dead code elimination in PGO mode + if (__builtin_expect(TINY_FRONT_HEAP_V2_ENABLED && front_prune_heapv2_enabled() && class_idx <= 3, 0)) { void* hv2 = tiny_heap_v2_alloc_by_class(class_idx); if (hv2) { front_metrics_heapv2_hit(class_idx);