Skip to content

Commit

Permalink
Merge branch 'release/graal-vm/22.0' of https://github.com/oracle/graal
Browse files Browse the repository at this point in the history
… into release/graal-vm/22.0-gluon
  • Loading branch information
jperedadnr committed Jan 26, 2022
2 parents 6aa7d0d + cb58c28 commit a90fdfa
Show file tree
Hide file tree
Showing 71 changed files with 1,841 additions and 355 deletions.
20 changes: 10 additions & 10 deletions common.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,18 @@

"openjdk11": {"name": "openjdk", "version": "11.0.11+9", "platformspecific": true },
"oraclejdk11": {"name": "oraclejdk", "version": "11.0.11+9", "platformspecific": true },
"labsjdk-ce-11": {"name": "labsjdk", "version": "ce-11.0.14+8-jvmci-22.0-b03", "platformspecific": true },
"labsjdk-ce-11-llvm": {"name": "labsjdk", "version": "ce-11.0.14+8-jvmci-22.0-b03-sulong", "platformspecific": true },
"labsjdk-ee-11": {"name": "labsjdk", "version": "ee-11.0.14+8-jvmci-22.0-b03", "platformspecific": true },
"labsjdk-ee-11-llvm": {"name": "labsjdk", "version": "ee-11.0.14+8-jvmci-22.0-b03-sulong", "platformspecific": true },
"labsjdk-ce-11": {"name": "labsjdk", "version": "ce-11.0.14+9-jvmci-22.0-b05", "platformspecific": true },
"labsjdk-ce-11-llvm": {"name": "labsjdk", "version": "ce-11.0.14+9-jvmci-22.0-b05-sulong", "platformspecific": true },
"labsjdk-ee-11": {"name": "labsjdk", "version": "ee-11.0.14+8-jvmci-22.0-b05", "platformspecific": true },
"labsjdk-ee-11-llvm": {"name": "labsjdk", "version": "ee-11.0.14+8-jvmci-22.0-b05-sulong", "platformspecific": true },

"oraclejdk17": {"name": "oraclejdk", "version": "17.0.1+12", "platformspecific": true },
"labsjdk-ce-17": {"name": "labsjdk", "version": "ce-17.0.2+8-jvmci-22.0-b03", "platformspecific": true },
"labsjdk-ce-17Debug": {"name": "labsjdk", "version": "ce-17.0.2+8-jvmci-22.0-b03-debug", "platformspecific": true },
"labsjdk-ce-17-llvm": {"name": "labsjdk", "version": "ce-17.0.2+8-jvmci-22.0-b03-sulong", "platformspecific": true },
"labsjdk-ee-17": {"name": "labsjdk", "version": "ee-17.0.2+8-jvmci-22.0-b03", "platformspecific": true },
"labsjdk-ee-17Debug": {"name": "labsjdk", "version": "ee-17.0.2+8-jvmci-22.0-b03-debug", "platformspecific": true },
"labsjdk-ee-17-llvm": {"name": "labsjdk", "version": "ee-17.0.2+8-jvmci-22.0-b03-sulong", "platformspecific": true }
"labsjdk-ce-17": {"name": "labsjdk", "version": "ce-17.0.2+8-jvmci-22.0-b05", "platformspecific": true },
"labsjdk-ce-17Debug": {"name": "labsjdk", "version": "ce-17.0.2+8-jvmci-22.0-b05-debug", "platformspecific": true },
"labsjdk-ce-17-llvm": {"name": "labsjdk", "version": "ce-17.0.2+8-jvmci-22.0-b05-sulong", "platformspecific": true },
"labsjdk-ee-17": {"name": "labsjdk", "version": "ee-17.0.2+8-jvmci-22.0-b05", "platformspecific": true },
"labsjdk-ee-17Debug": {"name": "labsjdk", "version": "ee-17.0.2+8-jvmci-22.0-b05-debug", "platformspecific": true },
"labsjdk-ee-17-llvm": {"name": "labsjdk", "version": "ee-17.0.2+8-jvmci-22.0-b05-sulong", "platformspecific": true }
},

"COMMENT.devkits" : "The devkits versions reflect those used to build the JVMCI JDKs (e.g., see devkit_platform_revisions in <jdk>/make/conf/jib-profiles.js)",
Expand Down
4 changes: 2 additions & 2 deletions compiler/mx.compiler/suite.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
"sourceinprojectwhitelist" : [],

