From a19d625e667024fe27dcee04dd748e914bc24762 Mon Sep 17 00:00:00 2001 From: Takashi Kokubun Date: Sun, 1 Dec 2019 00:56:27 -0800 Subject: Allow specifying arbitrary MJIT flags by --jit-debug This is a secret feature for me. It's only for testing and any behavior with this flag override is unsupported. I needed this because I sometimes want to add debug options but do not want to disable optimizations, for using Linux perf. --- test/ruby/test_rubyoptions.rb | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'test') diff --git a/test/ruby/test_rubyoptions.rb b/test/ruby/test_rubyoptions.rb index 10d54550c1..abdacc508e 100644 --- a/test/ruby/test_rubyoptions.rb +++ b/test/ruby/test_rubyoptions.rb @@ -1043,6 +1043,12 @@ class TestRubyOptions < Test::Unit::TestCase assert_in_out_err([IO::NULL], success: true) end + def test_jit_debug + if JITSupport.supported? + assert_in_out_err(["--jit-debug=-O0 -O1", "--jit-verbose=2", ""], "", [], /-O0 -O1/) + end + end + private def mjit_force_enabled? -- cgit v1.2.3