Skip to content

Commit 628038c

Browse files
committed
Merge branch 'master' into bugfix/GR-15886
2 parents 065f3e2 + 6a01cae commit 628038c

File tree

408 files changed

+7846
-5379
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

408 files changed

+7846
-5379
lines changed

.travis.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ jdk:
1818

1919
env:
2020
global:
21-
- JVMCI_VERSION="jvmci-0.59"
22-
- JDK8_UPDATE_VERSION="202"
21+
- JVMCI_VERSION="jvmci-20-b01"
22+
- JDK8_UPDATE_VERSION="212"
2323

2424
matrix:
2525
include:
@@ -37,7 +37,7 @@ matrix:
3737
- clang-format-3.8
3838
- libc++1
3939
- libc++-dev
40-
- env: JDK="jdk8" GATE="build,sulong" PRIMARY="vm" DYNAMIC_IMPORTS="/sulong,/substratevm" LLVM_VERSION="6.0" DISABLE_POLYGLOT=true DISABLE_LIBPOLYGLOT=true NATIVE_IMAGE_TESTING=true
40+
- env: JDK="jdk8" GATE="build,sulong" PRIMARY="vm" DYNAMIC_IMPORTS="/sulong,/substratevm" LLVM_VERSION="6.0" DISABLE_POLYGLOT=true DISABLE_LIBPOLYGLOT=true
4141
addons:
4242
apt:
4343
sources:

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ The GraalVM main source repository includes the following components:
1313

1414
* [GraalVM SDK](sdk/README.md) contains long term supported APIs of GraalVM.
1515

16-
* [Graal compiler](compiler/README.md) written in Java that supports both dynamic and static compilation and can integrate with
16+
* [GraalVM compiler](compiler/README.md) written in Java that supports both dynamic and static compilation and can integrate with
1717
the Java HotSpot VM or run standalone.
1818

1919
* [Truffle](truffle/README.md) language implementation framework for creating languages and instrumentations for GraalVM.
@@ -39,8 +39,8 @@ Please report security vulnerabilities not via GitHub issues or the public maili
3939

4040
## Related Repositories
4141

