Skip to content

Commit

Permalink
[GR-48318] Move compiler packages and module to jdk.compiler.graal na…
Browse files Browse the repository at this point in the history
…mespace.

PullRequest: graal/15720
  • Loading branch information
dougxc committed Oct 19, 2023
2 parents e3bcde3 + 206d616 commit 1e41203
Show file tree
Hide file tree
Showing 4,367 changed files with 37,582 additions and 38,965 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
4 changes: 2 additions & 2 deletions ci/common.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -259,9 +259,9 @@ local common_json = import "../common.json";

local common = mx + {
catch_files+: [
# Keep in sync with org.graalvm.compiler.debug.StandardPathUtilitiesProvider#DIAGNOSTIC_OUTPUT_DIRECTORY_MESSAGE_REGEXP
# Keep in sync with jdk.compiler.graal.debug.StandardPathUtilitiesProvider#DIAGNOSTIC_OUTPUT_DIRECTORY_MESSAGE_REGEXP
"Graal diagnostic output saved in '(?P<filename>[^']+)'",
# Keep in sync with org.graalvm.compiler.debug.DebugContext#DUMP_FILE_MESSAGE_REGEXP
# Keep in sync with jdk.compiler.graal.debug.DebugContext#DUMP_FILE_MESSAGE_REGEXP
"Dumping debug output to '(?P<filename>[^']+)'",
# Keep in sync with com.oracle.svm.hosted.NativeImageOptions#DEFAULT_ERROR_FILE_NAME
" (?P<filename>.+/svm_err_b_\\d+T\\d+\\.\\d+_pid\\d+\\.md)",
Expand Down
4 changes: 2 additions & 2 deletions ci_includes/publish-javadoc.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
["zip", "-r", "javadoc.zip", "javadoc"],
["cd", "../compiler"],
["mx", "build"],
["mx", "javadoc", "--projects", "jdk.internal.vm.compiler", "--packages", "org.graalvm.graphio"],
["cd", "src/jdk.internal.vm.compiler/"],
["mx", "javadoc", "--projects", "jdk.compiler.graal", "--packages", "jdk.compiler.graal.graphio"],
["cd", "src/jdk.compiler.graal/"],
["zip", "-r", "../../graphio-javadoc.zip", "javadoc"],
["cd", "../../.."],
["set-export", "GRAAL_REPO", ["pwd"]],
Expand Down
5 changes: 5 additions & 0 deletions compiler/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@

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

## GraalVM for JDK 22 (Internal Version 24.0.0)
* (GR-48318): The Graal module has been renamed from `jdk.internal.vm.compiler` to `jdk.compiler.graal`.
Likewise, the compiler packages moved into the `jdk.compiler.graal` namespace.
These renamings were done in preparation for [Project Galahad](https://openjdk.org/projects/galahad/).

## GraalVM for JDK 21 (Internal Version 23.1.0)
* (GR-43228): Enforce backward-edge control-flow integrity (CFI) on aarch64 based on the `UseBranchProtection` JVM flag.

Expand Down
18 changes: 0 additions & 18 deletions compiler/ci/ci_common/benchmark-suites.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -232,22 +232,6 @@
self.benchmark_cmd + ["shopcart-wrk:mixed-huge"] + hwlocBind_16C_32T + ["--"] + self.extra_vm_args + ["-Xms1024m", "-Xmx8192m", "-XX:ActiveProcessorCount=32", "-XX:MaxDirectMemorySize=8192m"],
bench_upload,

# tika-wrk odt
self.benchmark_cmd + ["tika-wrk:odt-tiny"] + hwlocBind_1C_1T + ["--"] + self.extra_vm_args + ["-Xms32m", "-Xmx150m", "-XX:ActiveProcessorCount=1"],
bench_upload,
self.benchmark_cmd + ["tika-wrk:odt-small"] + hwlocBind_2C_2T + ["--"] + self.extra_vm_args + ["-Xms64m", "-Xmx250m", "-XX:ActiveProcessorCount=2"],
bench_upload,
self.benchmark_cmd + ["tika-wrk:odt-medium"] + hwlocBind_4C_4T + ["--"] + self.extra_vm_args + ["-Xms128m", "-Xmx600m", "-XX:ActiveProcessorCount=4"],
bench_upload,

# tika-wrk pdf
self.benchmark_cmd + ["tika-wrk:pdf-tiny"] + hwlocBind_1C_1T + ["--"] + self.extra_vm_args + ["-Xms20m", "-Xmx80m", "-XX:ActiveProcessorCount=1"],
bench_upload,
self.benchmark_cmd + ["tika-wrk:pdf-small"] + hwlocBind_2C_2T + ["--"] + self.extra_vm_args + ["-Xms40m", "-Xmx200m", "-XX:ActiveProcessorCount=2"],
bench_upload,
self.benchmark_cmd + ["tika-wrk:pdf-medium"] + hwlocBind_4C_4T + ["--"] + self.extra_vm_args + ["-Xms80m", "-Xmx500m", "-XX:ActiveProcessorCount=4"],
bench_upload,

# petclinic-wrk
self.benchmark_cmd + ["petclinic-wrk:mixed-tiny"] + hwlocBind_1C_1T + ["--"] + self.extra_vm_args + ["-Xms32m", "-Xmx100m", "-XX:ActiveProcessorCount=1"],
bench_upload,
Expand All @@ -263,8 +247,6 @@
# helloworld-wrk
self.benchmark_cmd + ["micronaut-helloworld-wrk:helloworld"] + hwlocBind_1C_1T + ["--"] + self.extra_vm_args + ["-Xms8m", "-Xmx64m", "-XX:ActiveProcessorCount=1", "-XX:MaxDirectMemorySize=256m"],
bench_upload,
self.benchmark_cmd + ["quarkus-helloworld-wrk:helloworld"] + hwlocBind_1C_1T + ["--"] + self.extra_vm_args + ["-Xms8m", "-Xmx64m", "-XX:ActiveProcessorCount=1", "-XX:MaxDirectMemorySize=256m"],
bench_upload,
self.benchmark_cmd + ["spring-helloworld-wrk:helloworld"] + hwlocBind_1C_1T + ["--"] + self.extra_vm_args + ["-Xms8m", "-Xmx64m", "-XX:ActiveProcessorCount=1", "-XX:MaxDirectMemorySize=256m"],
bench_upload
],
Expand Down
2 changes: 1 addition & 1 deletion compiler/docs/CompilationPlanFuzzing.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Compilation plan fuzzing
This page covers the creation and usage of fuzzed compilation plans instead of the usual phase orderings specified by the different `CompilerConfiguration`s.
## Abstraction design
The following design can be found in the package `org.graalvm.compiler.core.phases.fuzzing`.
The following design can be found in the package `jdk.compiler.graal.core.phases.fuzzing`.
### Diagram
```
Suites > FuzzedSuites
Expand Down
16 changes: 8 additions & 8 deletions compiler/docs/Debugging.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ In addition to IDE debugging, there is support for *printf* style debugging.
The simplest is to place temporary usages of `System.out` where ever you need them.

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

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

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

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

## Metric filtering

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

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

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

As you become familiar with the scope names used in the compiler, you can refine the `-Dgraal.Dump` option
Expand Down
2 changes: 1 addition & 1 deletion compiler/docs/JMH.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ mx benchmark jmh-whitebox:* --results-file=results.json -- --jvm-config=graal-co

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


Refer to the [mx documentation][mx in-repo] for further information.
Expand Down
23 changes: 10 additions & 13 deletions compiler/mx.compiler/mx_compiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,6 @@
from mx_unittest import unittest, parse_split_args

from mx_javamodules import as_java_module
from mx_updategraalinopenjdk import updategraalinopenjdk
from mx_renamegraalpackages import renamegraalpackages
import mx_sdk_vm_impl

import mx_benchmark
Expand Down Expand Up @@ -108,7 +106,7 @@ def compare(this_version, other_version, jdk):
cached = JavaLangRuntimeVersion._cmp_cache.get(key, None)
if cached is not None:
return cached
source_path = join(_suite.dir, 'src', 'jdk.internal.vm.compiler', 'src', 'org', 'graalvm', 'compiler',
source_path = join(_suite.dir, 'src', 'jdk.compiler.graal', 'src', 'org', 'graalvm', 'compiler',
'hotspot',
'JVMCIVersionCompare.java')
out = mx.OutputCapture()
Expand Down Expand Up @@ -157,7 +155,7 @@ def _capture_jvmci_version(args=None):

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

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

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

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

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

run_vm(vmargs + mainClassAndArgs)

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

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

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

# Keep in sync with org.graalvm.compiler.debug.GlobalMetrics.print(OptionValues)
# Keep in sync with jdk.compiler.graal.debug.GlobalMetrics.print(OptionValues)
abs_filename = join(os.getcwd(), filename)
directory = dirname(abs_filename)
rootname = basename(filename)[0:-len('.csv')]
Expand Down Expand Up @@ -1280,7 +1279,7 @@ def add_serviceprovider(service, provider, version):
else:
version = None
provider = arcname[:-len('.class'):].replace('/', '.')
service = 'org.graalvm.compiler.options.OptionDescriptors'
service = 'jdk.compiler.graal.options.OptionDescriptors'
add_serviceprovider(service, provider, version)
return False

Expand Down Expand Up @@ -1365,7 +1364,7 @@ def phaseplan_fuzz_jtt_tests(args, extraVMarguments=None, extraUnitTestArguments
target_tests.append(arg)
args.remove(arg)
if not target_tests:
target_tests = ['org.graalvm.compiler.jtt.']
target_tests = ['jdk.compiler.graal.jtt.']

for test in target_tests:
UnitTestRun("Fuzz phase plan for tests matching substring " + test, [], tags=GraalTags.unittest + GraalTags.phaseplan_fuzz_jtt_tests).\
Expand Down Expand Up @@ -1525,8 +1524,6 @@ def profdiff(args):
'collate-metrics': [collate_metrics, 'filename'],
'ctw': [ctw, '[-vmoptions|noinline|nocomplex|full]'],
'java_base_unittest' : [java_base_unittest, 'Runs unittest on JDK java.base "only" module(s)'],
'updategraalinopenjdk' : [updategraalinopenjdk, '[options]'],
'renamegraalpackages' : [renamegraalpackages, '[options]'],
'javadoc': [javadoc, ''],
'makegraaljdk': [makegraaljdk_cli, '[options]'],
'graaljdk-home': [print_graaljdk_home, '[options]'],
Expand Down
4 changes: 2 additions & 2 deletions compiler/mx.compiler/mx_graal_benchmark.py
Original file line number Diff line number Diff line change
Expand Up @@ -517,7 +517,7 @@ def subgroup(self):
def whitebox_dependency(dist):
return itertools.chain(
(dep.name.startswith('GRAAL') for dep in dist.deps),
(dep.name.startswith('org.graalvm.compiler') for dep in dist.archived_deps())
(dep.name.startswith('jdk.compiler.graal') for dep in dist.archived_deps())
)

def filter_distribution(self, dist):
Expand All @@ -533,7 +533,7 @@ def extraVmArgs(self):
'--add-exports=jdk.internal.vm.ci/jdk.vm.ci.runtime=ALL-UNNAMED',
'--add-exports=jdk.internal.vm.ci/jdk.vm.ci.meta=ALL-UNNAMED',
'--add-exports=jdk.internal.vm.ci/jdk.vm.ci.code=ALL-UNNAMED',
'--add-exports=jdk.internal.vm.compiler/org.graalvm.compiler.graph=ALL-UNNAMED',
'--add-exports=jdk.compiler.graal/jdk.compiler.graal.graph=ALL-UNNAMED',
'--add-exports=org.graalvm.truffle/com.oracle.truffle.api.benchmark=ALL-UNNAMED',
'--add-exports=org.graalvm.truffle/com.oracle.truffle.api.debug=ALL-UNNAMED',
'--add-exports=org.graalvm.truffle/com.oracle.truffle.api.library=ALL-UNNAMED',
Expand Down
Loading

0 comments on commit 1e41203

Please sign in to comment.