-
-
Notifications
You must be signed in to change notification settings - Fork 939
Closed
Milestone
Description
Hey!
I'm opening this as a follow-up of #8445 . I discovered that my root issue is that it looks like when the JRuby native launcher is in use, running jruby -Xjit.logging --dev -Xcompile.mode=JIT working/blah.rb seems to get me in this weird state where JRuby claims JIT is enabled, but it's not actually.
Copy-pasting from my last comment on that ticket:
$ docker run --network=host -ti -v `pwd`:/working jruby:9.4.9.0-jre21 /bin/bash
Unable to find image 'jruby:9.4.9.0-jre21' locally
9.4.9.0-jre21: Pulling from library/jruby
Digest: sha256:3c57a4c2ec52728f89113540bdf35d94d7171e35cb4332ebe69c5ed0d887f381
Status: Downloaded newer image for jruby:9.4.9.0-jre21
root@rubyshade:/# jruby working/blah.rb
jruby 9.4.9.0 (3.1.4) 2024-11-04 547c6b150e OpenJDK 64-Bit Server VM 21.0.5+11-LTS on 21.0.5+11-LTS +jit [x86_64-linux]
JIT
["working/blah.rb", 9]
root@rubyshade:/# jruby -Xjit.logging --dev -Xcompile.mode=JIT working/blah.rb
2024-12-27T11:32:10.067Z [main] INFO Ruby : done compiling target script: working/blah.rb
jruby 9.4.9.0 (3.1.4) 2024-11-04 547c6b150e OpenJDK 64-Bit Server VM 21.0.5+11-LTS on 21.0.5+11-LTS +jit [x86_64-linux]
JIT
2024-12-27T11:32:10.222Z [Ruby-0-JIT-1] INFO JITCompiler : method done jitting: Gem::Version canonical_segments at /opt/jruby/lib/ruby/stdlib/rubygems/version.rb:381
2024-12-27T11:32:10.313Z [Ruby-0-JIT-1] INFO JITCompiler : method done jitting: #<Class:0x4c3c3d33> find_type at /opt/jruby/lib/ruby/stdlib/ffi/types.rb:75
2024-12-27T11:32:10.317Z [Ruby-0-JIT-1] INFO JITCompiler : method done jitting: #<Class:0x4c3c3d33> custom_typedefs at /opt/jruby/lib/ruby/stdlib/ffi/types.rb:38
2024-12-27T11:32:10.320Z [Ruby-0-JIT-1] INFO JITCompiler : method done jitting: #<Class:0x4c3c3d33> __typedef at /opt/jruby/lib/ruby/stdlib/ffi/types.rb:61
2024-12-27T11:32:10.324Z [Ruby-0-JIT-1] INFO JITCompiler : block done jitting: FFI each_line &|line|2 at /opt/jruby/lib/ruby/stdlib/ffi/types.rb:207
2024-12-27T11:32:10.345Z [Ruby-0-JIT-1] INFO JITCompiler : method done jitting: Gem::Platform to_a at /opt/jruby/lib/ruby/stdlib/rubygems/platform.rb:129
2024-12-27T11:32:10.354Z [Ruby-0-JIT-1] INFO JITCompiler : method done jitting: Gem::Specification platform at /opt/jruby/lib/ruby/stdlib/rubygems/specification.rb:2227
["working/blah.rb", 9]
root@rubyshade:/# which jruby
/opt/jruby/bin/jruby
root@rubyshade:/# cat /opt/jruby/bin/jruby
#!/bin/sh
# shellcheck disable=1007
# -----------------------------------------------------------------------------
# jruby.bash - Start Script for the JRuby interpreter
# -----------------------------------------------------------------------------
...
# ... here I copy my a jruby native launcher binary into the docker image...
root@rubyshade:/working# cp ./jruby /opt/jruby/bin/binjruby
root@rubyshade:/# binjruby -Xjit.logging --dev -Xcompile.mode=JIT working/blah.rb
jruby 9.4.9.0 (3.1.4) 2024-11-04 547c6b150e OpenJDK 64-Bit Server VM 21.0.5+11-LTS on 21.0.5+11-LTS +jit [x86_64-linux]
JIT
2024-12-27T11:33:58.593Z [Ruby-0-JIT-1] INFO JITCompiler : done building: Gem::Version canonical_segments at /opt/jruby/lib/ruby/stdlib/rubygems/version.rb:381
2024-12-27T11:33:58.703Z [Ruby-0-JIT-1] INFO JITCompiler : done building: #<Class:0x8c7d598> find_type at /opt/jruby/lib/ruby/stdlib/ffi/types.rb:75
2024-12-27T11:33:58.704Z [Ruby-0-JIT-1] INFO JITCompiler : done building: #<Class:0x8c7d598> custom_typedefs at /opt/jruby/lib/ruby/stdlib/ffi/types.rb:38
2024-12-27T11:33:58.704Z [Ruby-0-JIT-1] INFO JITCompiler : done building: #<Class:0x8c7d598> __typedef at /opt/jruby/lib/ruby/stdlib/ffi/types.rb:61
2024-12-27T11:33:58.709Z [Ruby-0-JIT-1] INFO JITCompiler : done building: FFI at /opt/jruby/lib/ruby/stdlib/ffi/types.rb:207
2024-12-27T11:33:58.719Z [Ruby-0-JIT-1] INFO JITCompiler : done building: Gem::Platform to_a at /opt/jruby/lib/ruby/stdlib/rubygems/platform.rb:129
2024-12-27T11:33:58.726Z [Ruby-0-JIT-1] INFO JITCompiler : done building: Gem::Specification platform at /opt/jruby/lib/ruby/stdlib/rubygems/specification.rb:2227
["working/blah.rb", 5]
root@rubyshade:/# jruby -Xjit.logging --dev -Xcompile.mode=JIT working/blah.rb
2024-12-27T11:34:06.061Z [main] INFO Ruby : done compiling target script: working/blah.rb
jruby 9.4.9.0 (3.1.4) 2024-11-04 547c6b150e OpenJDK 64-Bit Server VM 21.0.5+11-LTS on 21.0.5+11-LTS +jit [x86_64-linux]
JIT
2024-12-27T11:34:06.239Z [Ruby-0-JIT-1] INFO JITCompiler : method done jitting: Gem::Version canonical_segments at /opt/jruby/lib/ruby/stdlib/rubygems/version.rb:381
2024-12-27T11:34:06.338Z [Ruby-0-JIT-1] INFO JITCompiler : method done jitting: #<Class:0x4c3c3d33> find_type at /opt/jruby/lib/ruby/stdlib/ffi/types.rb:75
2024-12-27T11:34:06.342Z [Ruby-0-JIT-1] INFO JITCompiler : method done jitting: #<Class:0x4c3c3d33> custom_typedefs at /opt/jruby/lib/ruby/stdlib/ffi/types.rb:38
2024-12-27T11:34:06.345Z [Ruby-0-JIT-1] INFO JITCompiler : method done jitting: #<Class:0x4c3c3d33> __typedef at /opt/jruby/lib/ruby/stdlib/ffi/types.rb:61
2024-12-27T11:34:06.351Z [Ruby-0-JIT-1] INFO JITCompiler : block done jitting: FFI each_line &|line|2 at /opt/jruby/lib/ruby/stdlib/ffi/types.rb:207
2024-12-27T11:34:06.380Z [Ruby-0-JIT-1] INFO JITCompiler : method done jitting: Gem::Platform to_a at /opt/jruby/lib/ruby/stdlib/rubygems/platform.rb:129
2024-12-27T11:34:06.388Z [Ruby-0-JIT-1] INFO JITCompiler : method done jitting: Gem::Specification platform at /opt/jruby/lib/ruby/stdlib/rubygems/specification.rb:2227
["working/blah.rb", 9]
As usual, let me know if I can provide more info 🙏
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels