Skip to content

Commit edb81b5

Browse files
authored
Merge pull request #800 from zakkak/2024-10-15-oct-cpu-sync
[24.1] October CPU sync
2 parents adbc8bd + 4f15dff commit edb81b5

File tree

50 files changed

+503
-419
lines changed

Some content is hidden

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

50 files changed

+503
-419
lines changed

common.json

+8-8
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"Jsonnet files should not include this file directly but use ci/common.jsonnet instead."
55
],
66

7-
"mx_version": "7.27.5",
7+
"mx_version": "7.27.5.1",
88

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

48-
"oraclejdk-latest": {"name": "jpg-jdk", "version": "23", "build_id": "jdk-23+37", "platformspecific": true, "extrabundles": ["static-libs"]},
49-
"labsjdk-ce-latest": {"name": "labsjdk", "version": "ce-23+37-jvmci-b01", "platformspecific": true },
50-
"labsjdk-ce-latestDebug": {"name": "labsjdk", "version": "ce-23+37-jvmci-b01-debug", "platformspecific": true },
51-
"labsjdk-ce-latest-llvm": {"name": "labsjdk", "version": "ce-23+37-jvmci-b01-sulong", "platformspecific": true },
52-
"labsjdk-ee-latest": {"name": "labsjdk", "version": "ee-23+37-jvmci-b01", "platformspecific": true },
53-
"labsjdk-ee-latestDebug": {"name": "labsjdk", "version": "ee-23+37-jvmci-b01-debug", "platformspecific": true },
54-
"labsjdk-ee-latest-llvm": {"name": "labsjdk", "version": "ee-23+37-jvmci-b01-sulong", "platformspecific": true }
48+
"oraclejdk-latest": {"name": "jpg-jdk", "version": "23", "build_id": "jdk-23.0.1+11", "platformspecific": true, "extrabundles": ["static-libs"]},
49+
"labsjdk-ce-latest": {"name": "labsjdk", "version": "ce-23.0.1+11-jvmci-b01", "platformspecific": true },
50+
"labsjdk-ce-latestDebug": {"name": "labsjdk", "version": "ce-23.0.1+11-jvmci-b01-debug", "platformspecific": true },
51+
"labsjdk-ce-latest-llvm": {"name": "labsjdk", "version": "ce-23.0.1+11-jvmci-b01-sulong", "platformspecific": true },
52+
"labsjdk-ee-latest": {"name": "labsjdk", "version": "ee-23.0.1+11-jvmci-b01", "platformspecific": true },
53+
"labsjdk-ee-latestDebug": {"name": "labsjdk", "version": "ee-23.0.1+11-jvmci-b01-debug", "platformspecific": true },
54+
"labsjdk-ee-latest-llvm": {"name": "labsjdk", "version": "ee-23.0.1+11-jvmci-b01-sulong", "platformspecific": true }
5555
},
5656