42-
GraalVM allows running of following languages which are being developed and tested in related repositories with GraalVM core to run on top of it using Truffle and Graal compiler. These are:
43-
* [Graal JavaScript](https://github.com/graalvm/graaljs) - JavaScript (ECMAScript 2019 compatible) and Node.js 10.15.2
42+
GraalVM allows running of following languages which are being developed and tested in related repositories with GraalVM core to run on top of it using Truffle and the GraalVM compiler. These are:
43+
* [GraalJS](https://github.com/graalvm/graaljs) - JavaScript (ECMAScript 2019 compatible) and Node.js 10.15.2
4444
* [FastR](https://github.com/oracle/fastr) - R Language 3.5.1
4545
* [GraalPython](https://github.com/graalvm/graalpython) - Python 3.7
4646
* [TruffleRuby](https://github.com/oracle/truffleruby/) - Ruby Programming Language 2.6.2
@@ -50,10 +50,10 @@ GraalVM allows running of following languages which are being developed and test
5050
## License
5151

5252
Each GraalVM component is licensed:
53-
* [Truffle](/truffle/) and its dependency [GraalVM SDK](/sdk/) are licensed under the [Universal Permissive License](truffle/LICENSE.md).
53+
* [Truffle Framework](/truffle/) and its dependency [GraalVM SDK](/sdk/) are licensed under the [Universal Permissive License](truffle/LICENSE.md).
5454
* [Tools](/tools/) project is licensed under the [GPL 2 with Classpath exception](tools/LICENSE.GPL.md).
5555
* [TRegex](/regex/) project is licensed under the [GPL 2 with Classpath exception](regex/LICENSE.GPL.md).
56-
* The [Graal compiler](/compiler/) is licensed under the [GPL 2 with Classpath exception](compiler/LICENSE.md).
56+
* [GraalVM compiler](/compiler/) is licensed under the [GPL 2 with Classpath exception](compiler/LICENSE.md).
5757
* [Substrate VM](/substratevm/) is licensed under the [GPL 2 with Classpath exception](substratevm/LICENSE.md).
5858
* [Sulong](/sulong/) is licensed under [3-clause BSD](sulong/LICENSE).
5959
* [VM](/vm/) is licensed under the [GPL 2 with Classpath exception](vm/LICENSE_GRAALVM_CE).

ci_includes/publish-javadoc.hocon

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Publish Javadoc of graal components post-merge
22

33
builds += [
4-
${linux-amd64} ${labsjdk8} {
4+
${linux-amd64} ${oraclejdk8} {
55
timelimit : "30:00",
66
run : [
77
[cd, "./sdk"],

common.hocon

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
# overlay version
2-
overlay = 92cc4cf61ccb3ffc91bea53450b8a73222107f8e
2+
overlay = 24a9cd249544a2c8b61e225aa1f02c85db569fc4
33

44
# oraclejdk* are released OracleJDK binaries
5-
# labsjdk* are JDKs based on OracleJDK binaries
5+
# oraclejdk* are JDKs based on OracleJDK binaries
66
# openjdk8 JDKs on Linux are built by Oracle Labs
77
# openjdk8 JDKs on macOS are based on AdoptOpenJDK binaries
88
jdks: {
9-
labsjdk8: {name : labsjdk, version : "8u202-jvmci-0.59", platformspecific: true}
10-
openjdk8: {name : openjdk, version : "8u202-jvmci-0.59", platformspecific: true}
11-
labsjdk8Debug: {name : labsjdk, version : "8u202-jvmci-0.59-fastdebug", platformspecific: true}
12-
oraclejdk11: {name : oraclejdk, version : "11+28", platformspecific: true}
13-
openjdk11: {name : openjdk, version : "11+28", platformspecific: true}
9+
oraclejdk8: {name : oraclejdk, version : "8u212-jvmci-20-b01", platformspecific: true}
10+
openjdk8: {name : openjdk, version : "8u212-jvmci-20-b01", platformspecific: true}
11+
oraclejdk8Debug: {name : oraclejdk, version : "8u212-jvmci-20-b01-fastdebug", platformspecific: true}
12+
oraclejdk11: {name : oraclejdk, version : "11.0.3+12", platformspecific: true}
13+
openjdk11: {name : openjdk, version : "11.0.3+12", platformspecific: true}
1414
}
1515

1616
# This must always point to HEAD in the master branch but can be used to point
@@ -27,8 +27,8 @@ download-hsdis : {
2727
]
2828
}
2929

30-
labsjdk8 : { downloads : { JAVA_HOME : ${jdks.labsjdk8}, EXTRA_JAVA_HOMES : { pathlist :[ ${jdks.oraclejdk11} ]} }}
31-
labsjdk8Debug : { downloads : { JAVA_HOME : ${jdks.labsjdk8Debug}, EXTRA_JAVA_HOMES : { pathlist :[ ${jdks.oraclejdk11} ]} }}
30+
oraclejdk8 : { downloads : { JAVA_HOME : ${jdks.oraclejdk8}, EXTRA_JAVA_HOMES : { pathlist :[ ${jdks.oraclejdk11} ]} }}
31+
oraclejdk8Debug : { downloads : { JAVA_HOME : ${jdks.oraclejdk8Debug}, EXTRA_JAVA_HOMES : { pathlist :[ ${jdks.oraclejdk11} ]} }}
3232

3333
openjdk8 : { downloads : { JAVA_HOME : ${jdks.openjdk8} }}
3434

compiler/README.md

Lines changed: 41 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,54 +1,56 @@
1-
Graal is a dynamic compiler written in Java that integrates with the HotSpot JVM. It has a focus on high performance and extensibility.
2-
In addition, it provides optimized performance for [Truffle](https://github.com/graalvm/graal/tree/master/truffle)-based languages running on the JVM.
1+
The GraalVM compiler is a dynamic compiler written in Java that integrates with the HotSpot JVM. It has a focus on high performance and extensibility.
2+
In addition, it provides optimized performance for languages implemented with [Truffle Framework](https://github.com/graalvm/graal/tree/master/truffle)-based languages running on the JVM.
3+
For brevity, the GraalVM compiler is often referred to as "the compiler" below.
34

45
## Setup
56

6-
Working with Graal will mean cloning more than one repository and so it's
7+
Working with the GraalVM compiler will mean cloning more than one repository and so it's
78
recommended to create and use a separate directory:
89

910
```
1011
mkdir graal
1112
cd graal
1213
```
1314

14-
## Building Graal
15+
## Building the GraalVM compiler
1516

16-
To simplify Graal development, a separate Python tool called [mx](https://github.com/graalvm/mx) has been co-developed.
17+
To simplify development, a separate Python tool called [mx](https://github.com/graalvm/mx) has been co-developed.
1718
This tool must be downloaded and put onto your PATH:
1819

1920
```
2021
git clone https://github.com/graalvm/mx.git
2122
export PATH=$PWD/mx:$PATH
2223
```
2324

24-
Graal depends on a JDK that supports a compatible version of JVMCI ([JVM Compiler Interface](https://bugs.openjdk.java.net/browse/JDK-8062493)).
25+
The compiler depends on a JDK that supports a compatible version of JVMCI ([JVM Compiler Interface](https://bugs.openjdk.java.net/browse/JDK-8062493)).
2526
There is a JVMCI [port](https://github.com/graalvm/graal-jvmci-8) for JDK 8 and the required JVMCI version is built into the JDK as of JDK 11.
26-
To develop Graal you need either a JVMCI-enabled JDK 8 (download from [OTN](http://www.oracle.com/technetwork/oracle-labs/program-languages/downloads/index.html) or [build](#building-jvmci-jdk8) yourself)
27-
or JDK 11 (build 20 or later).
27+
A JVMCI-enabled JDK 8 can be downloaded from [OTN](https://www.oracle.com/technetwork/graalvm/downloads/index.html)
28+
or [GitHub](https://github.com/graalvm/openjdk8-jvmci-builder/releases)
29+
or you can [build](#building-jvmci-jdk8) it yourself.
2830

29-
Most Graal sources are compliant with Java 8. Some sources use API specific to JDK 8 or only introduced in JDK 9.
31+
Most compiler sources are compliant with Java 8. Some sources use API specific to JDK 8 or only introduced in JDK 9.
3032
These sources are in [versioned projects](https://github.com/graalvm/mx#versioning-sources-for-different-jdk-releases).
3133
If you don't have a JDK that satisfies the requirement of a versioned project, the project is ignored by mx.
3234

33-
If you only want to develop Graal for a single JDK version, you only need to define `JAVA_HOME`. For example:
35+
If you want to develop on a single JDK version, you only need to define `JAVA_HOME`. For example:
3436
```
35-
export JAVA_HOME=/usr/lib/jvm/labsjdk1.8.0_172-jvmci-0.46
37+
export JAVA_HOME=/usr/lib/jvm/oraclejdk1.8.0_212-jvmci-20-b01
3638
```
3739
or:
3840
```
3941
export JAVA_HOME=/usr/lib/jvm/jdk-11
4042
```
4143

4244
If you want to ensure your changes will pass both JDK 8 and JDK 11 gates, you can specify the secondary JDK(s) in `EXTRA_JAVA_HOMES`.
43-
For example, to develop Graal for JDK 8 while ensuring `mx build` still works with the JDK 11 specific sources:
45+
For example, to develop for JDK 8 while ensuring `mx build` still works with the JDK 11 specific sources:
4446

4547
```
46-
export JAVA_HOME=/usr/lib/jvm/labsjdk1.8.0_172-jvmci-0.46
48+
export JAVA_HOME=/usr/lib/jvm/oraclejdk1.8.0_212-jvmci-20-b01
4749
export EXTRA_JAVA_HOMES=/usr/lib/jvm/jdk-11
4850
```
4951
And on macOS:
5052
```
51-
export JAVA_HOME=/Library/Java/JavaVirtualMachines/labsjdk1.8.0_172-jvmci-0.46/Contents/Home
53+
export JAVA_HOME=/Library/Java/JavaVirtualMachines/oraclejdk1.8.0_212-jvmci-20-b01/Contents/Home
5254
export EXTRA_JAVA_HOMES=/Library/Java/JavaVirtualMachines/jdk-11.jdk/Contents/Home
5355
```
5456
If you omit `EXTRA_JAVA_HOMES` in the above examples, versioned projects depending on the specified JDK(s) will be ignored.
@@ -59,19 +61,19 @@ Now change to the `graal/compiler` directory:
5961
cd graal/compiler
6062
```
6163

62-
Changing to the `graal/compiler` directory informs mx that the focus of development (called the _primary suite_) is Graal.
64+
Changing to the `graal/compiler` directory informs mx that the focus of development (called the _primary suite_) is the GraalVM compiler.
6365
All subsequent mx commands should be executed from this directory.
6466

65-
Here's the recipe for building and running Graal:
67+
Here's the recipe for building and running the GraalVM compiler:
6668

6769
```
6870
mx build
6971
mx vm
7072
```
7173

72-
By default, Graal is only used for hosted compilation (i.e., the VM still uses C2 for compilation).
73-
To make the VM use Graal as the top tier JIT compiler, add the `-XX:+UseJVMCICompiler` option to the command line.
74-
To disable use of Graal altogether, use `-XX:-EnableJVMCI`.
74+
By default, the GraalVM compiler is only used for hosted compilation (i.e., the VM still uses C2 for compilation).
75+
To make the VM use the GraalVM compiler as the top tier JIT compiler, add the `-XX:+UseJVMCICompiler` option to the command line.
76+
To disable use of the GraalVM compiler altogether, use `-XX:-EnableJVMCI`.
7577

7678
### Windows Specifics
7779

@@ -88,13 +90,14 @@ mx ideinit
8890
This will generate Eclipse, IntelliJ, and NetBeans project configurations.
8991
Further information on how to import these project configurations into individual IDEs can be found on the [IDEs](docs/IDEs.md) page.
9092

91-
The Graal code base includes the [Ideal Graph Visualizer](http://ssw.jku.at/General/Staff/TW/igv.html) which is very useful in terms of visualizing Graal's intermediate representation (IR).
93+
The [Ideal Graph Visualizer](https://www.graalvm.org/docs/reference-manual/tools/#ideal-graph-visualizer)(IGV) is very useful in terms of visualizing the compiler's intermediate representation (IR).
94+
IGV is available on [OTN](https://www.oracle.com/technetwork/graalvm/downloads/index.html).
9295
You can get a quick insight into this tool by running the commands below.
93-
The first command launches the tool and the second runs one of the unit tests included in the Graal code base with extra options to make Graal dump the IR for all methods it compiles.
96+
The first command launches the tool and the second runs one of the unit tests included in the code base with extra options to dump the compiler IR for all methods compiled.
9497
You should wait for the GUI to appear before running the second command.
9598

9699
```
97-
mx igv &
100+
$GRAALVM_EE_HOME/bin/idealgraphvisualizer &
98101
mx unittest -Dgraal.Dump BC_athrow0
99102
```
100103

@@ -105,33 +108,33 @@ Further information can be found on the [Debugging](docs/Debugging.md) page.
105108

106109
## libgraal
107110

108-
Building Graal as described above enables it to be used in HotSpot as Java code
109-
called from the VM. In this mode, Graal is executed in the same way as any
111+
Building the GraalVM compiler as described above means it is executed in the same way as any
110112
other Java code in the VM; it allocates in the HotSpot heap and it starts execution
111113
in the interpreter with hot parts being subsequently JIT compiled.
112-
The advantage of this mode is that Graal can be debugged with a Java debugger.
114+
The advantage of this mode is that it can be debugged with a Java debugger.
113115

114-
However, it has some disadvantages. Firstly, since Graal uses the object heap, it can
116+
However, it has some disadvantages. Firstly, since it uses the object heap, it can
115117
reduce application object locality and increase GC pause times. Additionally, it can
116118
complicate fine tuning options such as `-Xmx` and `-Xms` which now need to take the
117-
heap usage of Graal needs to be taken into account. Secondly, Graal will initially be executed
119+
heap usage of the compiler into account. Secondly, the compiler will initially be executed
118120
in the interpreter and only get faster over time as its hot methods are JIT
119-
compiled. This is mitigated to some degree by forcing Graal (and JVMCI)
120-
to only be compiled by C1 but this comes at the cost of lower peak performance for Graal.
121+
compiled. This is mitigated to some degree by forcing the GraalVM compiler
122+
to only be compiled by C1 (i.e., `-Dgraal.CompileGraalWithC1Only=true`) but this comes at the cost
123+
of slower compilation speed.
121124

122-
To address these issues, Graal can be deployed as a native shared library. The shared
123-
library is produced using [SubstrateVM](../substratevm/README.md) to ahead-of-time compile Graal. In this mode,
124-
Graal uses memory separate from the HotSpot heap and it runs compiled
125+
To address these issues, the GraalVM compiler can be deployed as a native shared library. The shared
126+
library is a native image produced using [SubstrateVM](../substratevm/README.md). In this mode,
127+
the GraalVM compiler uses memory separate from the HotSpot heap and it runs compiled
125128
from the start. That is, it has execution properties similar to other native HotSpot
126129
compilers such as C1 and C2.
127130

128-
To build a GraalVM image with libgraal:
131+
To build libgraal:
129132

130133
```
131134
cd graal/vm
132135
mx --env libgraal build
133136
```
134-
The newly built GraalVM image is available at:
137+
The newly built GraalVM image containing libgraal is available at:
135138
```
136139
mx --env libgraal graalvm-home
137140
```
@@ -161,7 +164,7 @@ Without leaving the `graal/vm` directory, you can now run libgraal as follows:
161164
162165
## Publications and Presentations
163166
164-
For video tutorials, presentations and publications on Graal visit the [Publications](../docs/Publications.md) page.
167+
For video tutorials, presentations and publications on the GraalVM compiiler visit the [Publications](../docs/Publications.md) page.
165168
166169
## Building JVMCI JDK 8
167170
@@ -175,10 +178,10 @@ mx --java-home /path/to/jdk8 unittest
175178
export JAVA_HOME=$(mx --java-home /path/to/jdk8 jdkhome)
176179
```
177180
178-
You need to use the same JDK the [OTN](http://www.oracle.com/technetwork/oracle-labs/program-languages/downloads/index.html) downloads are based on as the argument to `--java-home` in the above commands.
181+
You need to use the same JDK the [OTN](https://www.oracle.com/technetwork/graalvm/downloads/index.html) downloads are based on as the argument to `--java-home` in the above commands.
179182
The build step above should work on all [supported JDK 8 build platforms](https://wiki.openjdk.java.net/display/Build/Supported+Build+Platforms).
180183
It should also work on other platforms (such as Oracle Linux, CentOS and Fedora as described [here](http://mail.openjdk.java.net/pipermail/graal-dev/2015-December/004050.html)).
181-
If you run into build problems, send a message to the [Graal mailing list](http://mail.openjdk.java.net/mailman/listinfo/graal-dev).
184+
If you run into build problems, send a message to http://mail.openjdk.java.net/mailman/listinfo/graal-dev.
182185
183186
### Windows Specifics
184187
@@ -200,4 +203,4 @@ You will also need an *MSVC 2010 SP1* compiler. The following tool chain is reco
200203
201204
## License
202205
203-
The Graal compiler is licensed under the [GPL 2](LICENSE.md).
206+
The GraalVM compiler is licensed under the [GPL 2](LICENSE.md).

0 commit comments

Comments
 (0)