1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Rename RubyVM::MJIT to RubyVM::JIT

because the name "MJIT" is an internal code name, it's inconsistent with
--jit while they are related to each other, and I want to discourage future
JIT implementation-specific (e.g. MJIT-specific) APIs by this rename.

[Feature #17490]
This commit is contained in:
Takashi Kokubun 2021-01-13 22:36:45 -08:00
parent 4d13f3e9da
commit e1fee7f949
No known key found for this signature in database
GPG key ID: 6FFC433B12EE23DD
34 changed files with 86 additions and 81 deletions

View file

@ -14,17 +14,17 @@ class BenchmarkDriver::Runner::Mjit < BenchmarkDriver::Runner::Ips
jobs.map do |job|
job = job.dup
job.prelude = "#{job.prelude}\n#{<<~EOS}"
if defined?(RubyVM::MJIT) && RubyVM::MJIT.enabled?
if defined?(RubyVM::JIT) && RubyVM::JIT.enabled?
__bmdv_ruby_i = 0
while __bmdv_ruby_i < 10000 # jit_min_calls
#{job.script}
__bmdv_ruby_i += 1
end
RubyVM::MJIT.pause # compile
RubyVM::JIT.pause # compile
#{job.script}
RubyVM::MJIT.resume; RubyVM::MJIT.pause # recompile
RubyVM::JIT.resume; RubyVM::JIT.pause # recompile
#{job.script}
RubyVM::MJIT.resume; RubyVM::MJIT.pause # recompile 2
RubyVM::JIT.resume; RubyVM::JIT.pause # recompile 2
end
EOS
job

View file

@ -135,7 +135,7 @@ class BenchmarkDriver::Runner::MjitExec
nil
end
% end
RubyVM::MJIT.pause if defined?(RubyVM::MJIT) && RubyVM::MJIT.enabled?
RubyVM::JIT.pause if defined?(RubyVM::JIT) && RubyVM::JIT.enabled?
def vm
t = Process.clock_gettime(Process::CLOCK_MONOTONIC)
@ -172,7 +172,7 @@ class BenchmarkDriver::Runner::MjitExec
a<%= i %>
a<%= i %> # --jit-min-calls=2
% end
RubyVM::MJIT.pause if defined?(RubyVM::MJIT) && RubyVM::MJIT.enabled?
RubyVM::JIT.pause if defined?(RubyVM::JIT) && RubyVM::JIT.enabled?
def vm
t = Process.clock_gettime(Process::CLOCK_MONOTONIC)
@ -228,7 +228,7 @@ class BenchmarkDriver::Runner::MjitExec
jit
jit
RubyVM::MJIT.pause if defined?(RubyVM::MJIT) && RubyVM::MJIT.enabled?
RubyVM::JIT.pause if defined?(RubyVM::JIT) && RubyVM::JIT.enabled?
File.write(<%= result.dump %>, jit)
EOS
end