Skip to content

Commit

Permalink
Merge 'oracle/release/graal-vm/24.1' into mandrel/24.1
Browse files Browse the repository at this point in the history
  • Loading branch information
zakkak committed Oct 15, 2024
2 parents adbc8bd + 4d9a08f commit 4f15dff
Show file tree
Hide file tree
Showing 50 changed files with 503 additions and 419 deletions.
16 changes: 8 additions & 8 deletions common.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"Jsonnet files should not include this file directly but use ci/common.jsonnet instead."
],

"mx_version": "7.27.5",
"mx_version": "7.27.5.1",

"COMMENT.jdks": "When adding or removing JDKs keep in sync with JDKs in ci/common.jsonnet",
"jdks": {
Expand Down Expand Up @@ -45,13 +45,13 @@
"labsjdk-ee-21-llvm": {"name": "labsjdk", "version": "ee-21.0.2+13-jvmci-23.1-b33-sulong", "platformspecific": true },
"graalvm-ee-21": {"name": "graalvm-java21", "version": "23.1.3", "platformspecific": true },

"oraclejdk-latest": {"name": "jpg-jdk", "version": "23", "build_id": "jdk-23+37", "platformspecific": true, "extrabundles": ["static-libs"]},
"labsjdk-ce-latest": {"name": "labsjdk", "version": "ce-23+37-jvmci-b01", "platformspecific": true },
"labsjdk-ce-latestDebug": {"name": "labsjdk", "version": "ce-23+37-jvmci-b01-debug", "platformspecific": true },
"labsjdk-ce-latest-llvm": {"name": "labsjdk", "version": "ce-23+37-jvmci-b01-sulong", "platformspecific": true },
"labsjdk-ee-latest": {"name": "labsjdk", "version": "ee-23+37-jvmci-b01", "platformspecific": true },
"labsjdk-ee-latestDebug": {"name": "labsjdk", "version": "ee-23+37-jvmci-b01-debug", "platformspecific": true },
"labsjdk-ee-latest-llvm": {"name": "labsjdk", "version": "ee-23+37-jvmci-b01-sulong", "platformspecific": true }
"oraclejdk-latest": {"name": "jpg-jdk", "version": "23", "build_id": "jdk-23.0.1+11", "platformspecific": true, "extrabundles": ["static-libs"]},
"labsjdk-ce-latest": {"name": "labsjdk", "version": "ce-23.0.1+11-jvmci-b01", "platformspecific": true },
"labsjdk-ce-latestDebug": {"name": "labsjdk", "version": "ce-23.0.1+11-jvmci-b01-debug", "platformspecific": true },
"labsjdk-ce-latest-llvm": {"name": "labsjdk", "version": "ce-23.0.1+11-jvmci-b01-sulong", "platformspecific": true },
"labsjdk-ee-latest": {"name": "labsjdk", "version": "ee-23.0.1+11-jvmci-b01", "platformspecific": true },
"labsjdk-ee-latestDebug": {"name": "labsjdk", "version": "ee-23.0.1+11-jvmci-b01-debug", "platformspecific": true },
"labsjdk-ee-latest-llvm": {"name": "labsjdk", "version": "ee-23.0.1+11-jvmci-b01-sulong", "platformspecific": true }
},

