Files
hakmem/quick_bench_compare.sh
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

20 lines
689 B
Bash
Executable File

#!/bin/bash
run_bench() {
name=$1
cmd=$2
echo "=== $name ==="
# Merge stderr to stdout for grep, relax match
timeout 5s $cmd 2>&1 | grep "Throughput" || echo "Timed out or Failed (check raw output)"
echo ""
}
# HAKMEM
run_bench "HAKMEM (ws=256)" "./bench_random_mixed_hakmem 100000 256 42"
run_bench "HAKMEM (ws=2048)" "./bench_random_mixed_hakmem 100000 2048 42"
run_bench "HAKMEM (ws=8192)" "./bench_random_mixed_hakmem 100000 8192 42"
# mimalloc
run_bench "mimalloc (ws=256)" "./bench_random_mixed_mi 100000 256 42"
run_bench "mimalloc (ws=2048)" "./bench_random_mixed_mi 100000 2048 42"
run_bench "mimalloc (ws=8192)" "./bench_random_mixed_mi 100000 8192 42"