summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakashi Kokubun <takashikkbn@gmail.com>2021-08-12 23:15:34 -0700
committerTakashi Kokubun <takashikkbn@gmail.com>2021-08-12 23:15:34 -0700
commitb64f81c81729bbc248d19af01cafde88eb60fdc7 (patch)
tree0624d3ba3bc514ab9f787745639f0403adec7752
parentb3f8c491efefc0461ab225d062f6c64286498609 (diff)
Pause an MJIT worker when JIT is cancelled
-rw-r--r--NEWS.md2
-rw-r--r--mjit.c3
2 files changed, 5 insertions, 0 deletions
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