Feature #14462

MJIT enabled should be displayed in the version string

Added by chrisseaton (Chris Seaton) over 2 years ago. Updated about 2 years ago.

Target version:


Whether or not MJIT is enabled will probably be an important part of diagnosing bugs. It's also useful for when benchmarking - we often run benchmarks with -v, and other implementations that have JITs give information about whether their JIT is enabled and with what basic options in this string.

For example TruffleRuby (Graal being the JIT)

truffleruby 0.31, like ruby 2.3.5 <GraalVM 0.31 1.8.0_151-b12 with Graal> [darwin-x86_64]

And JRuby

jruby (2.3.3) 2017-09-06 8e1c115 Java HotSpot(TM) 64-Bit Server VM 25.144-b01 on 1.8.0_144-b01 +jit [darwin-x86_64]

CRuby could display the version string something like this

ruby 2.6.0dev (2018-02-07 jit-version 62270) [x86_64-darwin17] +JIT

I've attached a patch, but I wasn't sure how to get the information into the version module, and I wasn't sure if rb_version was part of the API so I didn't want to modify that, so it may be a bit of a messy solution I'm afraid.


jit-version.diff (1.43 KB) jit-version.diff chrisseaton (Chris Seaton), 02/10/2018 09:23 PM

Also available in: Atom PDF