Skip to content

Commit 0d6d37f

Browse files
committed
Merge
2 parents a9a3284 + a46b5ac commit 0d6d37f

File tree

652 files changed

+25559
-6560
lines changed

Some content is hidden

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

652 files changed

+25559
-6560
lines changed

make/jdk/src/classes/build/tools/taglet/SealedGraph.java

Lines changed: 53 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2017, 2022, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2022, 2023, 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
@@ -145,11 +145,15 @@ String graph(TypeElement rootClass, Set<String> exports) {
145145

146146
static void traverse(State state, TypeElement node, Set<String> exports) {
147147
state.addNode(node);
148-
for (TypeElement subNode : permittedSubclasses(node, exports)) {
149-
if (isInPublicApi(node, exports) && isInPublicApi(subNode, exports)) {
150-
state.addEdge(node, subNode);
148+
if (!(node.getModifiers().contains(Modifier.SEALED) || node.getModifiers().contains(Modifier.FINAL))) {
149+
state.addNonSealedEdge(node);
150+
} else {
151+
for (TypeElement subNode : permittedSubclasses(node, exports)) {
152+
if (isInPublicApi(node, exports) && isInPublicApi(subNode, exports)) {
153+
state.addEdge(node, subNode);
154+
}
155+
traverse(state, subNode, exports);
151156
}
152-
traverse(state, subNode, exports);
153157
}
154158
}
155159

@@ -158,13 +162,31 @@ private final class State {
158162
private static final String LABEL = "label";
159163
private static final String TOOLTIP = "tooltip";
160164
private static final String LINK = "href";
161-
private static final String STYLE = "style";
162165

163166
private final TypeElement rootNode;
164167

165168
private final StringBuilder builder;
166169

167-
private final Map<String, Map<String, String>> nodeStyleMap;
170+
private final Map<String, Map<String, StyleItem>> nodeStyleMap;
171+
172+
private int nonSealedHierarchyCount = 0;
173+
174+
private sealed interface StyleItem {
175+
String valueString();
176+
177+
record PlainString(String text) implements StyleItem {
178+
@Override
179+
public String valueString() {
180+
return "\"" + text + "\"";
181+
}
182+
}
183+
record HtmlString(String text) implements StyleItem {
184+
@Override
185+
public String valueString() {
186+
return "<" + text + ">";
187+
}
188+
}
189+
}
168190

169191
public State(TypeElement rootNode) {
170192
this.rootNode = rootNode;
@@ -188,13 +210,9 @@ public State(TypeElement rootNode) {
188210

189211
public void addNode(TypeElement node) {
190212
var styles = nodeStyleMap.computeIfAbsent(id(node), n -> new LinkedHashMap<>());
191-
styles.put(LABEL, node.getSimpleName().toString());
192-
styles.put(TOOLTIP, node.getQualifiedName().toString());
193-
styles.put(LINK, relativeLink(node));
194-
if (!(node.getModifiers().contains(Modifier.SEALED) || node.getModifiers().contains(Modifier.FINAL))) {
195-
// This indicates that the hierarchy is not closed
196-
styles.put(STYLE, "dashed");
197-
}
213+
styles.put(LABEL, new StyleItem.PlainString(node.getSimpleName().toString()));
214+
styles.put(TOOLTIP, new StyleItem.PlainString(node.getQualifiedName().toString()));
215+
styles.put(LINK, new StyleItem.PlainString(relativeLink(node)));
198216
}
199217

200218
// A permitted class must be in the same package or in the same module.
@@ -223,12 +241,32 @@ public void addEdge(TypeElement node, TypeElement subNode) {
223241
.append(lineSeparator());
224242
}
225243

244+
public void addNonSealedEdge(TypeElement node) {
245+
// prepare open node
246+
var openNodeId = "open node #" + nonSealedHierarchyCount++;
247+
var styles = nodeStyleMap.computeIfAbsent(openNodeId, n -> new LinkedHashMap<>());
248+
styles.put(LABEL, new StyleItem.HtmlString("<I>&lt;any&gt;</I>"));
249+
styles.put(TOOLTIP, new StyleItem.PlainString("Non-sealed Hierarchy"));
250+
251+
// add link to parent node
252+
builder.append(" ")
253+
.append('"')
254+
.append(openNodeId)
255+
.append('"')
256+
.append(" -> ")
257+
.append(quotedId(node))
258+
.append(" ")
259+
.append("[style=\"dashed\"]")
260+
.append(";")
261+
.append(lineSeparator());
262+
}
263+
226264
public String render() {
227265
nodeStyleMap.forEach((nodeName, styles) -> {
228266
builder.append(" ")
229267
.append('"').append(nodeName).append("\" ")
230268
.append(styles.entrySet().stream()
231-
.map(e -> e.getKey() + "=\"" + e.getValue() + "\"")
269+
.map(e -> e.getKey() + "=" + e.getValue().valueString())
232270
.collect(joining(" ", "[", "]")))
233271
.append(lineSeparator());
234272
});

make/modules/jdk.jfr/Java.gmk

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved.
2+
# Copyright (c) 2020, 2023, 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
@@ -24,5 +24,5 @@
2424
#
2525

2626
DISABLED_WARNINGS_java += exports
27-
COPY := .xsd .xml .dtd
27+
COPY := .xsd .xml .dtd .ini
2828
JAVAC_FLAGS := -XDstringConcat=inline

make/test/JtregNativeHotspot.gmk

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (c) 2015, 2022, Oracle and/or its affiliates. All rights reserved.
2+
# Copyright (c) 2015, 2023, 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
@@ -99,11 +99,6 @@ NSK_GC_LOCK_JVMTI_INCLUDES := \
9999
-I$(VM_TESTBASE_DIR)/nsk/share/native \
100100
-I$(VM_TESTBASE_DIR)/nsk/share/jni
101101

102-
NSK_GC_LOCK_MALLOC_INCLUDES := \
103-
-I$(VM_TESTBASE_DIR)/nsk/share/gc/lock/malloc \
104-
-I$(VM_TESTBASE_DIR)/nsk/share/native \
105-
-I$(VM_TESTBASE_DIR)/nsk/share/jni
106-
107102
NSK_GC_LOCK_JNI_INCLUDES := \
108103
-I$(VM_TESTBASE_DIR)/nsk/share/gc/lock/jni \
109104
-I$(VM_TESTBASE_DIR)/nsk/share/native \
@@ -179,8 +174,6 @@ BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libnativeAndMH := $(MLVM_STRESS_INCLUDES)
179174

180175
BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libJVMTIAllocLocker := $(NSK_GC_LOCK_JVMTI_INCLUDES)
181176

182-
BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libMallocLocker := $(NSK_GC_LOCK_MALLOC_INCLUDES)
183-
184177
BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libBooleanArrayCriticalLocker := $(NSK_GC_LOCK_JNI_INCLUDES)
185178
BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libByteArrayCriticalLocker := $(NSK_GC_LOCK_JNI_INCLUDES)
186179
BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libCharArrayCriticalLocker := $(NSK_GC_LOCK_JNI_INCLUDES)
@@ -874,7 +867,7 @@ BUILD_HOTSPOT_JTREG_EXECUTABLES_LIBS_exesigtest := -ljvm
874867

875868
ifeq ($(call isTargetOs, windows), true)
876869
BUILD_HOTSPOT_JTREG_EXECUTABLES_CFLAGS_exeFPRegs := -MT
877-
BUILD_HOTSPOT_JTREG_EXCLUDE += exesigtest.c libterminatedThread.c libTestJNI.c libCompleteExit.c libTestPsig.c libnativeStack.c
870+
BUILD_HOTSPOT_JTREG_EXCLUDE += exesigtest.c libterminatedThread.c libTestJNI.c libCompleteExit.c libTestPsig.c libnativeStack.c exeGetCreatedJavaVMs.c
878871
BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libatExit := jvm.lib
879872
BUILD_HOTSPOT_JTREG_EXECUTABLES_LIBS_exedaemonDestroy := jvm.lib
880873
else
@@ -1516,6 +1509,7 @@ else
15161509
BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libatExit += -ljvm
15171510
BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libCompleteExit += -lpthread
15181511
BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libnativeStack += -lpthread
1512+
BUILD_HOTSPOT_JTREG_EXECUTABLES_LIBS_exeGetCreatedJavaVMs := -ljvm -lpthread
15191513
endif
15201514

15211515
ifeq ($(ASAN_ENABLED), true)

src/hotspot/cpu/aarch64/aarch64.ad

Lines changed: 4 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -664,11 +664,6 @@ reg_class method_reg(
664664
R12, R12_H
665665
);
666666

667-
// Class for heapbase register
668-
reg_class heapbase_reg(
669-
R27, R27_H
670-
);
671-
672667
// Class for thread register
673668
reg_class thread_reg(
674669
R28, R28_H
@@ -1244,15 +1239,15 @@ source %{
12441239
// zero, compressed klass pointers doesn't use r27 after JDK-8234794
12451240
if (UseCompressedOops && (CompressedOops::ptrs_base() != NULL)) {
12461241
_NO_SPECIAL_REG32_mask.Remove(OptoReg::as_OptoReg(r27->as_VMReg()));
1247-
_NO_SPECIAL_REG_mask.SUBTRACT(_HEAPBASE_REG_mask);
1248-
_NO_SPECIAL_PTR_REG_mask.SUBTRACT(_HEAPBASE_REG_mask);
1242+
_NO_SPECIAL_REG_mask.Remove(OptoReg::as_OptoReg(r27->as_VMReg()));
1243+
_NO_SPECIAL_PTR_REG_mask.Remove(OptoReg::as_OptoReg(r27->as_VMReg()));
12491244
}
12501245

12511246
// r29 is not allocatable when PreserveFramePointer is on
12521247
if (PreserveFramePointer) {
12531248
_NO_SPECIAL_REG32_mask.Remove(OptoReg::as_OptoReg(r29->as_VMReg()));
1254-
_NO_SPECIAL_REG_mask.SUBTRACT(_FP_REG_mask);
1255-
_NO_SPECIAL_PTR_REG_mask.SUBTRACT(_FP_REG_mask);
1249+
_NO_SPECIAL_REG_mask.Remove(OptoReg::as_OptoReg(r29->as_VMReg()));
1250+
_NO_SPECIAL_PTR_REG_mask.Remove(OptoReg::as_OptoReg(r29->as_VMReg()));
12561251
}
12571252
}
12581253

@@ -5320,17 +5315,6 @@ operand iRegNNoSp()
53205315
interface(REG_INTER);
53215316
%}
53225317

5323-
// heap base register -- used for encoding immN0
5324-
5325-
operand iRegIHeapbase()
5326-
%{
5327-
constraint(ALLOC_IN_RC(heapbase_reg));
5328-
match(RegI);
5329-
op_cost(0);
5330-
format %{ %}
5331-
interface(REG_INTER);
5332-
%}
5333-
53345318
// Float Register
53355319
// Float register operands
53365320
operand vRegF()
@@ -15034,42 +15018,6 @@ instruct convL2I_reg(iRegINoSp dst, iRegL src) %{
1503415018
ins_pipe(ialu_reg);
1503515019
%}
1503615020

15037-
instruct convI2B(iRegINoSp dst, iRegIorL2I src, rFlagsReg cr)
15038-
%{
15039-
match(Set dst (Conv2B src));
15040-
effect(KILL cr);
15041-
15042-
format %{
15043-
"cmpw $src, zr\n\t"
15044-
"cset $dst, ne"
15045-
%}
15046-
15047-
ins_encode %{
15048-
__ cmpw(as_Register($src$$reg), zr);
15049-
__ cset(as_Register($dst$$reg), Assembler::NE);
15050-
%}
15051-
15052-
ins_pipe(ialu_reg);
15053-
%}
15054-
15055-
instruct convP2B(iRegINoSp dst, iRegP src, rFlagsReg cr)
15056-
%{
15057-
match(Set dst (Conv2B src));
15058-
effect(KILL cr);
15059-
15060-
format %{
15061-
"cmp $src, zr\n\t"
15062-
"cset $dst, ne"
15063-
%}
15064-
15065-
ins_encode %{
15066-
__ cmp(as_Register($src$$reg), zr);
15067-
__ cset(as_Register($dst$$reg), Assembler::NE);
15068-
%}
15069-
15070-
ins_pipe(ialu_reg);
15071-
%}
15072-
1507315021
instruct convD2F_reg(vRegF dst, vRegD src) %{
1507415022
match(Set dst (ConvD2F src));
1507515023

src/hotspot/cpu/aarch64/aarch64_vector.ad

Lines changed: 24 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -5512,6 +5512,30 @@ instruct vmask_truecount_sve(iRegINoSp dst, pReg src) %{
55125512
ins_pipe(pipe_slow);
55135513
%}
55145514

5515+
// Combined rule for VectorMaskTrueCount (VectorStoreMask) when the vector element type is not T_BYTE.
5516+
5517+
instruct vstoremask_truecount_neon(iRegINoSp dst, vReg src, immI_gt_1 size, vReg vtmp) %{
5518+
match(Set dst (VectorMaskTrueCount (VectorStoreMask src size)));
5519+
effect(TEMP vtmp);
5520+
format %{ "vstoremask_truecount_neon $dst, $src\t# KILL $vtmp" %}
5521+
ins_encode %{
5522+
// Input "src" is a vector mask represented as lanes with
5523+
// 0/-1 as element values.
5524+
uint esize = (uint)$size$$constant;
5525+
if (esize == 8) {
5526+
__ addpd($vtmp$$FloatRegister, $src$$FloatRegister);
5527+
} else {
5528+
uint length_in_bytes = Matcher::vector_length_in_bytes(this, $src);
5529+
Assembler::SIMD_Arrangement arrangement = Assembler::esize2arrangement(esize,
5530+
/* isQ */ length_in_bytes == 16);
5531+
__ addv($vtmp$$FloatRegister, arrangement, $src$$FloatRegister);
5532+
}
5533+
__ smov($dst$$Register, $vtmp$$FloatRegister, __ B, 0);
5534+
__ neg($dst$$Register, $dst$$Register);
5535+
%}
5536+
ins_pipe(pipe_slow);
5537+
%}
5538+
55155539
// first true
55165540

55175541
instruct vmask_firsttrue_lt8e(iRegINoSp dst, vReg src, rFlagsReg cr) %{
@@ -5992,49 +6016,6 @@ instruct vblend_sve(vReg dst, vReg src1, vReg src2, pReg pg) %{
59926016
ins_pipe(pipe_slow);
59936017
%}
59946018

5995-
// ------------------------- Vector conditional move --------------------------
5996-
5997-
instruct vcmove_neon(vReg dst, vReg src1, vReg src2, immI cond, cmpOp copnd) %{
5998-
predicate(UseSVE == 0 ||
5999-
(VM_Version::use_neon_for_vector(Matcher::vector_length_in_bytes(n)) &&
6000-
n->in(1)->in(2)->get_int() != BoolTest::ne));
6001-
match(Set dst (CMoveVF (Binary copnd cond) (Binary src1 src2)));
6002-
match(Set dst (CMoveVD (Binary copnd cond) (Binary src1 src2)));
6003-
effect(TEMP_DEF dst);
6004-
format %{ "vcmove_neon.$copnd $dst, $src1, $src2\t# vector conditional move fp" %}
6005-
ins_encode %{
6006-
Assembler::Condition condition = to_assembler_cond((BoolTest::mask)$cond$$constant);
6007-
BasicType bt = Matcher::vector_element_basic_type(this);
6008-
uint length_in_bytes = Matcher::vector_length_in_bytes(this);
6009-
assert(length_in_bytes == 8 || length_in_bytes == 16, "must be");
6010-
__ neon_compare($dst$$FloatRegister, bt, $src1$$FloatRegister,
6011-
$src2$$FloatRegister, condition, /* isQ */ length_in_bytes == 16);
6012-
__ bsl($dst$$FloatRegister, length_in_bytes == 16 ? __ T16B : __ T8B,
6013-
$src2$$FloatRegister, $src1$$FloatRegister);
6014-
%}
6015-
ins_pipe(pipe_slow);
6016-
%}
6017-
6018-
instruct vcmove_sve(vReg dst, vReg src1, vReg src2, immI cond, cmpOp copnd, pRegGov pgtmp) %{
6019-
predicate(!VM_Version::use_neon_for_vector(Matcher::vector_length_in_bytes(n)) ||
6020-
(UseSVE > 0 && n->in(1)->in(2)->get_int() == BoolTest::ne));
6021-
match(Set dst (CMoveVF (Binary copnd cond) (Binary src1 src2)));
6022-
match(Set dst (CMoveVD (Binary copnd cond) (Binary src1 src2)));
6023-
effect(TEMP pgtmp);
6024-
format %{ "vcmove_sve.$copnd $dst, $src1, $src2\t# vector conditional move fp. KILL $pgtmp" %}
6025-
ins_encode %{
6026-
assert(UseSVE > 0, "must be sve");
6027-
Assembler::Condition condition = to_assembler_cond((BoolTest::mask)$cond$$constant);
6028-
BasicType bt = Matcher::vector_element_basic_type(this);
6029-
uint length_in_bytes = Matcher::vector_length_in_bytes(this);
6030-
__ sve_compare($pgtmp$$PRegister, bt, ptrue, $src1$$FloatRegister,
6031-
$src2$$FloatRegister, condition);
6032-
__ sve_sel($dst$$FloatRegister, __ elemType_to_regVariant(bt),
6033-
$pgtmp$$PRegister, $src2$$FloatRegister, $src1$$FloatRegister);
6034-
%}
6035-
ins_pipe(pipe_slow);
6036-
%}
6037-
60386019
// ------------------------------ Vector round ---------------------------------
60396020

60406021
// vector Math.round

0 commit comments

Comments
 (0)