summaryrefslogtreecommitdiff
path: root/internal
diff options
context:
space:
mode:
authorTakashi Kokubun <takashikkbn@gmail.com>2022-10-19 17:18:59 -0700
committerTakashi Kokubun <takashikkbn@gmail.com>2022-10-19 17:20:48 -0700
commitd9d9005a3a31d0df0b5432eba5d6f2b9bd647cb1 (patch)
treefac1ad347a511fa970a2bf5d0f8eff1122baacbb /internal
parent0d360ee7ff962ef66667a75a912c3980c4f5b217 (diff)
MJIT: Stop using the VM barrier for jit_cont
This solves multiple problems. First, RB_VM_LOCK_ENTER/LEAVE is a barrier. We could at least use the _NO_BARRIER variant. Second, this doesn't need to interfere with GC or other GVL users when multiple Ractors are used. This needs to be used in very few places, so the benefit of fine-grained locking would outweigh its small maintenance cost. Third, it fixes a crash for YJIT. Because YJIT is never disabled until a process exits unlike MJIT that finishes earlier, we could call jit_cont_free when EC no longer exists, which crashes RB_VM_LOCK_ENTER.
Diffstat (limited to 'internal')
-rw-r--r--internal/cont.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/internal/cont.h b/internal/cont.h
index 38fab4f8ac..acac0254d3 100644
--- a/internal/cont.h
+++ b/internal/cont.h
@@ -18,7 +18,7 @@ struct rb_execution_context_struct; /* in vm_core.c */
/* cont.c */
void rb_fiber_reset_root_local_storage(struct rb_thread_struct *);
void ruby_register_rollback_func_for_ensure(VALUE (*ensure_func)(VALUE), VALUE (*rollback_func)(VALUE));
-void rb_fiber_init_jit_cont(struct rb_fiber_struct *fiber);
+void rb_jit_cont_init(void);
void rb_jit_cont_each_iseq(rb_iseq_callback callback, void *data);
void rb_jit_cont_finish(void);