Fix C7 warm/TLS Release path and unify debug instrumentation
This commit is contained in:
@ -13,9 +13,16 @@
|
||||
#include <stdint.h>
|
||||
#include <time.h>
|
||||
#include <string.h>
|
||||
#include <stdatomic.h>
|
||||
#define C7_META_COUNTER_DEFINE
|
||||
#include "core/box/c7_meta_used_counter_box.h"
|
||||
#undef C7_META_COUNTER_DEFINE
|
||||
#include "core/box/warm_pool_rel_counters_box.h"
|
||||
|
||||
#ifdef USE_HAKMEM
|
||||
#include "hakmem.h"
|
||||
#include "hakmem_build_flags.h"
|
||||
#include "core/box/c7_meta_used_counter_box.h"
|
||||
|
||||
// Box BenchMeta: Benchmark metadata management (bypass hakmem wrapper)
|
||||
// Phase 15: Separate BenchMeta (slots array) from CoreAlloc (user workload)
|
||||
@ -253,6 +260,38 @@ int main(int argc, char** argv){
|
||||
extern void tiny_warm_pool_print_stats_public(void);
|
||||
tiny_warm_pool_print_stats_public();
|
||||
|
||||
#if HAKMEM_BUILD_RELEASE
|
||||
// Minimal Release-side telemetry to verify Warm path usage (C7-only)
|
||||
extern _Atomic uint64_t g_rel_c7_warm_pop;
|
||||
extern _Atomic uint64_t g_rel_c7_warm_push;
|
||||
fprintf(stderr,
|
||||
"[REL_C7_CARVE] attempts=%llu success=%llu zero=%llu\n",
|
||||
(unsigned long long)warm_pool_rel_c7_carve_attempts(),
|
||||
(unsigned long long)warm_pool_rel_c7_carve_successes(),
|
||||
(unsigned long long)warm_pool_rel_c7_carve_zeroes());
|
||||
fprintf(stderr,
|
||||
"[REL_C7_WARM] pop=%llu push=%llu\n",
|
||||
(unsigned long long)atomic_load_explicit(&g_rel_c7_warm_pop, memory_order_relaxed),
|
||||
(unsigned long long)atomic_load_explicit(&g_rel_c7_warm_push, memory_order_relaxed));
|
||||
fprintf(stderr,
|
||||
"[REL_C7_WARM_PREFILL] calls=%llu slabs=%llu\n",
|
||||
(unsigned long long)warm_pool_rel_c7_prefill_calls(),
|
||||
(unsigned long long)warm_pool_rel_c7_prefill_slabs());
|
||||
fprintf(stderr,
|
||||
"[REL_C7_META_USED_INC] total=%llu backend=%llu tls=%llu front=%llu\n",
|
||||
(unsigned long long)c7_meta_used_total(),
|
||||
(unsigned long long)c7_meta_used_backend(),
|
||||
(unsigned long long)c7_meta_used_tls(),
|
||||
(unsigned long long)c7_meta_used_front());
|
||||
#else
|
||||
fprintf(stderr,
|
||||
"[DBG_C7_META_USED_INC] total=%llu backend=%llu tls=%llu front=%llu\n",
|
||||
(unsigned long long)c7_meta_used_total(),
|
||||
(unsigned long long)c7_meta_used_backend(),
|
||||
(unsigned long long)c7_meta_used_tls(),
|
||||
(unsigned long long)c7_meta_used_front());
|
||||
#endif
|
||||
|
||||
// Phase 21-1: Ring cache - DELETED (A/B test: OFF is faster)
|
||||
// extern void ring_cache_print_stats(void);
|
||||
// ring_cache_print_stats();
|
||||
|
||||
Reference in New Issue
Block a user