Tiered compilation leads to "unloaded signature class" inlining failures in JRuby

Charles Oliver Nutter headius at headius.com
Mon Jun 15 21:38:29 UTC 2020


Charlie Gracie figured out a nice Hotspot incantation to reproduce
100% and dump just the PriintInlining graph in question.

He also managed this with tiered compilation *turned off*, so that may
have been a red herring.

jruby \
    -Xcompile.invokedynamic \
    "-J-XX:CompileCommand=option *::*foo*,PrintInlining" \
    "-J-XX:CompileCommand=compileonly,*::*foo*" \
    "-J-XX:-TieredCompilation" \
    main.rb

On Mon, Jun 15, 2020 at 4:23 PM Claes Redestad
<claes.redestad at oracle.com> wrote:
> If so, a possible workaround might be to pass the generated class
> through Unsafe.ensureClassInitialized (or Lookup.ensureInitialized if on
> 15+)

I added Unsafe.ensureClassInitialized right after the JIT class has
been defined, and it did not appear to help.

I tried turning off JRuby's background JIT threads, which could cause
a method to get jitted and loaded twice (into separate classloaders).
The JRuby flag is "-Xjit.background=false" but it also did not help.

- Charlie


More information about the hotspot-compiler-dev mailing list