Skip to content

Commit 570a409

Browse files
authored
Merge upstream 21.3 branch (tagged vm-ee-21.3.3.0)
2 parents 2f72dea + de7d96f commit 570a409

File tree

129 files changed

+4539
-1016
lines changed

Some content is hidden

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

129 files changed

+4539
-1016
lines changed

.github/workflows/mandrel.yml

+7-7
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ on:
1111
- '.github/workflows/main.yml'
1212
- '.github/workflows/quarkus.yml'
1313
- '**.md'
14-
workflow_dispatch: []
14+
workflow_dispatch:
1515

1616
# The following aims to reduce CI CPU cycles by:
1717
# 1. Cancelling any previous builds of this PR when pushing new changes to it
@@ -27,20 +27,20 @@ concurrency:
2727
cancel-in-progress: ${{ github.event_name == 'pull_request' || github.repository != 'graalvm/mandrel' }}
2828

2929
jobs:
30-
q-2_2-ea:
31-
name: "Q 2.2 M 21.3 EA"
30+
q-2_7-ea:
31+
name: "Q 2.7 M 21.3 EA"
3232
uses: graalvm/mandrel/.github/workflows/base.yml@default
3333
with:
34-
quarkus-version: "2.2"
34+
quarkus-version: "2.7"
3535
repo: ${{ github.repository }}
3636
version: ${{ github.ref }}
3737
mandrel-packaging-version: "21.3"
3838
jdk: "11/ea"
39-
q-2_2-ea-win:
40-
name: "Q 2.2 M 21.3 windows EA"
39+
q-2_7-ea-win:
40+
name: "Q 2.7 M 21.3 windows EA"
4141
uses: graalvm/mandrel/.github/workflows/base-windows.yml@default
4242
with:
43-
quarkus-version: "2.2"
43+
quarkus-version: "2.7"
4444
repo: ${{ github.repository }}
4545
version: ${{ github.ref }}
4646
mandrel-packaging-version: "21.3"

common.json

+8-8
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,19 @@
33

44
"jdks": {
55
"openjdk8": {"name": "openjdk", "version": "8u302+06-jvmci-21.3-b05", "platformspecific": true },
6-
"oraclejdk8": {"name": "oraclejdk", "version": "8u331+09-jvmci-21.3-b11", "platformspecific": true },
7-
"oraclejdk8Debug": {"name": "oraclejdk", "version": "8u331+09-jvmci-21.3-b11-fastdebug", "platformspecific": true },
6+
"oraclejdk8": {"name": "oraclejdk", "version": "8u341+10-jvmci-21.3-b19", "platformspecific": true },
7+
"oraclejdk8Debug": {"name": "oraclejdk", "version": "8u341+10-jvmci-21.3-b19-fastdebug", "platformspecific": true },
88

99
"openjdk11": {"name": "openjdk", "version": "11.0.11+9", "platformspecific": true },
1010
"oraclejdk11": {"name": "oraclejdk", "version": "11.0.11+9", "platformspecific": true },
11-
"labsjdk-ce-11": {"name": "labsjdk", "version": "ce-11.0.15+8-jvmci-21.3-b13", "platformspecific": true },
12-
"labsjdk-ee-11": {"name": "labsjdk", "version": "ee-11.0.15+8-jvmci-21.3-b11", "platformspecific": true },
11+
"labsjdk-ce-11": {"name": "labsjdk", "version": "ce-11.0.16+7-jvmci-21.3-b19", "platformspecific": true },
12+
"labsjdk-ee-11": {"name": "labsjdk", "version": "ee-11.0.16+11-jvmci-21.3-b20", "platformspecific": true },
1313

1414
"oraclejdk17": {"name": "oraclejdk", "version": "17.0.1+2", "platformspecific": true },
15-
"labsjdk-ce-17": {"name": "labsjdk", "version": "ce-17.0.3+5-jvmci-21.3-b13", "platformspecific": true },
16-
"labsjdk-ce-17Debug": {"name": "labsjdk", "version": "ce-17.0.3+5-jvmci-21.3-b13-debug", "platformspecific": true },
17-
"labsjdk-ee-17": {"name": "labsjdk", "version": "ee-17.0.3+8-jvmci-21.3-b11", "platformspecific": true },
18-
"labsjdk-ee-17Debug": {"name": "labsjdk", "version": "ee-17.0.3+8-jvmci-21.3-b11-debug", "platformspecific": true }
15+
"labsjdk-ce-17": {"name": "labsjdk", "version": "ce-17.0.4+7-jvmci-21.3-b19", "platformspecific": true },
16+
"labsjdk-ce-17Debug": {"name": "labsjdk", "version": "ce-17.0.4+7-jvmci-21.3-b19-debug", "platformspecific": true },
17+
"labsjdk-ee-17": {"name": "labsjdk", "version": "ee-17.0.4+11-jvmci-21.3-b20", "platformspecific": true },
18+
"labsjdk-ee-17Debug": {"name": "labsjdk", "version": "ee-17.0.4+11-jvmci-21.3-b20-debug", "platformspecific": true }
1919
},
2020

