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

Remi Forax forax at univ-mlv.fr
Thu Sep 3 19:42:51 UTC 2020


----- Mail original -----
> De: "Charles Oliver Nutter" <headius at headius.com>
> À: "Vladimir Ivanov" <vladimir.x.ivanov at oracle.com>
> Cc: "hotspot compiler" <hotspot-compiler-dev at openjdk.java.net>
> Envoyé: Jeudi 3 Septembre 2020 20:13:20
> Objet: Re: Tiered compilation leads to "unloaded signature class" inlining failures in JRuby

> OMG, it might be working...
> 
> On Thu, Sep 3, 2020 at 11:32 AM Charles Oliver Nutter
> <headius at headius.com> wrote:
>> I'm not sure I understand fully, but I'm now generously sprinkling
>> class LDCs into my jitted methods' static initializers now. This seems
>> like an incredibly onerous series of requirements just to load some
>> dynamic code.
> 
> So I moved the Class.forName's out of the OneShot constructor and into
> the static initializer (as LDC) in the jitted methods' classes. I went
> ahead and loaded everything that is in the signatures in question.
> 
> https://gist.github.com/headius/6408b8392096d7932020870022374a9d
> 
> Running the original script, I no longer see "unloaded signature
> class" warnings from PrintInlining, and as shown in the above gist I
> eventually get the asm I expect!
> 
> But this is a hacky workaround, right? Do other frameworks that
> dynamically generate code also have to do this aggressive classloading
> within that generated code? This doesn't seem right, does it?

Hi Charles,

I will say something that doesn't help you,
i tries to not use one classloader per method and instead use a combination of ahead of time compilation + lookup.defineClass + defineAnonymousClass.
I can do that because my base version is Java 11 not Java 8.
I plan to use Hidden classes soon, i've already a prototype but i still need to study where to use weak or strong hidden classes.

Rémi

> 
> - Charlie
> 
>>
> > - Charlie


More information about the hotspot-compiler-dev mailing list