[9] RFR(M) 8166416: [AOT] Integrate JDK build changes and launcher 'jaotc' for AOT compiler

Volker Simonis volker.simonis at gmail.com
Fri Oct 28 09:09:00 UTC 2016


On Fri, Oct 28, 2016 at 10:57 AM, Erik Joelsson
<erik.joelsson at oracle.com> wrote:
> Hello,
>
>
> On 2016-10-28 09:56, Vladimir Kozlov wrote:
>>
>> Webrevs updated in place (please, reload webpage to get new version).
>> generated-configure.sh changes are included.
>>
>> http://cr.openjdk.java.net/~kvn/aot/top.webrev/
>> http://cr.openjdk.java.net/~kvn/aot/jdk.webrev/
>> http://cr.openjdk.java.net/~kvn/aot/hs.make.webrev/
>>
>> libelfshim generation is guarded by ENABLE_AOT as Volker suggested.
>>
>> I did not figure out how switch off ENABLE_AOT if libelf not found. So I
>> changed warning to configuration error:
>>
>> error: libelf not found, cannot build AOT. Disable AOT build:
>> --enable-aot=no. You might be able to fix this by running 'sudo yum install
>> elfutils-libelf-devel'.
>>
>> Which is not correct since AOT build is enabled by default on linux-x64.
>> Need help with this.
>>
> I think it should be fine moving HOTSPOT_SETUP_JVM_FEATURES to after
> LIB_SETUP_LIBRARIES in configure.ac. (Note that many of these calls are just
> ordered as they happened to be, though some really need to be before or
> after others. I cannot find a reason for these two.) Then you can
> enable/disable AOT after looking for libelf. It depends on what kind of
> behavior you want.
>
> If libelf isn't commonly installed, then having configure use it, and enable
> AOT if it is, and semi silently just disabling AOT if it's not is fine. We
> can define our Oracle builds to explicitly set --enable-aot to get an early
> fail on a missing dependency. That's inline with current configure behavior
> so I like that.

I'm fine with that. But then we shouldn't warn if we don't find
libelf. We should only warn, if '--enable-aot' was explicitly
requested by the user and if this request can't be fulfilled because
of the missing libelf dependency.

I also noticed that currently the configuration for AOT bails out
early, because it can not find the "aot src":

+  AC_MSG_CHECKING([if aot src is present])
+  if test -d "$HOTSPOT_TOPDIR/src/jdk.aot"; then
+    AC_MSG_RESULT([yes])

But I couldn't find the patch which provides
"$HOTSPOT_TOPDIR/src/jdk.aot". Should this read
"$HOTSPOT_TOPDIR/src/jdk.vm.compiler" which is the location where the
graal sources will be copied to (see RFR for "8166417: Graal-core into
JDK for AOT compiler")? Or is there yet another patch to come which
will provide "$HOTSPOT_TOPDIR/src/jdk.aot"?

>
> Another note. We usually use the style --disable-<feature> rather than
> --enable-<feature>=no when referring to configure options.
>
> /Erik
>
>> AOT modules dependencies moved to new module-info.java.extra.
>>
>> And other changes suggested by Erik.
>>
>> Thanks,
>> Vladimir
>>
>> On 10/27/16 11:41 AM, Vladimir Kozlov wrote:
>>>
>>> Thank you, Erik
>>>
>>> On 10/27/16 5:40 AM, Erik Joelsson wrote:
>>>>
>>>>
>>>> On 2016-10-27 02:45, Vladimir Kozlov wrote:
>>>>>
>>>>> AOT JEP:
>>>>> https://bugs.openjdk.java.net/browse/JDK-8166089
>>>>> Subtask:
>>>>> https://bugs.openjdk.java.net/browse/JDK-8166416
>>>>> Webrev:
>>>>> http://cr.openjdk.java.net/~kvn/aot/top.webrev/
>>>>
>>>> hotspot.m4: 296: Comment is misleading. Should just be removed.
>>>
>>>
>>> Removed.
>>>
>>>> CompileJavaModules.gmk: Use of -g flag for java compilation is
>>>> controlled globally. Please remove.
>>>
>>>
>>> See Chris comment on this. We want to have JAOTC java debug information
>>> for debugging in product builds.
>>>
>>>> Main.gmk: buildtools-hotspot should be declared inside the
>>>> CREATING_BUILDJDK conditional like all other buildtools targets.
>>>
>>>
>>> Done.
>>>
>>>>
>>>>> http://cr.openjdk.java.net/~kvn/aot/jdk.webrev/
>>>>
>>>> The extra exports from java.base needs to go in a new
>>>> jdk/src/java.base/share/classes/module-info.java.extra since the module
>>>> jdk.vm.compiler is optional.
>>>
>>>
>>> Done.
>>>
>>>>> http://cr.openjdk.java.net/~kvn/aot/hs.make.webrev/
>>>>
>>>> Lib-jdk.aot.gmk: Please inline LDFLAGS and LIBS and add $(LIBS_JDKLIB)
>>>> to LIBS since that will provide -lc on Solaris automatically.
>>>
>>>
>>> Like this?:
>>>
>>>    LDFLAGS := $(LDFLAGS_JDKLIB), \
>>>    LIBS := $(ELF_LIBS) $(LIBS_JDKLIB), \
>>>
>>>> No need to set DEBUG_SYMBOLS or STRIP_SYMBOLS as the defaults should be
>>>> correct and controlled globally.
>>>
>>>
>>> Done.
>>>
>>> Thanks,
>>> Vladimir
>>>
>>>>
>>>> /Erik
>>>>>
>>>>>
>>>>> Please, review build changes for AOT.  Only Linux/x64 platform is
>>>>> supported. 'jaotc' and AOT part of Hotspot will be build only on Linux/x64.
>>>>>
>>>>> Changes include new 'jaotc' launcher, makefile changes to build
>>>>> jdk.vm.compiler (Graal) and jdk.aot modules used by 'jaotc'.
>>>>> Both modules sources are located in Hotspot: hotspot/src/jdk.aot and
>>>>> hotspot/src/jdk.vm.compiler.
>>>>> 'jaotc' requires installed libelf package on a system to build native
>>>>> part of 'jaotc'. It is used to generated AOT shared libraries (.so) as
>>>>> result of AOT compilation.
>>>>>
>>>>> Hotspot makefile changes will be pushed together with Hotspot AOT
>>>>> changes.
>>>>>
>>>>> Thanks,
>>>>> Vladimir
>>>>
>>>>
>


More information about the hotspot-dev mailing list