"groupId" : "org.graalvm.compiler",
"version" : "22.0.0",
"release" : True,
"version" : "22.0.0.3",
"release" : False,
"url" : "http://www.graalvm.org/",
"developer" : {
"name" : "GraalVM Development",
Expand Down

Large diffs are not rendered by default.

20 changes: 9 additions & 11 deletions docs/enterprise-overview/architecture-overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ The conceptual overview and advantages of GraalVM Enterprise are described on th

The preceding diagram illustrates a complete high-level architecture of GraalVM Enterprise.

GraalVM adds an [advanced just-in-time (JIT) optimizing compiler](../reference-manual/compiler.md), which is written in Java, to the HotSpot Java Virtual Machine.
GraalVM adds an [advanced just-in-time (JIT) optimizing compiler](../reference-manual/java/compiler.md), which is written in Java, to the HotSpot Java Virtual Machine.

In addition to running Java and JVM-based languages, [GraalVM's language implementation framework (Truffle)](../../truffle/docs/README.md), makes it possible to run JavaScript, Ruby, Python, and a number of other popular languages on the JVM.
With Truffle, Java and other supported languages can directly interoperate with each other and pass data back and forth in the same memory space.
Expand All @@ -39,7 +39,7 @@ With Truffle, Java and other supported languages can directly interoperate with
GraalVM Enterprise is unique as a runtime environment offering several modes of operation: JVM runtime mode, Native Image, Java on Truffle (the same Java applications can be run on either).

#### JVM Runtime Mode
When running programs on the HotSpot JVM, GraalVM defaults to the [GraalVM compiler](../reference-manual/compiler.md) as the top-tier JIT compiler.
When running programs on the HotSpot JVM, GraalVM defaults to the [Graal compiler](../reference-manual/java/compiler.md) as the top-tier JIT compiler.
At runtime, an application is loaded and executed normally on the JVM.
The JVM passes bytecodes for Java or any other JVM-native language to the compiler, which compiles that to the machine code and returns it to the JVM.
Interpreters for supported languages, written on top of the [Truffle framework](../../truffle/docs/README.md), are themselves Java programs that run on the JVM.
Expand All @@ -52,19 +52,18 @@ A generated self-contained native executable is specific to each individual oper
#### Java on Truffle
[Java on Truffle](../reference-manual/java-on-truffle/README.md) is an implementation of the Java Virtual Machine Specification, built with the [Truffle framework](../../truffle/docs/README.md).
It is a complete Java VM that includes all core components, implements the same API as the Java Runtime Environment library, and reuses all JARs and native libraries from GraalVM.
Java on Trufle is an experimental technology in GraalVM, available as of version 21.0.0.

## Available Distributions

GraalVM Enterprise distributions are based on Oracle JDK 8, 11, and 17.
GraalVM Enterprise distributions are based on Oracle JDK 11 and 17.
GraalVM Enterprise releases include all Oracle Java critical patch updates (CPUs), which are released on a regular schedule to remedy defects and known vulnerabilities.

GraalVM Enterprise is available for Linux, macOS, and Windows platforms on x86 64-bit systems, and for Linux on ARM 64-bit system.
Depending on the platform, the distributions are shipped as *.tar.gz* or *.zip* archives.

## Certified Platforms

The following are the certified platforms for GraalVM Enterprise 21:
The following are the certified platforms for GraalVM Enterprise 22:

| Operating System | Version | Architecture | Installation Guide |
|------------------------------------ |-------------- |-------------- |------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
Expand Down Expand Up @@ -103,9 +102,9 @@ Tools/Utilities:
Runtimes:

* [Java on Truffle](../reference-manual/java-on-truffle/README.md) -- a JVM implementation built upon the [Truffle framework](../../truffle/docs/README.md) to run Java via a Java bytecode interpreter.
* [Node.js](../reference-manual/js/README.md) -- the Node.js 14.17.6 runtime for JavaScript
* [Node.js](../reference-manual/js/README.md) -- the Node.js 14.18.1 runtime for JavaScript
* [Python](../reference-manual/python/README.md) -- Python 3.8.5 compatible
* [Ruby](../reference-manual/ruby/README.md) -- Ruby 2.7.3 compatible
* [Ruby](../reference-manual/ruby/README.md) -- Ruby 3.0.2 compatible
* [R](../reference-manual/r/README.md) -- GNU R 4.0.3 compatible
* [GraalWasm](../reference-manual/wasm/README.md) -- WebAssembly (Wasm)

Expand All @@ -116,10 +115,9 @@ Oracle GraalVM Enterprise Edition is licensed under the [Oracle Technology Netwo
For production use, GraalVM Enterprise is available as part of the [Oracle Java SE Subscription](https://www.oracle.com/uk/java/java-se-subscription/) which includes 24x7x365 [Oracle premier support](https://www.oracle.com/support/premier/) and the access to [My Oracle Support (MOS)](https://www.oracle.com/support/).

GraalVM Enterprise focuses on support for Java LTS releases for production deployments.
GraalVM Enterprise Edition 21.3 is announced a Long-Term-Support (LTS) release.
See [Versions Roadmap of Oracle GraalVM Enterprise Edition](../../release-notes/enterprise/graalvm-enterprise-version-roadmap.md) for more information.

Please note, that while Oracle JDK 17 is available under the new [Oracle No-Fee Terms and Conditions (NFTC) license](https://www.oracle.com/downloads/licenses/no-fee-license.html) which allows commercial and production use for 2 years, GraalVM Enterprise Edition license remains unchanged.
Please note, that while Oracle JDK 17 is available under the new [Oracle No-Fee Terms and Conditions (NFTC) license](https://www.oracle.com/downloads/licenses/no-fee-license.html) which allows commercial and production use for 2 years, GraalVM Enterprise Edition license remains unchanged.

## Experimental and Early Adopter Features

Expand All @@ -131,7 +129,7 @@ The development team welcomes feedback on experimental features, but users shoul

For more information, check the [Oracle Technology Network License Agreement for GraalVM Enterprise Edition](https://www.oracle.com/downloads/licenses/graalvm-otn-license.html).

The following table lists supported and experimental features in GraalVM Enterprise Edition 21 by platform.
The following table lists supported and experimental features in GraalVM Enterprise Edition 22 by platform.

| Feature | Linux AMD64 | Linux ARM64 | macOS | Windows |
|--------------------|---------------|---------------|---------------|
Expand All @@ -140,7 +138,7 @@ The following table lists supported and experimental features in GraalVM Enterpr
| LLVM toolchain | supported | supported | supported | not available |
| JavaScript | supported | supported | supported | supported |
| Node.js | supported | supported | supported | supported |
| Java on Truffle | experimental | experimental | experimental | experimental |
| Java on Truffle | supported | experimental | experimental | experimental |
| Python | experimental | not available | experimental | not available |
| Ruby | experimental | experimental | experimental | not available |
| R | experimental | not available | experimental | not available |
Expand Down
21 changes: 12 additions & 9 deletions docs/examples/java-kotlin-aot.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,32 +57,35 @@ It should have produced the executable file, `helloworld`.
## Running the Application

To run the application, you need to execute the JAR file in the `target` directory.
You can run it as a normal Java application using `java`.
Or, since we have a native executable prepared, you can run that directly.
The `run.sh` file executes both, and times them with the `time` utility:
You can run it as a normal Java application using `java`:
```shell
java -cp ./target/mixed-code-hello-world-1.0-SNAPSHOT-jar-with-dependencies.jar hello.JavaHello
```

Or, since we have a native executable prepared, you can run that directly.
```shell
./helloworld

```

The `run.sh` file executes both, and times them with the `time` utility.
An output close to the following should be produced:
```shell
→ ./run.sh
+ java -cp ./target/mixed-code-hello-world-1.0-SNAPSHOT-jar-with-dependencies.jar hello.JavaHello
Hello from Kotlin!
Hello from Java!

real 0m0.129s
user 0m0.094s
sys 0m0.034s
real 0m0.589s
user 0m0.155s
sys 0m0.072s
+ ./helloworld
Hello from Kotlin!
Hello from Java!

real 0m0.010s
user 0m0.003s
sys 0m0.004s
real 0m0.053s
user 0m0.006s
sys 0m0.006s
```

The performance gain of the native version is largely due to the faster startup.
Expand Down
12 changes: 6 additions & 6 deletions docs/examples/java-performance-examples.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ permalink: /examples/java-performance-examples/

# Java Performance Examples

The GraalVM compiler achieves excellent performance, especially for highly abstracted programs, due to its versatile optimization techniques.
The [Graal compiler](../reference-manual/java/compiler.md) achieves excellent performance, especially for highly abstracted programs, due to its versatile optimization techniques.
Code using more abstraction and modern Java features like Streams or Lambdas will see greater speedups.
The examples below demonstrate this.

## Running Examples

### Streams API Example

A simple example based on the [Streams API](https://docs.oracle.com/javase/8/docs/api/java/util/stream/package-summary.html) is used here to demonstrate performance gains when using the GraalVM compiler.
A simple example based on the [Streams API](https://docs.oracle.com/javase/8/docs/api/java/util/stream/package-summary.html) is used here to demonstrate performance gains when using the Graal compiler.
This example counts the number of uppercase characters in a body of text.
To simulate a large load, the same sentence is processed 10 million times:

Expand Down Expand Up @@ -46,7 +46,7 @@ public class CountUppercase {
2&#46; Compile it and run as follows:
```shell
javac CountUppercase.java
java CountUppercase In 2021 I would like to run ALL languages in one VM.
java CountUppercase This year I would like to run ALL languages in one VM.
1 (319 ms)
2 (275 ms)
3 (164 ms)
Expand All @@ -64,14 +64,14 @@ If the performance profile of `CountUppercase` on your machine does not match th

3&#46; Add the `-Dgraal.PrintCompilation=true` option to see statistics for the compilations:
```shell
java -Dgraal.PrintCompilation=true CountUppercase In 2021 I would like to run ALL languages in one VM.
java -Dgraal.PrintCompilation=true CountUppercase This year I would like to run ALL languages in one VM.
```

This option prints a line after each compilation that shows the method compiled, time taken, bytecodes processed (including inlined methods), size of machine code produced, and amount of memory allocated during compilation.

4&#46; Use the `-XX:-UseJVMCICompiler` option to disable the GraalVM compiler and use the native top tier compiler in the VM to compare performance:
```shell
java -XX:-UseJVMCICompiler CountUppercase In 2021 I would like to run ALL languages in one VM.
java -XX:-UseJVMCICompiler CountUppercase This year I would like to run ALL languages in one VM.
1 (492 ms)
2 (441 ms)
3 (443 ms)
Expand Down Expand Up @@ -187,7 +187,7 @@ If you would like to check how it would behave when using GraalVM Community, use
java -Dgraal.CompilerConfiguration=community Blender
```

3&#46; Use the `-XX:-UseJVMCICompiler` option to disable the GraalVM compiler and run with the default HotSpot JIT compiler:
3&#46; Use the `-XX:-UseJVMCICompiler` option to disable the Graal compiler and run with the default HotSpot JIT compiler:
```shell
java -XX:-UseJVMCICompiler Blender
2546 ms
Expand Down
8 changes: 4 additions & 4 deletions docs/examples/java-simple-stream-benchmark.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ permalink: /examples/java-simple-stream-benchmark/

# Simple Java Stream Benchmark

This application is a small benchmark of the Java Stream API. It demonstrates how the GraalVM compiler can achieve better performance for highly abstracted programs like those using Streams, Lambdas, or other Java features.
This application is a small benchmark of the Java Stream API. It demonstrates how the Graal compiler can achieve better performance for highly abstracted programs like those using Streams, Lambdas, or other Java features.

## Preparation

1&#46; [Download GraalVM](https://www.graalvm.org/downloads/), unzip the archive, export the GraalVM home directory as the `$JAVA_HOME` and add `$JAVA_HOME/bin` to the `PATH` environment variable:
1&#46; [Download GraalVM](https://www.graalvm.org/downloads/), unzip the archive, export the GraalVM Home directory as the `$JAVA_HOME` and add `$JAVA_HOME/bin` to the `PATH` environment variable:
On Linux:
```bash
export JAVA_HOME=/home/${current_user}/path/to/graalvm
Expand Down Expand Up @@ -49,12 +49,12 @@ You can run it with the following command:
java -jar target/benchmarks.jar
```
If you would like to run the benchmark on a different JVM, you can run it with whatever `java` you have.
However, if you just want to run it on the same JVM, but without the GraalVM compiler, you may add the `-XX:-UseJVMCICompiler` option into the same command:
However, if you just want to run it on the same JVM, but without the Graal compiler, you may add the `-XX:-UseJVMCICompiler` option into the same command:
```shell
java -XX:-UseJVMCICompiler -jar target/benchmarks.jar
```

This way, the GraalVM compiler will not be used as the JVMCI compiler and the JVM will use its default one.
This way, the Graal compiler will not be used as the JVMCI compiler and the JVM will use its default one.

### Note about Results

Expand Down
Loading

0 comments on commit a90fdfa

Please sign in to comment.