2121
"COMMENT" : "The devkits versions reflect those used to build the JVMCI JDKs (e.g., see devkit_platform_revisions in <jdk>/make/conf/jib-profiles.js)",

compiler/CHANGELOG.md

+5
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22

33
This changelog summarizes newly introduced optimizations that may be relevant to other teams.
44

5+
## Version 21.3.0
6+
* (GR-38857): Deprecated the libgraal JMX management bean and disabled it by default. The bean is scheduled to be
7+
removed completely in GraalVM 22.3.0. Until then, it can be explicitly re-enabled with
8+
`-Dgraal.LibGraalManagementDelay=1000`.
9+
510
## Version 21.2.0
611
* (GR-29770) Loop safepoint elimination: Not only consider 32bit loops for safepoint removal but also 64bit ones
712
that iterate in 32bit ranges.

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" : "21.3.2.1",
7+
"version" : "21.3.3.0",
88
"release" : False,
99
"url" : "http://www.graalvm.org/",
1010
"developer" : {

compiler/src/org.graalvm.compiler.asm.amd64/src/org/graalvm/compiler/asm/amd64/AMD64Assembler.java

+79-46
Large diffs are not rendered by default.

compiler/src/org.graalvm.compiler.core.amd64/src/org/graalvm/compiler/core/amd64/AMD64LIRGenerator.java

+12
Original file line numberDiff line numberDiff line change
@@ -764,4 +764,16 @@ public void emitZeroMemory(Value address, Value length, boolean isAligned) {
764764
emitMove(lengthReg, length);
765765
append(new AMD64ZeroMemoryOp(asAddressValue(address), lengthReg));
766766
}
767+
768+
public boolean supportsCPUFeature(AMD64.CPUFeature feature) {
769+
return ((AMD64) target().arch).getFeatures().contains(feature);
770+
}
771+
772+
public boolean supportsCPUFeature(String feature) {
773+
try {
774+
return ((AMD64) target().arch).getFeatures().contains(AMD64.CPUFeature.valueOf(feature));
775+
} catch (IllegalArgumentException e) {
776+
return false;
777+
}
778+
}
767779
}

compiler/src/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/Graph.java

+59-1
Original file line numberDiff line numberDiff line change
@@ -537,6 +537,26 @@ private <T extends Node> T addHelper(T node) {
537537
return node;
538538
}
539539

