You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/enterprise-overview/architecture-overview.md
+2-3
Original file line number
Diff line number
Diff line change
@@ -56,11 +56,10 @@ Java on Trufle is an experimental technology in GraalVM, available as of version
56
56
57
57
## Available Distributions
58
58
59
-
GraalVM Enterprise distributions are based on Oracle JDK 8, 11, and 16.
59
+
GraalVM Enterprise distributions are based on Oracle JDK 8, 11, and 17.
60
60
GraalVM Enterprise releases include all Oracle Java critical patch updates (CPUs), which are released on a regular schedule to remedy defects and known vulnerabilities.
61
61
62
62
GraalVM Enterprise is available for Linux, macOS, and Windows platforms on x86 64-bit systems, and for Linux on ARM 64-bit system.
63
-
The GraalVM Enterprise distribution based on Oracle JDK 16 is experimental with [several known limitations](https://docs.oracle.com/en/graalvm/enterprise/21/docs/overview/known-issues/).
64
63
Depending on the platform, the distributions are shipped as *.tar.gz* or *.zip* archives.
65
64
66
65
## Certified Platforms
@@ -104,7 +103,7 @@ Tools/Utilities:
104
103
105
104
Runtimes:
106
105
107
-
*[Node.js](/reference-manual/js/) -- the Node.js 14.16.1 runtime for JavaScript
106
+
*[Node.js](/reference-manual/js/) -- the Node.js 14.17.6 runtime for JavaScript
This is a simple Java and Kotlin application showing how easy it is to interoperate between JVM-based languages.
20
+
A Java method accesses a String from Kotlin and calls a Kotlin function, which later accesses a String from a Java class.
21
+
Before running this example, you need to build the application.
22
+
23
+
Note: You can use any JDK for building the application. However, `javac` from GraalVM in the build script is used to simplify the prerequisites so another JDK does not need to be installed.
24
+
25
+
2.[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:
It takes a few parameters: the classpath, the main class of the application with
55
-
`-H:Class=...`, and the name of the resulting executable with `-H:Name=...`.
59
+
It takes a few parameters: the classpath, the main class of the application with `-H:Class=...`, and the name of the resulting executable with `-H:Name=...`.
56
60
57
-
After executing the `native-image` command, check the directory. It should have
58
-
produced the executable file, `helloworld`.
61
+
After executing the `native-image` command, check the directory.
62
+
It should have produced the executable file, `helloworld`.
59
63
60
-
###Running the Application
64
+
## Running the Application
61
65
62
-
To run the application, you need to execute the JAR file in the `target`dir.
66
+
To run the application, you need to execute the JAR file in the `target`directory.
63
67
You can run it as a normal Java application using `java`.
64
68
Or, since we have a native executable prepared, you can run that directly.
65
69
The `run.sh` file executes both, and times them with the `time` utility:
The GraalVM compiler achieves excellent performance, especially for highly
11
-
abstracted programs, due to its versatile optimization techniques. Code using
12
-
more abstraction and modern Java features like Streams or Lambdas will see
13
-
greater speedups. The examples below demonstrate this.
10
+
The GraalVM compiler achieves excellent performance, especially for highly abstracted programs, due to its versatile optimization techniques.
11
+
Code using more abstraction and modern Java features like Streams or Lambdas will see greater speedups.
12
+
The examples below demonstrate this.
14
13
15
-
###Running Examples
14
+
## Running Examples
16
15
17
-
####Streams API Example
16
+
### Streams API Example
18
17
19
-
A simple example based on the [Streams API](https://docs.oracle.com/javase/8/docs/api/java/util/stream/package-summary.html)
20
-
is used here to demonstrate performance gains when using the GraalVM compiler.
21
-
This example counts the number of uppercase characters in a body of text. To
22
-
simulate a large load, the same sentence is processed 10 million times:
18
+
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.
19
+
This example counts the number of uppercase characters in a body of text.
20
+
To simulate a large load, the same sentence is processed 10 million times:
23
21
24
22
1. Save the following code snippet to a file named `CountUppercase.java`:
25
23
@@ -49,62 +47,54 @@ public class CountUppercase {
49
47
```shell
50
48
javac CountUppercase.java
51
49
java CountUppercase In 2021 I would like to run ALL languages in one VM.
52
-
1 (297 ms)
53
-
2 (452 ms)
54
-
3 (136 ms)
55
-
4 (88 ms)
56
-
5 (107 ms)
57
-
6 (135 ms)
58
-
7 (88 ms)
59
-
8 (87 ms)
60
-
9 (78 ms)
61
-
total: 69999993 (1550 ms)
50
+
1 (319 ms)
51
+
2 (275 ms)
52
+
3 (164 ms)
53
+
4 (113 ms)
54
+
5 (100 ms)
55
+
6 (124 ms)
56
+
7 (86 ms)
57
+
8 (76 ms)
58
+
9 (77 ms)
59
+
total: 69999993 (1414 ms)
62
60
```
63
61
64
-
The warmup time depends on numerous factors like the source code or how
65
-
many cores a machine has. If the performance profile of `CountUppercase` on your
66
-
machine does not match the above, run it for more iterations by adding
67
-
`-Diterations=N` just after `java` for some `N` greater than 1.
62
+
The warmup time depends on numerous factors like the source code or how many cores a machine has.
63
+
If the performance profile of `CountUppercase` on your machine does not match the above, run it for more iterations by adding `-Diterations=N` just after `java` for some `N` greater than 1.
68
64
69
65
3. Add the `-Dgraal.PrintCompilation=true` option to see statistics for the compilations:
70
66
```shell
71
67
java -Dgraal.PrintCompilation=true CountUppercase In 2021 I would like to run ALL languages in one VM.
72
68
```
73
69
74
-
This option prints a line after each compilation that shows the method
75
-
compiled, time taken, bytecodes processed (including inlined methods), size
76
-
of machine code produced, and amount of memory allocated during compilation.
70
+
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.
77
71
78
-
4. Use the `-XX:-UseJVMCICompiler` option to disable the GraalVM compiler and
79
-
use the native top tier compiler in the VM to compare performance:
72
+
4. Use the `-XX:-UseJVMCICompiler` option to disable the GraalVM compiler and use the native top tier compiler in the VM to compare performance:
80
73
```shell
81
74
java -XX:-UseJVMCICompiler CountUppercase In 2021 I would like to run ALL languages in one VM.
82
-
1 (747 ms)
83
-
2 (806 ms)
84
-
3 (640 ms)
85
-
4 (771 ms)
86
-
5 (606 ms)
87
-
6 (582 ms)
88
-
7 (623 ms)
89
-
8 (564 ms)
90
-
9 (682 ms)
91
-
total: 69999993 (6713 ms)
75
+
1 (492 ms)
76
+
2 (441 ms)
77
+
3 (443 ms)
78
+
4 (470 ms)
79
+
5 (422 ms)
80
+
6 (382 ms)
81
+
7 (407 ms)
82
+
8 (425 ms)
83
+
9 (343 ms)
84
+
total: 69999993 (4249 ms)
92
85
```
93
86
94
-
The preceding example demonstrates the benefits of partial escape analysis (PEA)
95
-
and advanced inlining, which combine to significantly reduce heap allocation.
87
+
The preceding example demonstrates the benefits of partial escape analysis (PEA) and advanced inlining, which combine to significantly reduce heap allocation.
96
88
The results were obtained using Oracle GraalVM Enterprise Edition.
97
89
98
-
The GraalVM Community Edition still has good performance compared to the native top-tier
99
-
compiler as shown below. You can simulate the Community Edition on the Enterprise Edition
100
-
by adding the option `-Dgraal.CompilerConfiguration=community`.
90
+
The GraalVM Community Edition still has good performance compared to the native top-tier compiler as shown below.
91
+
You can simulate the Community Edition on the Enterprise Edition by adding the option `-Dgraal.CompilerConfiguration=community`.
101
92
102
-
####Sunflow Example
93
+
### Sunflow Example
103
94
104
95
[Sunflow](http://sunflow.sourceforge.net) is an open source rendering engine.
105
96
The following example is a simplified version of the Sunflow engine core code.
106
-
It performs calculations to blend various values for a point of light in a
107
-
rendered scene.
97
+
It performs calculations to blend various values for a point of light in a rendered scene.
108
98
109
99
1. Save the following code snippet to a file named `Blender.java`:
This application is a small benchmark of the Java Stream API. It demonstrates how
11
-
the GraalVM compiler can achieve better performance for highly
12
-
abstracted programs like those using Streams, Lambdas, or other Java features.
13
-
14
-
### Preparation
15
-
16
-
This example requires the [Maven](https://maven.apache.org/) build tool.
17
-
18
-
1. Download or clone the repository and navigate into the `java-simple-stream-benchmark` directory:
10
+
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.
11
+
12
+
## Preparation
13
+
14
+
1.[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:
Now you are all set to execute the benchmark and compare the results between different JVMs.
41
43
42
-
###Running the Benchmark
44
+
## Running the Benchmark
43
45
44
46
To run the benchmark, you need to execute the `target/benchmarks.jar` file.
45
47
You can run it with the following command:
46
48
```shell
47
49
java -jar target/benchmarks.jar
48
50
```
49
-
If you would like to run the benchmark on a different JVM, you can run it with
50
-
whatever `java` you have. However, if you just want to run it on the same JVM,
51
-
but without the GraalVM compiler, you may add the `-XX:-UseJVMCICompiler` option
52
-
into the same command:
51
+
If you would like to run the benchmark on a different JVM, you can run it with whatever `java` you have.
52
+
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:
0 commit comments