JAOTC in JDK 10: kicking the tyres

Vladimir Kozlov vladimir.kozlov at oracle.com
Tue Nov 21 18:47:34 UTC 2017


Unfortunately some methods have to be excluded from AOT compilation with 
--compile-commands.

One case, like this, class initialization dependencies. AOT is loading 
classes in different order than when they are loaded during normal 
execution.

Other case - missing classes which usually are not present and not used 
and loaded only in special case (running on particular platform, for 
example). I saw it during jruby compilation.

In both cases we have to exclude such methods from compilation.

Note, missing classes (when they are present) exceptions during 
compilation is different case. As described in 
http://openjdk.java.net/jeps/295 you may need to use '-J -cp ...' to 
specify path for existing classes which AOT does not load by default.

Regards,
Vladimir

On 11/20/17 11:06 AM, dean.long at oracle.com wrote:
> On 11/20/17 10:43 AM, Andrew Haley wrote:
> 
>> On 20/11/17 18:34, dean.long at oracle.com wrote:
>>> I think you want --module java.base here.  I guess jaotc doesn't support
>>> .jmod files.
>> Aha!  Yes, that seems to be much better, thanks.
>>
>> It still doesn't work, but oh well:
>>
>> Error: Failed compilation: 
>> sun.net.www.protocol.jrt.Handler.openConnection(Ljava/net/URL;)Ljava/net/URLConnection;: 
>> org.graalvm.compiler.java.BytecodeParser$BytecodeParserError: 
>> java.lang.ExceptionInInitializerError
>>     at parsing 
>> java.base/sun.net.www.protocol.jrt.Handler.openConnection(Handler.java:42) 
>>
>>
>> If this isn't expected to fail I'll report it as a bug.
>>
> There are problem methods listed in 
> test/hotspot/jtreg/compiler/aot/scripts/java.base-list.txt and also on 
> http://openjdk.java.net/jeps/295.  So please try with --compile-commands 
> java.base-list.txt first and if it still fails then please file a bug.
> 
> dl


More information about the hotspot-dev mailing list