News

Latest Release of the GraalVM Includes Support for Java 17

GraalVM 21.3, announced in October, is the last release of the year of this high-performance, polyglot, virtual machine, and it leaves 2021 with some long-awaited features, a host of bug fixes, and support for Java 17 and JDK Flight Recorder (JFR) for low-overhead production profiling of native Java executables.

"Along with the JDK11-based builds, GraalVM 21.3 is also available for recently released Java 17," explained Alina Yurenko, Principal Developer Advocate for GraalVM at Oracle, in a blog post. "This means that, in addition to all the great Java 17 features, such as pattern matching for switch expressions, sealed classes, platform updates and many more, we are also getting access to all Java 11+ features accumulated in Java 17…."

Two versions of GraalVM are currently available: a free Community Edition, which was built from the GraalVM sources available on GitHub, and is available for development and production use; and the Enterprise Edition, which requires the Oracle Java SE subscription for production use, paid for on a per-user or per-processor basis. This release comes with new Enterprise container images and a new set of Community container images.

The compiler updates in this release add performance optimizations and promote previously experimental features. As an example, Yurenko pointed to the Strip Mining optimization for non-counted loops, which is now enabled by default. With this optimization, more uncounted loops are converted to counted loops, becoming subject to further optimization such as vectorization and partial unrolling, she explained, resulting in up to 15% speedup for workloads making heavy use of non-counted loops.

Also in this release, Enhanced Automated Vectorization is enabled by default, which on workloads such as math-heavy machine learning workloads, makes GraalVM Enterprise up to 40% faster than OpenJDK. Also, the Enterprise Edition of this release adds support for Constant Blinding to defend against Just-in-Time (JIT) spraying attacks. "The constant blinding phase encrypts user-supplied constants in the code with a randomly generated key," Yurenko said, "so that the attacker cannot rely on the immediate value being present in executable memory." Constant blinding is an experimental feature disabled by default.

There's also a new tool in this release designed to improve the capture and analysis of profiles of Java programs. Called proftool, it's meant to provide machine-level details about the execution to aid with JIT performance analysis. The tool currently contains a Java Virtual Machine Tool Interface (JVMTI) agent for capturing all the assembly generated by the JVM, a parser for Linux perf output, and a parser for HotSpot LogCompilation information. By combining these components into a single command line, the perf profile information can be attributed to the JIT code. Profile collection currently supports Linux perf only, though once the data is captured, the profile can be viewed anywhere. Yurenko promised details in an upcoming blog post.

The GraalVM, the first version of which was released in April 2018, is an extension of the Java Virtual Machine (JVM) designed to run applications written in a range of languages, including JavaScript, Python, Ruby, and R; JVM-based languages, such as Java, Scala, and Kotlin; and Low-Level Virtual Machine (LLVM)-based languages, such as C and C++. Graal is the Java-based Just-in-Time (JIT) compiler that is the basis of the Ahead-of-Time (AOT) compiler introduced in JDK 9.

GraalVM Enterprise is available free for development and evaluation usage from the Oracle Technology Network. It's available for purchase and is free (including support) on Oracle Cloud. It's also built into the Oracle Cloud Developer Image, which includes the latest tools, OCI SDKs, Terraform templates and database connectors.

Oracle announced the general availability (GA) of version JDK 17 in September. It was the latest update of the reference implementation of the Java SE Platform under the company’s six-month release schedule, and the second Long Term Support (LTS) since JDK 11 went GA in 2018.

About the Author

John K. Waters is the editor in chief of a number of Converge360.com sites, with a focus on high-end development, AI and future tech. He's been writing about cutting-edge technologies and culture of Silicon Valley for more than two decades, and he's written more than a dozen books. He also co-scripted the documentary film Silicon Valley: A 100 Year Renaissance, which aired on PBS.  He can be reached at [email protected].


Upcoming Events