Release Notes
This page highlights changes to Oracle GraalVM Enterprise Edition 21 between releases. GraalVM Enterprise comprises different components, changes to which are listed separately. Release notes are grouped in descending order for usability reasons.
Check the GraalVM Enterprise Version Roadmap for information on the updates cadence.
Oracle GraalVM Enterprise Edition 21.3.11
(2024-07-16)
This is the July 2024 Oracle Critical Patch Update (CPU) for Oracle GraalVM Enterprise Edition 21. This release contains fixes to security vulnerabilities announced in the July 2024 Oracle Critical Patch Update Advisory. It includes the security fixes released as part of that CPU, some noteworthy bug fixes, listed below, and platform updates.
- Updated the Oracle JDK release on which GraalVM Enterprise Edition is built to:
- 17.0.12+8 for Java 17-based GraalVM Enterprise. See Java SE 17 Release Notes.
- 11.0.24+7 for Java 11-based GraalVM Enterprise. See Java SE 11 Release Notes.
- 8u421-b09 for Java 8-based GraalVM Enterprise. See Java SE 8u421 Release Notes.
- Graal compiler:
- Properly implemented
isConstantStride
for masked negate strides. - Fixed simplification of always-deopt
FixedGuard
. - Improved the Pi node: added a guard against deletion in recursion.
- Added tests for EVEX encoding of various instructions.
- Unsigned loops that need an overflow to terminate must not be counted.
- Fixed
AArch64AtomicMove
.
- Properly implemented
- Tooling:
- Updated CPUSampler to not log interrupts if the sampler is already closed, and added various other CPUSampler fixes.
Oracle GraalVM Enterprise Edition 21.3.10
(2024-04-16)
This is the April 2024 Oracle Critical Patch Update (CPU) for Oracle GraalVM Enterprise Edition 21.3.x. This release contains fixes to security vulnerabilities announced in the April 2024 Oracle Critical Patch Update Advisory. It includes the security fixes released as part of that CPU, some noteworthy bug fixes, listed below, and platform updates.
- Updated the Oracle JDK release on which GraalVM Enterprise Edition is built to:
- 17.0.11+7 for Java 17-based GraalVM Enterprise. See Java SE 17 Release Notes.
- 11.0.23+7 for Java 11-based GraalVM Enterprise. See Java SE 11 Release Notes.
- 8u411-b09 for Java 8-based GraalVM Enterprise. See Java SE 8u411 Release Notes.
- Graal compiler:
- Fixed magic number calculation for
Integer.divideUnsigned
. - Added a fix so that calls to the
ThrowableTracer#traceThrowable
inserted by the JFR instrumentation are never inlined. - Fixed a stamp inversion for
ZeroExtend
andSignExtend
operations. - Added a check to ensure
CompilationResult.methods
does not contain duplicates. - Added a fix to Initialization Vector (IV): only non-overflowing constant properties should be constant.
- Added a test for incorrect optimization of compares on narrows.
- Fixed read nodes must only be removed if they are not used as null checks.
- Fixed
FrameStates
for unresolved deoptimizations with incorrect stack size. - Ensure guards are attached to
CaptureStateBeginNode
andMoveGuardsUpwards
to respect a DOM tree.
- Fixed magic number calculation for
- Truffle framework:
- Added a fix so that calls to the
ThrowableTracer#traceThrowable
inserted by the JFR instrumentation are never inlined. - Added a fix to not inline
ThrowableTracer#traceError
in PE code.
- Added a fix so that calls to the
- Javascript:
- Fixed a possible infinite recursion in
AbstractJSObjectArray.setElementImpl
. - Deoptimize loops in NetSuite Javascript code.
- Fixed a possible infinite recursion in
- LLVM:
- Link
libsulong
tostdlib
if running on macOS.
- Link
- GraalVM Updater:
- Removed
gu
catalogs that are no longer used or needed.
- Removed
Oracle GraalVM Enterprise Edition 21.3.9
(2024-01-16)
This is the January 2024 Oracle Critical Patch Update (CPU) for Oracle GraalVM Enterprise Edition 21.3.x. This release contains fixes to security vulnerabilities announced in the January 2024 Oracle Critical Patch Update Advisory. It includes the security fixes released as part of that CPU, some noteworthy bug fixes, listed below, and platform updates.
- Updated the Oracle JDK release on which GraalVM Enterprise Edition is built to:
- 17.0.10+11 for Java 17-based GraalVM Enterprise. See Java SE 17 Release Notes.
- 11.0.22+9 for Java 11-based GraalVM Enterprise. See Java SE 11 Release Notes.
- 8u401-b10 for Java 8-based GraalVM Enterprise. See Java SE 8u391 Release Notes.
- Compiler fixes:
- The compiler now checks stamps before casting in
IntegerLessThanNode
. - Improved the loop unrolling optimization by handling stride overflow in the
int
range. - Removed explicit null check exceptions during generation of
checkcast
andinstanceof
. - Improved the conditional move optimization cost calculation.
- Fixed a bug causing a
StackOverflowError
inConditionalMoveOptimizationPhase
when compiling ahead of time the Bouncy Castle library in a Java host application with Python code.
- The compiler now checks stamps before casting in
- Native Image fixes:
- Updated OS detection code to recognize Windows 11 and Windows Server 2022.
- Truffle tools and languages fixes:
- Added a fix to prevent closing an engine on a VM shutdown.
- Do not permit
FixedGuardNode
andConditionAnchorNode
to go away if there are PiNodes attached. - Fixed a GraalVM process not being accessible with the Chrome DevTools by adding the mandatory experimental property
debuggerId
. - Upgraded the JSON parser library, org.json, to version 20231013.
- Added a fix to prevent
InteropByteBufferTest#testLargeInteropBuffer
from failing with an OutOfMemory error.
Oracle GraalVM Enterprise Edition 21.3.8
(2023-10-17)
This is the October 2023 Oracle Critical Patch Update (CPU) for Oracle GraalVM Enterprise Edition 21.3.x. This release contains fixes to security vulnerabilities announced in the October 2023 Oracle Critical Patch Update Advisory. It includes the security fixes released as part of that CPU, some noteworthy bug fixes, listed below, and platform updates.
- Updated the Oracle JDK release on which GraalVM Enterprise Edition is built to:
- 17.0.9+11 for Java 17-based GraalVM Enterprise. See Java SE 17 Release Notes.
- 11.0.21+9 for Java 11-based GraalVM Enterprise. See Java SE 11 Release Notes.
- 8u391-b12 for Java 8-based GraalVM Enterprise. See Java SE 8u391 Release Notes.
- Compiler fix:
- Fixed alternating
Phi
wrongly detected as induction variable.
- Fixed alternating
- Truffle framework fixes:
- Prevent shutdown hook registration may fail if already in shutdown.
- Fixed unbounded growth of
guestToHostCodeCache
when iterating polyglot maps.
Oracle GraalVM Enterprise Edition 21.3.7
(2023-07-18)
This is the July 2023 Oracle Critical Patch Update (CPU) for Oracle GraalVM Enterprise Edition 21.3.x. This release contains fixes to security vulnerabilities announced in the July 2023 Oracle Critical Patch Update Advisory. It includes the security fixes released as part of that CPU, and platform updates.
- Updated the Oracle JDK release on which GraalVM Enterprise Edition is built to:
- 17.0.8+9 for Java 17-based GraalVM Enterprise. See Java SE 17 Release Notes.
- 11.0.20+9 for Java 11-based GraalVM Enterprise. See Java SE 11 Release Notes.
- 8u381+9 for Java 8-based GraalVM Enterprise. See Java SE 8u381 Release Notes.
Oracle GraalVM Enterprise Edition 21.3.6
(2023-04-18)
This is the April 2023 Oracle Critical Patch Update (CPU) for Oracle GraalVM Enterprise Edition 21.3.x. This release contains fixes to security vulnerabilities announced in the April 2023 Oracle Critical Patch Update Advisory. It includes the security fixes released as part of that CPU, and platform updates.
- Updated the Oracle JDK release on which GraalVM Enterprise Edition is built to:
- 17.0.7+8 for Java 17-based GraalVM Enterprise. See Java SE 17 Release Notes.
- 11.0.19+8 for Java 11-based GraalVM Enterprise. See Java SE 11 Release Notes.
- 8u371+10 for Java 8-based GraalVM Enterprise. See Java SE 8u371 release notes.
- Upgraded Node.js to version 14.21.3.
Oracle GraalVM Enterprise Edition 21.3.5
(2023-01-17)
This is the January 2023 Oracle Critical Patch Update (CPU) for GraalVM Enterprise 21.3.x. This release contains fixes to security vulnerabilities announced in the January 2023 Oracle Critical Patch Update Advisory. It includes the security fixes released as part of that CPU, and platform updates.
- Updated the Oracle JDK release on which GraalVM Enterprise Edition is built to:
- 8u361 for Java 8-based GraalVM Enterprise. See Java SE 8u361 release notes
- 11.0.18 for Java 11-based GraalVM Enterprise. See Java SE 11 Release Notes
- 17.0.6 for Java 17-based GraalVM Enterprise. See Java SE 17 Release Notes
- Updated Node.js to version 14.21.1.
Oracle GraalVM Enterprise Edition 21.3.4
(2022-10-18)
This is the October 2022 Oracle Critical Patch Update (CPU) for GraalVM Enterprise 21.3.x. This release contains fixes to security vulnerabilities announced in the October 2022 Oracle Critical Patch Update Advisory. It includes the security fixes released as part of that CPU, and platform updates.
- Updated the Oracle JDK release on which GraalVM Enterprise Edition is built to:
- 8u351 for Java 8-based GraalVM Enterprise. See Java SE 8u351 release notes
- 11.0.17 for Java 11-based GraalVM Enterprise. See Java SE 11 Release Notes
- 17.0.5 for Java 17-based GraalVM Enterprise. See Java SE 17 Release Notes
Oracle GraalVM Enterprise Edition 21.3.3.1
(2022-09-20)
This is a patch release for the GraalVM Enterprise 21.3.3 branch which includes the following:
- Platform updates:
- 11.0.16.1 for Java 11-based GraalVM Enterprise
- 17.0.4.1 for Java 17-based GraalVM Enterprise
- Prevent the Truffle file system sandbox from checking host files while parsing paths using alternative file system providers.
- The
hashCode()
andequals(
) methods ofInsightFilter
are corrected and context management is fixed. - Corrected the depth in insight heap dumps: it does not apply to primitives and is applied to variables, not the frame.
- Fixed the
PolyglotFunction
to not treat null argument as zero arguments. - Fixed JavaScript threads getting stuck due to the shape generalization.
- Allowed subclassing of
ConstantBlindingPhase
.
Oracle GraalVM Enterprise Edition 21.3.3
(2022-07-19)
This is the July 2022 Oracle Critical Patch Update (CPU) for Oracle GraalVM Enterprise Edition. This release contains fixes to security vulnerabilities announced in the July 2022 Oracle Critical Patch Update Advisory. It includes the security fixes released as part of that CPU, and platform updates.
- Updated the Oracle JDK release on which GraalVM Enterprise Edition is built to:
- 8u341 for Java 8-based GraalVM Enterprise. See Java SE 8u341 release notes
- 11.0.16 for Java 11-based GraalVM Enterprise. See Java SE 11 release notes
- 17.0.4 for Java 17-based GraalVM Enterprise. See Java SE 17 release notes
Oracle GraalVM Enterprise Edition 21.3.2
(2022-04-19)
This is the April 2022 Oracle Critical Patch Update (CPU) for Oracle GraalVM Enterprise Edition. This release contains fixes to security vulnerabilities announced in the April 2022 Oracle Critical Patch Update Advisory. It includes the security fixes released as part of that CPU, and platform updates.
- Updated the Oracle JDK release on which GraalVM Enterprise Edition is built to:
- 8u331 for Java 8-based GraalVM Enterprise. See Java SE 8 release notes
- 11.0.15 for Java 11-based GraalVM Enterprise. See Java SE 11 release notes
- 17.0.3 for Java 17-based GraalVM Enterprise. See Java SE 17 release notes
Oracle GraalVM Enterprise Edition 21.3.1
(2022-01-18)
This is the January 2022 Oracle Critical Patch Update (CPU) for Oracle GraalVM Enterprise Edition. This release contains fixes to security vulnerabilities announced in the January 2022 Oracle Critical Patch Update Advisory. It includes all the Oracle Java Development Kit (JDK) security fixes released as part of that CPU, and platform updates.
- The Oracle JDK release that GraalVM Enterprise Edition is built on was updated to:
- 8u321 for Java 8-based GraalVM Enterprise. See Java SE 8 release notes
- 11.0.14 for Java 11-based GraalVM Enterprise. See Java SE 11 release notes
- 17.0.2 for Java 17-based GraalVM Enterprise. See Java SE 17 release notes
- Removed support for JDK versions 12, 13, 14, 15, and 16.
- Updated Node.js to version 14.18.1.
Oracle GraalVM Enterprise Edition 21.3.0
(2021-10-19)
- Java and Compiler Updates
- Platform Updates
- Native Image
- Polyglot Runtime
- Java on Truffle
- JavaScript
- Ruby
- Python
- R
- LLVM Runtime
- WebAssembly
- Tools
- Polyglot Embedding
- Updates for Truffle Language and Tool Implementers
Platform Updates
-
Java 17 support: The GraalVM distributions based on Oracle Java 17 and OpenJDK 17 are available for download.
-
The Oracle JDK release that GraalVM Enterprise Edition is built on was updated to:
- 8u311 for Java 8-based GraalVM Enterprise. See Java SE 8 release notes
- 11.0.13 for Java 11-based GraalVM Enterprise. See Java SE 11 release notes
- 17.0.1 for Java 17-based GraalVM Enterprise. See Java SE 17 release notes
Java and Compiler Updates
- Improved the Strip Mining optimization for non-counted loops, which includes:
- Enabled Strip Mining for non-counted loops by default.
- Improved counted loop detection for inequality checked loops. Now more uncounted loops are converted to counted loops, becoming subject to further optimization such as vectorization and partial unrolling. This extra optimization adds to better performance. Take this loop as an example:
for (int i = start; i != end; i++){ // body }
The compiler cannot statically prove that
start < end
and so this loop may have to overflowi
before it terminates. The compiler now inserts astart < end
check before the loop. If this check fails, the compiled code will deoptimize and the next time it is compiled, the check will be omitted and the loop will be treated as uncounted.
- Added a new Infeasible Path Correlation optimization to eliminate infeasible paths. Have a look at this snippet:
class A { ... } class B extends A { ... } if (x > 5) { if (y instanceof A) { throw Error(); } } loop { int foo = <expensive computation>; if (x > 10) { if (y instanceof B) { bar(foo); } } }
The
bar(foo)
call will only be executed ifx > 10 && y instanceof B
. However, that condition impliesx > 5 && y instanceof A
which meansthrow Error()
will be executed. That is, the call tobar
can never actually be executed. The Graal compiler now recognizes this and eliminates both the call tobar
as well as the computation offoo
if it is only used as an argument tobar
. This optimization is enabled by default and can be disabled with-Dgraal.InfeasiblePathCorrelation=false
. - Implemented support for Constant Blinding to defend against JIT spraying attacks. In a JIT spraying attack, an attacker uses the JIT compiler to inject machine instructions in executable memory by using operations with immediate values. Given an existing memory corruption vulnerability, the attacker can then redirect control flow to the injected code.
The constant blinding phase encrypts user supplied constants in the code with a randomly generated key, so that the attacker cannot rely on the immediate value being present in executable memory:
mov reg, $0xF5952C xor reg, $0xABCDEF // reg = 0x5E58C3
Constant Blinding is an experimental feature disabled by default. Enable it with
-Dgraal.BlindConstants=true
. Configure with-Dgraal.MinimumBlindedConstantSize
the size of constants (in bytes) above which constant blinding will be applied. - Improved the SIMD (Single Instruction Multiple Data) vectorization optimization for sequential code:
- SIMD Vectorization and Partial Loop Unrolling can now be enabled at the same time. It is no longer necessary to specify
-Dgraal.PartialUnroll=false
to maximize the benefit achieved from SIMD Vectorization. This optimization is now enabled by default. - SIMD Vectorization can now create groups of operations which do not completely fill a vector register. This increases the number of acceleration opportunities SIMD Vectorization is able to realize and so improves overall throughput performance.
- Improved grouping and pattern matching in SIMD Vectorization to increase the number of SIMD opportunities the optimization can find and successfully exploit.
- SIMD Vectorization and Partial Loop Unrolling can now be enabled at the same time. It is no longer necessary to specify
-
Added a new optimization that prevents inlining from negatively impacting register allocation and code size for certain caller/callee combinations. This can improve performance because fewer values may be existing concurrently in a program.
- Added compiler intrinsics for following methods in both JVM and Native Image mode:
Math.signum
,Math.copySign
,Reference.refersTo
andPhantomReference.refersTo
. The way intrinsics operate is to replace a native method with direct machine code. Thus intrinsification of the above Java methods removes the overhead of native calls, which is considerable and improves the overall performance. For example, intrinsifyingReference.refersTo
andPhantomReference.refersTo
fixed the performance regression reported in this GitHub issue.
A full list of compiler changes in GraalVM Community Edition can be found in the compiler changelog.
Native Image
- Improved the Native Image configuration: configuration file entries that are necessary at image build time for Reflection, JNI, class path resources, and Dynamic Proxy objects, can now be conditional based on the reachability of class. This allows a more precise configuration, which can reduce the size of a native image. See the documentation for more details and find an example for a conditional reflection configuration.
- Improved gathering the reflection metadata by the
native-image
builder: Native Image now distinguishes between queried and invoked reflection methods. CallingClass.getDeclaredMethods
(and all the other variants to look up methods and constructors) now returns all reachable methods for all classes. Previously, only methods that were explicitly registered for reflective invocation were returned. This new feature allows significant reduction of the manual reflection configuration: only methods that need to be invoked viaMethod.invoke
, or methods that would not be seen as reachable based on reachability, need to be registered manually. This distinction between queried and invoked reflection methods reduces the filesize of a native image. -
Added several new optimizations to reduce the image size as well as the image build time for large applications. This has been an ongoing effort for several releases. The following table shows the image size and image build time for Spring petclinic-jdbc, a well-known large application. The numbers are measured on a developer laptop with Linux, AMD64, JDK 11, GraalVM Enterprise, spring-native 0.10.3:
GraalVM Version Image Build Time Image Size GraalVM 21.1 170 sec. 138 MByte GraalVM 21.2 163 sec. 133 MByte GraalVM 21.3 133 sec. 119 MByte - Added initial support for the Java Platform Module System: The
native-image
builder now accepts the module-related arguments known from thejava
launcher like-m
,-p
, and--add-opens
. When such a module-related argument is used, the image generator itself is used as a module too. This is a major change how the image generator works, and development is still ongoing to support more aspects of the module system. Please provide feedback and bug reports when you try out this new feature. - Changed the way the compiler is looked up when creating static,
musl
-based native images to use themusl
toolchain from musl.cc. Themusl
toolchain greatly simplify creating static native images. Using a toolchain also ensures minimum changes will be needed on users’ side to create a dynamically linkedmusl
based image. - Added a new policy for the Serial GC reducing the memory footprint of applications at run time. The new policy enables survivor spaces for the young generation, a feature that has been present in the codebase for a while but was not enabled by default. In addition, a full GC no longer scans the whole image heap for root pointers, but only parts of the image heap that have been written to. The new policy is not enabled by default (this is planned for the next release) but can be enabled using
-H:InitialCollectionPolicy=Adaptive
. Test the new policy and report any regressions so that they can be addressed before the next release. - Improved the precision of the static analysis: small methods are now inlined before the static analysis. This improves constant folding and reduces surprises. For example, previously code that accessed a static final field directly was optimized differently from code that accessed a static final field via an accessor method:
void foo() { if (MyConfiguration.WINDOWS) { // The static analysis does not see this code as reachable on non-Windows platforms. } } static boolean isWindows() { return MyConfiguration.WINDOWS; } void bar() { if (isWindows()) { // The static analysis marked this code as reachable because the method invocation prevented constant folding before the static analysis. With method inlining before static analysis enabled now, this code is no longer seen as reachable on non-Windows platforms. } }
- Arguments to the native image generator can now be passed in a separate file that is provided with the
@argument
option. This is a necessary workaround for platforms like Windows where the the length of the command line is limited. - Root certificates can now be configured at image run time. Previously, the root certificates present at image build time were the only root certificates available at run time. See the documentation for details, and to find a list of system properties that are now read at run time to configure the root certificates.
- Crash dumps, which are printed when a segfault or a fatal VM error happen, now include more details to aid diagnostics. Also, the beginning of the image heap is now protected memory so that null pointer accesses produce a segfault instead of accessing random memory. Internal VM errors, where an illegal virtual method table entry is accessed, produce a better crash dump.
- On Linux, the processor count reported at run time now takes limitations set via
cpuset
into account. - Improved Dwarf debug info generation now includes information about inlined methods (contributed by Red Hat).
- JDK Flight Recorder (JFR) support is now also available for JDK 17 based GraalVM (contributed by Red Hat).
Polyglot Runtime
- Improved stability and performance of the experimental engine caching feature. See the documentation for more detials.
- Improved builtin CPU sampler tool usability with all polyglot languages (see
--cpusampler
option).- Increased precision of the sampling output by using the new guest language safepoint mechanism. The sampling output now shows inlined methods in addition to compilation units by default.
- Simplified the default sampling histogram output and added the
--cpusampler.ShowTiers
option to show time spend in each optimization tier. -
Added the SVG flamegraph output format to the CPUSampler. To enable it, use option
--cpusampler.OutputFormat=flamegraph
.
Java on Truffle
- Added Java 17 guest and host support.
- Enabled support using interop buffer-like object as
byte[]
in Java on Truffle. See “buffer elements” in the Interop API javadoc. - Added support for buffer interop messages to the explicit Interop API.
- The Polyglot API is not enabled by default anymore. When needed, contexts should be created with the
java.Polyglot
option set totrue
. - The HotSwap API is not auto-enabled by debugging anymore. When needed, contexts should be created with the
java.HotSwapAPI
option set totrue
. - Added optimization to avoid illegal reflective access warnings with the host Java 11 or higher.
The project changelog is available on GitHub.
JavaScript
- Updated Node.js to version 14.17.6. Note that GraalVM Node.js support ends when Node 14.x reaches end-of-life (see Node.js release schedule).
- Implemented the Error Cause proposal. It is available behind the experimental option
--js.error-cause
. - Implemented the Import Assertions proposal. It is available behind the experimental option
--js.import-assertions
. - Implemented
Object.hasOwn
(Accessible Object.hasOwnProperty proposal). It is available in ECMAScript 2022 (--js.ecmascript-version=2022
). - Implemented support for class static initialization blocks and private fields in
in
. Available in ECMAScript 2022 (--js.ecmascript-version=2022
). - Added an experimental polyglot
Context
option--js.esm-eval-returns-exports
(disabled by default). When enabled,eval()
of an ES module will return a polyglotValue
containing the exports. - Added several WebAssembly completeness and performance fixes, including the JavaScript BigInt to WebAssembly i64 integration proposal.
The changelog is available in the project repository.
Ruby
- TRegex is now used by default, which provides large speedups for matching regular expressions.
- Fully integrated support for foreign objects traits (arrays, hashes, iterables, etc.) in polyglot mode, which now behave like their Ruby counterpart.
- Added support for transparent inner contexts as used in the ExecJS gem.
- Updated to Ruby 2.7.4 to fix CVE-2021-31810, CVE-2021-32066 and CVE-2021-31799.
A full list of changes is available in the changelog.
Python
- Removed
PYPY_VERSION
from our C extension emulation layer. This means we no longer pretend to be PyPy for C extensions and can avoid PyPy specific hacks, which enables the PyGame package to work out of the box. - Intrinsified and optimized more of the core language for better startup and reduced footprint.
- Implemented a binary compatible backend for HPy 0.0.3, which allows HPy packages to run unmodified on CPython and GraalVM Python. This is part of an ongoing effort to make more packages available to users without them having to compile them for GraalPython specifically.
- Added support for the
multiprocessing
module via in-process nested contexts. This allows execution on multiple cores within the same process using the common Python facilities for multiprocessing. - Added support for the
ctypes
module, enabling more native extensions to run that use the ctypes API. - Fixed multiple REPL issues reported on Github. Users can now properly paste blocks of code and use the numpad in the REPL.
- Made our marshal format compatible with CPython, so objects can now be exchanged between CPython and GraalVM Python processes.
- Made most
socket
module tests pass in native mode, allowing usage of all POSIX socket APIs where before only those supported with Java facilities could be used. This includes, for example, Unix domain sockets and the message APIs for sockets. - Added various compatibility fixes to make the
psutil
package work.
The project changelog is available on GitHub.
R
- Upgraded from PCRE to PCRE2 version 10.37. Some Unicode patterns and texts are still not supported. See GNU-R changelog (section MIGRATION TO PCRE2) for more details on potentially user visible differences between PCRE and PCRE2.
- Added some usability improvements and bug fixes:
- Fixed implicit make rule parameters used when building R extensions.
- Fixed unexpected garbage collection of
CHARSXP
objects in R extensions. FastR did not materialize its internal representation of character vectors to GNU-R compatibleCHARSXP
objects, which caused unexpected collection of CHARSXP objects returned bySTRING_ELT
. - The option to ignore the user’s profile at startup,
--no-init-file
, works as expected now. - Fixed functions
approx
andapproxfun
from thestats
package to prevent them failing with error message “Incorrect number of arguments”.
The project changelog is available on GitHub.
LLVM Runtime
- Updated the LLVM toolchain for compiling C/C++ to version 12.0.1.
- Improved modularization of the codebase around “managed mode” and “native mode” code. This reduces static build dependencies between these two modes, at the same time making the managed mode codebase more robust by removing all unmanaged memory accesses.
The project changelog is available on GitHub.
WebAssembly
- Improved internal implementation of GraalVM WebAssembly to make JS-WebAssembly Interface API more compliant.
- Added support for importing and exporting mutable globals to GraalVM WebAssembly, as defined by the Import/Export mutable globals proposal.
- Moved the module-validation checks to the earlier stage, so that a module is completely validated during parsing, instead of being validated during linking and instantiation. All validation errors are now properly reported when
Context#eval
from the Polyglot API is invoked, and similarly when invokingWebAssembly.validate
from the JS-WebAssembly Interface API. - Added notifications to JavaScript when the memory grows (i.e., when
mem_grow
instruction executes). This improves the compliance of the JS-WebAssembly Interface API. - Changed the Interop objects in GraalVM WebAssembly to allow object-caching in the JS-WebAssembly Interface.
- Added support for
BigInt
-to-i64
conversion in the JS-WebAssembly Interface API.
A full list of changes can be found in the changelog.
Tools
Visual Studio Code
Added a number of refractorings to the GraalVM Extension Pack for Java. These are:
- Convert to static import
- Extract interface or method
- Extract local variable
- Assign to variable
- Generate
hashCode
andequals
- Generate
toString()
- Change method signature
- Rename
- Pull member up
- Move class
for
cycle,while()
cycle,try-catch
,switch()
statement refactorings
GraalVM Tools for Java Extension
-
Native Image debugging in VS Code, enabled with GraalVM Tools for Java extension, was significantly improved. Now you can attach the debugger to Native Image processes and step over the image “real” code:
- Implemented the ability to add GraalVM installed by a host OS utility like
yum
. Then components must be managed from a terminal by the same utility. -
Enabled utilizing VS Code Native Test Explorer API and UI extensions.
-
Enabled setting conditional breakpoints:
- Groovy language features are now available for Java projects which contain some Groovy files or Spock tests. For example,
CodeCompletion
is working, Spock tests can be debugged and run. The execution of standalone Groovy scripts is not supported.
GraalVM Tools for Micronaut Extension
Added support for Kubernetes: now you can deploy, run and debug Micronaut applications in a Kubernetes cluster directly from VS Code.
-
Enabled “Create Kubernetes Deployment Resource”, “Run in Kubernetes” and “Deploy in Kubernetes” quick actions for Micronaut support:
-
Enabled selecting what Docker image will be used when creating a Kubernetes deployment:
-
Enabled selecting a secret for a Docker registry:
When you invoke the “Micronaut: Deploy to Kubernetes” action, your Java project is packaged, Docker image is built and pushed to the container registry. Deployment is created in the Kubernetes Cluster and local port is forwarded to an application running in a Pod.
When deployed it is possible to debug a Kubernetes node using the Kubernetes extension. You can also select the node you are developing and invoke the action “Debug (Attach using Java 8+)”.
Polyglot Embedding
- Added the ability to share values between contexts. Please see
Context.Builder.allowValueSharing(boolean)
for further details. The update addressed this GitHub issue. - Improved the Polyglot API by adding support for scoped values in guest-to-host callbacks. Scoped values are automatically released when the callback returns. They can be configured in
HostAccess
.
A full list of changes can be found in the changelog.
Updates for Truffle Language and Tool Implementers
- Added new Static Object Model APIs to represent the layout of objects that, once defined, do not change the number and the type of their properties. It is particularly well suited for, but not limited to, the implementation of the object model of static programming languages. For more information, read the Javadoc and the tutorial.
- Added
BytecodeOSRNode
interface to support on-stack replacement (OSR) for bytecode interpreters. OSR can improve start-up performance by switching from interpreted code to compiled code in the middle of execution. It is especially effective for targets with long-running loops, which can get “stuck” running in the interpreter without OSR. Refer to the Javadoc and the OSR guide for more details. - Language and context references can now be stored in static final fields. See the javadoc for the new intended usage. All thread local lookups have an efficient implementation on HotSpot and SubstrateVM, interpreted and compiled, eliminating the need to ever cache the value in the AST.
- Added FrameInstance#getCompilationTier and FrameInstancel#isCompilationRoot
- Added
TruffleContext.evalPublic(Node, Source)
andTruffleContext.evalInternal(Node, Source)
that allow to evaluate sources in an inner context and access values of the inner context safely. - Added
--engine.TraceDeoptimizeFrame
to trace frame deoptimizations due toFrameInstance#getFrame(READ_WRITE|MATERIALIZE)
. - Added
TruffleContext.evalPublic(Node, Source)
andTruffleContext.evalInternal(Node, Source)
that allow to evaluate sources in an inner context and access values of the inner context safely. - Added
TruffleContext.Builder.initializeCreatorContext(boolean)
that allows to disable initialization of the language that created the inner context. - Added
ExecuteTracingSupport
interface that allows tracing the calls toexecute
methods of aNode
.
A full list of changes can be found in the changelog.
Oracle GraalVM Enterprise Edition 21.2.0.1
(2021-08-04)
This is a hotfix release for the GraalVM 21.2.x branch. It contains some operational fixes as:
- Fixed a
StringBuilder
optimization issue in Java 11-based GraalVM to improve special characters parsing (see #3627). - Fixed issue with
strspn
used in thedate
C extension compiled as a macro on olderglibc
and then missing the__strspn_c1
symbol on newerglibc
(see #2406).
Oracle GraalVM Enterprise Edition 21.2.0
(2021-07-20)
- Java and Compiler Updates
- Platform Updates
- Native Image
- Polyglot Runtime
- Java on Truffle
- JavaScript
- WebAssembly
- LLVM Runtime
- Ruby
- Python
- R
- Tools
- Polyglot Embedding
- Truffle Language and Tool Implementations
Java and Compiler Updates
The Oracle JDK release that GraalVM Enterprise Edition is built on was updated to:
- 8u301 for Java 8-based GraalVM Enterprise; please see Java SE 8 release notes
- 11.0.12 for Java 11-based GraalVM Enterprise; please see Java SE 11 release notes
-
16.0.2 for Java 16-based GraalVM Enterprise; please see Java SE 16 release notes
- Improved loop limit analysis for counted loops. The compiler will now detect and refine the range of an induction variable by taking the preceding conditions into account. When the loop is counted, it becomes amendable for advanced optimizations like partial unrolling, inversion, and vectorization.
- Added a novel SIMD (Single Instruction Multiple Data) vectorization optimization for sequential code. This optimization is disabled by default until the 21.3 release. Enable it with
-Dgraal.VectorizeSIMD=true
. - Added a novel Strip Mining optimization for non-counted loops. Strip mining is disabled per default. Enable it with the
-Dgraal.StripMineNonCountedLoops=true
option. - The existing
StringBuilderOptimizationPhase
performs high level transformations onStringBuilder
patterns to directly construct the finalString
and eliminate unnecessary intermediateStrings
andStringBuilders
. This release adds support for this optimization in JDK11 by adding support for the compactString
representation used in the JDK. The core optimizations were improved to handle more code shapes and to constant fold more operations. - Improved safepoint elimination in long counted loops. The compiler can now eliminate safepoints in loops that have a
long
induction variable (as opposed to anint
) where it can statically prove that the range of the induction variable (i.e., the maximum number of iterations) isInteger.MAX_VALUE - Integer.MIN_VALUE
while previously it would only considerint
-typed induction variables. - Added an optimization that tries to move writes out of loops, called “Write Sinking.” Write Sinking is an experimental feature disabled by default. Enable it with
-Dgraal.OptWriteMotion=true
. - Implemented a Speculative Guard Movement optimization that tries to move a loop invariant guard (e.g., an array bounds check) inside a loop to outside the loop. This change improves the geomean throughput score of GraalVM Community on SpecJVM2008 by 4.2%. The scores on the Renaissance, DaCapo, and ScalaDacapo benchmarks also increased by about 0.5%. Disable it with
-Dgraal.SpeculativeGuardMovement=false
. - Added intrinsic for
Reference.refersTo
andPhantomReference.refersTo
just like it was done for C2. - Added support for applying counted loop optimizations to
do
/while
loops whose first iteration is not guarded by the loop condition. - Added guard hoisting loop duplication phase which should contribute to ahead-of-time compilation flow (GraalVM Native Image). It splits certain loops into “fast” and “slow” versions. The fast loop is chosen if we know at run time that no exceptions can happen. The fast loop allows more loop optimizations and loop vectorization. Loop duplication needs the profile-guided optimizations data. Disable it with
-H:-GuardHoistingLoopDuplication
. - Improved the Graal compiler to allow compiling ahead-of-time methods with more than 64 loops. This resolves a problem that was preventing Native Image from compiling programs with more than 64 loops in a method body. This is a pattern often seen in generated Java code, such as that output by tools such as ANTLR.
Platform Updates
- Linux AArch64: GraalVM distributions for AArch64 CPU architecture are released as supported in 21.2 with more features enabled, like Ruby runtime, and Java on Truffle (Espresso).
- Java 16 support: GraalVM builds based on Oracle JDK 16 or OpenJDK 16 remain experimental in this release, but have become more “mature” by overcoming some known limitations and adding support for Ruby, Python, and WebAssembly runtimes.
Native Image
- Released new official Gradle and Maven plugins for Native Image with initial JUnit 5 testing support. These plugins will make building, testing, and running Java applications as native executables much easier, and the native JUnit support allows JVM libraries to run their test suites via GraalVM Native Image. For more details, read the announcement blog post.
- Added basic Java Flight Recorder (JFR) support on JDK 11. This feature was developed in a cooperation between Oracle and Red Hat. Native images that are built with
-H:+AllowVMInspection
support JFR events that are written in Java (seejdk.jfr.Event
). To record JFR events at run time, JFR support and JFR recording must be enabled. Check the documentation or see the help message for-XX:+FlightRecorder
and-XX:StartFlightRecording
options. At the moment, JFR support is still significantly limited, i.e., most VM-internal events and also most advanced features such as stack traces or memory leak detection are still missing. - Improved resource handling: resources stored in the image can be accessed through a virtual file system.
- Implemented the class pre-definition: to support
ClassLoader.loadClass
at run time, classes that need to be loaded at run time can be made available to the static analysis so that they are included in the closed-world analysis. This improves compatibility with libraries that rely on dynamic class loading, as long as the classes loaded or generated at run time are stable. This feature was developed in cooperation with Oracle and Alibaba. - Removed unnecessary security providers from the image: the reachable security providers are automatically detected by the static analysis. We fixed some bugs that made too many providers reachable in some cases, leading to large and non-deterministic image sizes. It is now also possible to disable the automatic detection completely using
-H:-EnableSecurityServicesFeature
. - Added an “epsilon” GC to build an image without any garbage collector, which is applicable for very short running applications that only allocate a small amount of memory. The application fails when more than the maximum heap size is allocated. Enable it at image build time with
--gc=epsilon
. - Changed the
--initialize-at-build-time
option behaviour to be used only with arguments. This prevents users to write non-composable code and to avoid accidental semantic errors.
Polyglot Runtime
- Added a new compilation queuing heuristic enabled by default. The new heuristic improves the warmup time of the polyglot runtime on many workloads. It detects code being currently executed and prioritizes the compilation of such code. The new queue implementation also uses dynamic compilation thresholds that increase and decrease compilation thresholds depending on the load of the compilation queue. The new heuristic can be enabled or disabled using
--engine.TraversingCompilationQueue=true|false
. A more detailed description of the new heuristic can be found here. - VM inspection is now enabled in all launchers by default. It is no longer necessary to rebuild the language launcher image to enable inspection. The
SIGQUIT
signal can now be used to print thread dumps at any point during their execution. By additionally enabling the performance counters with the--vm.XX:+UsePerfData
option in GraalVM Enterprise, VisualVM is able to attach and monitor language launchers that run withnative-image
.
Java on Truffle
- Introduced Truffle on Java HotSwap Plugin API which allows to reload the code without the need for restarting a running application. It is meant for framework developers to reflect changes to, e.g., annotations, framework-specific updates such as implemented services or beans. For more details, check the documentation.
- Improved bytecode dispatch, yielding a 15-30% interpreter speed-up.
- Added a new static object model implementation that dynamically generates host classes at run time. It is experimental at the moment.
- Added fixes to prevent crashes when external threads enter Espresso and call native code.
- Fixed crashes when running with older versions of GNU libc (<= 2.17).
- Added support for additional interoperability messages for guest objects implementing
Map
,Map.Entry
,List
,Iterator
, orIterable
.
JavaScript
- GraalVM JavaScript now prints a warning when runtime compilation is not supported. This warning can be disabled using the
-engine.WarnInterpreterOnly=false
option or the-Dpolyglot.engine.WarnInterpreterOnly=false
system property. - Added the
js.unhandled-rejections
option to track unhandled promise rejections in a polyglotContext
. By default, the option is set tonone
, and unhandled promise rejections are not tracked. - Implemented the New Set Methods proposal. It is available behind an experimental flag (
--js.new-set-methods
). - Implemented experimental operator overloading support. Use the experimental option
--js.operator-overloading
to enable it and consult the documentation. - Updated the RegExp Match Indices proposal with opt-in using the
d
flag. Available in ECMAScript 2022 (-js.ecmascript-version=2022
). Deprecated the-js.regexp-match-indices
option.
The changelog is available in the project repository.
WebAssembly
- GraalVM’s WebAssembly now correctly detects memory-allocation failures, and throws WebAssembly errors as per specification (
RangeError
exception), instead of returning internal engine errors. - Fixed edge-cases in calls to functions from imported tables. In indirect calls (
call_indirect
instruction) GraalWasm will now correctly type-check the function type when the function is exported from a different module and set as an entry in an imported table. - Improved detection of some arithmetic errors, printing out a more specific type of the arithmetic exception. In the earlier version, handling of certain arithmetic errors caused a
NullPointerException
. - Performed general maintenance work and fixed bugs to pass tests for as many NPM modules that use WebAssembly as possible.
LLVM Runtime
- [GraalVM Enterprise] Added support for
pthreads
andpthread
synchronization primitives in managed mode such aspthread_create
,pthread_exit
,pthread_join
,pthread_mutex
,pthread_rwlock
,pthread_cond
, and more. This enables a user to run multi-threaded programs. Previously, it would just fail when a user tried to run a multi-threaded software. - [GraalVM Enterprise] Updated
musl libc
to version 1.2.2. - Added support for C++ virtual calls via cross-language interoperability.
- Added support for atomic versions of already existing assembly instructions. This means that the LLVM runtime now has wider support for inline assembly, especially for multi-threaded software.
- Fixed GraalVM’s LLVM toolchain not working correctly for C++ on MacOS 11.3 (see #3383.
The project changelog is available on GitHub.
Ruby (TruffleRuby)
- Implemented the precise invalidation for Ruby methods and constants, by using per-name and per-class assumptions.
- Updated to Ruby 2.7.3 (fixes CVE-2021-28965 and CVE-2021-28966). The
resolv
stdlib was not updated (resolv
in 2.7.3 has bugs). - Fixed the LLVM toolchain issue on macOS 10.13 (see #3383).
- Improved the
#dig
method to make iteration through arrays and hashes faster and compile better for calls with 3+ arguments (see #2301). - Improved fiber-local variables by using less synchronization which made them faster.
TruffleSafepoint
is now used instead of custom logic, which no longer invalidates JIT-ed code for guest safepoints (e.g.,Thread#{backtrace,raise,kill}
,ObjectSpace
, etc.).
A full list of changes is available in the changelog.
Python
- [GraalVM Enterprise] Implemented
_pickle
as a faster version than the pure Python version. GraalVM Enterprise users will see better performance when serializing objects across the network. - Improved Python performance especially during warmup and in shared engine configurations by adding fast paths, intrinsifying functions, and adding optimized representations for common data structures.
- Applied the new Truffle safepoint mechanism for more efficient GIL releases, signal handlers, and weak reference callbacks.
- Updated the supported HPy version to 0.0.2.
- Added support for the
dict
type properly using the new hash interoperability messages. Now Python dictionaries can be cast tojava.util.Map
and behave as expected when using Python from Java. - GraalVM Python runtime now passes more compatibility tests for
io
,crypt
, and more functions insocket
,OrderedDict
, andtime
. The code written for Python 3.8 that uses these can be expected to work better now. - Added initial support for the
psutil
package which enables system access and processes monitoring, and for thePyGame
modules designed for writing video games. - GraalVM’s Python no longer unconditionally creates
_pycache_
if the file name “sitecustomize.py” exists in the current working directory.
More details can be found in the changelog.
R
- Continued improving the compatibility with R 4.0.3. For example, the support for
rlang
0.4.10,vctrs
3.6,tibble
3.0.6, andtestthat
3.0.1 packages was significantly improved. - Packages with known issues,
dplyr
1.0.3,ggplot
3.3.3, andknitr
1.31, still remain.
More details are available in the project changelog.
Tools
Visual Studio Code
- Renamed extensions for VS Code as following:
- GraalVM Tools for Java
- GraalVM Extension Pack for Java
- GraalVM Tools for Micronaut
GraalVM Tools for Java Extension
- Implemented full support of JDK16 and its language features.
- Added support for developing, running, and debugging single Java class, supported from JDK8 and beyond.
-
Introduced a wizard to easily create a new Java project:
-
Introduced a new class wizard “Java: New From Template” that allows to add various Java and related files to a project:
-
Implemented the possibility to attach a debugger to a running process. Available via Run and Debug “Java 8+…” configuration.
- Improved Java code navigation with “GoTo Type”, “Find Usages” options.
-
Enabled the Native Image agent to gather the configuration data in the “Run without Debugger” mode. This makes it easier to build native images from VS Code. Use a special launch configuration Launch Java 8+ Application With Native Image Agent.
GraalVM Tools for Micronaut Extension
-
Added “Launch Java: Continuous Mode” launch configuration also known as “Run Dev Mode” for Gradle and Maven projects:
-
Developed and ran Spock tests in the Groovy language. Included code completion and other editing support for Groovy.
VisualVM and VS Code Integration
- Added a special section to the VS Code Gr activity to control the VisualVM tool included in the active GraalVM installation. The major updates are:
- Enabled to start VisualVM along with the VS Code project
- Provided actions to take a thread or heap dump, and to configure and control CPU/Memory sampling and JFR recording
- Enabled the Go to Source action in VisualVM views which opens the sources back in VS Code
VisualVM
- Added a feature that allows to save JFR recording from live process (see #297).
- Implemented a lock contentions profiling feature, by adding a Lock Contention view in the Profiler tab (see #298).
- Added support for JDK 17.
- Enabled controlling VisualVM instance from the command line or an external tool: start sampling (#321), control flight recording (#322), taking a thread (#319) or a heap dump (#320) of a Java process from the terminal.
- Published Maven artifacts for VisualVM.
Polyglot Embedding
The required JVMCI version for Polyglot Embeddings was updated in this release. All GraalVM JDK versions (8, 11, 16) already contain the updated JVMCI version and there is no further action required. If you are using a different JDK than GraalVM and you have configured the Graal compiler on the upgrade module path you will need one of the following JDK versions that includes JDK-8264016 for full compatibility:
- Other JDK 11: Oracle JDK 11.0.13 (2021-10-19), OpenJDK is still to be determined.
- Other JDK 16: No current plans to update JVMCI.
- Other JDK 17: The new JVMCI version is already integrated into early access builds.
If your JVMCI version is outdated, you will be able to use GraalVM embeddings, but forced context cancellation (Context.close(true)
) and interrupt (Context.interrupt(Duration)
) will throw an error. We recommend the following workarounds:
- Do not use forced context cancellation or interrupt. All other features are still supported.
- Switch to the fallback runtime by removing graal.jar from the upgrade-module-path. Note that this will significantly worsen performance and should only be a last resort.
- Wait with upgrading to 21.2 until the JDK version has support for the new JVMCI version.
Other changes:
- Changed the behaviour of
Value.as(TypeLiteral<Function<Object, Object>>).apply()
: when the function is called with anObject[]
argument, it is passed through as a single argument rather than an array of arguments (see #456).
A full list of changes can be found here.
Truffle Language and Tool Implementations
- Added support for Truffle libraries to be prepared for ahead-of-time compilation without prior execution. See ExportLibrary.useForAOT or the AOT Tutorial for more details.
- Implemented
DebugValue
methodshashCode()
andequals()
to provide results of the interoperabilityidentityHashCode
and isIdentical calls on the corresponding guest objects, respectively. - Added support for iterators and hash maps to
DebugValue
. The added methods delegate to the respective methods ofInteropLibrary
. - Methods annotated with
@Fallback
of the Truffle specialization DSL now support@Cached
,@CachedContext
,@CachedLanguage
,@Bind
and dispatched@CachedLibrary
parameters. - Added
TruffleContext.pause()
andTruffleContext.resume(Future<Void>)
to pause and resume execution for a Truffle context, respectively. - Added
CompilerDirectives.blackhole(value)
which can be helpful for benchmarking. - Added
TruffleLanguage#Env.registerOnDispose(Closeable)
registering aCloseable
for automatic close on context dispose. - Added
RootNode#countsTowardsStackTraceLimit()
, replacingRootNode#isInternal()
as the criterion that determines whether a frame with the given root node counts towards the stack trace limit. - Added
MemoryFence
which provides methods for fine-grained control of memory ordering (see #2031). - Deprecated
ValueProfile.createEqualityProfile()
without replacement.Object.equals(Object)
cannot safely be used on compiled code paths. Use the Truffle Specialization DSL instead to implement caches with equality semantics. MakingObject.equals(Object)
reachable as runtime compiled method will mark too many equals implementations reachable for runtime compilation in a native image. - Deprecated and added methods to support expected arity ranges in
ArityException
instances. Note that the replacement methods now include more strict validations. - The Specialization DSL now generates code to throw an
AssertionError
if a@Shared
and@Cached
parameter returns a non-null value and is used in a guard. The null state is reserved for the uninitialized state. - Added
LoopConditionProfile#create()
as an alias ofcreateCountingProfile()
so it can be used like@Cached LoopConditionProfile loopProfile
.
A full list of changes can be found here.
Oracle GraalVM Enterprise Edition 21.1.0
(2021-04-20)
Java Updates
The Oracle JDK release that GraalVM Enterprise Edition is built on was updated to:
- 8u291 for Java 8-based GraalVM Enterprise, please see Java SE 8 release notes
- 11.0.11 for Java 11-based GraalVM Enterprise, please see Java SE 11 release notes
- 16.0.1 for Java 16-based GraalVM Enterprise, please see Java SE 16 release notes
Platform Updates
- Java 16 (experimental) support: The GraalVM Enterprise distribution based on Oracle Java 16 is available for download with several known limitations.
- MacOS platform support: GraalVM Enterprise builds for macOS based on Oracle JDK 8 continue to be available, unlike builds of GraalVM Community for macOS based on OpenJDK 8 which are no longer being produced.
- Linux AArch64 platform compatibility: The GraalVM Enterprise distributions for Linux AArch64 architecture remain experimental in this release. Supported features include the GraalVM compiler, the
gu
tool, the Node.js JavaScript runtime, Native Image, some developer tools.
Compiler
- Added support to detect inverted (tail counted) loops as counted loops. GraalVM Enterprise now detects such loops as counted, enabling them to be analyzed and optimized like all other counted loops. These loops are subject to full unrolling, partial unrolling, guard optimization and vectorization. This new capability can be disabled with
-Dgraal.DetectInvertedLoopsAsCounted=false
. * Added a novel loop inversion optimization in GraalVM Enterprise. This adds compiler support to generate inverted loops from regular ones. Inverted loops have superior characteristics for instruction level parallelism and optimization capabilities compared to regular, head counted loops. We have seem performance improvements of up to 30% for micro benchmarks exercising the inverted loop shape. Loop inversion is on by default and can be disabled with-Dgraal.LoopInversion=false
. - Added a new optimization that analyzes code guarded by a conditional of the form
x == y
and replace all uses ofx
withy
(or vice versa) if the replacement results in potential for further optimization. * Enhanced SIMD vectorization, to support vector byte reversal (e.g.,Integer.reverseBytes
). SIMD vectorization is still experimental and not enabled by default. Enable it with-Dgraal.VectorizeSIMD=true
. * Added support for vectorizinghashCode
-like loops using thehash = c * hash + array[i]
. Disable with-Dgraal.VectorizeHashes=false
. - Eliminated the cast of the loaded array element to Node, to prevent the situation when volatile fields are loading from arrays, losing type information about the element, and resulting in unneeded casts. This method in
ConcurrentHashMap
can be an example:static final <K,V> Node<K,V> tabAt(Node<K,V>[] tab, int i) { return (Node<K,V>)U.getObjectVolatile(tab, ((long)i << ASHIFT) + ABASE); }
- Eliminate unneeded memory barriers on sequential volatile writes on x86. There are patterns in classes such as
ConcurrentHashMap
where numerous volatile writes can occur in a sequence (after inlining). The GraalVM compiler now omits the memory barrier for all but the last write in the sequence, speeding up methods such asConcurrentHashMap.transfer
.
Native Image
- Improved support for localization. Now you can specify which locales should be included in the native executable, and which should be the default. For
example, to switch the default locale to German and also include French and English, use
-H:DefaultLocale=de -H:IncludeLocales=fr,en
. All locales can be included via-H:+IncludeAllLocales
. - Deprecated the
--enable-all-security-services
option as it is no longer necessary. Security services are now registered automatically when found in use by static analysis. - Improved support on Windows: applications now do file globbing on parameters.
- Added reporting on the native image build to produce multiple artifacts. Results of the build are written to the imagename.build_artifacts.txt file.
- Fixed a bug on Linux and macOS that resulted in local symbols about all methods being included in the native image, when
-g
is passed for debug information generation. Method symbols are not necessary for debugging because the Dwarf debugging information also contains this information. When local symbols are desired, e.g., for certain profilers, they can be included in the image using-H:-DeleteLocalSymbols
(independently of the-g
option). - Allowed multiple different native images in the same process, e.g., an application and a shared library. This was required for Linux platforms.
- Automatically mark more classes for build-time initializaiton. This reduces the overhead of class initialization at run time.
Polyglot Runtime
- Enabled multi-tier compilation by default. This feature was first introduced in 20.3 as an experimental option. Truffle now uses two tiers of compilation. The first tier is optimized for compilation speed and reuses the GraalVM compiler economy configuration to perform speedy compilations with method inlining of trivial methods only. The second tier compiles with all GraalVM’s compiler optimizations enabled and is performed after the first tier compilation is completed. Our benchmark results show that this improves warmup for most languages significantly.
- Added new capabilities for language implementations that require an optional dependency to the newest JVMCI version 21.1-b02 (issue JDK-8263776). In the next release, 21.2 we plan to use some of these capabilities for core runtime functionality, and therefore JVMCI 21.1-b02 will become a required dependency. This will make runtime compilation for JDK releases that do not support JVMCI 21.1-b02 unsupported. Note that all Truffle languages can still be executed on any JDK but without support for runtime compilation.
- Introduced new experimental flags to set the compilation thresholds for multi-tier compilation:
--engine.FirstTierCompilationThreshold
sets the threshold for the first, and--engine.LastTierCompilationThreshold
for the second tier. If multi-tier compilation is disabled,--engine.SingleTierCompilationThreshold=x
may be used. The original option,--engine.CompilationThreshold
, is now deprecated and will be removed in a future release. - Added a new experimental compilation queue implementation inspired by HotSpot. The implementation is not yet enabled by default, but can be tried out using the
--engine.TraversingCompilationQueue
option. The flag is expected to reduce warmup time. More changes and enhancements are planned for the next release, where it is expected to become the default implementation. - Deprecated the
--engine.CompilationThreshold
option. Use--engine.FirstTierCompilationThreshold
and--engine.LastTierCompilationThreshold
instead.
Java on Truffle
- Introduced many fixes and improvements to the Java Debug Wire Protocol (JDWP) support. Many edge cases have been fixed which increased the performance of Java on Truffle while debugging is enabled (up to 200x!).
- Provided fixes for method redefinition: reflective access and MethodHandles now follow method changes.
- Added support for signal handlers (
sun.misc.Signal
/jdk.internal.misc.Signal
). This means shutdown hooks are now run when closing a program withCtrl-C
. - Removed the dependency on deprecated Scope API and implement newly introduced
NodeLibrary
instead. - Fixed guest stack traces as reported by the GraalVM embedder API (PolyglotException).
- Improved support for restricting thread creation.
JavaScript
- Updated Node.js to version 14.16.1.
- Node.js support is not enabled by default and must be installed explicitly with GraalVM Updater if needed:
gu install nodejs
. The JavaScript runtime continue to be included in the base GraalVM installation. - Added Iterator interoperability support. It allows JavaScript iterators to be used via the Value API (
hasIterator()
,getIterator()
,hasIteratorNextElement()
,getIteratorNextElement()
), as well as iterable objects from other languages to be iterated in GraalVM’s JavaScript runtime (e.g., via for-of loops), and vice versa. - Enabled buffer interoperability support. It allows host
ByteBuffers
and buffers from other languages to be used with JavaScript typed arrays (e.g.,new Uint8Array(foreignBuffer)
) andDataView
, without copying. It also enables access toArrayBuffers
via the Value API (readBuffer*
,writeBuffer*
). - Implemented the experimental version of the WebAssembly JavaScript Interface, which allows invoking WebAssembly programs from within JavaScript programs (available behind the
--js.webassembly
option).
The changelog is available in the project repository.
LLVM Runtime (Sulong)
* The ability to build GraalVM or a native image with “native mode” completely removed (so only --llvm.managed
mode works).
- Made pointers to foreign “buffer-like” objects (e.g., JS
ArrayBuffer
) be transparently accessed like native buffers. - Added support for loading bitcode modules with regular
dlopen
in addition to the Polyglot API. - Added experimental support for the Linux AArch64 platform.
- Implemented a sanity check to verify that loaded bitcode files are compiled correctly for the GraalVM LLVM Runtime. In particular, this will fail when loading bitcode that is built for managed mode and used in native mode, or vice versa. This can be turned into a non-fatal warning with the
--llvm.verifyBitcode=false
option.
The project changelog is available on GitHub.
Ruby
- Implemented more complete support of Ruby 2.7 (see #2004 for more details).
- Multi-tier compilation is now enabled by default, which improves warmup significantly.
- C extensions which link to a static library now generally work by prepending the GraalVM LLVM toolchain to
PATH
when installing gems. - Improved the performance of checks for recursion (#2189).
- Improved random number generation performance by avoiding synchronization (#2190).
- Implemented the ability to create a single call target per block by default instead of two.
- Optimized some uses of class variables (#2259).
- Speeded up the interpreter and reduced footprint by making several methods that need the caller frame always inlined in their caller.
- Added support for accessing local variables of the interactive
Binding
via language bindings:context.getBindings("ruby").putMember("my_var", 42);
. See #2030. - Made signal handlers run without triggering multi-threading.
- Implemented the Debug Inspector C API.
- Switched to the
io-console
C extension for better performance and compatibility inirb
. - Updated to
irb
1.3.3 andreline
0.2.3 which allow pasting code in IRB reasonably fast (#2233). - Standalone builds of TruffleRuby are now based on JDK11 (they used JDK8 previously).
More details are available from the TruffleRuby changelog.
Python
- Improved support for Java subclassing and new Interoperability APIs for better Jython migration path. The features often requested and available with Jython, like convenient iteration over Python types from Java, implementing Java abstract classes and interfaces from Python, catching and re-throwing Java exceptions in Python code, are now provided with GraalVM’s Python runtime as well, making the migration easier.
- Added the SSL support. This allows out-of-the-box installation of Python packages. Now users can run the Python
pip
installer to download Python packages, and their dependencies, just as they would on CPython. - Added a completely native backend for
posix
API. This provides better performance and more compatibility for filesystem access. - Added support for multi-threading with GIL. Multi-threading is supported in GraalVM’s Python runtime to the same extent as CPython. That is, there is only concurrency, not parallelism for most workloads.
- Added support for the current HPy Python C API to run C extensions at better performance. This is an ongoing research project together with members of the PyPy project and the University of Cape Town to provide a faster API for NumPy and other popular Python C extensions.
More details are available in the project changelog.
R
- Upgraded GraalVM’s R runtime to R 4.0.3:
- Made the GraalVM R runtime mostly compatible with R 4.0.3;
- Migrated to new versions of the base and recommended packages;
- Implemented some of the new features of R 4.0.3 (see the changelog for a complete list).
- Upgraded the CRAN snapshot, used by default by
install.packages
, to 2021-02-01:- Support of the new versions of some of most popular packages on GraalVM’s R runtime is a work in progress;
- Packages with known issues remain:
dplyr
1.0.3,ggplot
3.3.3,knitr
1.31.
More details are available in the project changelog.
WebAssembly (GraalWasm)
- Substantially improved the speedup and the overall peak performance of the GraalWasm interpreter by over 10x.
- Provided the basic WASI functions that allow manipulating the files and accessing the file system through the Truffle filesystem layer.
- GraalWasm is now passing most of the tests in the official WebAssembly test suite.
- Improved the speed of the standalone GraalWasm launcher, and the peak performance overall.
- Implemented the WebAssembly-JavaScript Interface specification, which allows invoking WebAssembly programs from within JavaScript programs running on GraalVM’s JavaScript runtime.
- Implemented parsing custom name sections in the .wasm files to make stack-traces more user-friendly.
- Made the GraalWasm interpreter respect the binary-validation rules.
- Introduced checks for memory/table/function count limits when parsing and linking binaries, as defined in the specification.
- Added checks to not get exponential compilation slowdown on some pathological code examples.
Tools
Visual Studio Code Extensions
- Added results visualization for unit tests:
- Improved Micronaut support by adding YAML <> Java code editing features:
- Added a number of refactorings.
- Included Micronaut projects Docker build commands.
- Improved support for Maven and Gradle multi-project builds.
VisualVM
- Added support for upcoming JDK 16 (#260).
- Added support for the new Apple M1 processor (aarch64) (#262).
- Added support for the importation of plugins from the previous release (#270).
- Added a display list of enabled modules in heap dumps feature, taken from JDK 9+ created by jlink (#275).
Polyglot Embedding
* Added a new experimental sandbox option --sandbox.MaxHeapMemory=<size>
that specifies the maximum heap memory that a guest application can retain during its run. This feature is currently only supported on HotSpot. Note that this feature is still experimental.
- Added support for byte buffer-like data structures. This release adds new methods to access buffer values like
Value.hasBufferElements()
. Java host interoperability was improved to handlejava.nio.ByteBuffer
implementations to make them work like native guest language buffers. This feature can be enabled and disabled usingHostAccess.Builder.allowBufferAccess(boolean)
. Support for polyglot buffers in languages may vary. See the individual language changelog for more details. - Added support for iterable and iterator-like data structures. This includes new methods to detect if a polyglot value is an iterator or iterable with
Value.isIterator()
andValue.hasIterator()
. New proxy interfacesProxyIterator
andProxyIterable
were added to mimic iterators and iterables. Java host interoperability was improved to handlejava.util.Iterator
andjava.util.Iterable
implementations to make them work like guest language values. This feature can be enabled and disabled withHostAccess.Builder.allowIteratorAccess(boolean)
andHostAccess.Builder.allowIterableAccess(boolean)
. Guest language iterators can now also be mapped to Java iterators usingValue.as(Iterator.class)
. The support for this feature in individual languages may vary. See the language changelog for more details. - Added support for map-like data structures (issue #143). This includes new methods for polyglot values like
Value.hasHashEntries()
to query if a polyglot value represents a hash map like data structure. A new interfaceProxyHashMap
was added to mimic such values. Java host interoperability was improved to handlejava.util.Map
implementations to make them look like guest language hash maps. This feature can be enabled and disabled withHostAccess.Builder.allowMapAccess(boolean)
. Guest language maps can now also be mapped to Java Maps usingValue.as(Map.class)
. The support for this feature in individual languages may vary. See the language changelog for more details. - Added
Context.safepoint()
to cooperatively poll thread local actions of a polyglot context while a host method is executed. For example, this allows the context to check for interruption or cancellation.
A detailed list of all the changes can be found in the changelog.
Truffle Language and Tool Implementations
- Added support for submitting thread local actions to run at guest language safepoints for language implementations (issue JDK-8263776). Please see the tutorial on how to adapt and use this feature in a language or tool implementation.
- Added a new interoperability trait for buffer elements in InteropLibrary that allows better integration with native buffers.
- Added a new interoperability type iterator and a new trait for iterable in InteropLibrary to improve traversal of collections between languages.
- Added a new interoperability trait for hash entries in InteropLibrary to improve interoperability between guest language hash maps (issue #143).
- Added
TruffleInstrument.Env.calculateContextHeapSize(TruffleContext, long, AtomicBoolean)
to calculate the heap size retained by a context. - Added
@GenerateAOT
to support preparation for AOT specializing nodes. Read the AOT tutorial to get started with Truffle and AOT compilation. We also added the--engine.CompileAOTOnCreate
option to trigger AOT compilation on call target create. More changes and enhancements are planned for the next release. - Added
ExactMath.truncate(float)
andExactMath.truncate(double)
methods to remove the decimal part (round toward zero) of a float or of a double respectively. These methods are intrinsified. - Added several new events to
ContextsListener
when language context initialization was completed or failed. - Added
CompilerDirectives.isExact(Object, Class)
to check whether a value is of an exact type. This method should be used instead of thevalue != null && value.getClass() == exactClass
pattern. - Added
Frame.clear(FrameSlot)
. This allows the compiler to reason about the liveness of local variables. Languages are recommended to use this method when applicable. - Added
TruffleLanguage.Env.getLogger(String)
andTruffleLanguage.Env.getLogger(Class<?>)
creating a context-bound logger. The returnedTruffleLogger
always uses a logging handler and options from Env’s context and does not depend on being entered on any thread. - Added
TruffleContext.leaveAndEnter(Node, Supplier)
to wait for another thread without triggering multithreading. - The native image build now fails for the Truffle languages if a method that is known to be not suitable for partial evaluation is reachable for runtime compilation. The check can be disabled by the
-H:-TruffleCheckBlackListedMethods
option for the native-image builder. Removed the deprecatedTruffleLanguage.Env.getTruffleFile(String)
,TruffleLanguage.Env.getTruffleFile(URI)
methods. - Added
TruffleContext.isCancelling()
to check whether a Truffle context is being cancelled. - Added new features to the specializing DSL
@NodeChild
annotation: Addedimplicit
andimplicitCreate
attributes to allow implicit creation of child nodes by the parent factory method. - Added
allowUncached
and uncached attributes to allow using@NodeChild
with@GenerateUncached
. - Profiles now can be disabled using
Profile.disable()
and reset usingProfile.reset()
. - Added support for two-phase attach in the Truffle instrumentation with the new
EventBinding.attach()
method.
A detailed list of all the changes can be found in the Truffle framework changelog.
Oracle GraalVM Enterprise Edition 21.0.0.2
(2021-02-11)
This is a bug fix release for the GraalVM 21.0.x branch. It contains operational changes to GraalVM Updater - a tool for installing optional GraalVM language runtimes and utilities, and for updating your local GraalVM installation.
- Enhanced the upgrading policies to prevent components not being upgraded when migrating from GraalVM Community to GraalVM Enterprise Edition (
gu upgrade --edition ee
). - Improved handling the license acceptance by
gu
when a user is prompted to accept “Oracle GraalVM Enterprise Edition Native Image License”.
Oracle GraalVM Enterprise Edition 21.0.0
(2021-01-19)
Java
- Updated the underlying JDK to Oracle JDK version 1.8.0_281 and Oracle JDK version 11.0.10 for GraalVM Enterprise distributions based on Java 8 and Java 11. You can find release notes for these versions at Oracle Java SE Downloads.
Java on Truffle
- Added an experimental Java Virtual Machine implementation based on a Truffle interpreter. Read more here.
Platforms Support
As of this version, GraalVM distribution for Linux on AArch64 system is provided. All components including the GraalVM core are experimental. This distribution is based on Oracle JDK11 for the AArch64 architecture.
Native Image
- Added serialization support for Native Image. The serialization support ensures constructors for classes are contained in a native image, so that they can be deserialized in the first place. These classes should be whitelisted in an additional specific configuration file, similar to the Reflection continuation, as some classes cannot be deserialized, including classes that might be part of the native image, but not listed in the configuration file. You can either create a configuration file manually or apply a Tracing Agent, provided with GraalVM, to help writing the configuration files.
- Added method handle invocation support for Native Image (see #2761). Methods and fields accessed through method handles have to be registered in the Reflection configuration file. Also added method handles support to the Tracing agent to automatically generate the configuration for the native image build. Most use cases of method handles are supported. VarHandles that are not stored in static fields are still not supported.
- Added AWT and Swing support for the Linux platform (configuration collection with the Tracing agent is necessary).
- Added the experimental
-H:+InlineBeforeAnalysis
option to reduce the number of required configuration entries and lessen the image size. - Improved the Tracing agent: it now captures instances of
Class.getClasses
andClass.getDeclaredClasses
. - Improved the
ServiceLoaderFeature
class to scan for services declared using modules. - Disallowed the instances of
Random
in the native image heap. - Improved GC performance (less time spent in GC).
Updates for Language and Tool Implementers Using Truffle API
- Fixed many issues related to multi-tier compilation. Multi-tier compilation (
--engine.MultiTier
) will be enabled by default in 21.1. - Added
HostCompilerDirectives
for directives that guide the host compilations of the Truffle interpreters: HostCompilerDirectives.BytecodeInterpreterSwitch
to denote methods that contain the instruction-dispatch switch in bytecode interpretersHostCompilerDirectives.BytecodeInterpreterSwitchBoundary
to denote methods that do not need to be inlined into the bytecode interpreter switch- Truffle DSL generated nodes are no longer limited to 64 state bits. Use these state bits responsibly.
- More changes are listed in the changelog.
Updates for Polyglot Embedders
- Added support for explicitly selecting a host method overload using the signature in the form of comma-separated fully qualified parameter type names enclosed by parentheses (e.g.,
methodName(f.q.TypeName,java.lang.String,int,int[])
). - Deprecated the host method selection by JNI mangled signature, replaced by the aforementioned new form. Scheduled for removal in 21.2.
JavaScript
- Updated Node.js to version 12.20.1.
- Enabled the following ECMAScript 2021 mode/features by default:
- Class fields
Promise.any
String.prototype.replaceAll
- Logical Assignment Operators
- Adopted a new interop exception handling and made JS exceptions extend the
AbstractTruffleException
class. - Exposed
Graal.versionECMAScript
instead ofGraal.versionJS
. - Implemented the relative indexing method proposal. It is available in ECMAScript 2022 mode (
--js.ecmascript-version=2022
).
Python
- Added the
jarray
module for compatiblity with Jython. - Improved the support for Pandas and added the initial support for the Matplotlib visualization library.
- Provided fixes to avoid possible memory leaks and crashes when running NumPy in a shared engine.
- Fixed an infinite continuation prompt in REPL when pasting snippets.
More details can be found in the changelog.
Ruby
- The new IRB is quite slow when copy/paste code into it. This is due to an inefficient
io/console
implementation which will be addressed in the next release. A workaround is to useirb --readline
, which disables some IRB features but is much faster for copy/pasting code.
New features:
- Updated to Ruby 2.7.2. Most Ruby 2.7 features and changes are implemented (see #2004).
Bug fixes:
- Fixed setting of special variables in enumerators and enumerables (issue #1484).
- Fixed issue with
Method#to_proc
and special variable storage (issue #2156).
Compatibility:
**kwargs
now accept non-Symbol keys like Ruby 2.7.
Performance:
- Refactor and implement more performant
MatchData#length
(see #2147). - Refactor and implement more performant
Array#sample
(see #2148). String#inspect
is now more efficient.
Changes:
- All
InteropLibrary
messages are now exposed consistently as methods onTruffle::Interop
(see #2139). Some methods were renamed to match the scheme described in the documentation. - More details are available from the changelog.
R
- Fixed
AssertionError
when trying to install the R validate package (issue #169).
LLVM runtime
- Improved the AST sharing, and support for the auxiliary engine caching. On top of the regular AST sharing that allows sharing code between multiple contexts in a single engine, this allows persisting of the shared code to share it across process boundaries.
- Added support for the current major release of macOS (macOS Big Sur).
Deprecations:
- Added a deprecation warning for the old header files locations
polyglot.h
andllvm/api/toolchain.h
. These header files have been already deprecated in 20.3.0, but without a warning.
WebAssembly (GraalWasm)
- This release included a large number of bugfixes in semantics, linking and in-module validation. GraalVM’s WebAssembly interpreter now passes almost all tests from the official specification test suite.
- Exposed
Polyglot
bindings that are needed for the JS-to-WebAssembly Interface API. - Optimized the GraalWasm interpreter, leading to warmup and an overall 20x peak performance improvement of the interpreted execution mode.
- Improved the security by using the byte-buffer-based memory instead of the off-heap memory.
Tooling
GraalVM Updater
Starting from version 21.0, GraalVM Updater has become more powerful and can be used to update your GraalVM local installation to a newer version or upgrade from a Community to Enterprise Edition. Read more in Upgrade GraalVM.
Visual Studio Code Extensions
- Added refactoring and other productivity features.
GraalVM Dashboard
- Improved the BGV format to support large amount of integer properties.
VisualVM
- Enabled a seamless import of settings from the previous installations of VisualVM.