@@ -5,6 +5,8 @@ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
55PYTHON_BIN=" ${PYTHON_BIN:- $SCRIPT_DIR / .venv/ bin/ python} "
66ARTIFACT_ROOT=" ${ARTIFACT_ROOT:- $SCRIPT_DIR / artifacts/ linux_gap_close} "
77DMD_BIN=" ${DMD_BIN:- $SCRIPT_DIR / .locald/ dmd-nightly/ linux/ bin64/ dmd} "
8+ PROFILE_DMD_BIN=" ${PROFILE_DMD_BIN:- $DMD_BIN } "
9+ PARSER_DMD_BIN=" ${PARSER_DMD_BIN:- $DMD_BIN } "
810LDC2_BIN=" ${LDC2_BIN:- $SCRIPT_DIR / .locald/ ldc-1.42.0/ bin/ ldc2} "
911CLANG_BIN=" ${CLANG_BIN:- clang} "
1012PARSER_THREADS=" ${PARSER_THREADS:- 1,2,4,8} "
@@ -23,7 +25,9 @@ Runs Linux-focused closure for remaining "partial" items:
2325Options:
2426 --python-bin <path> Python executable (default: .venv/bin/python)
2527 --artifact-root <path> Output root (default: artifacts/linux_gap_close)
26- --dmd-bin <path> DMD binary for not_done_experiments profile/parser tasks
28+ --dmd-bin <path> Legacy default DMD binary for both profile/parser tasks
29+ --profile-dmd-bin <path> DMD binary for dmd_profile_compare
30+ --parser-dmd-bin <path> DMD binary for parser_incompiler_parallel
2731 --ldc2-bin <path> LDC2 binary path
2832 --clang-bin <path> Clang binary path
2933 --parser-threads <csv> Parser in-compiler thread counts (default: 1,2,4,8)
@@ -41,7 +45,14 @@ while [[ $# -gt 0 ]]; do
4145 case " $1 " in
4246 --python-bin) PYTHON_BIN=" $2 " ; shift 2 ;;
4347 --artifact-root) ARTIFACT_ROOT=" $2 " ; shift 2 ;;
44- --dmd-bin) DMD_BIN=" $2 " ; shift 2 ;;
48+ --dmd-bin)
49+ DMD_BIN=" $2 "
50+ PROFILE_DMD_BIN=" $2 "
51+ PARSER_DMD_BIN=" $2 "
52+ shift 2
53+ ;;
54+ --profile-dmd-bin) PROFILE_DMD_BIN=" $2 " ; shift 2 ;;
55+ --parser-dmd-bin) PARSER_DMD_BIN=" $2 " ; shift 2 ;;
4556 --ldc2-bin) LDC2_BIN=" $2 " ; shift 2 ;;
4657 --clang-bin) CLANG_BIN=" $2 " ; shift 2 ;;
4758 --parser-threads) PARSER_THREADS=" $2 " ; shift 2 ;;
@@ -66,6 +77,16 @@ if [[ ! -x "$PYTHON_BIN" ]]; then
6677 exit 2
6778fi
6879
80+ if [[ ! -x " $PROFILE_DMD_BIN " ]]; then
81+ echo " Profile DMD binary not executable: $PROFILE_DMD_BIN " >&2
82+ exit 2
83+ fi
84+
85+ if [[ ! -x " $PARSER_DMD_BIN " ]]; then
86+ echo " Parser DMD binary not executable: $PARSER_DMD_BIN " >&2
87+ exit 2
88+ fi
89+
6990mkdir -p " $ARTIFACT_ROOT "
7091
7192if ! command -v perf > /dev/null 2>&1 ; then
@@ -90,16 +111,63 @@ log "Step 2/4: Analyze release sweep"
90111
91112log " Step 3/4: Linux not_done subset (dmd profile + in-compiler parser threading)"
92113" $PYTHON_BIN " " $SCRIPT_DIR /not_done_experiments.py" \
93- --out-dir " $NOT_DONE_DIR " \
94- --tasks dmd_profile_compare,parser_incompiler_parallel \
95- --dmd " $DMD_BIN " \
114+ --out-dir " $NOT_DONE_DIR /profile" \
115+ --tasks dmd_profile_compare \
116+ --dmd " $PROFILE_DMD_BIN " \
117+ --ldc2 " $LDC2_BIN " \
118+ --clang " $CLANG_BIN " \
119+ --task-timeout 900
120+
121+ " $PYTHON_BIN " " $SCRIPT_DIR /not_done_experiments.py" \
122+ --out-dir " $NOT_DONE_DIR /parser" \
123+ --tasks parser_incompiler_parallel \
124+ --dmd " $PARSER_DMD_BIN " \
96125 --ldc2 " $LDC2_BIN " \
97126 --clang " $CLANG_BIN " \
98127 --parser-threads " $PARSER_THREADS " \
99128 --parser-repeats " $PARSER_REPEATS " \
100129 --parser-file-count " $PARSER_FILE_COUNT " \
101130 --task-timeout 900
102131
132+ " $PYTHON_BIN " - " $NOT_DONE_DIR /profile/status.csv" " $NOT_DONE_DIR /parser/status.csv" " $NOT_DONE_DIR /status.csv" " $NOT_DONE_DIR /status.md" << 'PY '
133+ import csv
134+ import sys
135+ from pathlib import Path
136+
137+ profile_csv = Path(sys.argv[1])
138+ parser_csv = Path(sys.argv[2])
139+ out_csv = Path(sys.argv[3])
140+ out_md = Path(sys.argv[4])
141+
142+ rows = []
143+ fieldnames = set()
144+ for path in (profile_csv, parser_csv):
145+ if not path.exists():
146+ continue
147+ with path.open("r", encoding="utf-8") as handle:
148+ reader = csv.DictReader(handle)
149+ for row in reader:
150+ rows.append(row)
151+ fieldnames.update(row.keys())
152+
153+ ordered = ["task", "status", "task_key"] + sorted(k for k in fieldnames if k not in {"task", "status", "task_key"})
154+ with out_csv.open("w", newline="", encoding="utf-8") as handle:
155+ writer = csv.DictWriter(handle, fieldnames=ordered)
156+ writer.writeheader()
157+ for row in rows:
158+ writer.writerow({key: row.get(key, "") for key in ordered})
159+
160+ lines = [
161+ "# Linux not_done status",
162+ "",
163+ "| Task | Status | Task Key |",
164+ "|---|---|---|",
165+ ]
166+ for row in rows:
167+ lines.append(f"| {row.get('task', '')} | {row.get('status', '')} | {row.get('task_key', '')} |")
168+ out_md.write_text("\n".join(lines) + "\n", encoding="utf-8")
169+ PY
170+
103171log " Step 4/4: Build summary"
104172" $PYTHON_BIN " - " $RELEASE_DIR " " $NOT_DONE_DIR " " $SUMMARY_FILE " << 'PY '
105173import csv
@@ -114,7 +182,7 @@ summary_file = Path(sys.argv[3])
114182latest_csv = release_dir / "latest20" / "results_raw.csv"
115183compat_csv = release_dir / "compatible20" / "results_raw.csv"
116184status_csv = not_done_dir / "status.csv"
117- parser_speedup_csv = not_done_dir / "parser_incompiler_parallel" / "speedup.csv"
185+ parser_speedup_csv = not_done_dir / "parser" / " parser_incompiler_parallel" / "speedup.csv"
118186
119187def count_ok_fail(path: Path):
120188 ok = fail = 0
0 commit comments