Commit graph

66 commits

Author SHA1 Message Date
Takashi Kokubun
33a052486b Assert everything is compiled in test_zjit (https://github.com/Shopify/zjit/pull/40)
* Assert everything is compiled in test_zjit

* Update a comment on rb_zjit_assert_compiles

Co-authored-by: Maxime Chevalier-Boisvert <maxime.chevalierboisvert@shopify.com>

* Add a comment about assert_compiles

* Actually use pipe_fd

---------

Co-authored-by: Maxime Chevalier-Boisvert <maxime.chevalierboisvert@shopify.com>
2025-04-18 21:52:59 +09:00
Nobuyoshi Nakada
4a67ef09cc
[Feature #21116] Extract RJIT as a third-party gem 2025-02-13 18:01:03 +09:00
Takashi Kokubun
9f95b6eb5d Skip a test that is flaky with RJIT
It's crashing inside the bug reporter after a crash, so not sure why
it's crashing. It's not really useful for maintaining RJIT to flag this
test failure, so let's just ignore it until we figure out why it fails.

1835843916
2023-11-03 22:18:16 -07:00
Hiroshi SHIBATA
cc8a48a496
Revert an accidentally sync.
Revert "[ruby/open3] Removed to load jit_support.rb"

  This reverts commit 67feb782f9.
2023-03-27 12:28:11 +09:00
Hiroshi SHIBATA
67feb782f9 [ruby/open3] Removed to load jit_support.rb
It's removed at 4445b9e2a2

41b180deab
2023-03-27 03:24:48 +00:00
Takashi Kokubun
e4caf59cc1 Move yjit_force_enabled? to JITSupport
for consistency
2023-03-11 20:59:03 -08:00
Takashi Kokubun
4445b9e2a2 Remove unused methods from JITSupport 2023-03-11 20:56:29 -08:00
Takashi Kokubun
ac5f983f7d
RJIT: Break up and enable test_version (#7495) 2023-03-10 10:07:52 -08:00
Takashi Kokubun
23ec248e48 s/mjit/rjit/ 2023-03-06 23:44:01 -08:00
Takashi Kokubun
2e875549a9 s/MJIT/RJIT/ 2023-03-06 23:44:01 -08:00
Takashi Kokubun
f68580890f Stop building mjit_build_dir.so 2023-03-06 22:14:44 -08:00
Takashi Kokubun
9d59d093bd
MJIT: Compile methods in batches (#6900)
* MJIT: Compile methods in batches

* MJIT: make mjit-bindgen

* MJIT: Fix RubyVM::MJIT tests
2022-12-10 22:21:06 -08:00
Alan Wu
1d64a5a7c0 YJIT: Run test-all tests without requiring RUN_OPTS
Most tests in test_yjit.rb use a sub process, so we can run them even
when the parent process is not running with YJIT. Run them so simply
running `make check` tests YJIT a bit.

[Misc #19149]
2022-11-25 17:15:24 -05:00
Takashi Kokubun
d15d1c01c2
Rename --mjit-min-calls to --mjit-call-threshold (#6731)
for consistency with YJIT
2022-11-14 23:38:52 -08:00
Takashi Kokubun
915cbdb226
Stop testing MJIT on s390x
It didn't work either.
20220905T080003Z.fail.html.gz
2022-09-05 02:02:17 -07:00
Alan Wu
ea9ee31744 A64 Linux reports aarach64 in RUBY_PLATFORM
This should fix a version string test
2022-08-29 09:09:41 -07:00
Takashi Kokubun
dca5e74aa1
Fix test_rubyoptions.rb for arm64 (https://github.com/Shopify/ruby/pull/396) 2022-08-29 08:47:10 -07:00
Takashi Kokubun
203801566a
Fix #5872 for MJIT GitHub Actions
If you run tests with RUN_OPTS=--mjit, the test fixes in
https://github.com/ruby/ruby/pull/5872 don't work.
2022-07-10 23:10:36 -07:00
Takashi Kokubun
eb49aa3119
Fix test_rubyoptions for MinGW (#5363)
* Fix test_rubyoptions for MinGW

follows up a74a2f456a

* Require jit_support

* Fix MinGW platform

* Handle MinGW UCRT

and fix the prefix

* Make it more robust
2021-12-27 22:22:09 -08:00
Takashi Kokubun
1a63468831
Prepare for removing RubyVM::JIT (#5262) 2021-12-13 23:07:46 -08:00
Takashi Kokubun
11b8aaa26a
Rename --jit to --mjit (#5248)
* Rename --jit to --mjit

[Feature #18349]

* Fix a few more --jit references

* Fix MJIT Actions

* More s/jit/mjit/ and re-introduce --disable-jit

* Update NEWS.md

* Fix test_bug_reporter_add
2021-12-13 16:08:01 -08:00
Aaron Patterson
2a59bd7312 Disable YJIT in MJIT tests 2021-10-20 18:19:38 -04:00
Takashi Kokubun
e1fee7f949
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]
2021-01-13 22:46:51 -08:00
Benoit Daloze
b4ec4a41c2 Guard all accesses to RubyVM::MJIT with defined?(RubyVM::MJIT) &&
* Otherwise those tests, etc cannot run on alternative Ruby implementations.
2020-12-04 16:45:54 +01:00
Yusuke Endoh
2e7d886311 test/lib/jit_support.rb: Let JIT tests skip on centos8
It has the same issue as RHEL 8.  k0kubun said he will fix later
2020-05-12 17:48:31 +09:00
Takashi Kokubun
9aa5fe1bf8
Split compile and link for MinGW support
MinGW test_jit fails with no error message. Perhaps linker flags should
not be passed when compilation is happening.

Anyway splitting these stages doesn't matter for performance. So let me
just split it to fix the issue. Probably this helps Solaris's issue too.
2020-05-03 16:41:25 -07:00
Takashi Kokubun
0776198486
Debug Solaris's MJIT failure
using -Winvalid-pch

20200501T170004Z.fail.html.gz
2020-05-03 15:49:51 -07:00
Takashi Kokubun
a218cbdf31
Skip pdb corruption on Visual Studio 2015 as well
It turned out that the pdb corruption happens on Visual Studio 2015 as
well.
32602953/job/3gj43q18wqeiy729
2020-05-03 00:41:28 -07:00
Takashi Kokubun
72c0612c40
Skip Solaris RubyCI TestJIT for now
to be investigated later
20200501T160004Z.fail.html.gz
2020-05-01 10:40:44 -07:00
Takashi Kokubun
41bbdd7806
Skip MinGW TestJIT* and macOS TestJITDebug failures
caused by 818d6d3336, for now.

I'll take a look at them tomorrow.
2020-05-01 03:08:51 -07:00
Yusuke Endoh
847e25975c Skip JIT tests on riscv64 due to SEGV of cc1 2020-04-20 22:48:10 +09:00
Takashi Kokubun
2832ba80d6
The pdb header error is printed at stdout
32278754/job/90jmky2jq2k0wjv8
2020-04-18 18:40:01 -07:00
Takashi Kokubun
f8b79ef567
Compilation error does not impact exit status
We failed to ignore
32245902/job/xcfxw67uexxysvni
2020-04-17 10:11:47 -07:00
Takashi Kokubun
f888626552
Fix logic to detect vs120
MJIT_CC seems not defined
32161572/job/u5sw8yn4in87heki
2020-04-13 23:48:40 -07:00
Takashi Kokubun
e667750364
Add missing call in 70b7304f03 2020-04-13 23:11:51 -07:00
Takashi Kokubun
70b7304f03
Ignore AppVeyor vs120's pdb corruption
We tried to fix this like https://github.com/ruby/ruby/pull/3029, but it
didn't work. The failure has never been helpful for developing MJIT, and
currently it's not prioritized to be fixed. Until we try to figure out
the root cause on AppVeyor vs120, let's optionally disable testing when
the random corruption happens.
2020-04-13 23:08:25 -07:00
Takashi Kokubun
b736ea63bd
Optimize exivar access on JIT-ed getivar
JIT support of dd723771c1.

$ benchmark-driver -v --rbenv 'before;before --jit;after --jit' benchmark/mjit_exivar.yml --repeat-count=4
before: ruby 2.8.0dev (2020-03-30T12:32:26Z master e5db3da9d3) [x86_64-linux]
before --jit: ruby 2.8.0dev (2020-03-30T12:32:26Z master e5db3da9d3) +JIT [x86_64-linux]
after --jit: ruby 2.8.0dev (2020-03-31T05:57:24Z mjit-exivar 128625baec) +JIT [x86_64-linux]
Calculating -------------------------------------
                         before  before --jit  after --jit
         mjit_exivar    57.944M       53.579M      54.471M i/s -    200.000M times in 3.451588s 3.732772s 3.671687s

Comparison:
                      mjit_exivar
              before:  57944345.1 i/s
         after --jit:  54470876.7 i/s - 1.06x  slower
        before --jit:  53579483.4 i/s - 1.08x  slower
2020-03-30 23:16:35 -07:00
Takashi Kokubun
9745e90197
Propagate JIT skip to all tests 2020-03-06 20:19:56 -08:00
Yusuke Endoh
16415fefc1 test/lib/jit_support.rb: The path to icc was changed 2020-03-04 12:31:55 +09:00
Yusuke Endoh
6477d98e49 test/lib/jit_support.rb: Update the regexp for icc
MJIT_CC is always an absolute path.
2019-12-05 23:46:42 +09:00
Takashi Kokubun
5fbb4555b4
Prefer using MJIT_CC for JIT support check
because Solaris might have CC=cc and we'd like to check full path
MJIT_CC=/opt/developerstudio12.5/bin/cc instead.
2019-12-04 22:16:08 -08:00
Takashi Kokubun
b3ea0980db
Check MJIT support in one place
to fix test failure on trunk-no-mjit
https://gist.github.com/ko1/32ab982ffd7555988818773c08f97123
2019-12-01 10:53:59 -08:00
Takashi Kokubun
4ccb49bad3
Enforce --jit-debug test by another way 2019-10-15 22:47:20 -07:00
Takashi Kokubun
5d8f112505
RubyVM::MJIT.pause(wait: true) should wait
for all compilations and compaction.

Prior to this commit, the last-compiled code has not been used because
MJIT worker is stopped before setting the code, and compaction has also
been skipped.

But it was not intentional and `wait: true` pause should wait until
those two things by its feature.
2019-09-26 16:28:34 +09:00
Takashi Kokubun
cda5745c1b
Automatically detect missing symbols
which are usually optimized away by -O3.

This CI can detect missing exports like
ea84a68075 which was needed for
761346a960.
2019-09-01 16:31:15 +09:00
Hiroshi SHIBATA
f9a2440866
Restore support library for only test files. 2019-07-09 21:04:07 +09:00
Hiroshi SHIBATA
c3c0e3f5c9 Move to tool/lib from test/lib. 2019-07-02 07:59:54 +09:00
k0kubun
d31cbd4ff9 test_jit.rb: change format of test error output
to avoid breaking redmine quote like
https://bugs.ruby-lang.org/issues/15522

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66781 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-01-10 14:55:24 +00:00
k0kubun
fa3fda1c62 jit_support.rb: deal with -std=c99 flag
CC is changed from "icc" to "icc -std=c99" by r66605.

20181228T130003Z.fail.html.gz

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66615 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-12-28 14:12:42 +00:00
k0kubun
45918161a8 jit_support.rb: skip testing MJIT on oracle developer studio
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66590 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-12-27 14:53:02 +00:00