540+
/**
541+
* Notifies node event listeners registered with this graph that {@code node} has been created
542+
* as part of decoding a graph but its fields have yet to be initialized.
543+
*/
544+
public void beforeDecodingFields(Node node) {
545+
if (nodeEventListener != null) {
546+
nodeEventListener.event(NodeEvent.BEFORE_DECODING_FIELDS, node);
547+
}
548+
}
549+
550+
/**
551+
* Notifies node event listeners registered with this graph that {@code node} has been created
552+
* as part of decoding a graph and its fields have now been initialized.
553+
*/
554+
public void afterDecodingFields(Node node) {
555+
if (nodeEventListener != null) {
556+
nodeEventListener.event(NodeEvent.AFTER_DECODING_FIELDS, node);
557+
}
558+
}
559+
540560
/**
541561
* The type of events sent to a {@link NodeEventListener}.
542562
*/
@@ -559,7 +579,22 @@ public enum NodeEvent {
559579
/**
560580
* A node was removed from the graph.
561581
*/
562-
NODE_REMOVED
582+
NODE_REMOVED,
583+
584+
/**
585+
* Graph decoding (partial evaluation) may create nodes adding them to the graph in a "stub"
586+
* form before filling any node fields. We want to observe these events as well. This event
587+
* is triggered before a "stub" node's fields are decoded and initialized.
588+
*/
589+
BEFORE_DECODING_FIELDS,
590+
591+
/**
592+
* Graph decoding (partial evaluation) may create nodes adding them to the graph in a "stub"
593+
* form before filling any node fields. We want to observe these events as well. This event
594+
* is triggered after a "stub" node's fields are decoded and populated i.e. when the node is
595+
* no longer a stub.
596+
*/
597+
AFTER_DECODING_FIELDS,
563598
}
564599

565600
/**
@@ -590,6 +625,13 @@ final void event(NodeEvent e, Node node) {
590625
case NODE_REMOVED:
591626
nodeRemoved(node);
592627
break;
628+
case BEFORE_DECODING_FIELDS:
629+
beforeDecodingFields(node);
630+
break;
631+
632+
case AFTER_DECODING_FIELDS:
633+
afterDecodingFields(node);
634+
break;
593635
}
594636
changed(e, node);
595637
}
@@ -611,6 +653,22 @@ public void changed(NodeEvent e, Node node) {
611653
public void inputChanged(Node node) {
612654
}
613655

656+
/**
657+
* Notifies this listener that the decoding of fields for this node is about to commence.
658+
*
659+
* @param node a node whose fields are about to be decoded.
660+
*/
661+
public void beforeDecodingFields(Node node) {
662+
}
663+
664+
/**
665+
* Notifies this listener that the decoding of fields for this node has finished.
666+
*
667+
* @param node a node who has had fields decoded.
668+
*/
669+
public void afterDecodingFields(Node node) {
670+
}
671+
614672
/**
615673
* Notifies this listener of a node becoming unused.
616674
*

compiler/src/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/Node.java

+23-1
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@
4848
import org.graalvm.compiler.core.common.type.Stamp;
4949
import org.graalvm.compiler.debug.DebugCloseable;
5050
import org.graalvm.compiler.debug.DebugContext;
51+
import org.graalvm.compiler.debug.GraalError;
5152
import org.graalvm.compiler.graph.Graph.NodeEventListener;
5253
import org.graalvm.compiler.graph.iterators.NodeIterable;
5354
import org.graalvm.compiler.graph.iterators.NodePredicate;
@@ -1420,7 +1421,28 @@ public final void pushInputs(NodeStack stack) {
14201421
getNodeClass().pushInputs(this, stack);
14211422
}
14221423

1423-
public NodeSize estimatedNodeSize() {
1424+
public final NodeSize estimatedNodeSize() {
1425+
try {
1426+
return dynamicNodeSizeEstimate();
1427+
} catch (Exception e) {
1428+
throw GraalError.shouldNotReachHere(e, "Exception during node cost estimation");
1429+
}
1430+
}
1431+
1432+
/**
1433+
* Node subclasses should override this method if they need to specify a dynamically calculated
1434+
* {@link NodeSize} value. If the node size is static please use {@link NodeInfo#size()}.
1435+
*
1436+
* NOTE: When overriding this method, make sure that *all* field reads are null checked (even if
1437+
* Java semantics seemingly make the value of the field non-null). This is necessary because
1438+
* node size estimates are needed even during graph decoding which, for some nodes, first
1439+
* reflectively creates a stub and then later, reflectively, populates its fields. This method
1440+
* could be invoked between these two points. For this reason, when overriding this method
1441+
* assume that all fields can and will be null.
1442+
*
1443+
* @return The estimated node size for this node.
1444+
*/
1445+
protected NodeSize dynamicNodeSizeEstimate() {
14241446
return nodeClass.size();
14251447
}
14261448

