ruby-changes:64451
From: Takashi <ko1@a...>
Date: Tue, 22 Dec 2020 15:08:02 +0900 (JST)
Subject: [ruby-changes:64451] 15b81edd86 (master): MJIT is enabled whenever an MJIT header is used
https://git.ruby-lang.org/ruby.git/commit/?id=15b81edd86 From 15b81edd86a760331cb551b39882fab6fb9f4e37 Mon Sep 17 00:00:00 2001 From: Takashi Kokubun <takashikkbn@g...> Date: Mon, 21 Dec 2020 22:05:58 -0800 Subject: MJIT is enabled whenever an MJIT header is used ``` $ benchmark-driver -v --rbenv 'before --jit;after --jit' --repeat-count=4 --alternate --output=all benchmark.yml before --jit: ruby 3.0.0dev (2020-12-22T05:16:39Z master 692af8e8f8) +JIT [x86_64-linux] after --jit: ruby 3.0.0dev (2020-12-22T06:05:59Z master d2ca23fdbc) +JIT [x86_64-linux] last_commit=MJIT is enabled whenever an MJIT header is used Calculating ------------------------------------- before --jit after --jit Optcarrot 180 frames 86.61115328062763 91.49245232931852 fps 90.18653732453176 92.31139517827663 91.29817884736318 93.84437713805814 92.76118222412521 93.91929147901106 ``` diff --git a/mjit.h b/mjit.h index a523bc9..dd23cf7 100644 --- a/mjit.h +++ b/mjit.h @@ -187,7 +187,11 @@ mjit_exec(rb_execution_context_t *ec) https://github.com/ruby/ruby/blob/trunk/mjit.h#L187 void mjit_child_after_fork(void); +# ifdef MJIT_HEADER +#define mjit_enabled true +# else // MJIT_HEADER extern bool mjit_enabled; +# endif // MJIT_HEADER VALUE mjit_pause(bool wait_p); VALUE mjit_resume(void); void mjit_finish(bool close_handle_p); @@ -207,7 +211,7 @@ static inline void mjit_remove_class_serial(rb_serial_t class_serial){} https://github.com/ruby/ruby/blob/trunk/mjit.h#L211 static inline VALUE mjit_exec(rb_execution_context_t *ec) { return Qundef; /* unreachable */ } static inline void mjit_child_after_fork(void){} -#define mjit_enabled 0 +#define mjit_enabled false static inline VALUE mjit_pause(bool wait_p){ return Qnil; } // unreachable static inline VALUE mjit_resume(void){ return Qnil; } // unreachable static inline void mjit_finish(bool close_handle_p){} -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/