"eclipse": {
Expand Down
2 changes: 1 addition & 1 deletion compiler/mx.compiler/suite.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"sourceinprojectwhitelist" : [],

"groupId" : "org.graalvm.compiler",
"version" : "24.1.0.1",
"version" : "24.1.1.0",
"release" : False,
"url" : "http://www.graalvm.org/",
"developer" : {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ public final class JVMCIVersionCheck {
private static final Map<String, Map<String, Version>> JVMCI_MIN_VERSIONS = Map.of(
"21", Map.of(DEFAULT_VENDOR_ENTRY, createLegacyVersion(23, 1, 33)),
"23", Map.of(
"Oracle Corporation", createLabsJDKVersion("23+37", 1),
DEFAULT_VENDOR_ENTRY, createLabsJDKVersion("23+37", 1)));
"Oracle Corporation", createLabsJDKVersion("23.0.1+11", 1),
DEFAULT_VENDOR_ENTRY, createLabsJDKVersion("23.0.1+11", 1)));
private static final int NA = 0;
/**
* Minimum Java release supported by Graal.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ public static Plugins create(HotSpotGraalRuntimeProvider graalRuntime,
OptionValues options,
TargetDescription target,
BarrierSet barrierSet) {
InvocationPlugins invocationPlugins = new HotSpotInvocationPlugins(graalRuntime, config, compilerConfiguration, options);
InvocationPlugins invocationPlugins = new HotSpotInvocationPlugins(graalRuntime, config, compilerConfiguration, options, target);

Plugins plugins = new Plugins(invocationPlugins);
plugins.appendNodePlugin(new HotSpotExceptionDispatchPlugin(config, wordTypes.getWordKind()));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
*/
package jdk.graal.compiler.hotspot.meta;

import static jdk.vm.ci.hotspot.HotSpotJVMCIRuntime.runtime;
import static jdk.graal.compiler.hotspot.HotSpotGraalServices.isIntrinsicAvailable;
import static jdk.vm.ci.hotspot.HotSpotJVMCIRuntime.runtime;

import java.lang.reflect.Type;
import java.util.ArrayList;
Expand All @@ -37,6 +37,7 @@
import org.graalvm.collections.EconomicSet;
import org.graalvm.collections.MapCursor;
import org.graalvm.collections.Pair;

import jdk.graal.compiler.debug.GraalError;
import jdk.graal.compiler.debug.TTY;
import jdk.graal.compiler.graph.Node;
Expand All @@ -49,7 +50,7 @@
import jdk.graal.compiler.options.OptionValues;
import jdk.graal.compiler.phases.tiers.CompilerConfiguration;
import jdk.graal.compiler.replacements.nodes.MacroInvokable;

import jdk.vm.ci.code.TargetDescription;
import jdk.vm.ci.hotspot.VMIntrinsicMethod;
import jdk.vm.ci.meta.ResolvedJavaMethod;
import jdk.vm.ci.meta.ResolvedJavaType;
Expand All @@ -73,11 +74,11 @@ record MethodKey(String name, String descriptor) {

private final EconomicMap<String, EconomicSet<MethodKey>> disabledIntrinsics = EconomicMap.create();

HotSpotInvocationPlugins(HotSpotGraalRuntimeProvider graalRuntime, GraalHotSpotVMConfig config, CompilerConfiguration compilerConfiguration, OptionValues options) {
HotSpotInvocationPlugins(HotSpotGraalRuntimeProvider graalRuntime, GraalHotSpotVMConfig config, CompilerConfiguration compilerConfiguration, OptionValues options, TargetDescription target) {
this.graalRuntime = graalRuntime;
this.config = config;
if (Options.WarnMissingIntrinsic.getValue(options)) {
this.unimplementedIntrinsics = new UnimplementedGraalIntrinsics(graalRuntime.getTarget().arch);
this.unimplementedIntrinsics = new UnimplementedGraalIntrinsics(target.arch);
} else {
this.unimplementedIntrinsics = null;
}
Expand Down
2 changes: 1 addition & 1 deletion espresso/mx.espresso/suite.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
suite = {
"mxversion": "7.27.1",
"name": "espresso",
"version" : "24.1.0.1",
"version" : "24.1.1.0",
"release" : False,
"groupId" : "org.graalvm.espresso",
"url" : "https://www.graalvm.org/reference-manual/java-on-truffle/",
Expand Down
2 changes: 1 addition & 1 deletion regex/mx.regex/suite.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@

"name" : "regex",

"version" : "24.1.0.1",
"version" : "24.1.1.0",
"release" : False,
"groupId" : "org.graalvm.regex",
"url" : "http://www.graalvm.org/",
Expand Down
2 changes: 1 addition & 1 deletion sdk/mx.sdk/suite.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
suite = {
"mxversion": "7.27.0",
"name" : "sdk",
"version" : "24.1.0.1",
"version" : "24.1.1.0",
"release" : False,
"sourceinprojectwhitelist" : [],
"url" : "https://github.com/oracle/graal",
Expand Down
2 changes: 2 additions & 0 deletions substratevm/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ This changelog summarizes major changes to GraalVM Native Image.
* (GR-52844) Add `-Os`, a new optimization mode to configure the optimizer in a way to get the smallest code size.
* (GR-49770) Add support for glob patterns in resource-config files in addition to regexp. The Tracing agent now prints entries in the glob format.
* (GR-46386) Throw missing registration errors for JNI queries when the query was not included in the reachability metadata.
* (GR-54241) Streamline Native Image reachability metadata into a single `reachability-metadata.json`. The formerly-used individual metadata files (`reflection-config.json`, `resource-config.json`, etc.) are now deprecated, but will still be accepted.
Native Image will only output `reachability-metadata.json` files, and those will be readable on the previous LTS versions of GraalVM. See the [documentation](../docs/reference-manual/native-image/ReachabilityMetadata.md).

## GraalVM for JDK 22 (Internal Version 24.0.0)
* (GR-48304) Red Hat added support for the JFR event ThreadAllocationStatistics.
Expand Down
5 changes: 4 additions & 1 deletion substratevm/mx.substratevm/mx_substratevm.py
Original file line number Diff line number Diff line change
Expand Up @@ -1139,7 +1139,9 @@ def _native_image_launcher_extra_jvm_args():
build_args=driver_build_args + [
'--features=com.oracle.svm.agent.NativeImageAgent$RegistrationFeature',
'--enable-url-protocols=jar',
],
] + svm_experimental_options([
'-H:+TreatAllTypeReachableConditionsAsTypeReached',
]),
headers=False,
home_finder=False,
),
Expand Down Expand Up @@ -1448,6 +1450,7 @@ def _native_image_configure_extra_jvm_args():
main_class='com.oracle.svm.configure.ConfigurationTool',
build_args=svm_experimental_options([
'-H:-ParseRuntimeOptions',
'-H:+TreatAllTypeReachableConditionsAsTypeReached',
]),
extra_jvm_args=_native_image_configure_extra_jvm_args(),
home_finder=False,
Expand Down
2 changes: 1 addition & 1 deletion substratevm/mx.substratevm/suite.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
suite = {
"mxversion": "7.27.1",
"name": "substratevm",
"version" : "24.1.0.1",
"version" : "24.1.1.0",
"release" : False,
"url" : "https://github.com/oracle/graal/tree/master/substratevm",

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,12 @@ protected void scanField(AnalysisField field, JavaConstant receiver, ScanReason

} catch (UnsupportedFeatureException | AnalysisError.TypeNotFoundError ex) {
unsupportedFeatureDuringFieldScan(bb, field, receiver, ex, reason);
} catch (AnalysisError analysisError) {
if (analysisError.getCause() instanceof UnsupportedFeatureException ex) {
unsupportedFeatureDuringFieldScan(bb, field, receiver, ex, reason);
} else {
throw analysisError;
}
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,14 @@
import jdk.graal.compiler.util.json.JsonWriter;

final class ConfigurationConditionPrintable {
static void printConditionAttribute(UnresolvedConfigurationCondition condition, JsonWriter writer) throws IOException {
static void printConditionAttribute(UnresolvedConfigurationCondition condition, JsonWriter writer, boolean combinedFile) throws IOException {
if (!condition.isAlwaysTrue()) {
writer.quote(CONDITIONAL_KEY).appendFieldSeparator().appendObjectStart();
writer.quote(condition.isRuntimeChecked() ? TYPE_REACHED_KEY : TYPE_REACHABLE_KEY).appendFieldSeparator().quote(condition.getTypeName());
/*
* typeReachable conditions are emitted as typeReached in reachability-metadata.json.
* typeReached conditions are emitted as typeReachable in resource-config.json
*/
writer.quote(combinedFile ? TYPE_REACHED_KEY : TYPE_REACHABLE_KEY).appendFieldSeparator().quote(condition.getTypeName());
writer.appendObjectEnd().appendSeparator();
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -460,7 +460,7 @@ public synchronized void setAllPublicConstructors(ConfigurationMemberAccessibili
@Override
public synchronized void printJson(JsonWriter writer) throws IOException {
writer.appendObjectStart();
ConfigurationConditionPrintable.printConditionAttribute(condition, writer);
ConfigurationConditionPrintable.printConditionAttribute(condition, writer, true);
writer.quote("type").appendFieldSeparator();
typeDescriptor.printJson(writer);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,73 +103,73 @@ public void registerConstructor(UnresolvedConfigurationCondition condition, bool

@Override
public void registerPublicClasses(UnresolvedConfigurationCondition condition, ConfigurationType type) {
VMError.guarantee(condition.equals(type.getCondition()), "condition is already a part of the type");
VMError.guarantee(condition.isAlwaysTrue() || condition.equals(type.getCondition()), "condition is already a part of the type");
type.setAllPublicClasses();
}

@Override
public void registerDeclaredClasses(UnresolvedConfigurationCondition condition, ConfigurationType type) {
VMError.guarantee(condition.equals(type.getCondition()), "condition is already a part of the type");
VMError.guarantee(condition.isAlwaysTrue() || condition.equals(type.getCondition()), "condition is already a part of the type");
type.setAllDeclaredClasses();
}

@Override
public void registerRecordComponents(UnresolvedConfigurationCondition condition, ConfigurationType type) {
VMError.guarantee(condition.equals(type.getCondition()), "condition is already a part of the type");
VMError.guarantee(condition.isAlwaysTrue() || condition.equals(type.getCondition()), "condition is already a part of the type");
type.setAllRecordComponents();
}

@Override
public void registerPermittedSubclasses(UnresolvedConfigurationCondition condition, ConfigurationType type) {
VMError.guarantee(condition.equals(type.getCondition()), "condition is already a part of the type");
VMError.guarantee(condition.isAlwaysTrue() || condition.equals(type.getCondition()), "condition is already a part of the type");
type.setAllPermittedSubclasses();
}

@Override
public void registerNestMembers(UnresolvedConfigurationCondition condition, ConfigurationType type) {
VMError.guarantee(condition.equals(type.getCondition()), "condition is already a part of the type");
VMError.guarantee(condition.isAlwaysTrue() || condition.equals(type.getCondition()), "condition is already a part of the type");
type.setAllNestMembers();
}

@Override
public void registerSigners(UnresolvedConfigurationCondition condition, ConfigurationType type) {
VMError.guarantee(condition.equals(type.getCondition()), "condition is already a part of the type");
VMError.guarantee(condition.isAlwaysTrue() || condition.equals(type.getCondition()), "condition is already a part of the type");
type.setAllSigners();
}

@Override
public void registerPublicFields(UnresolvedConfigurationCondition condition, boolean queriedOnly, ConfigurationType type) {
VMError.guarantee(condition.equals(type.getCondition()), "condition is already a part of the type");
VMError.guarantee(condition.isAlwaysTrue() || condition.equals(type.getCondition()), "condition is already a part of the type");
type.setAllPublicFields(queriedOnly ? ConfigurationMemberAccessibility.QUERIED : ConfigurationMemberAccessibility.ACCESSED);
}

@Override
public void registerDeclaredFields(UnresolvedConfigurationCondition condition, boolean queriedOnly, ConfigurationType type) {
VMError.guarantee(condition.equals(type.getCondition()), "condition is already a part of the type");
VMError.guarantee(condition.isAlwaysTrue() || condition.equals(type.getCondition()), "condition is already a part of the type");
type.setAllDeclaredFields(queriedOnly ? ConfigurationMemberAccessibility.QUERIED : ConfigurationMemberAccessibility.ACCESSED);
}

@Override
public void registerPublicMethods(UnresolvedConfigurationCondition condition, boolean queriedOnly, ConfigurationType type) {
VMError.guarantee(condition.equals(type.getCondition()), "condition is already a part of the type");
VMError.guarantee(condition.isAlwaysTrue() || condition.equals(type.getCondition()), "condition is already a part of the type");
type.setAllPublicMethods(queriedOnly ? ConfigurationMemberAccessibility.QUERIED : ConfigurationMemberAccessibility.ACCESSED);
}

@Override
public void registerDeclaredMethods(UnresolvedConfigurationCondition condition, boolean queriedOnly, ConfigurationType type) {
VMError.guarantee(condition.equals(type.getCondition()), "condition is already a part of the type");
VMError.guarantee(condition.isAlwaysTrue() || condition.equals(type.getCondition()), "condition is already a part of the type");
type.setAllDeclaredMethods(queriedOnly ? ConfigurationMemberAccessibility.QUERIED : ConfigurationMemberAccessibility.ACCESSED);
}

@Override
public void registerPublicConstructors(UnresolvedConfigurationCondition condition, boolean queriedOnly, ConfigurationType type) {
VMError.guarantee(condition.equals(type.getCondition()), "condition is already a part of the type");
VMError.guarantee(condition.isAlwaysTrue() || condition.equals(type.getCondition()), "condition is already a part of the type");
type.setAllPublicConstructors(queriedOnly ? ConfigurationMemberAccessibility.QUERIED : ConfigurationMemberAccessibility.ACCESSED);
}

@Override
public void registerDeclaredConstructors(UnresolvedConfigurationCondition condition, boolean queriedOnly, ConfigurationType type) {
VMError.guarantee(condition.equals(type.getCondition()), "condition is already a part of the type");
VMError.guarantee(condition.isAlwaysTrue() || condition.equals(type.getCondition()), "condition is already a part of the type");
type.setAllDeclaredConstructors(queriedOnly ? ConfigurationMemberAccessibility.QUERIED : ConfigurationMemberAccessibility.ACCESSED);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,25 +110,30 @@ public void printJson(JsonWriter writer) throws IOException {
public static void printProxyInterfaces(JsonWriter writer, List<ConditionalElement<List<String>>> lists) throws IOException {
lists.sort(ConditionalElement.comparator(ProxyConfiguration::compareList));

writer.append('[');
writer.indent();
String prefix = "";
writer.appendArrayStart();
boolean firstProxy = true;
for (ConditionalElement<List<String>> list : lists) {
writer.append(prefix).newline();
writer.append('{').indent().newline();
ConfigurationConditionPrintable.printConditionAttribute(list.condition(), writer);
writer.quote("interfaces").append(":").append('[');
String typePrefix = "";
if (firstProxy) {
firstProxy = false;
} else {
writer.appendSeparator();
}
writer.appendObjectStart();
ConfigurationConditionPrintable.printConditionAttribute(list.condition(), writer, false);
writer.quote("interfaces").appendFieldSeparator().appendArrayStart();
boolean firstType = true;
for (String type : list.element()) {
writer.append(typePrefix).quote(type);
typePrefix = ",";
if (firstType) {
firstType = false;
} else {
writer.appendSeparator();
}
writer.quote(type);
}
writer.append(']').unindent().newline();
writer.append('}');
prefix = ",";
writer.appendArrayEnd();
writer.appendObjectEnd();
}
writer.unindent().newline();
writer.append(']');
writer.appendArrayEnd();
}

@Override
Expand Down
Loading

0 comments on commit 4f15dff

Please sign in to comment.