JDK-8205207 : Port Graal unit tests under jtreg
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 11
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2018-06-19
  • Updated: 2019-01-10
  • Resolved: 2018-06-29
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 11 JDK 12
11 b20Fixed 12Fixed
Related Reports
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Description
Need to port Graal unit tests so they could be run with jtreg.
Comments
It seems problematic to me to enable something by default if that then results in an additional warning unless you set something else explicitly! But I'll wait to see how this works out in terms of configure-time versus build-time messages.
02-07-2018

[~dholmes], you've kinda selected graal during configure as it's enabled by default on x64 platforms[1]. I agree though that it should be a configure-time message. [1] # Only enable jvmci on x86_64, sparcv9 and aarch64. if test "x$OPENJDK_TARGET_CPU" = "xx86_64" || \ test "x$OPENJDK_TARGET_CPU" = "xsparcv9" || \ test "x$OPENJDK_TARGET_CPU" = "xaarch64" ; then JVM_FEATURES_jvmci="jvmci" else JVM_FEATURES_jvmci="" fi AC_MSG_CHECKING([if jdk.internal.vm.compiler should be built]) if HOTSPOT_CHECK_JVM_FEATURE(graal); then AC_MSG_RESULT([yes, forced]) if test "x$JVM_FEATURES_jvmci" != "xjvmci" ; then AC_MSG_ERROR([Specified JVM feature 'graal' requires feature 'jvmci']) fi INCLUDE_GRAAL="true" else # By default enable graal build on x64 or where AOT is available. # graal build requires jvmci. if test "x$JVM_FEATURES_jvmci" = "xjvmci" && \ (test "x$OPENJDK_TARGET_CPU" = "xx86_64" || \ test "x$ENABLE_AOT" = "xtrue") ; then AC_MSG_RESULT([yes]) JVM_FEATURES_graal="graal" INCLUDE_GRAAL="true" else AC_MSG_RESULT([no]) JVM_FEATURES_graal="" INCLUDE_GRAAL="false" fi fi
29-06-2018

I agree with Martin in that I don't want to see this message when I'm building a test-image and I haven't selected anything related to Graal during configure.
29-06-2018

Please see the list of libraries in test/hotspot/jtreg/compiler/graalunit/README.md. Then yes, use --with-graalunit-lib to point to the directory you downloaded the libs in. This is only needed in case you want to run compiler/graalunit tests.
29-06-2018

Thanks, Ekaterina. I tried your suggestion - $(ECHO) "Skip building of Graal unit tests because 3rd party libraries directory is not specified" + $(info "Skip building of Graal unit tests because 3rd party libraries directory is not specified") and it does allow the build to succeed, so it's definitely progress, but ... a null build spams you like this: $ make test-image Building target 'test-image' in configuration 'linux-x86_64-normal-server-release' "Skip building of Graal unit tests because 3rd party libraries directory is not specified" "Skip building of Graal unit tests because 3rd party libraries directory is not specified" Finished building target 'test-image' in configuration 'linux-x86_64-normal-server-release' ... and I have no idea what 3rd party libraries were being looked for ... hmmm ... this is probably a reference to --with-graalunit-lib specify location of 3rd party libraries used by Graal unit tests but what libraries should I put there?
29-06-2018

Sorry for breaking it, the fix seems to change ECHO line to $(info "Skip building of Graal unit tests because 3rd party libraries directory is not specified")$(info "Skip building of Graal unit tests because 3rd party libraries directory is not specified")
29-06-2018

created JDK-8206088, trying to reproduce it on my local host. I haven't used plain configure for quite some time. we have a special tool which (when you are inside oracle intranet) downloads dependencies and runs configure/make w/ corresponding flags.
29-06-2018

Igor, I tried that patch and it didn't make any difference, and I can't see how it would help, because that is a command that should be part of a recipe to build some target, but I don't see the corresponding rule. And this makefile has no tabs! I'm not doing anything special with graall, just taking the defaults. If you simply configure --with-default-make-target='jdk-image test-image' and then 'make' does it work for you?
29-06-2018

[~martin], we haven't seen this in our testing, apparently, nobody checked the build w/ INCLUDE_GRAAL true, but GRAALUNIT_LIB being empty. could you please check if the following patch helps? diff -r 3506855c6b86 make/test/JtregGraalUnit.gmk --- a/make/test/JtregGraalUnit.gmk Thu Jun 28 19:33:00 2018 -0700 +++ b/make/test/JtregGraalUnit.gmk Thu Jun 28 20:37:36 2018 -0700 @@ -130,7 +130,7 @@ TARGETS_IMAGE += $(COPY_HOTSPOT_JTREG_GRAAL) else - $(ECHO) "Skip building of Graal unit tests because 3rd party libraries directory is not specified" + $$(ECHO) "Skip building of Graal unit tests because 3rd party libraries directory is not specified" endif endif
29-06-2018

This change appears to break the build. Please fix. ~/ws/jdk11 $ make test-image Building target 'test-image' in configuration 'linux-x86_64-normal-server-release' JtregGraalUnit.gmk:133: *** missing separator. Stop. make[2]: *** [build-test-hotspot-jtreg-graal] Error 1 make[2]: *** Waiting for unfinished jobs.... make/Main.gmk:491: recipe for target 'build-test-hotspot-jtreg-graal' failed ERROR: Build failed for target 'test-image' in configuration 'linux-x86_64-normal-server-release' (exit code 2)
29-06-2018