Files
hakmem/benchmarks/Makefile
Moe Charm (CI) 4ef0171bc0 feat: Add ACE allocation failure tracing and debug hooks
This commit introduces a comprehensive tracing mechanism for allocation failures within the Adaptive Cache Engine (ACE) component. This feature allows for precise identification of the root cause for Out-Of-Memory (OOM) issues related to ACE allocations.

Key changes include:
- **ACE Tracing Implementation**:
  - Added  environment variable to enable/disable detailed logging of allocation failures.
  - Instrumented , , and  to distinguish between "Threshold" (size class mismatch), "Exhaustion" (pool depletion), and "MapFail" (OS memory allocation failure).
- **Build System Fixes**:
  - Corrected  to ensure  is properly linked into , resolving an  error.
- **LD_PRELOAD Wrapper Adjustments**:
  - Investigated and understood the  wrapper's behavior under , particularly its interaction with  and  checks.
  - Enabled debugging flags for  environment to prevent unintended fallbacks to 's  for non-tiny allocations, allowing comprehensive testing of the  allocator.
- **Debugging & Verification**:
  - Introduced temporary verbose logging to pinpoint execution flow issues within  interception and  routing. These temporary logs have been removed.
  - Created  to facilitate testing of the tracing features.

This feature will significantly aid in diagnosing and resolving allocation-related OOM issues in  by providing clear insights into the failure pathways.
2025-12-01 16:37:59 +09:00

50 lines
2.3 KiB
Makefile

.PHONY: all comparison tiny random mid comprehensive clean
ROOT := ..
BIN_TINY_HAK := $(ROOT)/bench_tiny_hot_hakmem
BIN_TINY_SYS := $(ROOT)/bench_tiny_hot_system
BIN_TINY_MI := $(ROOT)/bench_tiny_hot_mi
BIN_RM_HAK := $(ROOT)/bench_random_mixed_hakmem
BIN_RM_SYS := $(ROOT)/bench_random_mixed_system
BIN_RM_MI := $(ROOT)/bench_random_mixed_mi
BIN_MID_HAK := $(ROOT)/bench_mid_large_mt_hakmem
BIN_MID_SYS := $(ROOT)/bench_mid_large_mt_system
BIN_MID_MI := $(ROOT)/bench_mid_large_mt_mi
BIN_COMP_HAK := $(ROOT)/bench_comprehensive_hakmem
BIN_COMP_SYS := $(ROOT)/bench_comprehensive_system
all: comparison
comparison: tiny random mid comprehensive
@echo "✅ comparison done"
tiny:
@echo "📊 Tiny Hot Path Comparison:"
@if [ -x $(BIN_TINY_HAK) ]; then echo "HAKMEM:"; $(BIN_TINY_HAK) 100000 256 42; else echo "⚠️ $(BIN_TINY_HAK) not found"; fi
@if [ -x $(BIN_TINY_SYS) ]; then echo "System:"; $(BIN_TINY_SYS) 100000 256 42; else echo "⚠️ $(BIN_TINY_SYS) not found"; fi
@if [ -x $(BIN_TINY_MI) ]; then echo "Mimalloc:"; $(BIN_TINY_MI) 100000 256 42; else echo "⚠️ $(BIN_TINY_MI) not found"; fi
random:
@echo "📊 Random Mixed Comparison:"
@if [ -x $(BIN_RM_HAK) ]; then echo "HAKMEM:"; $(BIN_RM_HAK) 100000 256 42; else echo "⚠️ $(BIN_RM_HAK) not found"; fi
@if [ -x $(BIN_RM_SYS) ]; then echo "System:"; $(BIN_RM_SYS) 100000 256 42; else echo "⚠️ $(BIN_RM_SYS) not found"; fi
@if [ -x $(BIN_RM_MI) ]; then echo "Mimalloc:"; $(BIN_RM_MI) 100000 256 42; else echo "⚠️ $(BIN_RM_MI) not found"; fi
mid:
@echo "📊 Mid/Large Comparison:"
@if [ -x $(BIN_MID_HAK) ]; then echo "HAKMEM:"; $(BIN_MID_HAK) 1 100000 256 42; else echo "⚠️ $(BIN_MID_HAK) not found"; fi
@if [ -x $(BIN_MID_SYS) ]; then echo "System:"; $(BIN_MID_SYS) 1 100000 256 42; else echo "⚠️ $(BIN_MID_SYS) not found"; fi
@if [ -x $(BIN_MID_MI) ]; then echo "Mimalloc:"; $(BIN_MID_MI) 1 100000 256 42; else echo "⚠️ $(BIN_MID_MI) not found"; fi
comprehensive:
@echo "📊 Comprehensive Comparison:"
@if [ -x $(BIN_COMP_HAK) ]; then echo "HAKMEM:"; $(BIN_COMP_HAK) 100000 256 42; else echo "⚠️ $(BIN_COMP_HAK) not found"; fi
@if [ -x $(BIN_COMP_SYS) ]; then echo "System:"; $(BIN_COMP_SYS) 100000 256 42; else echo "⚠️ $(BIN_COMP_SYS) not found"; fi
clean:
@echo "Nothing to clean (skeleton only)"