Debug Counters Implementation - Clean History

Major Features:
- Debug counter infrastructure for Refill Stage tracking
- Free Pipeline counters (ss_local, ss_remote, tls_sll)
- Diagnostic counters for early return analysis
- Unified larson.sh benchmark runner with profiles
- Phase 6-3 regression analysis documentation

Bug Fixes:
- Fix SuperSlab disabled by default (HAKMEM_TINY_USE_SUPERSLAB)
- Fix profile variable naming consistency
- Add .gitignore patterns for large files

Performance:
- Phase 6-3: 4.79 M ops/s (has OOM risk)
- With SuperSlab: 3.13 M ops/s (+19% improvement)

This is a clean repository without large log files.

🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Moe Charm (CI)
2025-11-05 12:31:14 +09:00
commit 52386401b3
27144 changed files with 124451 additions and 0 deletions

View File

@ -0,0 +1,52 @@
#!/usr/bin/env bash
set -euo pipefail
# Sweep Tiny parameters via env for 1664B and capture throughput.
# This keeps code unchanged and only toggles env knobs:
# - HAKMEM_TINY_TLS_SLL: 0/1
# - HAKMEM_TINY_MAG_CAP: e.g. 128/256/512/1024
#
# Usage: scripts/sweep_tiny_params.sh [cycles]
ROOT_DIR=$(cd "$(dirname "$0")/.." && pwd)
cd "$ROOT_DIR"
cycles=${1:-150000}
make -s bench_fast >/dev/null
TS=$(date +%Y%m%d_%H%M%S)
OUTDIR="bench_results/sweep_tiny_${TS}"
mkdir -p "$OUTDIR"
CSV="$OUTDIR/results.csv"
echo "size,sll,mag_cap,throughput_mops" > "$CSV"
sizes=(16 32 64)
slls=(1 0)
mags=(128 256 512 1024 2048)
run_case() {
local size="$1"; shift
local sll="$1"; shift
local cap="$1"; shift
local out
HAKMEM_TINY_TLS_SLL="$sll" HAKMEM_TINY_MAG_CAP="$cap" ./bench_tiny_hot_hakmem "$size" 100 "$cycles" \
| sed -n 's/^Throughput: \([0-9.][0-9.]*\) M ops.*/\1/p' >"$OUTDIR/tmp.txt" || true
out=$(cat "$OUTDIR/tmp.txt" || true)
if [[ -n "$out" ]]; then
echo "$size,$sll,$cap,$out" >> "$CSV"
fi
}
for sz in "${sizes[@]}"; do
for sll in "${slls[@]}"; do
for cap in "${mags[@]}"; do
echo "[sweep] size=$sz sll=$sll cap=$cap cycles=$cycles"
run_case "$sz" "$sll" "$cap"
done
done
done
echo "[done] CSV: $CSV"
grep -E '^(size|16|32|64),' "$CSV" | sed -n '1,30p' || true