aboutsummaryrefslogtreecommitdiffstats
path: root/benchmark
diff options
context:
space:
mode:
authorTakashi Kokubun <takashikkbn@gmail.com>2021-01-13 22:36:45 -0800
committerTakashi Kokubun <takashikkbn@gmail.com>2021-01-13 22:46:51 -0800
commite1fee7f949cb6719122672fa1081c60984a5339f (patch)
tree3a851fdfcdbf395f5783aecaacf521308ddfd74e /benchmark
parent4d13f3e9da6298a1f8154def2e341ecb7c5fe116 (diff)
downloadruby-e1fee7f949cb6719122672fa1081c60984a5339f.tar.gz
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]
Diffstat (limited to 'benchmark')
-rw-r--r--benchmark/lib/benchmark_driver/runner/mjit.rb8
-rw-r--r--benchmark/lib/benchmark_driver/runner/mjit_exec.rb6
2 files changed, 7 insertions, 7 deletions
diff --git a/benchmark/lib/benchmark_driver/runner/mjit.rb b/benchmark/lib/benchmark_driver/runner/mjit.rb
index 1d4693e8be..abefa463b3 100644
--- a/benchmark/lib/benchmark_driver/runner/mjit.rb
+++ b/benchmark/lib/benchmark_driver/runner/mjit.rb
@@ -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
diff --git a/benchmark/lib/benchmark_driver/runner/mjit_exec.rb b/benchmark/lib/benchmark_driver/runner/mjit_exec.rb
index eac3dfba84..46e662bc7c 100644
--- a/benchmark/lib/benchmark_driver/runner/mjit_exec.rb
+++ b/benchmark/lib/benchmark_driver/runner/mjit_exec.rb
@@ -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