ruby-changes:69345
From: Alan <ko1@a...>
Date: Sat, 23 Oct 2021 06:22:55 +0900 (JST)
Subject: [ruby-changes:69345] f80069820e (master): YJIT: Don't take VM lock on constant IC fill when disabled
https://git.ruby-lang.org/ruby.git/commit/?id=f80069820e From f80069820e1f7d44ef9c385254d498468a352021 Mon Sep 17 00:00:00 2001 From: Alan Wu <XrXr@u...> Date: Fri, 22 Oct 2021 13:41:34 -0400 Subject: YJIT: Don't take VM lock on constant IC fill when disabled While theoretically it's fine to take the lock and then immediately release it, we don't need to do it when YJIT is off. --- yjit_iface.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/yjit_iface.c b/yjit_iface.c index 73b51fd50d..870a8d1efd 100644 --- a/yjit_iface.c +++ b/yjit_iface.c @@ -592,6 +592,8 @@ rb_yjit_constant_state_changed(void) https://github.com/ruby/ruby/blob/trunk/yjit_iface.c#L592 void rb_yjit_constant_ic_update(const rb_iseq_t *iseq, IC ic) { + if (!rb_yjit_enabled_p()) return; + // We can't generate code in these situations, so no need to invalidate. // See gen_opt_getinlinecache. if (ic->entry->ic_cref || rb_multi_ractor_p()) { -- cgit v1.2.1 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/