Repository navigation
Report the build's worker allocations when asked - #9271
Conversation
OCaml's allocation report at exit (OCAMLRUNPARAM=v=0x400) counts only the main domain, and the build compiles on worker domains: a clean build of tests/tests reported 3.2M words instead of about 252M. With REWATCH_REPORT_WORKER_ALLOCATIONS set, the build also prints `worker_allocated_words: <n>`, for the compiler benchmarks. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Kbf3gGPsF3fHZn9rBxA7Hm Signed-off-by: Christoph Knittel <ck@cca.io>
ChangelogNo changelog entry. Semantic Diff1 commit · Full page Report the build's worker allocations when askeda5e4a65 · cknitt + Claude · Nov 09, 2026, 06:45 UTC OCaml's allocation report at exit (OCAMLRUNPARAM=v=0x400) counts only the main domain, and the build compiles on worker domains: a clean build of tests/tests reported 3.2M words instead of about 252M. With REWATCH_REPORT_WORKER_ALLOCATIONS set, the build also prints |
✅ Compiler benchmarksAllocated wordsIn total: 456,989,425 → 456,989,425 (±0.00%). None of the 257 benchmarks changed by 0.1% or more. InstructionsIn total: 10,226,961,997 → 10,226,961,997 (±0.00%). None of the 33 benchmarks changed by 0.1% or more. Pull request a5e4a65 compared with base d47adb3 in this run. |
rescript
@rescript/belt
@rescript/darwin-arm64
@rescript/linux-arm64
@rescript/linux-x64
@rescript/runtime
@rescript/win32-x64
commit: |
|
Developer playground preview: https://rescript-lang.github.io/rescript/dev-playground/?version=pr-9271 |
OCaml 5's allocation report at exit (
OCAMLRUNPARAM=v=0x400) only counts the main domain, while the build compiles on worker domains: a clean build oftests/testsreported 3.2M words instead of about 252M.With
REWATCH_REPORT_WORKER_ALLOCATIONSset, the build also printsworker_allocated_words: <n>at exit. Each worker adds its own count (Gc.counters, minor + major − promoted, as the runtime counts) to a shared atomic counter when it stops. Without the variable nothing changes.This is the base for the build benchmarks in the PR stacked on top, so that their base side reports the workers too. A new check in
rewatch-ocaml/tests/run.shbuilds a one-module project with the variable set and expects a positive count; the variable is documented inrewatch-ocaml/README.mdnext toREWATCH_COMPILER_DOMAINS.🤖 Generated with Claude Code
https://claude.ai/code/session_01Kbf3gGPsF3fHZn9rBxA7Hm