diff --git a/NEWS.md b/NEWS.md index 85f49d4846..6b78cec01a 100644 --- a/NEWS.md +++ b/NEWS.md @@ -179,6 +179,8 @@ Excluding feature bug fixes. * `--jit-verbose` and `--jit-warning` output "JIT cancel" when JIT-ed code is disabled because TracePoint or GC.compact is used. +* Pause an MJIT worker when JIT-ed code gets disabled. + * `RubyVM::MJIT` is renamed to `RubyVM::JIT`. [[Feature #17490]] ## Static analysis diff --git a/mjit.c b/mjit.c index 57f28476ca..1f90ac0007 100644 --- a/mjit.c +++ b/mjit.c @@ -91,6 +91,9 @@ mjit_cancel_all(const char *reason) if (mjit_opts.warnings || mjit_opts.verbose) { fprintf(stderr, "JIT cancel: Disabled JIT-ed code because %s\n", reason); } + + // Currently we never re-enable JIT calls. Thus we don't need to run JIT anymore. + mjit_pause(false); } // Deal with ISeq movement from compactor