A fix for https://jbs.oracle.com/bugs/browse/JDK-7088419 relies on existence of CLMUL (and AVX) processor feature, and it should be governed by runtime switches (-XX:-UseCLMUL to disable).
The runtime currently lacks a probe for the existence of CLMUL, as well as the query routines and enable/disable flag. Since the runtime is not visible to the JNI code that will actually be choosing whether or not to use this instruction, the information path flows through an unsafe intrinsic to the Java code implementing java.util.zip.CRC32, and then into native from there. This information is also useful to Java-side CRC32 code in j.u.zip because it will assist it in estimating the speed of serial CRC execution if fork/join optimizations are added.
The runtime currently lacks a probe for the existence of CLMUL, as well as the query routines and enable/disable flag. Since the runtime is not visible to the JNI code that will actually be choosing whether or not to use this instruction, the information path flows through an unsafe intrinsic to the Java code implementing java.util.zip.CRC32, and then into native from there. This information is also useful to Java-side CRC32 code in j.u.zip because it will assist it in estimating the speed of serial CRC execution if fork/join optimizations are added.
- blocks
-
JDK-7088419 Use x86 Hardware CRC32 Instruction with java.util.zip.CRC32
- Resolved