[9] RFR(M): 8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics

Zoltán Majó zoltan.majo at oracle.com
Mon Jul 13 16:48:56 UTC 2015


Hi,


please review the following patch for JDK-8130832.

Bug: https://bugs.openjdk.java.net/browse/JDK-8130832

Problem: Currently, compiler-related tests frequently use the 
architecture descriptor string (e.g., "aarch64", "x86") to determine if 
a certain compiler feature is available on the platform where the JVM is 
executing. If the tested features is a compiler intrinsic, using 
architecture descriptor strings is an inaccurate way of determining if 
the intrinsic is available. The reason is that the availability of 
compiler intrinsics is guided by many factors (e.g., the value of 
command line flags and instructions available on the platform) and as a 
result a test might expect an intrinsic to be available when it is in 
fact not available.


Solution: This enhancement proposes adding a new WhiteBox method, 
is_compiled_intrinsic_available(Executable method, int compileLevel) 
that returns true if an intrinsic for method 'method' is available at 
compile level 'compileLevel' (the final API might differ from the 
proposed API).

To test the new API, a new test, 
hotspot/test/compiler/intrinsics/IntrinsicAvailableTest.java, is added. 
Moreover, existing tests in 
hotspot/test/compiler/intrinsics/mathexact/sanity are be updated to use 
the newly added WhiteBox method.

Webrev:
- top: http://cr.openjdk.java.net/~zmajo/8130832/top/webrev.00/
- hotspot: http://cr.openjdk.java.net/~zmajo/8130832/hotspot/webrev.00/

Testing:
- all JPRT tests in the hotspot testset (incl. all tests in 
hotspot/compiler/intrinsics/mathexact), all tests pass;
- all hotspot JTREG tests executed locally on Linux x86_64, all tests 
pass that pass with an unmodified VM; all tests were executed also with 
-Xcomp;
- hotspot/test/compiler/intrinsics/IntrinsicAvailableTest.java and all 
tests in hotspot/compiler/intrinsics/mathexact executed on arm64, all 
tests pass;
- manual testing on Linux x86_64 to verify that the functionality of the 
DisableIntrinsic flag is preserved.

Thank you and best regards,


Zoltan



More information about the hotspot-compiler-dev mailing list