Skip to content

test(interp): wait out asynchronous compiles in three JIT count tests - #312

Merged
siyul-park merged 2 commits into
mainfrom
test/jit-async-counts
Nov 10, 2026
Merged

siyul-park merged 2 commits into
mainfrom
test/jit-async-counts

Conversation

@siyul-park

Copy link
Copy Markdown
Owner

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.

Issue Test Change
#305 TestPool_Get pooled alternation The bound threshold+8 was exactly the 2×threshold a 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 is threshold*3/2 (96, still well short of 128).
#294 "catches a native callee's throw in its native caller" It needed batches*calls native entries from exactly batches Runs (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.
#289 "invalidates a caller whose served calls outweigh its work" It took one quiet round as settled. Now it needs two consecutive rounds with no served call and no compile (summed vm_jit_compiles_total), so an in-flight compile cannot hide behind a quiet round.

Evidence

Fixes #305
Fixes #294
Fixes #289

🤖 Generated with Claude Code

@coderabbitai

coderabbitai Bot commented Nov 9, 2026 •

Copy link
Copy Markdown

Explain Change →

Important

  • Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: b337fdc0-7763-46e6-8d3e-7e3841a68fcf
Finishing Touches

Generate docstrings

  • Commit to this branch
  • Create a new PR
Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

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
siyul-park force-pushed the test/jit-async-counts branch from 3a671f0 to 4971027 Compare November 10, 2026 02:52
@siyul-park
siyul-park merged commit 55f8569 into main Nov 10, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant