Skip to content

Commit 1e41203

Browse files
committed
[GR-48318] Move compiler packages and module to jdk.compiler.graal namespace.
PullRequest: graal/15720
2 parents e3bcde3 + 206d616 commit 1e41203

File tree

4,367 files changed

+37582
-38965
lines changed

Some content is hidden

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

4,367 files changed

+37582
-38965
lines changed

ci/common.jsonnet

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -259,9 +259,9 @@ local common_json = import "../common.json";
259259

260260
local common = mx + {
261261
catch_files+: [
262-
# Keep in sync with org.graalvm.compiler.debug.StandardPathUtilitiesProvider#DIAGNOSTIC_OUTPUT_DIRECTORY_MESSAGE_REGEXP
262+
# Keep in sync with jdk.compiler.graal.debug.StandardPathUtilitiesProvider#DIAGNOSTIC_OUTPUT_DIRECTORY_MESSAGE_REGEXP
263263
"Graal diagnostic output saved in '(?P<filename>[^']+)'",
264-
# Keep in sync with org.graalvm.compiler.debug.DebugContext#DUMP_FILE_MESSAGE_REGEXP
264+
# Keep in sync with jdk.compiler.graal.debug.DebugContext#DUMP_FILE_MESSAGE_REGEXP
265265
"Dumping debug output to '(?P<filename>[^']+)'",
266266
# Keep in sync with com.oracle.svm.hosted.NativeImageOptions#DEFAULT_ERROR_FILE_NAME
267267
" (?P<filename>.+/svm_err_b_\\d+T\\d+\\.\\d+_pid\\d+\\.md)",

ci_includes/publish-javadoc.jsonnet

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@
2020
["zip", "-r", "javadoc.zip", "javadoc"],
2121
["cd", "../compiler"],
2222
["mx", "build"],
23-
["mx", "javadoc", "--projects", "jdk.internal.vm.compiler", "--packages", "org.graalvm.graphio"],
24-
["cd", "src/jdk.internal.vm.compiler/"],
23+
["mx", "javadoc", "--projects", "jdk.compiler.graal", "--packages", "jdk.compiler.graal.graphio"],
24+
["cd", "src/jdk.compiler.graal/"],
2525
["zip", "-r", "../../graphio-javadoc.zip", "javadoc"],
2626
["cd", "../../.."],
2727
["set-export", "GRAAL_REPO", ["pwd"]],

compiler/CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22

33
This changelog summarizes newly introduced optimizations and other compiler related changes.
44

5+
## GraalVM for JDK 22 (Internal Version 24.0.0)
6+
* (GR-48318): The Graal module has been renamed from `jdk.internal.vm.compiler` to `jdk.compiler.graal`.
7+
Likewise, the compiler packages moved into the `jdk.compiler.graal` namespace.
8+
These renamings were done in preparation for [Project Galahad](https://openjdk.org/projects/galahad/).
9+
510
## GraalVM for JDK 21 (Internal Version 23.1.0)
611
* (GR-43228): Enforce backward-edge control-flow integrity (CFI) on aarch64 based on the `UseBranchProtection` JVM flag.
712

compiler/ci/ci_common/benchmark-suites.libsonnet

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -232,22 +232,6 @@
232232
self.benchmark_cmd + ["shopcart-wrk:mixed-huge"] + hwlocBind_16C_32T + ["--"] + self.extra_vm_args + ["-Xms1024m", "-Xmx8192m", "-XX:ActiveProcessorCount=32", "-XX:MaxDirectMemorySize=8192m"],
233233
bench_upload,
234234

235-
# tika-wrk odt
236-
self.benchmark_cmd + ["tika-wrk:odt-tiny"] + hwlocBind_1C_1T + ["--"] + self.extra_vm_args + ["-Xms32m", "-Xmx150m", "-XX:ActiveProcessorCount=1"],
237-
bench_upload,
238-
self.benchmark_cmd + ["tika-wrk:odt-small"] + hwlocBind_2C_2T + ["--"] + self.extra_vm_args + ["-Xms64m", "-Xmx250m", "-XX:ActiveProcessorCount=2"],
239-
bench_upload,
240-
self.benchmark_cmd + ["tika-wrk:odt-medium"] + hwlocBind_4C_4T + ["--"] + self.extra_vm_args + ["-Xms128m", "-Xmx600m", "-XX:ActiveProcessorCount=4"],
241-
bench_upload,
242-
243-
# tika-wrk pdf
244-
self.benchmark_cmd + ["tika-wrk:pdf-tiny"] + hwlocBind_1C_1T + ["--"] + self.extra_vm_args + ["-Xms20m", "-Xmx80m", "-XX:ActiveProcessorCount=1"],
245-
bench_upload,
246-
self.benchmark_cmd + ["tika-wrk:pdf-small"] + hwlocBind_2C_2T + ["--"] + self.extra_vm_args + ["-Xms40m", "-Xmx200m", "-XX:ActiveProcessorCount=2"],
247-
bench_upload,
248-
self.benchmark_cmd + ["tika-wrk:pdf-medium"] + hwlocBind_4C_4T + ["--"] + self.extra_vm_args + ["-Xms80m", "-Xmx500m", "-XX:ActiveProcessorCount=4"],
249-
bench_upload,
250-
251235
# petclinic-wrk
252236
self.benchmark_cmd + ["petclinic-wrk:mixed-tiny"] + hwlocBind_1C_1T + ["--"] + self.extra_vm_args + ["-Xms32m", "-Xmx100m", "-XX:ActiveProcessorCount=1"],
253237
bench_upload,
@@ -263,8 +247,6 @@
263247
# helloworld-wrk
264248
self.benchmark_cmd + ["micronaut-helloworld-wrk:helloworld"] + hwlocBind_1C_1T + ["--"] + self.extra_vm_args + ["-Xms8m", "-Xmx64m", "-XX:ActiveProcessorCount=1", "-XX:MaxDirectMemorySize=256m"],
265249
bench_upload,
266-
self.benchmark_cmd + ["quarkus-helloworld-wrk:helloworld"] + hwlocBind_1C_1T + ["--"] + self.extra_vm_args + ["-Xms8m", "-Xmx64m", "-XX:ActiveProcessorCount=1", "-XX:MaxDirectMemorySize=256m"],
267-
bench_upload,
268250
self.benchmark_cmd + ["spring-helloworld-wrk:helloworld"] + hwlocBind_1C_1T + ["--"] + self.extra_vm_args + ["-Xms8m", "-Xmx64m", "-XX:ActiveProcessorCount=1", "-XX:MaxDirectMemorySize=256m"],
269251
bench_upload
270252
],

compiler/docs/CompilationPlanFuzzing.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Compilation plan fuzzing
22
This page covers the creation and usage of fuzzed compilation plans instead of the usual phase orderings specified by the different `CompilerConfiguration`s.
33
## Abstraction design
4-
The following design can be found in the package `org.graalvm.compiler.core.phases.fuzzing`.
4+
The following design can be found in the package `jdk.compiler.graal.core.phases.fuzzing`.
55
### Diagram
66
```
77
Suites > FuzzedSuites

compiler/docs/Debugging.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ In addition to IDE debugging, there is support for *printf* style debugging.
3838
The simplest is to place temporary usages of `System.out` where ever you need them.
3939

4040
For more permanent logging statements, use the `log(...)` methods in
41-
[`DebugContext`](../src/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/DebugContext.java).
41+
[`DebugContext`](../src/jdk.compiler.graal.debug/src/jdk/compiler/graal/debug/DebugContext.java).
4242
A (nestable) debug scope is entered via one of the `scope(...)` methods in that class. For example:
4343

4444
```java
@@ -54,9 +54,9 @@ try (Scope s = debug.scope("CodeInstall", method)) {
5454

5555
The `debug.log` statement will send output to the console if `CodeInstall` is matched by the
5656
`-Dgraal.Log` option. The matching logic for this option is implemented in
57-
[DebugFilter](../src/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/DebugFilter.java#L31-L82)
57+
[DebugFilter](../src/jdk.compiler.graal/src/jdk/compiler/graal/debug/DebugFilter.java)
5858
and documented in the
59-
[Dump help message](../src/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/doc-files/DumpHelp.txt). As
59+
[Dump help message](../src/jdk.compiler.graal/src/jdk/compiler/graal/debug/doc-files/DumpHelp.txt). As
6060
mentioned in the javadoc, the same matching logic also applies to the `-Dgraal.Dump`,
6161
`-Dgraal.Time`, `-Dgraal.Count` and `-Dgraal.TrackMemUse` options.
6262

@@ -194,9 +194,9 @@ Specifying one of the debug scope options (i.e., `-Dgraal.Log`, `-Dgraal.Dump`,
194194
interesting in compiler output related to a single or few methods. In this case, use the
195195
`-Dgraal.MethodFilter` option to specify a method filter. The matching logic for this option is
196196
described in
197-
[MethodFilter](../src/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/MethodFilter.java#L33-L92)
197+
[MethodFilter](../src/jdk.compiler.graal/src/jdk/compiler/graal/debug/MethodFilter.java#L33-L92)
198198
and documented in the
199-
[MethodFilter help message](../src/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/doc-files/MethodFilterHelp.txt).
199+
[MethodFilter help message](../src/jdk.compiler.graal/src/jdk/compiler/graal/debug/doc-files/MethodFilterHelp.txt).
200200

201201
## Metric filtering
202202

@@ -214,7 +214,7 @@ In addition to logging, there is support for generating (or dumping) more detail
214214
visualizations of certain compiler data structures. Currently, there is support for dumping:
215215

216216
* HIR graphs (i.e., instances of
217-
[Graph](../src/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/Graph.java)) to the
217+
[Graph](../src/jdk.compiler.graal/src/jdk/compiler/graal/graph/Graph.java)) to the
218218
[Ideal Graph Visualizer (IGV)](../../docs/tools/ideal-graph-visualizer.md), and
219219
* LIR register allocation and generated code to the [C1Visualizer](https://github.com/zakkak/c1visualizer)
220220

@@ -258,8 +258,8 @@ java version "1.8.0_212"
258258
Java(TM) SE Runtime Environment (build 1.8.0_212-b31)
259259
Java HotSpot(TM) 64-Bit Server VM (build 25.212-b31-jvmci-20-b01, mixed mode)
260260
> find dumps/1497910458736 -type f
261-
dumps/1497910458736/HotSpotCompilation-539[org.graalvm.compiler.graph.Node.updateUsages(Node, Node)].bgv
262-
dumps/1497910458736/HotSpotCompilation-539[org.graalvm.compiler.graph.Node.updateUsages(Node, Node)].cfg
261+
dumps/1497910458736/HotSpotCompilation-539[jdk.compiler.graal.graph.Node.updateUsages(Node, Node)].bgv
262+
dumps/1497910458736/HotSpotCompilation-539[jdk.compiler.graal.graph.Node.updateUsages(Node, Node)].cfg
263263
```
264264

265265
As you become familiar with the scope names used in the compiler, you can refine the `-Dgraal.Dump` option

compiler/docs/JMH.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ mx benchmark jmh-whitebox:* --results-file=results.json -- --jvm-config=graal-co
133133

134134
The command above runs all *whitebox* benchmarks.
135135
That are all benchmark distributions that have either a dependency on a `GRAAL*` distribution,
136-
or include projects starting with `org.graalvm.compiler` in their distribution jar.
136+
or include projects starting with `jdk.compiler.graal` in their distribution jar.
137137

138138

139139
Refer to the [mx documentation][mx in-repo] for further information.

compiler/mx.compiler/mx_compiler.py

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,6 @@
4747
from mx_unittest import unittest, parse_split_args
4848

4949
from mx_javamodules import as_java_module
50-
from mx_updategraalinopenjdk import updategraalinopenjdk
51-
from mx_renamegraalpackages import renamegraalpackages
5250
import mx_sdk_vm_impl
5351

5452
import mx_benchmark
@@ -108,7 +106,7 @@ def compare(this_version, other_version, jdk):
108106
cached = JavaLangRuntimeVersion._cmp_cache.get(key, None)
109107
if cached is not None:
110108
return cached
111-
source_path = join(_suite.dir, 'src', 'jdk.internal.vm.compiler', 'src', 'org', 'graalvm', 'compiler',
109+
source_path = join(_suite.dir, 'src', 'jdk.compiler.graal', 'src', 'org', 'graalvm', 'compiler',
112110
'hotspot',
113111
'JVMCIVersionCompare.java')
114112
out = mx.OutputCapture()
@@ -157,7 +155,7 @@ def _capture_jvmci_version(args=None):
157155

158156
@mx.command(_suite.name, 'jvmci-version-check')
159157
def _run_jvmci_version_check(args=None, jdk=jdk, **kwargs):
160-
source_path = join(_suite.dir, 'src', 'jdk.internal.vm.compiler', 'src', 'org', 'graalvm', 'compiler', 'hotspot',
158+
source_path = join(_suite.dir, 'src', 'jdk.compiler.graal', 'src', 'jdk', 'compiler', 'graal', 'hotspot',
161159
'JVMCIVersionCheck.java')
162160
return mx.run([jdk.java, '-Xlog:disable', source_path] + (args or []), **kwargs)
163161

@@ -166,6 +164,7 @@ def _run_jvmci_version_check(args=None, jdk=jdk, **kwargs):
166164
_check_jvmci_version(jdk)
167165

168166
mx_gate.add_jacoco_includes(['org.graalvm.*'])
167+
mx_gate.add_jacoco_includes(['jdk.compiler.graal.*'])
169168
mx_gate.add_jacoco_excludes(['com.oracle.truffle'])
170169
mx_gate.add_jacoco_excluded_annotations(['@Snippet', '@ClassSubstitution', '@ExcludeFromJacocoInstrumentation'])
171170

@@ -228,7 +227,7 @@ def _ctw_system_properties_suffix():
228227
out.data = 'System properties for CTW:\n\n'
229228
args = ['-XX:+EnableJVMCI'] + _ctw_jvmci_export_args()
230229
cp = _remove_redundant_entries(mx.classpath('GRAAL_TEST', jdk=jdk))
231-
args.extend(['-cp', cp, '-DCompileTheWorld.Help=true', 'org.graalvm.compiler.hotspot.test.CompileTheWorld'])
230+
args.extend(['-cp', cp, '-DCompileTheWorld.Help=true', 'jdk.compiler.graal.hotspot.test.CompileTheWorld'])
232231
run_java(args, out=out, addDefaultArgs=False)
233232
return out.data
234233

@@ -281,7 +280,7 @@ def ctw(args, extraVMarguments=None):
281280
vmargs.append('-DCompileTheWorld.Classpath=' + cp)
282281
cp = _remove_redundant_entries(mx.classpath('GRAAL_TEST', jdk=jdk))
283282
vmargs.extend(_ctw_jvmci_export_args() + ['-cp', cp])
284-
mainClassAndArgs = ['org.graalvm.compiler.hotspot.test.CompileTheWorld']
283+
mainClassAndArgs = ['jdk.compiler.graal.hotspot.test.CompileTheWorld']
285284

286285
run_vm(vmargs + mainClassAndArgs)
287286

@@ -468,7 +467,7 @@ def _check_forbidden_imports(projects, package_substrings, exceptions=None):
468467
def compiler_gate_runner(suites, unit_test_runs, bootstrap_tests, tasks, extraVMarguments=None, extraUnitTestArguments=None):
469468
with Task('CheckForbiddenImports:Compiler', tasks, tags=['style']) as t:
470469
# Ensure HotSpot-independent compiler classes do not import HotSpot-specific classes
471-
if t: _check_forbidden_imports([mx.project('jdk.internal.vm.compiler')], ('hotspot', 'libgraal'))
470+
if t: _check_forbidden_imports([mx.project('jdk.compiler.graal')], ('hotspot', 'libgraal'))
472471

473472
with Task('JDK_java_base_test', tasks, tags=['javabasetest'], report=True) as t:
474473
if t: java_base_unittest(_remove_empty_entries(extraVMarguments) + [])
@@ -784,7 +783,7 @@ def _unittest_config_participant(config):
784783
# for the junit harness which uses reflection to find @Test methods. In addition, the
785784
# tests widely use JVMCI classes so JVMCI needs to also export all its packages to
786785
# ALL-UNNAMED.
787-
mainClassArgs.extend(['-JUnitOpenPackages', 'jdk.internal.vm.ci/*=org.graalvm.truffle.runtime,jdk.internal.vm.compiler,ALL-UNNAMED'])
786+
mainClassArgs.extend(['-JUnitOpenPackages', 'jdk.internal.vm.ci/*=org.graalvm.truffle.runtime,jdk.compiler.graal,ALL-UNNAMED'])
788787

789788
limited_modules = None
790789
for arg in vmArgs:
@@ -1052,7 +1051,7 @@ def collate_metrics(args):
10521051
if not filename.endswith('.csv'):
10531052
mx.abort('Cannot collate metrics from non-CSV files: ' + filename)
10541053

1055-
# Keep in sync with org.graalvm.compiler.debug.GlobalMetrics.print(OptionValues)
1054+
# Keep in sync with jdk.compiler.graal.debug.GlobalMetrics.print(OptionValues)
10561055
abs_filename = join(os.getcwd(), filename)
10571056
directory = dirname(abs_filename)
10581057
rootname = basename(filename)[0:-len('.csv')]
@@ -1280,7 +1279,7 @@ def add_serviceprovider(service, provider, version):
12801279
else:
12811280
version = None
12821281
provider = arcname[:-len('.class'):].replace('/', '.')
1283-
service = 'org.graalvm.compiler.options.OptionDescriptors'
1282+
service = 'jdk.compiler.graal.options.OptionDescriptors'
12841283
add_serviceprovider(service, provider, version)
12851284
return False
12861285

@@ -1365,7 +1364,7 @@ def phaseplan_fuzz_jtt_tests(args, extraVMarguments=None, extraUnitTestArguments
13651364
target_tests.append(arg)
13661365
args.remove(arg)
13671366
if not target_tests:
1368-
target_tests = ['org.graalvm.compiler.jtt.']
1367+
target_tests = ['jdk.compiler.graal.jtt.']
13691368

13701369
for test in target_tests:
13711370
UnitTestRun("Fuzz phase plan for tests matching substring " + test, [], tags=GraalTags.unittest + GraalTags.phaseplan_fuzz_jtt_tests).\
@@ -1525,8 +1524,6 @@ def profdiff(args):
15251524
'collate-metrics': [collate_metrics, 'filename'],
15261525
'ctw': [ctw, '[-vmoptions|noinline|nocomplex|full]'],
15271526
'java_base_unittest' : [java_base_unittest, 'Runs unittest on JDK java.base "only" module(s)'],
1528-
'updategraalinopenjdk' : [updategraalinopenjdk, '[options]'],
1529-
'renamegraalpackages' : [renamegraalpackages, '[options]'],
15301527
'javadoc': [javadoc, ''],
15311528
'makegraaljdk': [makegraaljdk_cli, '[options]'],
15321529
'graaljdk-home': [print_graaljdk_home, '[options]'],

compiler/mx.compiler/mx_graal_benchmark.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -517,7 +517,7 @@ def subgroup(self):
517517
def whitebox_dependency(dist):
518518
return itertools.chain(
519519
(dep.name.startswith('GRAAL') for dep in dist.deps),
520-
(dep.name.startswith('org.graalvm.compiler') for dep in dist.archived_deps())
520+
(dep.name.startswith('jdk.compiler.graal') for dep in dist.archived_deps())
521521
)
522522

523523
def filter_distribution(self, dist):
@@ -533,7 +533,7 @@ def extraVmArgs(self):
533533
'--add-exports=jdk.internal.vm.ci/jdk.vm.ci.runtime=ALL-UNNAMED',
534534
'--add-exports=jdk.internal.vm.ci/jdk.vm.ci.meta=ALL-UNNAMED',
535535
'--add-exports=jdk.internal.vm.ci/jdk.vm.ci.code=ALL-UNNAMED',
536-
'--add-exports=jdk.internal.vm.compiler/org.graalvm.compiler.graph=ALL-UNNAMED',
536+
'--add-exports=jdk.compiler.graal/jdk.compiler.graal.graph=ALL-UNNAMED',
537537
'--add-exports=org.graalvm.truffle/com.oracle.truffle.api.benchmark=ALL-UNNAMED',
538538
'--add-exports=org.graalvm.truffle/com.oracle.truffle.api.debug=ALL-UNNAMED',
539539
'--add-exports=org.graalvm.truffle/com.oracle.truffle.api.library=ALL-UNNAMED',

0 commit comments

Comments
 (0)