Skip to content

Commit 74b3332

Browse files
committed
Merge branch 'community-backports-jdk21u-master' into mandrel/23.1
2 parents 066d570 + 9c56165 commit 74b3332

File tree

81 files changed

+1522
-534
lines changed

Some content is hidden

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

81 files changed

+1522
-534
lines changed

BUILDING.md

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Building GraalVM Community Edition for JDK 21
2+
3+
To build GraalVM Community Edition for JDK 21, you need to have an OpenJDK 21 build, along with static libraries, installed on your system. You can use the [AdoptOpenJDK](https://adoptopenjdk.net/) distribution or any other OpenJDK 21 build as long as it ships static libraries.
4+
5+
After you have the required OpenJDK 21 build, follow these steps to build GraalVM Community Edition for JDK 21:
6+
7+
```bash
8+
export JAVA_HOME=/path/to/your/jdk21
9+
git clone https://github.com/graalvm/graalvm-community-jdk21u graalvm-jdk21
10+
export MX_VERSION=$(jq -r .mx_version graalvm-jdk21/common.json)
11+
git clone https://github.com/graalvm/mx.git mx --branch $(MX_VERSION)
12+
cd graalvm-jdk21
13+
../mx/mx --primary-suite vm --env ce build
14+
```
15+
16+
Once the build completes successfully, you can find the GraalVM Community Edition distribution in the directory where the `sdk/latest_graalvm_home` link points to.
17+

CONTRIBUTING.md

+47-5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,48 @@
1-
GraalVM welcomes contributors to the core platform and projects that extend that
2-
platform. There have been significant contributions from both industry
3-
and academia so far and we thank you for considering to contribute your changes!
1+
# Contributing to GraalVM Community Edition for JDK 21 maintenance repository
42

5-
- Learn [how to become a GraalVM contributor](https://www.graalvm.org/community/contributors/).
6-
- Subscribe and post to [[email protected]](https://oss.oracle.com/mailman/listinfo/graalvm-dev) for questions related to working with the sources or extending the GraalVM ecosystem by creating new languages, tools, or embeddings.
3+
The maintenance repository for GraalVM Community Edition for JDK 21 welcomes contributions from the community that satisfy the following criteria:
4+
5+
1. The contributor has signed the [Oracle Contributor Agreement](https://oca.opensource.oracle.com/). See https://www.graalvm.org/community/contributors/ for more information.
6+
2. The contribution contains a) replicas of existing commits applied to the `master` branch in the `oracle/graal` repository or b) patches specific to the maintained version. Such commits are intended to fix or improve existing features, must always keep release stability in mind, and ensure compatibility with published public APIs.
7+
3. The contribution is considered safe and beneficial for the GraalVM Community Edition for JDK 21. Ideally the contribution should be solving a reported issue and not be proactive.
8+
9+
Please note that feature requests and enhancements are not accepted in this repository. If you have a feature request or enhancement, please open an issue in [GraalVM's main repository](https://github.com/oracle/graal).
10+
11+
## How to Contribute
12+
13+
### Reporting Bugs
14+
15+
Open a [GitHub issue](https://github.com/graalvm/graalvm-community-jdk21u/issues/new?template=1_community_bug.yml) filling in the template with the necessary information.
16+
17+
### Fixing Bugs
18+
19+
1. Make sure an [issue report](https://github.com/graalvm/graalvm-community-jdk21u/issues/new?template=1_community_bug.yml) or [backport request](https://github.com/graalvm/graalvm-community-jdk21u/issues/new?template=0_backport_request.yml) exists in this repository explaining what the problem is and why it should be considered for fixing in the maintenance repository.
20+
2. Make sure you have signed the [Oracle Contributor Agreement](https://oca.opensource.oracle.com/).
21+
3. Create a pull request with the fix and reference the issue or backport request in the description.
22+
23+
#### Building GraalVM Community Edition for JDK 21
24+
25+
Please refer to the [BUILDING.md](BUILDING.md) file for instructions on how to build GraalVM Community Edition for JDK 21.
26+
27+
#### Running Style Checks
28+
29+
Before submitting a pull request, please run the following command to ensure that your changes comply with the GraalVM Community Edition code style:
30+
31+
```bash
32+
../mx/mx --primary-suite vm --env ce checkstyle
33+
34+
ECLIPSE_TAR=eclipse.tar.gz
35+
ECLIPSE_ORG_VERSION=$(jq -r '.eclipse.short_version' common.json)
36+
ECLIPSE_ORG_TIMESTAMP=$(jq -r '.eclipse.timestamp' common.json)
37+
wget --no-verbose https://archive.eclipse.org/eclipse/downloads/drops4/R-${ECLIPSE_ORG_VERSION}-${ECLIPSE_ORG_TIMESTAMP}/eclipse-SDK-${ECLIPSE_ORG_VERSION}-linux-gtk-x86_64.tar.gz -O $ECLIPSE_TAR
38+
tar -xzf ${ECLIPSE_TAR}
39+
ECLIPSE_EXE=${PWD}/eclipse/eclipse
40+
../mx/mx --primary-suite vm --env ce eclipseformat --eclipse-exe $ECLIPSE_EXE
41+
```
42+
43+
> [!NOTE]
44+
> The link used in the `wget` command above is only valid for linux x86_64. If you are using a different platform, please adjust the link accordingly.
45+
46+
#### Backporting Fixes
47+
48+
When backporting bug fixes use `git cherry-pick -x` to reference the original commit in the commit message. Additionally, please reference the upstream pull request that your changes are backporting. If the backport is partial explain which parts are being backported and why. Similarly in case of conflicts explain why they are happening and how they are resolved.

MAINTAINING.md

+22-8
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,29 @@
1-
# GraalVM Community Backports Repositories Guidelines
1+
# Merging Pull Requests
22

3-
1. Commits to a GraalVM Community Edition (CE) release branch or maintenance repository are either a) replicas of existing commits applied to the `master` branch in the `oracle/graal` repository or b) specific to the maintained version. Such commits are intended to fix or improve existing features, must always keep release stability in mind, and ensure compatibility with published public APIs.
3+
Merging a pull request requires the approval from at least one [maintainer](#current-maintainers). The maintainer should ensure that the pull request satisfies the criteria listed in the [CONTRIBUTING.md](CONTRIBUTING.md) file.
44

5-
2. Release branches shall be maintained by Oracle in `oracle/graal` for six months per GraalVM CE release. During that time, the community can request backports through pull requests against the corresponding release branch in `oracle/graal`.
5+
To assist maintainers, especially in areas they might not be familiar with, a number of [reviewers](#current-reviewers) are assigned to the repository.
66

7-
3. After six months and only for Java LTS releases that the community wants to support long-term (e.g., 21), Oracle shall create a dedicated repository (e.g., `graalvm/graalvm-community-jdk21u`) to maintain community backports and version-specific bug fixes.
7+
# Creating a New Release
88

9-
4. Each repository shall be managed by one maintainer, appointed by Oracle, with the permission to approve and merge pull requests.
9+
1. Switch the `release` field in all `suite.py` files to `True` and create a pull request.
10+
2. Once the pull request is merged, create two new tags as follows:
11+
```bash
12+
git tag -s vm-<version> -m "Community source release of GraalVM <version> for JDK 21"
13+
git tag -s jdk-<jdk-version> -m "Community source release of GraalVM <version> for JDK 21"
14+
```
15+
3. Bump the version and switch the `release` field back to `False` in all `suite.py` files and create a new pull request.
1016

11-
5. The repositories shall not be used to ship new releases of GraalVM CE or any other GraalVM distribution, only to maintain source code. Distributors should use these repositories as their primary source for creating GraalVM CE-based builds.
17+
Between step 1 and 3 no new pull requests should be merged.
1218

13-
6. The creation of maintenance repositories for other GraalVM projects (e.g., LabsJDK or GraalJS) can also be requested by the community after six months. The same rules apply.
19+
# Current Maintainers
1420

15-
7. Maven artifacts under the `org.graalvm` group that are used by both GraalVM CE-based distributions and Oracle GraalVM will be maintained by Oracle.
21+
* [Foivos Zakkak](https://github.com/zakkak/) (Lead maintainer)
22+
* [Karm Babacek](https://github.com/Karm/)
23+
* [Severin Gehwolf](https://github.com/jerboaa/)
24+
25+
# Current Reviewers
26+
27+
* [Boris Ulasevich](https://github.com/bulasevich)
28+
* [Cesar Soares](https://github.com/JohnTortugo)
29+
* [Volker Simonis](https://github.com/simonis/)

README.md

+23-39
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,27 @@
11
[![GraalVM](.github/assets/logo_320x64.svg)][website]
22

3-
[![GraalVM downloads][badge-dl]][downloads] [![GraalVM docs][badge-docs]][docs] [![GraalVM on Slack][badge-slack]][slack] [![GraalVM on Twitter][badge-twitter]][twitter] [![GraalVM on YouTube][badge-yt]][youtube] [![GraalVM Gate][badge-gate]][gate] [![License][badge-license]](#license)
3+
[![GraalVM Gate][badge-gate]][gate] [![GraalVM docs][badge-docs]][docs] [![GraalVM on Slack][badge-slack]][slack] [![GraalVM on Twitter][badge-twitter]][twitter] [![GraalVM on YouTube][badge-yt]][youtube] [![License][badge-license]](#license)
44

5-
GraalVM is a high-performance JDK distribution designed to accelerate the execution of applications written in Java and other JVM languages along with support for JavaScript, Ruby, Python, and a number of other popular languages.
5+
Welcome to the **maintenance repository** of GraalVM Community Edition for JDK 21. This is a **source-only** repository maintained by the GraalVM community.
6+
7+
GraalVM is a high-performance JDK distribution designed to accelerate the execution of applications written in Java and other JVM languages along with support for JavaScript, Ruby, Python, and a number of other popular languages. To get the latest GraalVM version visit the [GraalVM website][downloads].
8+
9+
Please refer to:
10+
11+
1. [BUILDING.md](BUILDING.md) for instructions on how to build GraalVM Community Edition for JDK 21.
12+
2. [CONTRIBUTING.md](CONTRIBUTING.md) for information on how to contribute to this repository.
13+
3. [MAINTAINING.md](MAINTAINING.md) for information on how to maintain this repository.
614

715
The project website at [https://www.graalvm.org/][website] describes how to [get started][getting-started], how to [stay connected][community], and how to [contribute][contributors].
816

917
## Documentation
1018

11-
Please refer to the [GraalVM website for documentation][docs]. You can find most of the documentation sources in the [_docs/_](docs/) directory in the same hierarchy as displayed on the website. Additional documentation including developer instructions for individual components can be found in corresponding _docs/_ sub-directories. The documentation for the Truffle framework, for example, is in [_truffle/docs/_](truffle/docs/). This also applies to languages, tools, and other components maintained in [related repositories](#related-repositories).
19+
Please refer to the [GraalVM website for documentation][docs]. You can find most of the documentation sources in the [_docs/_](docs/) directory in the same hierarchy as displayed on the website. Additional documentation including developer instructions for individual components can be found in corresponding _docs/_ sub-directories. The documentation for the Truffle framework, for example, is in [_truffle/docs/_](truffle/docs/).
1220

1321
## Get Support
1422

15-
* Open a [GitHub issue][issues] for bug reports, questions, or requests for enhancements.
16-
* Join the [GraalVM Slack][slack] to connect with the community and the GraalVM team.
23+
* Open a [GitHub issue][issues] for backport requests or bug reports.
24+
* Join the `#community-lts` channel in the [GraalVM Slack workspace][slack] to connect with the community.
1725
* Report a security vulnerability according to the [Reporting Vulnerabilities guide][reporting-vulnerabilities].
1826

1927
## Repository Structure
@@ -37,22 +45,6 @@ Directory | Description
3745
[`vm/`](vm/) | Components for building GraalVM distributions.
3846
[`wasm/`](wasm/) | [GraalWasm][reference-graalwasm], an engine for running WebAssembly programs on GraalVM.
3947

40-
## Related Repositories
41-
42-
GraalVM provides additional languages, tools, and other components developed in related repositories. These are:
43-
44-
Name | Description
45-
------------ | -------------
46-
[FastR] | Implementation of the R language.
47-
[GraalJS] | Implementation of JavaScript and Node.js.
48-
[GraalPy] | Implementation of the Python language.
49-
[GraalVM Demos][graalvm-demos] | Several example applications illustrating GraalVM capabilities.
50-
[Native Build Tools][native-build-tools] | Build tool plugins for GraalVM Native Image.
51-
[SimpleLanguage] | A simple example language built with the Truffle framework.
52-
[SimpleTool] | A simple example tool built with the Truffle framework.
53-
[TruffleRuby] | Implementation of the Ruby language.
54-
[VS Code Extensions][vscode-extensions] | VS Code extensions for GraalVM.
55-
5648
## License
5749

5850
GraalVM Community Edition is open source and distributed under [version 2 of the GNU General Public License with the “Classpath” Exception](LICENSE), which are the same terms as for Java. The licenses of the individual GraalVM components are generally derivative of the license of a particular language (see the table below).
@@ -65,39 +57,31 @@ Component(s) | License
6557
[Sulong](sulong/LICENSE) | 3-clause BSD
6658

6759

68-
[badge-dl]: https://img.shields.io/badge/download-latest-blue
6960
[badge-docs]: https://img.shields.io/badge/docs-read-green
70-
[badge-gate]: https://github.com/oracle/graal/actions/workflows/main.yml/badge.svg
61+
[badge-gate]: https://github.com/graalvm/graalvm-community-jdk21u/actions/workflows/main.yml/badge.svg
7162
[badge-license]: https://img.shields.io/badge/license-GPLv2+CE-green
7263
[badge-slack]: https://img.shields.io/badge/Slack-join-active?logo=slack
7364
[badge-twitter]: https://img.shields.io/badge/Twitter-@graalvm-active?logo=twitter
7465
[badge-yt]: https://img.shields.io/badge/YouTube-subscribe-active?logo=youtube
7566
[community]: https://www.graalvm.org/community/
7667
[contributors]: https://www.graalvm.org/community/contributors/
77-
[docs]: https://www.graalvm.org/latest/docs/
68+
[docs]: https://www.graalvm.org/jdk21/docs/
7869
[downloads]: https://www.graalvm.org/downloads/
79-
[fastr]: https://github.com/oracle/fastr
80-
[gate]: https://github.com/oracle/graal/actions/workflows/main.yml
81-
[getting-started]: https://www.graalvm.org/latest/docs/getting-started/
82-
[graaljs]: https://github.com/oracle/graaljs
83-
[graalpy]: https://github.com/oracle/graalpython
70+
[gate]: https://github.com/graalvm/graalvm-community-jdk21u/actions/workflows/main.yml
71+
[getting-started]: https://www.graalvm.org/jdk21/docs/getting-started/
8472
[graalvm-demos]: https://github.com/graalvm/graalvm-demos
8573
[graalvm-sdk]: https://www.graalvm.org/sdk/javadoc/
86-
[igv]: https://www.graalvm.org/latest/tools/igv/
87-
[issues]: https://github.com/oracle/graal/issues
88-
[java-on-truffle]: https://www.graalvm.org/latest/reference-manual/java-on-truffle/
74+
[igv]: https://www.graalvm.org/jdk21/tools/igv/
75+
[issues]: https://github.com/graalvm/graalvm-community-jdk21u/issues
76+
[java-on-truffle]: https://www.graalvm.org/jdk21/reference-manual/java-on-truffle/
8977
[native-build-tools]: https://github.com/graalvm/native-build-tools
9078
[native-image]: https://www.graalvm.org/native-image/
91-
[reference-compiler]: https://www.graalvm.org/latest/reference-manual/java/compiler/
92-
[reference-graalwasm]: https://www.graalvm.org/latest/reference-manual/wasm/
93-
[reference-sulong]: https://www.graalvm.org/latest/reference-manual/llvm/
79+
[reference-compiler]: https://www.graalvm.org/jdk21/reference-manual/java/compiler/
80+
[reference-graalwasm]: https://www.graalvm.org/jdk21/reference-manual/wasm/
81+
[reference-sulong]: https://www.graalvm.org/jdk21/reference-manual/llvm/
9482
[reporting-vulnerabilities]: https://www.oracle.com/corporate/security-practices/assurance/vulnerability/reporting.html
95-
[simplelanguage]: https://github.com/graalvm/simplelanguage
96-
[simpletool]: https://github.com/graalvm/simpletool
9783
[slack]: https://www.graalvm.org/slack-invitation/
9884
[truffle]: https://www.graalvm.org/graalvm-as-a-platform/language-implementation-framework/
99-
[truffleruby]: https://github.com/oracle/truffleruby
10085
[twitter]: https://twitter.com/graalvm
101-
[vscode-extensions]: https://github.com/graalvm/vscode-extensions
10286
[website]: https://www.graalvm.org/
10387
[youtube]: https://www.youtube.com/graalvm

ci/ci_common/bench-common.libsonnet

+29-19
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,17 @@
3131
else true
3232
},
3333

34+
# max number of threads to use for benchmarking in general
35+
# the goal being to limit parallelism on very large servers which may not be respresentative of real-world scenarios
36+
bench_max_threads:: {
37+
restrict_threads:: 36
38+
},
39+
40+
bench_no_thread_cap:: {
41+
restrict_threads:: null,
42+
should_use_hwloc:: false
43+
},
44+
3445
bench_hw:: {
3546
_bench_machine:: {
3647
targets+: ["bench"],
@@ -42,15 +53,16 @@
4253
numa_nodes:: [],
4354
is_numa:: std.length(self.numa_nodes) > 0,
4455
num_threads:: error "num_threads must bet set!",
56+
hyperthreading:: true,
4557
threads_per_node:: if self.is_numa then self.num_threads / std.length(self.numa_nodes) else self.num_threads,
4658
},
4759

48-
x52:: common.linux_amd64 + self._bench_machine + {
49-
machine_name:: "x52",
50-
capabilities+: ["no_frequency_scaling", "tmpfs25g"],
60+
e3:: common.linux_amd64 + self._bench_machine + {
61+
machine_name:: "e3",
62+
capabilities: ["e3", "tmpfs25g", "linux", "amd64"],
5163
numa_nodes:: [0, 1],
52-
default_numa_node:: 0,
53-
num_threads:: 72
64+
default_numa_node:: 1,
65+
num_threads:: 256
5466
},
5567
x82:: common.linux_amd64 + self._bench_machine + {
5668
machine_name:: "x82",
@@ -62,31 +74,29 @@
6274
xgene3:: common.linux_aarch64 + self._bench_machine + {
6375
machine_name:: "xgene3",
6476
capabilities+: [],
65-
num_threads:: 32
77+
num_threads:: 32,
78+
hyperthreading:: false
6679
},
6780
a12c:: common.linux_aarch64 + self._bench_machine + {
6881
machine_name:: "a12c",
6982
capabilities+: ["no_frequency_scaling", "tmpfs25g"],
7083
numa_nodes:: [0, 1],
7184
default_numa_node:: 0,
72-
num_threads:: 160
85+
num_threads:: 160,
86+
hyperthreading:: false
7387
}
7488
},
7589

76-
hwlocIfNuma(numa, cmd, node=0)::
77-
if numa then
90+
hwloc_cmd(cmd, num_threads, node, hyperthreading, max_threads_per_node)::
91+
if num_threads == null then
7892
["hwloc-bind", "--cpubind", "node:"+node, "--membind", "node:"+node, "--"] + cmd
7993
else
80-
cmd,
81-
82-
parallelHwloc(cmd_node0, cmd_node1)::
83-
// Returns a list of commands that will run cmd_nod0 on NUMA node 0
84-
// concurrently with cmd_node1 on NUMA node 1 and then wait for both to complete.
85-
[
86-
$.hwlocIfNuma(true, cmd_node0, node=0) + ["&"],
87-
$.hwlocIfNuma(true, cmd_node1, node=1) + ["&"],
88-
["wait"]
89-
],
94+
local threads = if num_threads != null then num_threads else max_threads_per_node;
95+
assert if hyperthreading then threads % 2 == 0 else true: "It is required to bind to an even number of threads on hyperthreaded machines. Got requested "+threads+" threads";
96+
assert threads <= max_threads_per_node: "Benchmarking must run on a single NUMA node for stability reasons. Got requested "+threads+" threads but the machine has only "+max_threads_per_node+" threads per node"; local cores = if hyperthreading then "0-"+((threads/2)-1)+".pu:0-1" else "0-"+(threads-1)+".pu:0";
97+
local cpu_bind = if hyperthreading then "node:"+node+".core:"+cores else "node:"+node+".core:"+cores+".pu:0";
98+
["hwloc-bind", "--cpubind", cpu_bind, "--membind", "node:"+node, "--"] + cmd
99+
,
90100

91101
// building block used to generate fork builds
92102
many_forks_benchmarking:: common.build_base + {

0 commit comments

Comments
 (0)