ruby-changes:73466
From: Takashi <ko1@a...>
Date: Wed, 7 Sep 2022 14:14:35 +0900 (JST)
Subject: [ruby-changes:73466] 496bdf01e2 (master): Adjust pch_status for --mjit=pause
https://git.ruby-lang.org/ruby.git/commit/?id=496bdf01e2 From 496bdf01e25cb13f0b676d0f23f47bb04907b1f6 Mon Sep 17 00:00:00 2001 From: Takashi Kokubun <takashikkbn@g...> Date: Tue, 6 Sep 2022 18:46:49 -0700 Subject: Adjust pch_status for --mjit=pause to let mjit_add_iseq_to_process work --- mjit.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mjit.c b/mjit.c index 67b6845cb6..864e682c24 100644 --- a/mjit.c +++ b/mjit.c @@ -1961,6 +1961,7 @@ mjit_resume(void) https://github.com/ruby/ruby/blob/trunk/mjit.c#L1961 if (rb_respond_to(rb_mMJITCompiler, rb_intern("compile"))) { // [experimental] defining RubyVM::MJIT.compile allows you to replace JIT mjit_opts.custom = true; + pch_status = PCH_SUCCESS; } else { // Lazy MJIT boot @@ -2041,7 +2042,7 @@ mjit_finish(bool close_handle_p) https://github.com/ruby/ruby/blob/trunk/mjit.c#L2042 mjit_dump_total_calls(); #endif - if (!mjit_opts.save_temps && getpid() == pch_owner_pid && pch_status != PCH_NOT_READY) + if (!mjit_opts.save_temps && getpid() == pch_owner_pid && pch_status == PCH_SUCCESS && !mjit_opts.custom) remove_file(pch_file); xfree(header_file); header_file = NULL; -- cgit v1.2.1 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/