Thursday, April 12, 2018

JDK 10 - What's new for AArch64?

Oracle has announced the release of Java SE 10, and listed the major new features including:
  1. (JEP 286) Local-Variable Type Inference: Enhances the Java Language to extend type inference to declarations of local variables with initializers. It introduces var to Java, something that is common in other languages.
  2. (JEP 204) Garbage Collector Interface: Improves the source code isolation of different garbage collectors by introducing a clean garbage collector (GC) interface.
  3. (JEP 307) Parallel Full GC for G1: Improves G1 worst-case latencies by making the full GC parallel.
  4. (JEP 301) Application Data-Class Sharing: To improve startup and footprint, this JEP extends the existing Class-Data Sharing ("CDS") feature to allow application classes to be placed in the shared archive.
  5. (JEP 312) Thread-Local Handshakes: Introduce a way to execute a callback on threads without performing a global VM safepoint. Makes it both possible and cheap to stop individual threads and not just all threads or none.
  6. (JEP 317) Experimental Java-Based JIT Compiler: Enables the Java-based JIT compiler, Graal, to be used as an experimental JIT compiler on the Linux/x64 platform.
So that's fine for those fringe x86 developers, but what about you, the mainstream Java developer running on AArch64? All of the features listed above apply to AArch64, except for JEP 317 Experimental Java-Based JIT Compiler (this is in progress).

Other AArch64 Improvements and Bug Fixes in JDK 10

The AArch644 Porting Community, including Linaro, Red Hat, Cavium (with Bellsoft), and others, have added a number of improvements and bug fixes for AArch64.

Improvements:
  •     JDK-8186915 AARCH64: Intrinsify squareToLen and mulAdd
  •     JDK-8184943 AARCH64: Intrinsify hasNegatives
  •     JDK-8190336 Make sure that AppCDS works on aarch64 platform
  •     JDK-8158361 AArch64: Address calculation missed optimizations
  •     JDK-8169697 aarch64: vectorized MLA instruction not generated for some test cases
  •     JDK-8163011 AArch64: NMT detail stack trace cleanup
  •     JDK-8189745 AARCH64: Use CRC32C intrinsic code in interpreter and C1
  •     JDK-8189596 AArch64: implementation for Thread-local handshakes
  •     JDK-8189439 Parameters type profiling is not performed from aarch64 interpreter
  •     JDK-8188221 Return type profiling is not performed from aarch64 interpreter
  •     JDK-8189176 AARCH64: Improve _updateBytesCRC32 intrinsic
  •     JDK-8189177 AARCH64: Improve _updateBytesCRC32C intrinsic
  •     JDK-8185786 AArch64: Disable some address reshapings
  •     JDK-8179444 AArch64: Put zero_words on a diet
  •     JDK-8178968 AArch64: Remove non-standard code cache size
  •     JDK-8184049 AArch64: Matching rule for ubfiz
  •     JDK-8184964 Arch64: Incorrect match rule for negL_reg
  •     JDK-8182161 arch64: combine andr+cbnz into tbnz when possible
  •     JDK-8183547 Arch64: Better instruction sequence for stack bangs
  •     JDK-8183533 AArch64: redundant registers saving in arraycopy stubs
  •     JDK-8182583 AArch64: FMA Vectorization on aarch64
  •     JDK-8179701 AArch64: Reinstate FP as an allocatable register

Bugs:
  •     JDK-8175367 Wrong assert for UseCompressedOops in aarch64 Copy::conjoint_oops_atomic implementation
  •     JDK-8191955 AArch64: incorrect prefetch distance causes an internal error
  •     JDK-8191129 AARCH64: Invalid value passed to critical JNI function
  •     JDK-8191769 AARCH64: Fix hint instructions encoding
  •     JDK-8186325 AArch64: jtreg test hotspot/test/gc/g1/TestJNIWeakG1/TestJNIWeakG1.java SEGV
  •     JDK-8186438 'configure' fails to find installed libfreetype on Ubuntu AArch64
  •     JDK-8184900 Arch64: Fix overflow in immediate cmp instruction
  •     JDK-8182581 aarch64: fix for crash caused by earlyret of compiled method
  •     JDK-8187022 AArch64: UBFX instructions have wrong format string
  •     JDK-8179933 AArch64: Incorrect match rule for immL_255
  •     JDK-8198950 AArch64: org.openjdk.jcstress.tests.varhandles.DekkerTest fails

Lots of good stuff for 64-bit ARM!

This list ignores fixes for broken builds, "backports" from JDK 9 -> JDK 10. The categories are my own quick opinion of improvement vs bug. See my "AArch64 fixes in JDK10" filter for raw data.

Coming Attractions for AArch64 in JDK 11:

Here are a few things that are already in JDK 11:
  • JDK-8196064 AArch64: Merging ld/st into ldp/stp in macro-assembler 
  • JDK-8193260 AArch64: JVMCI: Implement trampoline calls
  • JDK-8196590 Enable docker container related tests for linux AARCH64
  • JDK-8190428 Minimal Dynamic Constant support for AArch64
  • JDK-8198293 AARCH64 - Add CPU detection code for Cavium Thunder X2
  • JDK-8187472 AARCH64: array_equals intrinsic doesn't use prefetch for large arrays. (Also adds SIMD impl)
In addition, JEP 315 Improve Aarch64 Intrinsics is in the works.

You may want to see "Where to get JDK 10 for ARM?"

Disclaimer - even checked-in fixes may be removed before a release, so these are not guaranteed to be in JDK 11.

No comments:

Post a Comment