Repository navigation
test(interp): wait out asynchronous compiles in three JIT count tests - #312
Merged
Merged
Conversation
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
Three tests counted Runs or entries as if background compilation finished at a fixed point, and failed on loaded or instrumented runners: - TestPool_Get's pooled-alternation case bounded Runs at threshold+8, exactly the 2x threshold a pool without aggregation would need, so a few Runs of compile latency failed it. It now uses threshold 64, waits 5ms per Run past the threshold instead of spending Runs, and bounds at threshold*3/2, still well short of 2x. - "catches a native callee's throw in its native caller" required batches*calls native entries from a fixed number of batches. It now repeats checked batches until native code carried that many. - "invalidates a caller whose served calls outweigh its work" took one quiet round as settled. It now needs two consecutive rounds with no served call and no compile. Fixes #305 Fixes #294 Fixes #289 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
siyul-park
force-pushed
the
test/jit-async-counts
branch
from
November 10, 2026 02:52
3a671f0 to
4971027
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Three tests counted Runs or native entries as if background compilation finished at a fixed point. Each failed only on loaded or coverage-instrumented runners.
TestPool_Getpooled alternationthreshold+8was exactly the2×thresholda pool without aggregation needs, so a few Runs of compile latency failed it (18 > 16). Now threshold 64, each Run past the threshold sleeps 5 ms so compile latency costs time rather than Runs, and the bound isthreshold*3/2(96, still well short of 128).batches*callsnative entries from exactlybatchesRuns (it got 2033, 1988, 2003 of 2048). Now it repeats fully checked batches, with result and ref counts checked every Run, until native code carries that many entries. A deadline bounds it.vm_jit_compiles_total), so an in-flight compile cannot hide behind a quiet round.Evidence
go test -race -cover, alongside four concurrent fullTestWithThresholdruns as CPU load: all pass.make check(pre-commit) andgit diff --check: pass.Fixes #305
Fixes #294
Fixes #289
🤖 Generated with Claude Code