compiler/src/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/NodeMap.java

+9-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2011, 2019, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2011, 2022, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -210,6 +210,14 @@ public void remove() {
210210
assert NodeMap.this.values[current] != null;
211211
NodeMap.this.values[current] = null;
212212
}
213+
214+
@SuppressWarnings("unchecked")
215+
@Override
216+
public T setValue(T newValue) {
217+
T oldValue = (T) NodeMap.this.values[current];
218+
NodeMap.this.values[current] = newValue;
219+
return oldValue;
220+
}
213221
};
214222
}
215223

compiler/src/org.graalvm.compiler.hotspot.management.libgraal/src/org/graalvm/compiler/hotspot/management/libgraal/LibGraalHotSpotGraalManagement.java

+6-1
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
import org.graalvm.compiler.options.Option;
4040
import org.graalvm.compiler.options.OptionKey;
4141
import org.graalvm.compiler.options.OptionType;
42+
import org.graalvm.word.LocationIdentity;
4243
import org.graalvm.word.Pointer;
4344

4445
/**
@@ -59,7 +60,7 @@ static class Options {
5960
*/
6061
@Option(help = "Milliseconds to delay initialization of the libgraal JMX interface. " +
6162
"Specify a negative value to disable the interface altogether.", type = OptionType.Expert)//
62-
static final OptionKey<Integer> LibGraalManagementDelay = new OptionKey<>(1000);
63+
static final OptionKey<Integer> LibGraalManagementDelay = new OptionKey<>(-1);
6364
}
6465

6566
/**
@@ -77,6 +78,10 @@ public void initialize(HotSpotGraalRuntime runtime, GraalHotSpotVMConfig config)
7778
if (delay < 0) {
7879
return;
7980
}
81+
Pointer warningShown = MBeanProxy.getOptionWarningStatePointer();
82+
if (warningShown.compareAndSwapInt(0, 0, 1, LocationIdentity.ANY_LOCATION) == 0) {
83+
TTY.printf("The %s option is deprecated and will be removed in the next GraalVM version.%n", Options.LibGraalManagementDelay.getName());
84+
}
8085
Pointer defineClassesStatePointer = getDefineClassesStatePointer();
8186
long defineClassesState = defineClassesStatePointer.readLong(0);
8287
if (delay == 0 || defineClassesState == HS_CLASSES_DEFINED) {

compiler/src/org.graalvm.compiler.hotspot.management.libgraal/src/org/graalvm/compiler/hotspot/management/libgraal/MBeanProxy.java

+9
Original file line numberDiff line numberDiff line change
@@ -437,6 +437,15 @@ static Pointer getDefineClassesStatePointer() {
437437
return WordFactory.nullPointer();
438438
}
439439

440+
/**
441+
* Gets a pointer to a global word used as a flag to show a deprecated option warning only once
442+
* even in case of multiple compiler isolates per process.
443+
*/
444+
static Pointer getOptionWarningStatePointer() {
445+
// Substituted by Target_org_graalvm_compiler_hotspot_management_libgraal_MBeanProxy
446+
return WordFactory.nullPointer();
447+
}
448+
440449
/**
441450
* Lifecycle state.
442451
*/

0 commit comments

Comments
 (0)