5757
"eclipse": {

compiler/mx.compiler/suite.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"sourceinprojectwhitelist" : [],
55

66
"groupId" : "org.graalvm.compiler",
7-
"version" : "24.1.0.1",
7+
"version" : "24.1.1.0",
88
"release" : False,
99
"url" : "http://www.graalvm.org/",
1010
"developer" : {

compiler/src/jdk.graal.compiler/src/jdk/graal/compiler/hotspot/JVMCIVersionCheck.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@ public final class JVMCIVersionCheck {
5555
private static final Map<String, Map<String, Version>> JVMCI_MIN_VERSIONS = Map.of(
5656
"21", Map.of(DEFAULT_VENDOR_ENTRY, createLegacyVersion(23, 1, 33)),
5757
"23", Map.of(
58-
"Oracle Corporation", createLabsJDKVersion("23+37", 1),
59-
DEFAULT_VENDOR_ENTRY, createLabsJDKVersion("23+37", 1)));
58+
"Oracle Corporation", createLabsJDKVersion("23.0.1+11", 1),
59+
DEFAULT_VENDOR_ENTRY, createLabsJDKVersion("23.0.1+11", 1)));
6060
private static final int NA = 0;
6161
/**
6262
* Minimum Java release supported by Graal.

compiler/src/jdk.graal.compiler/src/jdk/graal/compiler/hotspot/meta/HotSpotGraphBuilderPlugins.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ public static Plugins create(HotSpotGraalRuntimeProvider graalRuntime,
212212
OptionValues options,
213213
TargetDescription target,
214214
BarrierSet barrierSet) {
215-
InvocationPlugins invocationPlugins = new HotSpotInvocationPlugins(graalRuntime, config, compilerConfiguration, options);
215+
InvocationPlugins invocationPlugins = new HotSpotInvocationPlugins(graalRuntime, config, compilerConfiguration, options, target);
216216

217217
Plugins plugins = new Plugins(invocationPlugins);
218218
plugins.appendNodePlugin(new HotSpotExceptionDispatchPlugin(config, wordTypes.getWordKind()));

compiler/src/jdk.graal.compiler/src/jdk/graal/compiler/hotspot/meta/HotSpotInvocationPlugins.java

+5-4
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@
2424
*/
2525
package jdk.graal.compiler.hotspot.meta;
2626

27-
import static jdk.vm.ci.hotspot.HotSpotJVMCIRuntime.runtime;
2827
import static jdk.graal.compiler.hotspot.HotSpotGraalServices.isIntrinsicAvailable;
28+
import static jdk.vm.ci.hotspot.HotSpotJVMCIRuntime.runtime;
2929

3030
import java.lang.reflect.Type;
3131
import java.util.ArrayList;
@@ -37,6 +37,7 @@
3737
import org.graalvm.collections.EconomicSet;
3838
import org.graalvm.collections.MapCursor;
3939
import org.graalvm.collections.Pair;
40+
4041
import jdk.graal.compiler.debug.GraalError;
4142
import jdk.graal.compiler.debug.TTY;
4243
import jdk.graal.compiler.graph.Node;
@@ -49,7 +50,7 @@
4950
import jdk.graal.compiler.options.OptionValues;
5051
import jdk.graal.compiler.phases.tiers.CompilerConfiguration;
5152
import jdk.graal.compiler.replacements.nodes.MacroInvokable;
52-
53+
import jdk.vm.ci.code.TargetDescription;
5354
import jdk.vm.ci.hotspot.VMIntrinsicMethod;
5455
import jdk.vm.ci.meta.ResolvedJavaMethod;
5556
import jdk.vm.ci.meta.ResolvedJavaType;
@@ -73,11 +74,11 @@ record MethodKey(String name, String descriptor) {
7374

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

76-
HotSpotInvocationPlugins(HotSpotGraalRuntimeProvider graalRuntime, GraalHotSpotVMConfig config, CompilerConfiguration compilerConfiguration, OptionValues options) {
77+
HotSpotInvocationPlugins(HotSpotGraalRuntimeProvider graalRuntime, GraalHotSpotVMConfig config, CompilerConfiguration compilerConfiguration, OptionValues options, TargetDescription target) {
7778
this.graalRuntime = graalRuntime;
7879
this.config = config;
7980
if (Options.WarnMissingIntrinsic.getValue(options)) {
80-
this.unimplementedIntrinsics = new UnimplementedGraalIntrinsics(graalRuntime.getTarget().arch);
81+
this.unimplementedIntrinsics = new UnimplementedGraalIntrinsics(target.arch);
8182
} else {
8283
this.unimplementedIntrinsics = null;
8384
}

espresso/mx.espresso/suite.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
suite = {
2525
"mxversion": "7.27.1",
2626
"name": "espresso",
27-
"version" : "24.1.0.1",
27+
"version" : "24.1.1.0",
2828
"release" : False,
2929
"groupId" : "org.graalvm.espresso",
3030
"url" : "https://www.graalvm.org/reference-manual/java-on-truffle/",

regex/mx.regex/suite.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343

4444
"name" : "regex",
4545

46-
"version" : "24.1.0.1",
46+
"version" : "24.1.1.0",
4747
"release" : False,
4848
"groupId" : "org.graalvm.regex",
4949
"url" : "http://www.graalvm.org/",

sdk/mx.sdk/suite.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
suite = {
4242
"mxversion": "7.27.0",
4343
"name" : "sdk",
44-
"version" : "24.1.0.1",
44+
"version" : "24.1.1.0",
4545
"release" : False,
4646
"sourceinprojectwhitelist" : [],
4747
"url" : "https://github.com/oracle/graal",

substratevm/CHANGELOG.md

+2
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ This changelog summarizes major changes to GraalVM Native Image.
2828
* (GR-52844) Add `-Os`, a new optimization mode to configure the optimizer in a way to get the smallest code size.
2929
* (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.
3030
* (GR-46386) Throw missing registration errors for JNI queries when the query was not included in the reachability metadata.
31+
* (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.
32+
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).
3133

3234
## GraalVM for JDK 22 (Internal Version 24.0.0)
3335
* (GR-48304) Red Hat added support for the JFR event ThreadAllocationStatistics.

substratevm/mx.substratevm/mx_substratevm.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -1139,7 +1139,9 @@ def _native_image_launcher_extra_jvm_args():
11391139
build_args=driver_build_args + [
11401140
'--features=com.oracle.svm.agent.NativeImageAgent$RegistrationFeature',
11411141
'--enable-url-protocols=jar',
1142-
],
1142+
] + svm_experimental_options([
1143+
'-H:+TreatAllTypeReachableConditionsAsTypeReached',
1144+
]),
11431145
headers=False,
11441146
home_finder=False,
11451147
),
@@ -1448,6 +1450,7 @@ def _native_image_configure_extra_jvm_args():
14481450
main_class='com.oracle.svm.configure.ConfigurationTool',
14491451
build_args=svm_experimental_options([
14501452
'-H:-ParseRuntimeOptions',
1453+
'-H:+TreatAllTypeReachableConditionsAsTypeReached',
14511454
]),
14521455
extra_jvm_args=_native_image_configure_extra_jvm_args(),
14531456
home_finder=False,

substratevm/mx.substratevm/suite.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
suite = {
33
"mxversion": "7.27.1",
44
"name": "substratevm",
5-
"version" : "24.1.0.1",
5+
"version" : "24.1.1.0",
66
"release" : False,
77
"url" : "https://github.com/oracle/graal/tree/master/substratevm",
88

substratevm/src/com.oracle.graal.pointsto/src/com/oracle/graal/pointsto/ObjectScanner.java

+6
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,12 @@ protected void scanField(AnalysisField field, JavaConstant receiver, ScanReason
211211

212212
} catch (UnsupportedFeatureException | AnalysisError.TypeNotFoundError ex) {
213213
unsupportedFeatureDuringFieldScan(bb, field, receiver, ex, reason);
214+
} catch (AnalysisError analysisError) {
215+
if (analysisError.getCause() instanceof UnsupportedFeatureException ex) {
216+
unsupportedFeatureDuringFieldScan(bb, field, receiver, ex, reason);
217+
} else {
218+
throw analysisError;
219+
}
214220
}
215221
}
216222

substratevm/src/com.oracle.svm.configure/src/com/oracle/svm/configure/config/ConfigurationConditionPrintable.java

+6-2
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,14 @@
3535
import jdk.graal.compiler.util.json.JsonWriter;
3636

3737
final class ConfigurationConditionPrintable {
38-
static void printConditionAttribute(UnresolvedConfigurationCondition condition, JsonWriter writer) throws IOException {
38+
static void printConditionAttribute(UnresolvedConfigurationCondition condition, JsonWriter writer, boolean combinedFile) throws IOException {
3939
if (!condition.isAlwaysTrue()) {
4040
writer.quote(CONDITIONAL_KEY).appendFieldSeparator().appendObjectStart();
41-
writer.quote(condition.isRuntimeChecked() ? TYPE_REACHED_KEY : TYPE_REACHABLE_KEY).appendFieldSeparator().quote(condition.getTypeName());
41+
/*
42+
* typeReachable conditions are emitted as typeReached in reachability-metadata.json.
43+
* typeReached conditions are emitted as typeReachable in resource-config.json
44+
*/
45+
writer.quote(combinedFile ? TYPE_REACHED_KEY : TYPE_REACHABLE_KEY).appendFieldSeparator().quote(condition.getTypeName());
4246
writer.appendObjectEnd().appendSeparator();
4347
}
4448
}

substratevm/src/com.oracle.svm.configure/src/com/oracle/svm/configure/config/ConfigurationType.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -460,7 +460,7 @@ public synchronized void setAllPublicConstructors(ConfigurationMemberAccessibili
460460
@Override
461461
public synchronized void printJson(JsonWriter writer) throws IOException {
462462
writer.appendObjectStart();
463-
ConfigurationConditionPrintable.printConditionAttribute(condition, writer);
463+
ConfigurationConditionPrintable.printConditionAttribute(condition, writer, true);
464464
writer.quote("type").appendFieldSeparator();
465465
typeDescriptor.printJson(writer);
466466

substratevm/src/com.oracle.svm.configure/src/com/oracle/svm/configure/config/ParserConfigurationAdapter.java

+12-12
Original file line numberDiff line numberDiff line change
@@ -103,73 +103,73 @@ public void registerConstructor(UnresolvedConfigurationCondition condition, bool
103103

104104
@Override
105105
public void registerPublicClasses(UnresolvedConfigurationCondition condition, ConfigurationType type) {
106-
VMError.guarantee(condition.equals(type.getCondition()), "condition is already a part of the type");
106+
VMError.guarantee(condition.isAlwaysTrue() || condition.equals(type.getCondition()), "condition is already a part of the type");
107107
type.setAllPublicClasses();
108108
}
109109

110110
@Override
111111
public void registerDeclaredClasses(UnresolvedConfigurationCondition condition, ConfigurationType type) {
112-
VMError.guarantee(condition.equals(type.getCondition()), "condition is already a part of the type");
112+
VMError.guarantee(condition.isAlwaysTrue() || condition.equals(type.getCondition()), "condition is already a part of the type");
113113
type.setAllDeclaredClasses();
114114
}
115115

116116
@Override
117117
public void registerRecordComponents(UnresolvedConfigurationCondition condition, ConfigurationType type) {
118-
VMError.guarantee(condition.equals(type.getCondition()), "condition is already a part of the type");
118+
VMError.guarantee(condition.isAlwaysTrue() || condition.equals(type.getCondition()), "condition is already a part of the type");
119119
type.setAllRecordComponents();
120120
}
121121

122122
@Override
123123
public void registerPermittedSubclasses(UnresolvedConfigurationCondition condition, ConfigurationType type) {
124-
VMError.guarantee(condition.equals(type.getCondition()), "condition is already a part of the type");
124+
VMError.guarantee(condition.isAlwaysTrue() || condition.equals(type.getCondition()), "condition is already a part of the type");
125125
type.setAllPermittedSubclasses();
126126
}
127127

128128
@Override
129129
public void registerNestMembers(UnresolvedConfigurationCondition condition, ConfigurationType type) {
130-
VMError.guarantee(condition.equals(type.getCondition()), "condition is already a part of the type");
130+
VMError.guarantee(condition.isAlwaysTrue() || condition.equals(type.getCondition()), "condition is already a part of the type");
131131
type.setAllNestMembers();
132132
}
133133

134134
@Override
135135
public void registerSigners(UnresolvedConfigurationCondition condition, ConfigurationType type) {
136-
VMError.guarantee(condition.equals(type.getCondition()), "condition is already a part of the type");
136+
VMError.guarantee(condition.isAlwaysTrue() || condition.equals(type.getCondition()), "condition is already a part of the type");
137137
type.setAllSigners();
138138
}
139139

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

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

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

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

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

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

substratevm/src/com.oracle.svm.configure/src/com/oracle/svm/configure/config/ProxyConfiguration.java

+20-15
Original file line numberDiff line numberDiff line change
@@ -110,25 +110,30 @@ public void printJson(JsonWriter writer) throws IOException {
110110
public static void printProxyInterfaces(JsonWriter writer, List<ConditionalElement<List<String>>> lists) throws IOException {
111111
lists.sort(ConditionalElement.comparator(ProxyConfiguration::compareList));
112112

113-
writer.append('[');
114-
writer.indent();
115-
String prefix = "";
113+
writer.appendArrayStart();
114+
boolean firstProxy = true;
116115
for (ConditionalElement<List<String>> list : lists) {
117-
writer.append(prefix).newline();
118-
writer.append('{').indent().newline();
119-
ConfigurationConditionPrintable.printConditionAttribute(list.condition(), writer);
120-
writer.quote("interfaces").append(":").append('[');
121-
String typePrefix = "";
116+
if (firstProxy) {
117+
firstProxy = false;
118+
} else {
119+
writer.appendSeparator();
120+
}
121+
writer.appendObjectStart();
122+
ConfigurationConditionPrintable.printConditionAttribute(list.condition(), writer, false);
123+
writer.quote("interfaces").appendFieldSeparator().appendArrayStart();
124+
boolean firstType = true;
122125
for (String type : list.element()) {
123-
writer.append(typePrefix).quote(type);
124-
typePrefix = ",";
126+
if (firstType) {
127+
firstType = false;
128+
} else {
129+
writer.appendSeparator();
130+
}
131+
writer.quote(type);
125132
}
126-
writer.append(']').unindent().newline();
127-
writer.append('}');
128-
prefix = ",";
133+
writer.appendArrayEnd();
134+
writer.appendObjectEnd();
129135
}
130-
writer.unindent().newline();
131-
writer.append(']');
136+
writer.appendArrayEnd();
132137
}
133138

134139
@Override

0 commit comments

Comments
 (0)