From 7d2ef9d984f96cd260dc233c4acf58669615227f Mon Sep 17 00:00:00 2001
From: Jonathan Gibbons
Date: Fri, 21 Jan 2022 23:18:37 +0000
Subject: [PATCH 001/400] 8279179: Update nroff pages in JDK 18 before RC
Reviewed-by: iris, mchung
---
src/java.base/share/man/java.1 | 9 +++++++++
src/java.base/share/man/keytool.1 | 12 +++++++++++-
src/jdk.jartool/share/man/jarsigner.1 | 15 ++++++++++++++-
3 files changed, 34 insertions(+), 2 deletions(-)
diff --git a/src/java.base/share/man/java.1 b/src/java.base/share/man/java.1
index 3e17a506fa9..246d0080577 100644
--- a/src/java.base/share/man/java.1
+++ b/src/java.base/share/man/java.1
@@ -512,6 +512,15 @@ of the release.
.RS
.RE
.TP
+.B \f[CB]\-\-finalization=\f[R]\f[I]value\f[R]
+Controls whether the JVM performs finalization of objects.
+Valid values are "enabled" and "disabled".
+Finalization is enabled by default, so the value "enabled" does nothing.
+The value "disabled" disables finalization, so that no finalizers are
+invoked.
+.RS
+.RE
+.TP
.B \f[CB]\-\-module\-path\f[R] \f[I]modulepath\f[R]... or \f[CB]\-p\f[R] \f[I]modulepath\f[R]
A semicolon (\f[CB];\f[R]) separated list of directories in which each
directory is a directory of modules.
diff --git a/src/java.base/share/man/keytool.1 b/src/java.base/share/man/keytool.1
index 8250cf555b9..5b70729917c 100644
--- a/src/java.base/share/man/keytool.1
+++ b/src/java.base/share/man/keytool.1
@@ -1,4 +1,4 @@
-.\" Copyright (c) 1998, 2020, Oracle and/or its affiliates. All rights reserved.
+.\" Copyright (c) 1998, 2022, Oracle and/or its affiliates. All rights reserved.
.\" DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
.\"
.\" This code is free software; you can redistribute it and/or modify it
@@ -70,6 +70,8 @@ keystore
\f[CB]\-storepasswd\f[R]: Changes the store password of a keystore
.IP \[bu] 2
\f[CB]\-showinfo\f[R]: Displays security\-related information
+.IP \[bu] 2
+\f[CB]\-version\f[R]: Prints the program version
.PP
See \f[B]Commands and Options\f[R] for a description of these commands
with their options.
@@ -219,6 +221,10 @@ they perform.
\f[B]Commands for Displaying Security\-related Information\f[R]:
.IP \[bu] 2
\f[CB]\-showinfo\f[R]
+.PP
+\f[B]Commands for Displaying Program Version\f[R]:
+.IP \[bu] 2
+\f[CB]\-version\f[R]
.SH COMMANDS FOR CREATING OR ADDING DATA TO THE KEYSTORE
.TP
.B \f[CB]\-gencert\f[R]
@@ -1314,6 +1320,10 @@ information.
The \f[CB]\-tls\f[R] option displays TLS configurations, such as the list
of enabled protocols and cipher suites.
.RE
+.SH COMMANDS FOR DISPLAYING PROGRAM VERSION
+.PP
+You can use \f[CB]\-version\f[R] to print the program version of
+\f[CB]keytool\f[R].
.SH COMMANDS FOR DISPLAYING HELP INFORMATION
.PP
You can use \f[CB]\-\-help\f[R] to display a list of \f[CB]keytool\f[R]
diff --git a/src/jdk.jartool/share/man/jarsigner.1 b/src/jdk.jartool/share/man/jarsigner.1
index a29dc0e714e..290d8de5fcf 100644
--- a/src/jdk.jartool/share/man/jarsigner.1
+++ b/src/jdk.jartool/share/man/jarsigner.1
@@ -1,4 +1,4 @@
-.\" Copyright (c) 1998, 2021, Oracle and/or its affiliates. All rights reserved.
+.\" Copyright (c) 1998, 2022, Oracle and/or its affiliates. All rights reserved.
.\" DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
.\"
.\" This code is free software; you can redistribute it and/or modify it
@@ -33,6 +33,8 @@ jarsigner \- sign and verify Java Archive (JAR) files
.PP
\f[CB]jarsigner\f[R] \f[CB]\-verify\f[R] [\f[I]options\f[R]]
\f[I]jar\-file\f[R] [\f[I]alias\f[R] ...]
+.PP
+\f[CB]jarsigner\f[R] \f[CB]\-version\f[R]
.TP
.B \f[I]options\f[R]
The command\-line options.
@@ -69,6 +71,12 @@ The aliases are defined in the keystore specified by \f[CB]\-keystore\f[R]
or the default keystore.
.RS
.RE
+.TP
+.B \f[CB]\-version\f[R]
+The \f[CB]\-version\f[R] option prints the program version of
+\f[CB]jarsigner\f[R].
+.RS
+.RE
.SH DESCRIPTION
.PP
The \f[CB]jarsigner\f[R] tool has two purposes:
@@ -1079,6 +1087,11 @@ The property keys supported are "jarsigner.all" for all actions,
name(s) cannot be set in this file.
.RS
.RE
+.TP
+.B \f[CB]\-version\f[R]
+Prints the program version.
+.RS
+.RE
.SH DEPRECATED OPTIONS
.PP
The following \f[CB]jarsigner\f[R] options are deprecated as of JDK 9 and
--
GitLab
From ead9feccae75ab0491ce86a707f5056d88ac899a Mon Sep 17 00:00:00 2001
From: Julia Boes
Date: Mon, 24 Jan 2022 10:03:40 +0000
Subject: [PATCH 002/400] 8280441: Missing "classpath exception" in several
files from jdk.httpserver
Reviewed-by: alanb, dfuchs
---
.../classes/com/sun/net/httpserver/SimpleFileServer.java | 6 ++++--
.../sun/net/httpserver/simpleserver/FileServerHandler.java | 6 ++++--
.../classes/sun/net/httpserver/simpleserver/JWebServer.java | 6 ++++--
.../share/classes/sun/net/httpserver/simpleserver/Main.java | 6 ++++--
.../sun/net/httpserver/simpleserver/OutputFilter.java | 6 ++++--
.../net/httpserver/simpleserver/ResourceBundleHelper.java | 6 ++++--
.../net/httpserver/simpleserver/SimpleFileServerImpl.java | 6 ++++--
7 files changed, 28 insertions(+), 14 deletions(-)
diff --git a/src/jdk.httpserver/share/classes/com/sun/net/httpserver/SimpleFileServer.java b/src/jdk.httpserver/share/classes/com/sun/net/httpserver/SimpleFileServer.java
index a08f48567c9..2952a40b142 100644
--- a/src/jdk.httpserver/share/classes/com/sun/net/httpserver/SimpleFileServer.java
+++ b/src/jdk.httpserver/share/classes/com/sun/net/httpserver/SimpleFileServer.java
@@ -1,10 +1,12 @@
/*
- * Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2021, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
diff --git a/src/jdk.httpserver/share/classes/sun/net/httpserver/simpleserver/FileServerHandler.java b/src/jdk.httpserver/share/classes/sun/net/httpserver/simpleserver/FileServerHandler.java
index b1b28446b4d..e0e9736cad4 100644
--- a/src/jdk.httpserver/share/classes/sun/net/httpserver/simpleserver/FileServerHandler.java
+++ b/src/jdk.httpserver/share/classes/sun/net/httpserver/simpleserver/FileServerHandler.java
@@ -1,10 +1,12 @@
/*
- * Copyright (c) 2005, 2021, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
diff --git a/src/jdk.httpserver/share/classes/sun/net/httpserver/simpleserver/JWebServer.java b/src/jdk.httpserver/share/classes/sun/net/httpserver/simpleserver/JWebServer.java
index 59f77abbae8..015d1b95244 100644
--- a/src/jdk.httpserver/share/classes/sun/net/httpserver/simpleserver/JWebServer.java
+++ b/src/jdk.httpserver/share/classes/sun/net/httpserver/simpleserver/JWebServer.java
@@ -1,10 +1,12 @@
/*
- * Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2021, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
diff --git a/src/jdk.httpserver/share/classes/sun/net/httpserver/simpleserver/Main.java b/src/jdk.httpserver/share/classes/sun/net/httpserver/simpleserver/Main.java
index 83441cdbc7f..30535c9296d 100644
--- a/src/jdk.httpserver/share/classes/sun/net/httpserver/simpleserver/Main.java
+++ b/src/jdk.httpserver/share/classes/sun/net/httpserver/simpleserver/Main.java
@@ -1,10 +1,12 @@
/*
- * Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2021, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
diff --git a/src/jdk.httpserver/share/classes/sun/net/httpserver/simpleserver/OutputFilter.java b/src/jdk.httpserver/share/classes/sun/net/httpserver/simpleserver/OutputFilter.java
index bdbcf2361ee..0a4d901303e 100644
--- a/src/jdk.httpserver/share/classes/sun/net/httpserver/simpleserver/OutputFilter.java
+++ b/src/jdk.httpserver/share/classes/sun/net/httpserver/simpleserver/OutputFilter.java
@@ -1,10 +1,12 @@
/*
- * Copyright (c) 2005, 2021, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
diff --git a/src/jdk.httpserver/share/classes/sun/net/httpserver/simpleserver/ResourceBundleHelper.java b/src/jdk.httpserver/share/classes/sun/net/httpserver/simpleserver/ResourceBundleHelper.java
index 99349fe3474..690722bddb9 100644
--- a/src/jdk.httpserver/share/classes/sun/net/httpserver/simpleserver/ResourceBundleHelper.java
+++ b/src/jdk.httpserver/share/classes/sun/net/httpserver/simpleserver/ResourceBundleHelper.java
@@ -1,10 +1,12 @@
/*
- * Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2021, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
diff --git a/src/jdk.httpserver/share/classes/sun/net/httpserver/simpleserver/SimpleFileServerImpl.java b/src/jdk.httpserver/share/classes/sun/net/httpserver/simpleserver/SimpleFileServerImpl.java
index 852aae5a838..7e97d203b6c 100644
--- a/src/jdk.httpserver/share/classes/sun/net/httpserver/simpleserver/SimpleFileServerImpl.java
+++ b/src/jdk.httpserver/share/classes/sun/net/httpserver/simpleserver/SimpleFileServerImpl.java
@@ -1,10 +1,12 @@
/*
- * Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2021, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--
GitLab
From 2b13341500cb9474f5fd6375b97d102ffb635b13 Mon Sep 17 00:00:00 2001
From: Angelos Bimpoudis
Date: Mon, 24 Jan 2022 15:09:17 +0000
Subject: [PATCH 003/400] 8036019: Insufficient alternatives listed in some
errors produced by the parser
Reviewed-by: vromero
---
.../sun/tools/javac/parser/JavacParser.java | 6 +--
.../tools/javac/resources/compiler.properties | 3 ++
test/langtools/tools/javac/T8036019.java | 46 +++++++++++++++++++
test/langtools/tools/javac/T8036019.out | 10 ++++
.../typeAnnotations/6967002/T6967002.out | 2 +-
.../AnnotationMissingElementValue.java | 28 +++++++++++
.../tools/javac/enum/EnumMembersOrder.out | 2 +-
.../tools/javac/parser/7157165/T7157165.out | 2 +-
.../parser/SingleCommaAnnotationValueFail.out | 2 +-
9 files changed, 94 insertions(+), 7 deletions(-)
create mode 100644 test/langtools/tools/javac/T8036019.java
create mode 100644 test/langtools/tools/javac/T8036019.out
create mode 100644 test/langtools/tools/javac/diags/examples/AnnotationMissingElementValue.java
diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/parser/JavacParser.java b/src/jdk.compiler/share/classes/com/sun/tools/javac/parser/JavacParser.java
index 4b508c4bdf0..b14673532bf 100644
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/parser/JavacParser.java
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/parser/JavacParser.java
@@ -2035,7 +2035,7 @@ public class JavacParser implements Parser {
args.append(parseExpression());
}
}
- accept(RPAREN);
+ accept(RPAREN, tk -> Errors.Expected2(RPAREN, COMMA));
} else {
syntaxError(token.pos, Errors.Expected(LPAREN));
}
@@ -2123,7 +2123,7 @@ public class JavacParser implements Parser {
nextToken();
break;
default:
- args.append(syntaxError(token.pos, Errors.Expected(GT)));
+ args.append(syntaxError(token.pos, Errors.Expected2(GT, COMMA)));
break;
}
return args.toList();
@@ -3379,7 +3379,7 @@ public class JavacParser implements Parser {
buf.append(annotationValue());
}
}
- accept(RBRACE);
+ accept(RBRACE, tk -> Errors.AnnotationMissingElementValue);
return toP(F.at(pos).NewArray(null, List.nil(), buf.toList()));
default:
selectExprMode();
diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/compiler.properties b/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/compiler.properties
index ae2f1f8c6fc..fddd3e935e1 100644
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/compiler.properties
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/compiler.properties
@@ -118,6 +118,9 @@ compiler.err.already.defined.static.single.import=\
compiler.err.already.defined.this.unit=\
{0} is already defined in this compilation unit
+compiler.err.annotation.missing.element.value=\
+ annotation is missing element value
+
# 0: type, 1: list of name
compiler.err.annotation.missing.default.value=\
annotation @{0} is missing a default value for the element ''{1}''
diff --git a/test/langtools/tools/javac/T8036019.java b/test/langtools/tools/javac/T8036019.java
new file mode 100644
index 00000000000..709b8abba46
--- /dev/null
+++ b/test/langtools/tools/javac/T8036019.java
@@ -0,0 +1,46 @@
+/*
+ * Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 8036019
+ * @summary Insufficient alternatives listed in some errors produced by the parser
+ * @compile/fail/ref=T8036019.out -XDrawDiagnostics T8036019.java
+ */
+
+
+public class T8036019 {
+ enum E {
+ E(String value) { }
+ }
+
+ interface A {}
+ interface B {}
+ public class Foo {
+ Foo extends A|B> foo1 = null;
+ }
+
+ @SuppressWarnings({,0})
+ public class AV {
+ }
+}
diff --git a/test/langtools/tools/javac/T8036019.out b/test/langtools/tools/javac/T8036019.out
new file mode 100644
index 00000000000..2c874175793
--- /dev/null
+++ b/test/langtools/tools/javac/T8036019.out
@@ -0,0 +1,10 @@
+T8036019.java:34:17: compiler.err.expected2: ')', ','
+T8036019.java:34:23: compiler.err.expected3: ',', '}', ';'
+T8036019.java:34:25: compiler.err.enum.constant.expected
+T8036019.java:40:24: compiler.err.expected2: >, ','
+T8036019.java:40:26: compiler.err.expected: token.identifier
+T8036019.java:40:32: compiler.err.expected: token.identifier
+T8036019.java:43:25: compiler.err.annotation.missing.element.value
+T8036019.java:43:27: compiler.err.expected4: class, interface, enum, record
+T8036019.java:46:1: compiler.err.expected4: class, interface, enum, record
+9 errors
\ No newline at end of file
diff --git a/test/langtools/tools/javac/annotations/typeAnnotations/6967002/T6967002.out b/test/langtools/tools/javac/annotations/typeAnnotations/6967002/T6967002.out
index 86480c2bfa8..d9a3545d31d 100644
--- a/test/langtools/tools/javac/annotations/typeAnnotations/6967002/T6967002.out
+++ b/test/langtools/tools/javac/annotations/typeAnnotations/6967002/T6967002.out
@@ -1,2 +1,2 @@
-T6967002.java:10:22: compiler.err.expected: ')'
+T6967002.java:10:22: compiler.err.expected2: ')', ','
1 error
diff --git a/test/langtools/tools/javac/diags/examples/AnnotationMissingElementValue.java b/test/langtools/tools/javac/diags/examples/AnnotationMissingElementValue.java
new file mode 100644
index 00000000000..65f24aad316
--- /dev/null
+++ b/test/langtools/tools/javac/diags/examples/AnnotationMissingElementValue.java
@@ -0,0 +1,28 @@
+/*
+ * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+// key: compiler.err.annotation.missing.element.value
+
+@SuppressWarnings({,0})
+public class AV {
+}
diff --git a/test/langtools/tools/javac/enum/EnumMembersOrder.out b/test/langtools/tools/javac/enum/EnumMembersOrder.out
index b1e01860f34..94aff47aca8 100644
--- a/test/langtools/tools/javac/enum/EnumMembersOrder.out
+++ b/test/langtools/tools/javac/enum/EnumMembersOrder.out
@@ -1,4 +1,4 @@
-EnumMembersOrder.java:11:16: compiler.err.expected: ')'
+EnumMembersOrder.java:11:16: compiler.err.expected2: ')', ','
EnumMembersOrder.java:11:18: compiler.err.expected3: ',', '}', ';'
EnumMembersOrder.java:11:20: compiler.err.enum.constant.expected
3 errors
diff --git a/test/langtools/tools/javac/parser/7157165/T7157165.out b/test/langtools/tools/javac/parser/7157165/T7157165.out
index deb580df96c..7552381ba15 100644
--- a/test/langtools/tools/javac/parser/7157165/T7157165.out
+++ b/test/langtools/tools/javac/parser/7157165/T7157165.out
@@ -1,4 +1,4 @@
-T7157165.java:11:20: compiler.err.expected: >
+T7157165.java:11:20: compiler.err.expected2: >, ','
T7157165.java:11:22: compiler.err.expected: token.identifier
T7157165.java:11:28: compiler.err.expected: token.identifier
3 errors
diff --git a/test/langtools/tools/javac/parser/SingleCommaAnnotationValueFail.out b/test/langtools/tools/javac/parser/SingleCommaAnnotationValueFail.out
index 23d1082361b..05d27bc67df 100644
--- a/test/langtools/tools/javac/parser/SingleCommaAnnotationValueFail.out
+++ b/test/langtools/tools/javac/parser/SingleCommaAnnotationValueFail.out
@@ -1,3 +1,3 @@
-SingleCommaAnnotationValueFail.java:11:12: compiler.err.expected: '}'
+SingleCommaAnnotationValueFail.java:11:12: compiler.err.annotation.missing.element.value
SingleCommaAnnotationValueFail.java:11:14: compiler.err.expected4: class, interface, enum, record
2 errors
--
GitLab
From 4b329addf1aca4b5f67057b5c6852d283d0c8f49 Mon Sep 17 00:00:00 2001
From: Kim Barrett
Date: Mon, 24 Jan 2022 17:08:50 +0000
Subject: [PATCH 004/400] 8280496: Remove unused
G1PageBasedVirtualSpace::pretouch_internal
Reviewed-by: tschatzl, sjohanss, mli
---
src/hotspot/share/gc/g1/g1PageBasedVirtualSpace.cpp | 9 +--------
src/hotspot/share/gc/g1/g1PageBasedVirtualSpace.hpp | 5 +----
2 files changed, 2 insertions(+), 12 deletions(-)
diff --git a/src/hotspot/share/gc/g1/g1PageBasedVirtualSpace.cpp b/src/hotspot/share/gc/g1/g1PageBasedVirtualSpace.cpp
index 7a164e6461f..94f51c8fdd1 100644
--- a/src/hotspot/share/gc/g1/g1PageBasedVirtualSpace.cpp
+++ b/src/hotspot/share/gc/g1/g1PageBasedVirtualSpace.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, 2021, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -178,13 +178,6 @@ char* G1PageBasedVirtualSpace::bounded_end_addr(size_t end_page) const {
return MIN2(_high_boundary, page_start(end_page));
}
-void G1PageBasedVirtualSpace::pretouch_internal(size_t start_page, size_t end_page) {
- guarantee(start_page < end_page,
- "Given start page " SIZE_FORMAT " is larger or equal to end page " SIZE_FORMAT, start_page, end_page);
-
- os::pretouch_memory(page_start(start_page), bounded_end_addr(end_page), _page_size);
-}
-
bool G1PageBasedVirtualSpace::commit(size_t start_page, size_t size_in_pages) {
// We need to make sure to commit all pages covered by the given area.
guarantee(is_area_uncommitted(start_page, size_in_pages),
diff --git a/src/hotspot/share/gc/g1/g1PageBasedVirtualSpace.hpp b/src/hotspot/share/gc/g1/g1PageBasedVirtualSpace.hpp
index 8b68ad60e56..0b97656c883 100644
--- a/src/hotspot/share/gc/g1/g1PageBasedVirtualSpace.hpp
+++ b/src/hotspot/share/gc/g1/g1PageBasedVirtualSpace.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, 2019, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -87,9 +87,6 @@ class G1PageBasedVirtualSpace {
// Uncommit the given memory range.
void uncommit_internal(size_t start_page, size_t end_page);
- // Pretouch the given memory range.
- void pretouch_internal(size_t start_page, size_t end_page);
-
// Returns the index of the page which contains the given address.
size_t addr_to_page_index(char* addr) const;
--
GitLab
From 1c7769d35b3a2aa4afe3125239dbfa1da5cfdeee Mon Sep 17 00:00:00 2001
From: Kim Barrett
Date: Mon, 24 Jan 2022 17:23:14 +0000
Subject: [PATCH 005/400] 8280437: Move G1BufferNodeList to gc/shared
Reviewed-by: sjohanss, iwalulya, mli
---
src/hotspot/share/gc/g1/g1DirtyCardQueue.cpp | 10 +++++-----
src/hotspot/share/gc/g1/g1DirtyCardQueue.hpp | 8 ++++----
src/hotspot/share/gc/g1/g1RedirtyCardsQueue.cpp | 10 +++++-----
src/hotspot/share/gc/g1/g1RedirtyCardsQueue.hpp | 10 +++++-----
src/hotspot/share/gc/g1/g1RemSet.cpp | 5 +++--
.../bufferNodeList.cpp} | 12 ++++++------
.../bufferNodeList.hpp} | 15 +++++++--------
7 files changed, 35 insertions(+), 35 deletions(-)
rename src/hotspot/share/gc/{g1/g1BufferNodeList.cpp => shared/bufferNodeList.cpp} (80%)
rename src/hotspot/share/gc/{g1/g1BufferNodeList.hpp => shared/bufferNodeList.hpp} (79%)
diff --git a/src/hotspot/share/gc/g1/g1DirtyCardQueue.cpp b/src/hotspot/share/gc/g1/g1DirtyCardQueue.cpp
index 8f704fce350..4ef40d29f16 100644
--- a/src/hotspot/share/gc/g1/g1DirtyCardQueue.cpp
+++ b/src/hotspot/share/gc/g1/g1DirtyCardQueue.cpp
@@ -24,7 +24,6 @@
#include "precompiled.hpp"
#include "gc/g1/g1BarrierSet.inline.hpp"
-#include "gc/g1/g1BufferNodeList.hpp"
#include "gc/g1/g1CardTableEntryClosure.hpp"
#include "gc/g1/g1CollectedHeap.inline.hpp"
#include "gc/g1/g1ConcurrentRefineStats.hpp"
@@ -35,6 +34,7 @@
#include "gc/g1/g1RemSet.hpp"
#include "gc/g1/g1ThreadLocalData.hpp"
#include "gc/g1/heapRegionRemSet.inline.hpp"
+#include "gc/shared/bufferNodeList.hpp"
#include "gc/shared/suspendibleThreadSet.hpp"
#include "memory/iterator.hpp"
#include "runtime/atomic.hpp"
@@ -313,7 +313,7 @@ void G1DirtyCardQueueSet::enqueue_all_paused_buffers() {
}
void G1DirtyCardQueueSet::abandon_completed_buffers() {
- G1BufferNodeList list = take_all_completed_buffers();
+ BufferNodeList list = take_all_completed_buffers();
BufferNode* buffers_to_delete = list._head;
while (buffers_to_delete != NULL) {
BufferNode* bn = buffers_to_delete;
@@ -334,20 +334,20 @@ void G1DirtyCardQueueSet::notify_if_necessary() {
// result. The queue sets must share the same allocator.
void G1DirtyCardQueueSet::merge_bufferlists(G1RedirtyCardsQueueSet* src) {
assert(allocator() == src->allocator(), "precondition");
- const G1BufferNodeList from = src->take_all_completed_buffers();
+ const BufferNodeList from = src->take_all_completed_buffers();
if (from._head != NULL) {
Atomic::add(&_num_cards, from._entry_count);
_completed.append(*from._head, *from._tail);
}
}
-G1BufferNodeList G1DirtyCardQueueSet::take_all_completed_buffers() {
+BufferNodeList G1DirtyCardQueueSet::take_all_completed_buffers() {
enqueue_all_paused_buffers();
verify_num_cards();
Pair pair = _completed.take_all();
size_t num_cards = Atomic::load(&_num_cards);
Atomic::store(&_num_cards, size_t(0));
- return G1BufferNodeList(pair.first, pair.second, num_cards);
+ return BufferNodeList(pair.first, pair.second, num_cards);
}
class G1RefineBufferedCards : public StackObj {
diff --git a/src/hotspot/share/gc/g1/g1DirtyCardQueue.hpp b/src/hotspot/share/gc/g1/g1DirtyCardQueue.hpp
index 9e9ad0ee80c..051e29058eb 100644
--- a/src/hotspot/share/gc/g1/g1DirtyCardQueue.hpp
+++ b/src/hotspot/share/gc/g1/g1DirtyCardQueue.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2001, 2021, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,10 +25,10 @@
#ifndef SHARE_GC_G1_G1DIRTYCARDQUEUE_HPP
#define SHARE_GC_G1_G1DIRTYCARDQUEUE_HPP
-#include "gc/g1/g1BufferNodeList.hpp"
#include "gc/g1/g1FreeIdSet.hpp"
#include "gc/g1/g1CardTable.hpp"
#include "gc/g1/g1ConcurrentRefineStats.hpp"
+#include "gc/shared/bufferNodeList.hpp"
#include "gc/shared/ptrQueue.hpp"
#include "memory/allocation.hpp"
#include "memory/padded.hpp"
@@ -69,7 +69,7 @@ public:
class G1DirtyCardQueueSet: public PtrQueueSet {
// Head and tail of a list of BufferNodes, linked through their next()
- // fields. Similar to G1BufferNodeList, but without the _entry_count.
+ // fields. Similar to BufferNodeList, but without the _entry_count.
struct HeadTail {
BufferNode* _head;
BufferNode* _tail;
@@ -275,7 +275,7 @@ public:
void merge_bufferlists(G1RedirtyCardsQueueSet* src);
- G1BufferNodeList take_all_completed_buffers();
+ BufferNodeList take_all_completed_buffers();
void flush_queue(G1DirtyCardQueue& queue);
diff --git a/src/hotspot/share/gc/g1/g1RedirtyCardsQueue.cpp b/src/hotspot/share/gc/g1/g1RedirtyCardsQueue.cpp
index a1802e01821..d6c2ae148be 100644
--- a/src/hotspot/share/gc/g1/g1RedirtyCardsQueue.cpp
+++ b/src/hotspot/share/gc/g1/g1RedirtyCardsQueue.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2019, 2021, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2019, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -67,7 +67,7 @@ void G1RedirtyCardsLocalQueueSet::enqueue(void* value) {
void G1RedirtyCardsLocalQueueSet::flush() {
flush_queue(_queue);
_shared_qset->add_bufferlist(_buffers);
- _buffers = G1BufferNodeList();
+ _buffers = BufferNodeList();
}
// G1RedirtyCardsLocalQueueSet::Queue
@@ -109,9 +109,9 @@ BufferNode* G1RedirtyCardsQueueSet::all_completed_buffers() const {
return _list.top();
}
-G1BufferNodeList G1RedirtyCardsQueueSet::take_all_completed_buffers() {
+BufferNodeList G1RedirtyCardsQueueSet::take_all_completed_buffers() {
DEBUG_ONLY(_collecting = false;)
- G1BufferNodeList result(_list.pop_all(), _tail, _entry_count);
+ BufferNodeList result(_list.pop_all(), _tail, _entry_count);
_tail = NULL;
_entry_count = 0;
DEBUG_ONLY(_collecting = true;)
@@ -135,7 +135,7 @@ void G1RedirtyCardsQueueSet::enqueue_completed_buffer(BufferNode* node) {
update_tail(node);
}
-void G1RedirtyCardsQueueSet::add_bufferlist(const G1BufferNodeList& buffers) {
+void G1RedirtyCardsQueueSet::add_bufferlist(const BufferNodeList& buffers) {
assert(_collecting, "precondition");
if (buffers._head != NULL) {
assert(buffers._tail != NULL, "invariant");
diff --git a/src/hotspot/share/gc/g1/g1RedirtyCardsQueue.hpp b/src/hotspot/share/gc/g1/g1RedirtyCardsQueue.hpp
index 26bb78c4096..b464d377298 100644
--- a/src/hotspot/share/gc/g1/g1RedirtyCardsQueue.hpp
+++ b/src/hotspot/share/gc/g1/g1RedirtyCardsQueue.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2019, 2021, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2019, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,7 @@
#ifndef SHARE_GC_G1_G1REDIRTYCARDSQUEUE_HPP
#define SHARE_GC_G1_G1REDIRTYCARDSQUEUE_HPP
-#include "gc/g1/g1BufferNodeList.hpp"
+#include "gc/shared/bufferNodeList.hpp"
#include "gc/shared/ptrQueue.hpp"
#include "memory/padded.hpp"
#include "utilities/macros.hpp"
@@ -42,7 +42,7 @@ class G1RedirtyCardsLocalQueueSet : private PtrQueueSet {
};
G1RedirtyCardsQueueSet* _shared_qset;
- G1BufferNodeList _buffers;
+ BufferNodeList _buffers;
Queue _queue;
// Add the buffer to the local list.
@@ -84,12 +84,12 @@ public:
// Collect buffers. These functions are thread-safe.
// precondition: Must not be concurrent with buffer processing.
virtual void enqueue_completed_buffer(BufferNode* node);
- void add_bufferlist(const G1BufferNodeList& buffers);
+ void add_bufferlist(const BufferNodeList& buffers);
// Processing phase operations.
// precondition: Must not be concurrent with buffer collection.
BufferNode* all_completed_buffers() const;
- G1BufferNodeList take_all_completed_buffers();
+ BufferNodeList take_all_completed_buffers();
};
#endif // SHARE_GC_G1_G1REDIRTYCARDSQUEUE_HPP
diff --git a/src/hotspot/share/gc/g1/g1RemSet.cpp b/src/hotspot/share/gc/g1/g1RemSet.cpp
index c8f3b0d49b2..603ddbc1e26 100644
--- a/src/hotspot/share/gc/g1/g1RemSet.cpp
+++ b/src/hotspot/share/gc/g1/g1RemSet.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2001, 2021, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -45,6 +45,7 @@
#include "gc/g1/heapRegion.inline.hpp"
#include "gc/g1/heapRegionManager.inline.hpp"
#include "gc/g1/heapRegionRemSet.inline.hpp"
+#include "gc/shared/bufferNodeList.hpp"
#include "gc/shared/gcTraceTime.inline.hpp"
#include "gc/shared/ptrQueue.hpp"
#include "gc/shared/suspendibleThreadSet.hpp"
@@ -1429,7 +1430,7 @@ public:
{
if (initial_evacuation) {
G1DirtyCardQueueSet& dcqs = G1BarrierSet::dirty_card_queue_set();
- G1BufferNodeList buffers = dcqs.take_all_completed_buffers();
+ BufferNodeList buffers = dcqs.take_all_completed_buffers();
if (buffers._entry_count != 0) {
_dirty_card_buffers.prepend(*buffers._head, *buffers._tail);
}
diff --git a/src/hotspot/share/gc/g1/g1BufferNodeList.cpp b/src/hotspot/share/gc/shared/bufferNodeList.cpp
similarity index 80%
rename from src/hotspot/share/gc/g1/g1BufferNodeList.cpp
rename to src/hotspot/share/gc/shared/bufferNodeList.cpp
index 3b89b0c7cd7..bcf4b42ec96 100644
--- a/src/hotspot/share/gc/g1/g1BufferNodeList.cpp
+++ b/src/hotspot/share/gc/shared/bufferNodeList.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2019, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -23,15 +23,15 @@
*/
#include "precompiled.hpp"
-#include "gc/g1/g1BufferNodeList.hpp"
+#include "gc/shared/bufferNodeList.hpp"
#include "utilities/debug.hpp"
-G1BufferNodeList::G1BufferNodeList() :
+BufferNodeList::BufferNodeList() :
_head(NULL), _tail(NULL), _entry_count(0) {}
-G1BufferNodeList::G1BufferNodeList(BufferNode* head,
- BufferNode* tail,
- size_t entry_count) :
+BufferNodeList::BufferNodeList(BufferNode* head,
+ BufferNode* tail,
+ size_t entry_count) :
_head(head), _tail(tail), _entry_count(entry_count)
{
assert((_head == NULL) == (_tail == NULL), "invariant");
diff --git a/src/hotspot/share/gc/g1/g1BufferNodeList.hpp b/src/hotspot/share/gc/shared/bufferNodeList.hpp
similarity index 79%
rename from src/hotspot/share/gc/g1/g1BufferNodeList.hpp
rename to src/hotspot/share/gc/shared/bufferNodeList.hpp
index 785c3118f9b..ae66a1fcc71 100644
--- a/src/hotspot/share/gc/g1/g1BufferNodeList.hpp
+++ b/src/hotspot/share/gc/shared/bufferNodeList.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2019, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -22,21 +22,20 @@
*
*/
-#ifndef SHARE_GC_G1_G1BUFFERNODELIST_HPP
-#define SHARE_GC_G1_G1BUFFERNODELIST_HPP
+#ifndef SHARE_GC_SHARED_BUFFERNODELIST_HPP
+#define SHARE_GC_SHARED_BUFFERNODELIST_HPP
#include "utilities/globalDefinitions.hpp"
class BufferNode;
-struct G1BufferNodeList {
+struct BufferNodeList {
BufferNode* _head; // First node in list or NULL if empty.
BufferNode* _tail; // Last node in list or NULL if empty.
size_t _entry_count; // Sum of entries in nodes in list.
- G1BufferNodeList();
- G1BufferNodeList(BufferNode* head, BufferNode* tail, size_t entry_count);
+ BufferNodeList();
+ BufferNodeList(BufferNode* head, BufferNode* tail, size_t entry_count);
};
-#endif // SHARE_GC_G1_G1BUFFERNODELIST_HPP
-
+#endif // SHARE_GC_SHARED_BUFFERNODELIST_HPP
--
GitLab
From dae2226a538f7156056d1f101fb5b4d1c6f72520 Mon Sep 17 00:00:00 2001
From: Alexey Ivanov
Date: Mon, 24 Jan 2022 18:30:31 +0000
Subject: [PATCH 006/400] 8279795: Fix typo in BasicFileChooserUI: Constucts ->
Constructs
Reviewed-by: prr, serb
---
.../swing/plaf/basic/BasicFileChooserUI.java | 72 ++++++++++++++-----
1 file changed, 55 insertions(+), 17 deletions(-)
diff --git a/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicFileChooserUI.java b/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicFileChooserUI.java
index 33f42da00f8..439101c0ef2 100644
--- a/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicFileChooserUI.java
+++ b/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicFileChooserUI.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2021, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,21 +25,58 @@
package javax.swing.plaf.basic;
-import javax.swing.*;
-import javax.swing.filechooser.*;
-import javax.swing.filechooser.FileFilter;
-import javax.swing.event.*;
-import javax.swing.plaf.*;
-import java.awt.*;
-import java.awt.event.*;
-import java.awt.datatransfer.*;
-import java.beans.*;
-import java.io.*;
-import java.util.*;
+import java.awt.BorderLayout;
+import java.awt.Toolkit;
+import java.awt.datatransfer.DataFlavor;
+import java.awt.datatransfer.Transferable;
+import java.awt.event.ActionEvent;
+import java.awt.event.MouseAdapter;
+import java.awt.event.MouseEvent;
+import java.awt.event.MouseListener;
+import java.beans.PropertyChangeListener;
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Hashtable;
import java.util.List;
-import java.util.regex.*;
+import java.util.Locale;
+import java.util.regex.Pattern;
+import java.util.regex.PatternSyntaxException;
+
+import javax.swing.AbstractAction;
+import javax.swing.Action;
+import javax.swing.ActionMap;
+import javax.swing.Icon;
+import javax.swing.InputMap;
+import javax.swing.JButton;
+import javax.swing.JComponent;
+import javax.swing.JFileChooser;
+import javax.swing.JList;
+import javax.swing.JOptionPane;
+import javax.swing.JPanel;
+import javax.swing.JTable;
+import javax.swing.LookAndFeel;
+import javax.swing.SwingUtilities;
+import javax.swing.TransferHandler;
+import javax.swing.UIDefaults;
+import javax.swing.UIManager;
+import javax.swing.event.ListSelectionEvent;
+import javax.swing.event.ListSelectionListener;
+import javax.swing.filechooser.FileFilter;
+import javax.swing.filechooser.FileSystemView;
+import javax.swing.filechooser.FileView;
+import javax.swing.plaf.ActionMapUIResource;
+import javax.swing.plaf.ComponentUI;
+import javax.swing.plaf.FileChooserUI;
+import javax.swing.plaf.UIResource;
+
import sun.awt.shell.ShellFolder;
-import sun.swing.*;
+import sun.swing.DefaultLookup;
+import sun.swing.FilePane;
+import sun.swing.SwingUtilities2;
+import sun.swing.UIAction;
/**
* Basic L&F implementation of a FileChooser.
@@ -723,11 +760,12 @@ public class BasicFileChooserUI extends FileChooserUI {
// new functionality add it to the Handler, but make sure this
// class calls into the Handler.
Handler handler;
+
/**
- * Constucts a {@code DoubleClickListener}.
- * @param list the lsit
+ * Constructs a {@code DoubleClickListener}.
+ * @param list the list
*/
- public DoubleClickListener(JList> list) {
+ public DoubleClickListener(JList> list) {
handler = new Handler(list);
}
--
GitLab
From acd98294c628e8e03a036a8e3e08d775147b2fda Mon Sep 17 00:00:00 2001
From: Alexey Ivanov
Date: Mon, 24 Jan 2022 18:31:43 +0000
Subject: [PATCH 007/400] 8279794: Fix typos in BasicScrollBarUI: Laysouts a
vertical scroll bar
Reviewed-by: prr, psadhukhan
---
.../swing/plaf/basic/BasicScrollBarUI.java | 53 ++++++++++++++-----
1 file changed, 41 insertions(+), 12 deletions(-)
diff --git a/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicScrollBarUI.java b/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicScrollBarUI.java
index afb2d58b885..8c7f348097e 100644
--- a/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicScrollBarUI.java
+++ b/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicScrollBarUI.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,18 +25,47 @@
package javax.swing.plaf.basic;
+import java.awt.Color;
+import java.awt.Component;
+import java.awt.Container;
+import java.awt.Dimension;
+import java.awt.Graphics;
+import java.awt.Insets;
+import java.awt.LayoutManager;
+import java.awt.Point;
+import java.awt.Rectangle;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.awt.event.FocusEvent;
+import java.awt.event.FocusListener;
+import java.awt.event.MouseAdapter;
+import java.awt.event.MouseEvent;
+import java.awt.event.MouseMotionListener;
+import java.beans.PropertyChangeEvent;
+import java.beans.PropertyChangeListener;
+
+import javax.swing.BoundedRangeModel;
+import javax.swing.InputMap;
+import javax.swing.JButton;
+import javax.swing.JComponent;
+import javax.swing.JList;
+import javax.swing.JScrollBar;
+import javax.swing.JScrollPane;
+import javax.swing.JViewport;
+import javax.swing.LookAndFeel;
+import javax.swing.SwingConstants;
+import javax.swing.SwingUtilities;
+import javax.swing.Timer;
+import javax.swing.UIManager;
+import javax.swing.event.ChangeEvent;
+import javax.swing.event.ChangeListener;
+import javax.swing.plaf.ComponentUI;
+import javax.swing.plaf.ScrollBarUI;
+import javax.swing.plaf.UIResource;
+
import sun.swing.DefaultLookup;
import sun.swing.UIAction;
-import java.awt.*;
-import java.awt.event.*;
-
-import java.beans.*;
-
-import javax.swing.*;
-import javax.swing.event.*;
-import javax.swing.plaf.*;
-
import static sun.swing.SwingUtilities2.drawHLine;
import static sun.swing.SwingUtilities2.drawRect;
import static sun.swing.SwingUtilities2.drawVLine;
@@ -754,7 +783,7 @@ public class BasicScrollBarUI
}
/**
- * Laysouts a vertical scroll bar.
+ * Lays out a vertical scroll bar.
* @param sb the scroll bar
*/
protected void layoutVScrollbar(JScrollBar sb)
@@ -856,7 +885,7 @@ public class BasicScrollBarUI
}
/**
- * Laysouts a vertical scroll bar.
+ * Lays out a horizontal scroll bar.
* @param sb the scroll bar
*/
protected void layoutHScrollbar(JScrollBar sb)
--
GitLab
From 0b5c54be675c63ecac17cd37f6d388fd42f09aa8 Mon Sep 17 00:00:00 2001
From: Alexey Ivanov
Date: Mon, 24 Jan 2022 18:32:35 +0000
Subject: [PATCH 008/400] 8279798: Javadoc for BasicTabbedPaneUI is
inconsistent
Reviewed-by: prr, psadhukhan
---
.../swing/plaf/basic/BasicTabbedPaneUI.java | 89 +++++++++++++------
1 file changed, 64 insertions(+), 25 deletions(-)
diff --git a/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicTabbedPaneUI.java b/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicTabbedPaneUI.java
index c9e5fd51f7f..3fc99dd2bc7 100644
--- a/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicTabbedPaneUI.java
+++ b/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicTabbedPaneUI.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2021, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,21 +25,60 @@
package javax.swing.plaf.basic;
-import sun.swing.SwingUtilities2;
-
-import javax.swing.*;
-import javax.swing.event.*;
-import javax.swing.plaf.*;
-import javax.swing.text.View;
-
-import java.awt.*;
-import java.awt.event.*;
-import java.beans.PropertyChangeListener;
+import java.awt.Color;
+import java.awt.Component;
+import java.awt.Container;
+import java.awt.Dimension;
+import java.awt.Font;
+import java.awt.FontMetrics;
+import java.awt.Graphics;
+import java.awt.Graphics2D;
+import java.awt.Insets;
+import java.awt.LayoutManager;
+import java.awt.Point;
+import java.awt.Polygon;
+import java.awt.Rectangle;
+import java.awt.Shape;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.awt.event.ContainerEvent;
+import java.awt.event.ContainerListener;
+import java.awt.event.FocusAdapter;
+import java.awt.event.FocusEvent;
+import java.awt.event.FocusListener;
+import java.awt.event.MouseAdapter;
+import java.awt.event.MouseEvent;
+import java.awt.event.MouseListener;
+import java.awt.event.MouseMotionListener;
import java.beans.PropertyChangeEvent;
-import java.util.Vector;
+import java.beans.PropertyChangeListener;
import java.util.Hashtable;
+import java.util.Vector;
+
+import javax.swing.Action;
+import javax.swing.ActionMap;
+import javax.swing.Icon;
+import javax.swing.InputMap;
+import javax.swing.JButton;
+import javax.swing.JComponent;
+import javax.swing.JPanel;
+import javax.swing.JTabbedPane;
+import javax.swing.JViewport;
+import javax.swing.KeyStroke;
+import javax.swing.LookAndFeel;
+import javax.swing.SwingConstants;
+import javax.swing.SwingUtilities;
+import javax.swing.UIManager;
+import javax.swing.event.ChangeEvent;
+import javax.swing.event.ChangeListener;
+import javax.swing.plaf.ComponentInputMapUIResource;
+import javax.swing.plaf.ComponentUI;
+import javax.swing.plaf.TabbedPaneUI;
+import javax.swing.plaf.UIResource;
+import javax.swing.text.View;
import sun.swing.DefaultLookup;
+import sun.swing.SwingUtilities2;
import sun.swing.UIAction;
/**
@@ -216,7 +255,7 @@ public class BasicTabbedPaneUI extends TabbedPaneUI implements SwingConstants {
public BasicTabbedPaneUI() {}
/**
- * Create a UI.
+ * Creates a UI.
* @param c a component
* @return a UI
*/
@@ -386,7 +425,7 @@ public class BasicTabbedPaneUI extends TabbedPaneUI implements SwingConstants {
}
/**
- * Install the defaults.
+ * Installs the defaults.
*/
protected void installDefaults() {
LookAndFeel.installColorsAndFont(tabPane, "TabbedPane.background",
@@ -423,7 +462,7 @@ public class BasicTabbedPaneUI extends TabbedPaneUI implements SwingConstants {
}
/**
- * Uninstall the defaults.
+ * Uninstalls the defaults.
*/
protected void uninstallDefaults() {
highlight = null;
@@ -438,7 +477,7 @@ public class BasicTabbedPaneUI extends TabbedPaneUI implements SwingConstants {
}
/**
- * Install the listeners.
+ * Installs the listeners.
*/
protected void installListeners() {
if ((propertyChangeListener = createPropertyChangeListener()) != null) {
@@ -461,7 +500,7 @@ public class BasicTabbedPaneUI extends TabbedPaneUI implements SwingConstants {
}
/**
- * Uninstall the listeners.
+ * Uninstalls the listeners.
*/
protected void uninstallListeners() {
if (mouseListener != null) {
@@ -1090,9 +1129,9 @@ public class BasicTabbedPaneUI extends TabbedPaneUI implements SwingConstants {
}
/**
- * Laysout a label.
+ * Lays out a label.
* @param tabPlacement the tab placement
- * @param metrics the font metric
+ * @param metrics the font metrics
* @param tabIndex the tab index
* @param title the title
* @param icon the icon
@@ -2144,7 +2183,7 @@ public class BasicTabbedPaneUI extends TabbedPaneUI implements SwingConstants {
// Tab Navigation methods
/**
- * Navigate the selected tab.
+ * Navigates the selected tab.
* @param direction the direction
*/
protected void navigateSelectedTab(int direction) {
@@ -2226,7 +2265,7 @@ public class BasicTabbedPaneUI extends TabbedPaneUI implements SwingConstants {
}
/**
- * Select the next tab in the run.
+ * Selects the next tab in the run.
* @param current the current tab
*/
protected void selectNextTabInRun(int current) {
@@ -2240,7 +2279,7 @@ public class BasicTabbedPaneUI extends TabbedPaneUI implements SwingConstants {
}
/**
- * Select the previous tab in the run.
+ * Selects the previous tab in the run.
* @param current the current tab
*/
protected void selectPreviousTabInRun(int current) {
@@ -2254,7 +2293,7 @@ public class BasicTabbedPaneUI extends TabbedPaneUI implements SwingConstants {
}
/**
- * Select the next tab.
+ * Selects the next tab.
* @param current the current tab
*/
protected void selectNextTab(int current) {
@@ -2267,7 +2306,7 @@ public class BasicTabbedPaneUI extends TabbedPaneUI implements SwingConstants {
}
/**
- * Select the previous tab.
+ * Selects the previous tab.
* @param current the current tab
*/
protected void selectPreviousTab(int current) {
@@ -2772,7 +2811,7 @@ public class BasicTabbedPaneUI extends TabbedPaneUI implements SwingConstants {
* Returns the preferred tab area width.
* @param tabPlacement the tab placement
* @param height the height
- * @return the preferred tab area widty
+ * @return the preferred tab area width
*/
protected int preferredTabAreaWidth(int tabPlacement, int height) {
FontMetrics metrics = getFontMetrics();
--
GitLab
From a825a4a1dba14317547b57bc0188b1e912baa251 Mon Sep 17 00:00:00 2001
From: Alexey Ivanov
Date: Mon, 24 Jan 2022 18:35:53 +0000
Subject: [PATCH 009/400] 8279861: Clarify 'rect' parameters and description of
paintTabBorder method in BasicTabbedPaneUI
Reviewed-by: prr, psadhukhan
---
.../javax/swing/plaf/basic/BasicTabbedPaneUI.java | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicTabbedPaneUI.java b/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicTabbedPaneUI.java
index 3fc99dd2bc7..360e98eee7a 100644
--- a/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicTabbedPaneUI.java
+++ b/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicTabbedPaneUI.java
@@ -955,7 +955,7 @@ public class BasicTabbedPaneUI extends TabbedPaneUI implements SwingConstants {
* Paints a tab.
* @param g the graphics
* @param tabPlacement the tab placement
- * @param rects rectangles
+ * @param rects the tab rectangles
* @param tabIndex the tab index
* @param iconRect the icon rectangle
* @param textRect the text rectangle
@@ -1301,7 +1301,7 @@ public class BasicTabbedPaneUI extends TabbedPaneUI implements SwingConstants {
* Paints the focus indicator.
* @param g the graphics
* @param tabPlacement the tab placement
- * @param rects rectangles
+ * @param rects the tab rectangles
* @param tabIndex the tab index
* @param iconRect the icon rectangle
* @param textRect the text rectangle
@@ -1346,9 +1346,9 @@ public class BasicTabbedPaneUI extends TabbedPaneUI implements SwingConstants {
}
/**
- * this function draws the border around each tab
- * note that this function does now draw the background of the tab.
- * that is done elsewhere
+ * Paints the border around a tab.
+ * Note that this function does not paint the background of the tab,
+ * that is done elsewhere.
*
* @param g the graphics context in which to paint
* @param tabPlacement the placement (left, right, bottom, top) of the tab
@@ -1878,7 +1878,7 @@ public class BasicTabbedPaneUI extends TabbedPaneUI implements SwingConstants {
}
/**
- * Assure the rectangles are created.
+ * Assures the tab rectangles are created.
* @param tabCount the tab count
*/
protected void assureRectsCreated(int tabCount) {
--
GitLab
From a5416669a57a7739af13efc32ec084560527862b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Daniel=20Jeli=C5=84ski?=
Date: Mon, 24 Jan 2022 19:31:11 +0000
Subject: [PATCH 010/400] 8280474: Garbage value passed to getLocaleInfoWrapper
in HostLocaleProviderAdapter_md
Reviewed-by: naoto, alanb
---
.../windows/native/libjava/HostLocaleProviderAdapter_md.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/java.base/windows/native/libjava/HostLocaleProviderAdapter_md.c b/src/java.base/windows/native/libjava/HostLocaleProviderAdapter_md.c
index 879422f096f..b7c2bcc28db 100644
--- a/src/java.base/windows/native/libjava/HostLocaleProviderAdapter_md.c
+++ b/src/java.base/windows/native/libjava/HostLocaleProviderAdapter_md.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2020, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -835,7 +835,7 @@ void replaceCalendarArrayElems(JNIEnv *env, jstring jlangtag, jint calid, jobjec
WCHAR name[BUFLEN];
const jchar *langtag = (*env)->GetStringChars(env, jlangtag, JNI_FALSE);
jstring tmp_string;
- CALTYPE isGenitive;
+ CALTYPE isGenitive = 0;
CHECK_NULL(langtag);
--
GitLab
From 8e82d0021c119b7793870811fad37d7659c1174d Mon Sep 17 00:00:00 2001
From: Joe Darcy
Date: Mon, 24 Jan 2022 20:16:38 +0000
Subject: [PATCH 011/400] 8280492: Use cross-module syntax for cross-module
links
Reviewed-by: iris, serb, lancea, dfuchs, aivanov
---
.../share/classes/java/io/FilenameFilter.java | 4 +--
.../share/classes/java/lang/Character.java | 8 +++---
.../share/classes/java/lang/System.java | 24 ++++++++---------
.../java/lang/invoke/MethodHandleProxies.java | 4 +--
.../java/lang/invoke/MethodHandles.java | 4 +--
.../share/classes/java/net/package-info.java | 4 +--
.../text/AttributedCharacterIterator.java | 6 ++---
.../share/classes/java/text/Bidi.java | 8 +++---
.../share/classes/java/util/Observable.java | 4 +--
.../classes/java/util/ServiceLoader.java | 4 +--
.../java/awt/datatransfer/Clipboard.java | 14 +++++-----
.../classes/java/util/logging/LogManager.java | 8 +++---
.../java/util/logging/LoggingMXBean.java | 14 +++++-----
.../lang/management/ManagementFactory.java | 4 +--
.../management/PlatformLoggingMXBean.java | 26 +++++++++----------
.../management/remote/JMXAddressable.java | 4 +--
.../remote/JMXServerErrorException.java | 4 +--
17 files changed, 72 insertions(+), 72 deletions(-)
diff --git a/src/java.base/share/classes/java/io/FilenameFilter.java b/src/java.base/share/classes/java/io/FilenameFilter.java
index fcd81479ee1..019ffb11771 100644
--- a/src/java.base/share/classes/java/io/FilenameFilter.java
+++ b/src/java.base/share/classes/java/io/FilenameFilter.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1994, 2019, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1994, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -34,7 +34,7 @@ package java.io;
*
* @author Arthur van Hoff
* @author Jonathan Payne
- * @see java.awt.FileDialog#setFilenameFilter(java.io.FilenameFilter)
+ * @see java.desktop/java.awt.FileDialog#setFilenameFilter(java.io.FilenameFilter)
* @see java.io.File
* @see java.io.File#list(java.io.FilenameFilter)
* @since 1.0
diff --git a/src/java.base/share/classes/java/lang/Character.java b/src/java.base/share/classes/java/lang/Character.java
index 1cc12940ef1..0fdd23997cc 100644
--- a/src/java.base/share/classes/java/lang/Character.java
+++ b/src/java.base/share/classes/java/lang/Character.java
@@ -10302,7 +10302,7 @@ class Character implements java.io.Serializable, Comparable, Constabl
* @see Character#isJavaIdentifierPart(char)
* @see Character#isLetter(char)
* @see Character#isUnicodeIdentifierStart(char)
- * @see javax.lang.model.SourceVersion#isIdentifier(CharSequence)
+ * @see java.compiler/javax.lang.model.SourceVersion#isIdentifier(CharSequence)
* @since 1.1
*/
public static boolean isJavaIdentifierStart(char ch) {
@@ -10331,7 +10331,7 @@ class Character implements java.io.Serializable, Comparable, Constabl
* @see Character#isJavaIdentifierPart(int)
* @see Character#isLetter(int)
* @see Character#isUnicodeIdentifierStart(int)
- * @see javax.lang.model.SourceVersion#isIdentifier(CharSequence)
+ * @see java.compiler/javax.lang.model.SourceVersion#isIdentifier(CharSequence)
* @since 1.5
*/
public static boolean isJavaIdentifierStart(int codePoint) {
@@ -10368,7 +10368,7 @@ class Character implements java.io.Serializable, Comparable, Constabl
* @see Character#isJavaIdentifierStart(char)
* @see Character#isLetterOrDigit(char)
* @see Character#isUnicodeIdentifierPart(char)
- * @see javax.lang.model.SourceVersion#isIdentifier(CharSequence)
+ * @see java.compiler/javax.lang.model.SourceVersion#isIdentifier(CharSequence)
* @since 1.1
*/
public static boolean isJavaIdentifierPart(char ch) {
@@ -10401,7 +10401,7 @@ class Character implements java.io.Serializable, Comparable, Constabl
* @see Character#isJavaIdentifierStart(int)
* @see Character#isLetterOrDigit(int)
* @see Character#isUnicodeIdentifierPart(int)
- * @see javax.lang.model.SourceVersion#isIdentifier(CharSequence)
+ * @see java.compiler/javax.lang.model.SourceVersion#isIdentifier(CharSequence)
* @since 1.5
*/
public static boolean isJavaIdentifierPart(int codePoint) {
diff --git a/src/java.base/share/classes/java/lang/System.java b/src/java.base/share/classes/java/lang/System.java
index 47b436847cb..2f9c205a327 100644
--- a/src/java.base/share/classes/java/lang/System.java
+++ b/src/java.base/share/classes/java/lang/System.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1994, 2021, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1994, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -1207,7 +1207,7 @@ public final class System {
* Severity values and Mapping to {@code java.util.logging.Level}.
*
* {@linkplain System.Logger.Level System logger levels} are mapped to
- * {@linkplain java.util.logging.Level java.util.logging levels}
+ * {@linkplain java.logging/java.util.logging.Level java.util.logging levels}
* of corresponding severity.
* The mapping is as follows:
*
@@ -1219,19 +1219,19 @@ public final class System {
*
*
*
*
@@ -1542,7 +1542,7 @@ public final class System {
* {@code java.util.logging} as the backend framework when the
* {@code java.logging} module is present.
* It returns a {@linkplain System.Logger logger} instance
- * that will route log messages to a {@link java.util.logging.Logger
+ * that will route log messages to a {@link java.logging/java.util.logging.Logger
* java.util.logging.Logger}. Otherwise, if {@code java.logging} is not
* present, the default implementation will return a simple logger
* instance that will route log messages of {@code INFO} level and above to
@@ -1556,7 +1556,7 @@ public final class System {
* logging backend, and usually requires using APIs specific to that backend.
*
For the default {@code LoggerFinder} implementation
* using {@code java.util.logging} as its backend, refer to
- * {@link java.util.logging java.util.logging} for logging configuration.
+ * {@link java.logging/java.util.logging java.util.logging} for logging configuration.
* For the default {@code LoggerFinder} implementation returning simple loggers
* when the {@code java.logging} module is absent, the configuration
* is implementation dependent.
@@ -1591,7 +1591,7 @@ public final class System {
* System.Logger.Level} to a level supported by the logging backend it uses.
* The default LoggerFinder using {@code java.util.logging} as the backend
* maps {@code System.Logger} levels to
- * {@linkplain java.util.logging.Level java.util.logging} levels
+ * {@linkplain java.logging/java.util.logging.Level java.util.logging} levels
* of corresponding severity - as described in {@link Logger.Level
* Logger.Level}.
*
diff --git a/src/java.base/share/classes/java/lang/invoke/MethodHandleProxies.java b/src/java.base/share/classes/java/lang/invoke/MethodHandleProxies.java
index 4dd2b1fce7e..784d672ff8f 100644
--- a/src/java.base/share/classes/java/lang/invoke/MethodHandleProxies.java
+++ b/src/java.base/share/classes/java/lang/invoke/MethodHandleProxies.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2008, 2021, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -88,7 +88,7 @@ public class MethodHandleProxies {
* Therefore, each instance must implement a unique single-method interface.
* Implementations may not bundle together
* multiple single-method interfaces onto single implementation classes
- * in the style of {@link java.awt.AWTEventMulticaster}.
+ * in the style of {@link java.desktop/java.awt.AWTEventMulticaster}.
*
* The method handle may throw an undeclared exception,
* which means any checked exception (or other checked throwable)
diff --git a/src/java.base/share/classes/java/lang/invoke/MethodHandles.java b/src/java.base/share/classes/java/lang/invoke/MethodHandles.java
index 743ebb66759..908c277fa86 100644
--- a/src/java.base/share/classes/java/lang/invoke/MethodHandles.java
+++ b/src/java.base/share/classes/java/lang/invoke/MethodHandles.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2008, 2021, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -2002,7 +2002,7 @@ public class MethodHandles {
* there is no internal form available to record in any class's constant pool.
* A hidden class or interface is not discoverable by {@link Class#forName(String, boolean, ClassLoader)},
* {@link ClassLoader#loadClass(String, boolean)}, or {@link #findClass(String)}, and
- * is not {@linkplain java.lang.instrument.Instrumentation#isModifiableClass(Class)
+ * is not {@linkplain java.instrument/java.lang.instrument.Instrumentation#isModifiableClass(Class)
* modifiable} by Java agents or tool agents using the
* JVM Tool Interface.
*
diff --git a/src/java.base/share/classes/java/net/package-info.java b/src/java.base/share/classes/java/net/package-info.java
index b221c6bf2f7..e0325f6a0f1 100644
--- a/src/java.base/share/classes/java/net/package-info.java
+++ b/src/java.base/share/classes/java/net/package-info.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -122,7 +122,7 @@
*
{@link java.net.HttpURLConnection} is a subclass of URLConnection
* and provides some additional functionalities specific to the
* HTTP protocol. This API has been superseded by the newer
- * {@linkplain java.net.http HTTP Client API}.
The recommended usage is to use {@link java.net.URI} to identify
* resources, then convert it into a {@link java.net.URL} when it is time to
diff --git a/src/java.base/share/classes/java/text/AttributedCharacterIterator.java b/src/java.base/share/classes/java/text/AttributedCharacterIterator.java
index 31b5b7d8d3c..a77417462a7 100644
--- a/src/java.base/share/classes/java/text/AttributedCharacterIterator.java
+++ b/src/java.base/share/classes/java/text/AttributedCharacterIterator.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2019, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -67,10 +67,10 @@ import java.util.Set;
*
*
* Attribute keys are instances of {@link AttributedCharacterIterator.Attribute} and its
- * subclasses, such as {@link java.awt.font.TextAttribute}.
+ * subclasses, such as {@link java.desktop/java.awt.font.TextAttribute}.
*
* @see AttributedCharacterIterator.Attribute
- * @see java.awt.font.TextAttribute
+ * @see java.desktop/java.awt.font.TextAttribute
* @see AttributedString
* @see Annotation
* @since 1.2
diff --git a/src/java.base/share/classes/java/text/Bidi.java b/src/java.base/share/classes/java/text/Bidi.java
index 00a878e1c64..41269afac9b 100644
--- a/src/java.base/share/classes/java/text/Bidi.java
+++ b/src/java.base/share/classes/java/text/Bidi.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000, 2020, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -121,9 +121,9 @@ public final class Bidi {
*
* @param paragraph a paragraph of text with optional character and paragraph attribute information
*
- * @see java.awt.font.TextAttribute#BIDI_EMBEDDING
- * @see java.awt.font.TextAttribute#NUMERIC_SHAPING
- * @see java.awt.font.TextAttribute#RUN_DIRECTION
+ * @see java.desktop/java.awt.font.TextAttribute#BIDI_EMBEDDING
+ * @see java.desktop/java.awt.font.TextAttribute#NUMERIC_SHAPING
+ * @see java.desktop/java.awt.font.TextAttribute#RUN_DIRECTION
*/
public Bidi(AttributedCharacterIterator paragraph) {
if (paragraph == null) {
diff --git a/src/java.base/share/classes/java/util/Observable.java b/src/java.base/share/classes/java/util/Observable.java
index d71bf5d5d4c..37a90f631ad 100644
--- a/src/java.base/share/classes/java/util/Observable.java
+++ b/src/java.base/share/classes/java/util/Observable.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1994, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1994, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -66,7 +66,7 @@ package java.util;
* {@code Observable} is unspecified, and state changes are not in
* one-for-one correspondence with notifications.
* For a richer event model, consider using the
- * {@link java.beans} package. For reliable and ordered
+ * {@link java.desktop/java.beans} package. For reliable and ordered
* messaging among threads, consider using one of the concurrent data
* structures in the {@link java.util.concurrent} package.
* For reactive streams style programming, see the
diff --git a/src/java.base/share/classes/java/util/ServiceLoader.java b/src/java.base/share/classes/java/util/ServiceLoader.java
index 64b01c3157e..c5d921896a0 100644
--- a/src/java.base/share/classes/java/util/ServiceLoader.java
+++ b/src/java.base/share/classes/java/util/ServiceLoader.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2021, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -1585,7 +1585,7 @@ public final class ServiceLoader
* are located in the order that its module descriptor {@linkplain
* java.lang.module.ModuleDescriptor.Provides#providers() lists the
* providers}. Providers added dynamically by instrumentation agents (see
- * {@link java.lang.instrument.Instrumentation#redefineModule redefineModule})
+ * {@link java.instrument/java.lang.instrument.Instrumentation#redefineModule redefineModule})
* are always located after providers declared by the module.
*
*
Step 2: Locate providers in unnamed modules.
diff --git a/src/java.datatransfer/share/classes/java/awt/datatransfer/Clipboard.java b/src/java.datatransfer/share/classes/java/awt/datatransfer/Clipboard.java
index ad3a56a701f..8aac4495547 100644
--- a/src/java.datatransfer/share/classes/java/awt/datatransfer/Clipboard.java
+++ b/src/java.datatransfer/share/classes/java/awt/datatransfer/Clipboard.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1996, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -43,8 +43,8 @@ import sun.datatransfer.DataFlavorUtil;
*
* @author Amy Fowler
* @author Alexander Gerasimov
- * @see java.awt.Toolkit#getSystemClipboard
- * @see java.awt.Toolkit#getSystemSelection
+ * @see java.desktop/java.awt.Toolkit#getSystemClipboard
+ * @see java.desktop/java.awt.Toolkit#getSystemSelection
* @since 1.1
*/
public class Clipboard {
@@ -81,7 +81,7 @@ public class Clipboard {
* Creates a clipboard object.
*
* @param name for the clipboard
- * @see java.awt.Toolkit#getSystemClipboard
+ * @see java.desktop/java.awt.Toolkit#getSystemClipboard
*/
public Clipboard(String name) {
this.name = name;
@@ -91,7 +91,7 @@ public class Clipboard {
* Returns the name of this clipboard object.
*
* @return the name of this clipboard object
- * @see java.awt.Toolkit#getSystemClipboard
+ * @see java.desktop/java.awt.Toolkit#getSystemClipboard
*/
public String getName() {
return name;
@@ -118,7 +118,7 @@ public class Clipboard {
* content
* @param owner the object which owns the clipboard content
* @throws IllegalStateException if the clipboard is currently unavailable
- * @see java.awt.Toolkit#getSystemClipboard
+ * @see java.desktop/java.awt.Toolkit#getSystemClipboard
*/
public synchronized void setContents(Transferable contents, ClipboardOwner owner) {
final ClipboardOwner oldOwner = this.owner;
@@ -145,7 +145,7 @@ public class Clipboard {
* @param requestor the object requesting the clip data (not used)
* @return the current transferable object on the clipboard
* @throws IllegalStateException if the clipboard is currently unavailable
- * @see java.awt.Toolkit#getSystemClipboard
+ * @see java.desktop/java.awt.Toolkit#getSystemClipboard
*/
public synchronized Transferable getContents(Object requestor) {
return contents;
diff --git a/src/java.logging/share/classes/java/util/logging/LogManager.java b/src/java.logging/share/classes/java/util/logging/LogManager.java
index 59950865283..38e9ebafeb6 100644
--- a/src/java.logging/share/classes/java/util/logging/LogManager.java
+++ b/src/java.logging/share/classes/java/util/logging/LogManager.java
@@ -2556,10 +2556,10 @@ public class LogManager {
/**
* String representation of the
- * {@link javax.management.ObjectName} for the management interface
+ * {@link java.management/javax.management.ObjectName} for the management interface
* for the logging facility.
*
- * @see java.lang.management.PlatformLoggingMXBean
+ * @see java.management/java.lang.management.PlatformLoggingMXBean
*
* @since 1.5
*/
@@ -2573,11 +2573,11 @@ public class LogManager {
*
* @deprecated {@code java.util.logging.LoggingMXBean} is deprecated and
* replaced with {@code java.lang.management.PlatformLoggingMXBean}. Use
- * {@link java.lang.management.ManagementFactory#getPlatformMXBean(Class)
+ * {@link java.management/java.lang.management.ManagementFactory#getPlatformMXBean(Class)
* ManagementFactory.getPlatformMXBean}(PlatformLoggingMXBean.class)
* instead.
*
- * @see java.lang.management.PlatformLoggingMXBean
+ * @see java.management/java.lang.management.PlatformLoggingMXBean
* @since 1.5
*/
@Deprecated(since="9")
diff --git a/src/java.logging/share/classes/java/util/logging/LoggingMXBean.java b/src/java.logging/share/classes/java/util/logging/LoggingMXBean.java
index 812eb36622d..b966421f9b0 100644
--- a/src/java.logging/share/classes/java/util/logging/LoggingMXBean.java
+++ b/src/java.logging/share/classes/java/util/logging/LoggingMXBean.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -29,18 +29,18 @@ package java.util.logging;
/**
* The management interface for the logging facility.
*
- * {@link java.lang.management.PlatformLoggingMXBean
+ * {@link java.management/java.lang.management.PlatformLoggingMXBean
* java.lang.management.PlatformLoggingMXBean} is the management interface
* for logging facility registered in the {@link
- * java.lang.management.ManagementFactory#getPlatformMBeanServer()
+ * java.management/java.lang.management.ManagementFactory#getPlatformMBeanServer()
* platform MBeanServer}.
* It is recommended to use the {@code PlatformLoggingMXBean} obtained via
- * the {@link java.lang.management.ManagementFactory#getPlatformMXBean(Class)
+ * the {@link java.management/java.lang.management.ManagementFactory#getPlatformMXBean(Class)
* ManagementFactory.getPlatformMXBean(PlatformLoggingMXBean.class)} method.
*
* @deprecated {@code LoggingMXBean} is no longer a {@link
- * java.lang.management.PlatformManagedObject platform MXBean} and is replaced
- * with {@link java.lang.management.PlatformLoggingMXBean}.
+ * java.management/java.lang.management.PlatformManagedObject platform MXBean} and is replaced
+ * with {@link java.management/java.lang.management.PlatformLoggingMXBean}.
* It will not register in the platform {@code MBeanServer}.
* Use {@code ManagementFactory.getPlatformMXBean(PlatformLoggingMXBean.class)}
* instead.
@@ -49,7 +49,7 @@ package java.util.logging;
* @author Mandy Chung
* @since 1.5
*
- * @see java.lang.management.PlatformLoggingMXBean
+ * @see java.management/java.lang.management.PlatformLoggingMXBean
*/
@Deprecated(since="9")
public interface LoggingMXBean {
diff --git a/src/java.management/share/classes/java/lang/management/ManagementFactory.java b/src/java.management/share/classes/java/lang/management/ManagementFactory.java
index cba413ccf63..76bc7417e68 100644
--- a/src/java.management/share/classes/java/lang/management/ManagementFactory.java
+++ b/src/java.management/share/classes/java/lang/management/ManagementFactory.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2021, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -176,7 +176,7 @@ import sun.management.spi.PlatformMBeanProvider.PlatformComponent;
*
*
*
diff --git a/src/java.management/share/classes/java/lang/management/PlatformLoggingMXBean.java b/src/java.management/share/classes/java/lang/management/PlatformLoggingMXBean.java
index 80595dd75d6..280d145be37 100644
--- a/src/java.management/share/classes/java/lang/management/PlatformLoggingMXBean.java
+++ b/src/java.management/share/classes/java/lang/management/PlatformLoggingMXBean.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2009, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,7 +26,7 @@
package java.lang.management;
/**
- * The management interface for the {@linkplain java.util.logging logging} facility.
+ * The management interface for the {@linkplain java.logging/java.util.logging logging} facility.
*
*
There is a single global instance of the {@code PlatformLoggingMXBean}.
* The {@link java.lang.management.ManagementFactory#getPlatformMXBean(Class)
@@ -41,7 +41,7 @@ package java.lang.management;
* The {@link javax.management.ObjectName ObjectName} for uniquely
* identifying the {@code PlatformLoggingMXBean} within an MBeanServer is:
*
*
* @since 1.7
@@ -50,8 +50,8 @@ public interface PlatformLoggingMXBean extends PlatformManagedObject {
/**
* Returns the list of the currently registered
- * {@linkplain java.util.logging.Logger logger} names. This method
- * calls {@link java.util.logging.LogManager#getLoggerNames} and
+ * {@linkplain java.logging/java.util.logging.Logger logger} names. This method
+ * calls {@link java.logging/java.util.logging.LogManager#getLoggerNames} and
* returns a list of the logger names.
*
* @return A list of {@code String} each of which is a
@@ -60,15 +60,15 @@ public interface PlatformLoggingMXBean extends PlatformManagedObject {
java.util.List getLoggerNames();
/**
- * Gets the name of the log {@linkplain java.util.logging.Logger#getLevel
+ * Gets the name of the log {@linkplain java.logging/java.util.logging.Logger#getLevel
* level} associated with the specified logger.
* If the specified logger does not exist, {@code null}
* is returned.
* This method first finds the logger of the given name and
* then returns the name of the log level by calling:
*
@@ -83,16 +83,16 @@ public interface PlatformLoggingMXBean extends PlatformManagedObject {
* is {@code null}. If the specified logger does not
* exist, {@code null} is returned.
*
- * @see java.util.logging.Logger#getLevel
+ * @see java.logging/java.util.logging.Logger#getLevel
*/
String getLoggerLevel(String loggerName);
/**
* Sets the specified logger to the specified new
- * {@linkplain java.util.logging.Logger#setLevel level}.
+ * {@linkplain java.logging/java.util.logging.Logger#setLevel level}.
* If the {@code levelName} is not {@code null}, the level
* of the specified logger is set to the parsed
- * {@link java.util.logging.Level Level}
+ * {@link java.logging/java.util.logging.Level Level}
* matching the {@code levelName}.
* If the {@code levelName} is {@code null}, the level
* of the specified logger is set to {@code null} and
@@ -111,13 +111,13 @@ public interface PlatformLoggingMXBean extends PlatformManagedObject {
* @throws SecurityException if a security manager exists and if
* the caller does not have LoggingPermission("control").
*
- * @see java.util.logging.Logger#setLevel
+ * @see java.logging/java.util.logging.Logger#setLevel
*/
void setLoggerLevel(String loggerName, String levelName);
/**
* Returns the name of the
- * {@linkplain java.util.logging.Logger#getParent parent}
+ * {@linkplain java.logging/java.util.logging.Logger#getParent parent}
* for the specified logger.
* If the specified logger does not exist, {@code null} is returned.
* If the specified logger is the root {@code Logger} in the namespace,
diff --git a/src/java.management/share/classes/javax/management/remote/JMXAddressable.java b/src/java.management/share/classes/javax/management/remote/JMXAddressable.java
index cc770b75194..973626b99a1 100644
--- a/src/java.management/share/classes/javax/management/remote/JMXAddressable.java
+++ b/src/java.management/share/classes/javax/management/remote/JMXAddressable.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -32,7 +32,7 @@ package javax.management.remote;
* Depending on the connector implementation, a {@link JMXConnector}
* object may implement this interface too. {@code JMXConnector}
* objects for the RMI Connector are instances of
- * {@link javax.management.remote.rmi.RMIConnector RMIConnector} which
+ * {@link java.management.rmi/javax.management.remote.rmi.RMIConnector RMIConnector} which
* implements this interface.
*
*
An object implementing this interface might not have an address
diff --git a/src/java.management/share/classes/javax/management/remote/JMXServerErrorException.java b/src/java.management/share/classes/javax/management/remote/JMXServerErrorException.java
index a8bf827fd3e..856234ad5dc 100644
--- a/src/java.management/share/classes/javax/management/remote/JMXServerErrorException.java
+++ b/src/java.management/share/classes/javax/management/remote/JMXServerErrorException.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2002, 2007, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -38,7 +38,7 @@ import javax.management.MBeanServer;
* JMXServerErrorException instance contains the original
* Error that occurred as its cause.
*
- * @see java.rmi.ServerError
+ * @see java.rmi/java.rmi.ServerError
* @since 1.5
*/
public class JMXServerErrorException extends IOException {
--
GitLab
From e3076552ec528864e61a6e0ec91e228006fddefc Mon Sep 17 00:00:00 2001
From: Ian Graves
Date: Mon, 24 Jan 2022 22:21:22 +0000
Subject: [PATCH 012/400] 8280403: RegEx: String.split can fail with NPE in
Pattern.CharPredicate::match
Reviewed-by: lancea, iris, naoto, rriggs
---
.../share/classes/java/util/regex/Pattern.java | 4 +++-
test/jdk/java/util/regex/RegExTest.java | 11 ++++++++++-
2 files changed, 13 insertions(+), 2 deletions(-)
diff --git a/src/java.base/share/classes/java/util/regex/Pattern.java b/src/java.base/share/classes/java/util/regex/Pattern.java
index 84e1063621d..b1e3977d0b2 100644
--- a/src/java.base/share/classes/java/util/regex/Pattern.java
+++ b/src/java.base/share/classes/java/util/regex/Pattern.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1999, 2021, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -2689,6 +2689,8 @@ loop: for(int x=0, offset=0; x
+ Pattern.compile(pattern));
+ assertTrue(e.getMessage().contains("Bad intersection syntax"));
+ }
}
--
GitLab
From f35df5bfb5d23f439fb64e8511fd5ca34c773f30 Mon Sep 17 00:00:00 2001
From: David Holmes
Date: Tue, 25 Jan 2022 01:22:48 +0000
Subject: [PATCH 013/400] 8280422: thread_from_jni_environment can never return
NULL
Reviewed-by: shade, kbarrett
---
src/hotspot/share/runtime/globals.hpp | 4 ----
.../share/runtime/interfaceSupport.inline.hpp | 9 ++++++--
src/hotspot/share/runtime/thread.hpp | 23 +++++++++++--------
3 files changed, 21 insertions(+), 15 deletions(-)
diff --git a/src/hotspot/share/runtime/globals.hpp b/src/hotspot/share/runtime/globals.hpp
index c963a69fa60..bc80a2eb45f 100644
--- a/src/hotspot/share/runtime/globals.hpp
+++ b/src/hotspot/share/runtime/globals.hpp
@@ -1191,10 +1191,6 @@ const intx ObjectAlignmentInBytes = 8;
develop(bool, VerifyJNIFields, trueInDebug, \
"Verify jfieldIDs for instance fields") \
\
- notproduct(bool, VerifyJNIEnvThread, false, \
- "Verify JNIEnv.thread == Thread::current() when entering VM " \
- "from JNI") \
- \
develop(bool, VerifyFPU, false, \
"Verify FPU state (check for NaN's, etc.)") \
\
diff --git a/src/hotspot/share/runtime/interfaceSupport.inline.hpp b/src/hotspot/share/runtime/interfaceSupport.inline.hpp
index 26a0cfe608e..13ecf2d80ce 100644
--- a/src/hotspot/share/runtime/interfaceSupport.inline.hpp
+++ b/src/hotspot/share/runtime/interfaceSupport.inline.hpp
@@ -340,6 +340,11 @@ class VMNativeEntryWrapper {
#define JRT_END }
// Definitions for JNI
+//
+// As the JNIEnv can be passed from external native code we validate
+// it in debug builds, primarily for our own testing. In general JNI
+// does not attempt to detect programming errors and a bad JNIEnv may
+// not even be readable.
#define JNI_ENTRY(result_type, header) \
JNI_ENTRY_NO_PRESERVE(result_type, header) \
@@ -349,7 +354,7 @@ class VMNativeEntryWrapper {
extern "C" { \
result_type JNICALL header { \
JavaThread* thread=JavaThread::thread_from_jni_environment(env); \
- assert( !VerifyJNIEnvThread || (thread == Thread::current()), "JNIEnv is only valid in same thread"); \
+ assert(thread == Thread::current(), "JNIEnv is only valid in same thread"); \
MACOS_AARCH64_ONLY(ThreadWXEnable __wx(WXWrite, thread)); \
ThreadInVMfromNative __tiv(thread); \
debug_only(VMNativeEntryWrapper __vew;) \
@@ -360,7 +365,7 @@ extern "C" { \
extern "C" { \
result_type JNICALL header { \
JavaThread* thread=JavaThread::thread_from_jni_environment(env); \
- assert( !VerifyJNIEnvThread || (thread == Thread::current()), "JNIEnv is only valid in same thread"); \
+ assert(thread == Thread::current(), "JNIEnv is only valid in same thread"); \
VM_LEAF_BASE(result_type, header)
diff --git a/src/hotspot/share/runtime/thread.hpp b/src/hotspot/share/runtime/thread.hpp
index 74916b98275..71100dbe637 100644
--- a/src/hotspot/share/runtime/thread.hpp
+++ b/src/hotspot/share/runtime/thread.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2021, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2022, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2021, Azul Systems, Inc. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
@@ -1312,16 +1312,21 @@ class JavaThread: public Thread {
// Returns the jni environment for this thread
JNIEnv* jni_environment() { return &_jni_environment; }
+ // Returns the current thread as indicated by the given JNIEnv.
+ // We don't assert it is Thread::current here as that is done at the
+ // external JNI entry points where the JNIEnv is passed into the VM.
static JavaThread* thread_from_jni_environment(JNIEnv* env) {
- JavaThread *thread_from_jni_env = (JavaThread*)((intptr_t)env - in_bytes(jni_environment_offset()));
- // Only return NULL if thread is off the thread list; starting to
- // exit should not return NULL.
- if (thread_from_jni_env->is_terminated()) {
- thread_from_jni_env->block_if_vm_exited();
- return NULL;
- } else {
- return thread_from_jni_env;
+ JavaThread* current = (JavaThread*)((intptr_t)env - in_bytes(jni_environment_offset()));
+ // We can't get here in a thread that has completed its execution and so
+ // "is_terminated", but a thread is also considered terminated if the VM
+ // has exited, so we have to check this and block in case this is a daemon
+ // thread returning to the VM (the JNI DirectBuffer entry points rely on
+ // this).
+ if (current->is_terminated()) {
+ current->block_if_vm_exited();
+ ShouldNotReachHere();
}
+ return current;
}
// JNI critical regions. These can nest.
--
GitLab
From a59d717fd65d523bb6f4fc57949054e904a149f1 Mon Sep 17 00:00:00 2001
From: Zhengyu Gu
Date: Tue, 25 Jan 2022 01:31:24 +0000
Subject: [PATCH 014/400] 8280289: Enhance debug pp() command with NMT info
Reviewed-by: stuefe, iklam
---
src/hotspot/share/services/mallocTracker.cpp | 55 ++++++++++++-------
src/hotspot/share/services/mallocTracker.hpp | 14 +++--
.../share/services/virtualMemoryTracker.cpp | 28 +++++++++-
.../share/services/virtualMemoryTracker.hpp | 6 +-
src/hotspot/share/utilities/debug.cpp | 40 +++++++++++++-
5 files changed, 113 insertions(+), 30 deletions(-)
diff --git a/src/hotspot/share/services/mallocTracker.cpp b/src/hotspot/share/services/mallocTracker.cpp
index 285a60d853f..e27d312ad81 100644
--- a/src/hotspot/share/services/mallocTracker.cpp
+++ b/src/hotspot/share/services/mallocTracker.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, 2021, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -31,6 +31,8 @@
#include "utilities/debug.hpp"
#include "utilities/ostream.hpp"
+#include "jvm_io.h"
+
size_t MallocMemorySummary::_snapshot[CALC_OBJ_SIZE_IN_TYPE(MallocMemorySnapshot, size_t)];
#ifdef ASSERT
@@ -115,7 +117,7 @@ void MallocHeader::mark_block_as_dead() {
void MallocHeader::release() {
assert(MemTracker::enabled(), "Sanity");
- check_block_integrity();
+ assert_block_integrity();
MallocMemorySummary::record_free(size(), flags());
MallocMemorySummary::record_free_malloc_header(sizeof(MallocHeader));
@@ -153,13 +155,18 @@ void MallocHeader::print_block_on_error(outputStream* st, address bad_address) c
os::print_hex_dump(st, from1, to2, 1);
}
}
+void MallocHeader::assert_block_integrity() const {
+ char msg[256];
+ address corruption = NULL;
+ if (!check_block_integrity(msg, sizeof(msg), &corruption)) {
+ if (corruption != NULL) {
+ print_block_on_error(tty, (address)this);
+ }
+ fatal("NMT corruption: Block at " PTR_FORMAT ": %s", p2i(this), msg);
+ }
+}
-// Check block integrity. If block is broken, print out a report
-// to tty (optionally with hex dump surrounding the broken block),
-// then trigger a fatal error.
-void MallocHeader::check_block_integrity() const {
-
-#define PREFIX "NMT corruption: "
+bool MallocHeader::check_block_integrity(char* msg, size_t msglen, address* p_corruption) const {
// Note: if you modify the error messages here, make sure you
// adapt the associated gtests too.
@@ -167,7 +174,8 @@ void MallocHeader::check_block_integrity() const {
// values. Note that we should not call this for ::free(NULL),
// which should be handled by os::free() above us.
if (((size_t)p2i(this)) < K) {
- fatal(PREFIX "Block at " PTR_FORMAT ": invalid block address", p2i(this));
+ jio_snprintf(msg, msglen, "invalid block address");
+ return false;
}
// From here on we assume the block pointer to be valid. We could
@@ -186,37 +194,42 @@ void MallocHeader::check_block_integrity() const {
// Should we ever start using std::max_align_t, this would be one place to
// fix up.
if (!is_aligned(this, sizeof(uint64_t))) {
- print_block_on_error(tty, (address)this);
- fatal(PREFIX "Block at " PTR_FORMAT ": block address is unaligned", p2i(this));
+ *p_corruption = (address)this;
+ jio_snprintf(msg, msglen, "block address is unaligned");
+ return false;
}
// Check header canary
if (_canary != _header_canary_life_mark) {
- print_block_on_error(tty, (address)this);
- fatal(PREFIX "Block at " PTR_FORMAT ": header canary broken.", p2i(this));
+ *p_corruption = (address)this;
+ jio_snprintf(msg, msglen, "header canary broken");
+ return false;
}
#ifndef _LP64
// On 32-bit we have a second canary, check that one too.
if (_alt_canary != _header_alt_canary_life_mark) {
- print_block_on_error(tty, (address)this);
- fatal(PREFIX "Block at " PTR_FORMAT ": header alternate canary broken.", p2i(this));
+ *p_corruption = (address)this;
+ jio_snprintf(msg, msglen, "header canary broken");
+ return false;
}
#endif
// Does block size seems reasonable?
if (_size >= max_reasonable_malloc_size) {
- print_block_on_error(tty, (address)this);
- fatal(PREFIX "Block at " PTR_FORMAT ": header looks invalid (weirdly large block size)", p2i(this));
+ *p_corruption = (address)this;
+ jio_snprintf(msg, msglen, "header looks invalid (weirdly large block size)");
+ return false;
}
// Check footer canary
if (get_footer() != _footer_canary_life_mark) {
- print_block_on_error(tty, footer_address());
- fatal(PREFIX "Block at " PTR_FORMAT ": footer canary broken at " PTR_FORMAT " (buffer overflow?)",
- p2i(this), p2i(footer_address()));
+ *p_corruption = footer_address();
+ jio_snprintf(msg, msglen, "footer canary broken at " PTR_FORMAT " (buffer overflow?)",
+ p2i(footer_address()));
+ return false;
}
-#undef PREFIX
+ return true;
}
bool MallocHeader::record_malloc_site(const NativeCallStack& stack, size_t size,
diff --git a/src/hotspot/share/services/mallocTracker.hpp b/src/hotspot/share/services/mallocTracker.hpp
index 6490b3d53ff..a0953c2b186 100644
--- a/src/hotspot/share/services/mallocTracker.hpp
+++ b/src/hotspot/share/services/mallocTracker.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, 2021, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -314,10 +314,9 @@ class MallocHeader {
// We discount sizes larger than these
static const size_t max_reasonable_malloc_size = LP64_ONLY(256 * G) NOT_LP64(3500 * M);
- // Check block integrity. If block is broken, print out a report
- // to tty (optionally with hex dump surrounding the broken block),
- // then trigger a fatal error.
- void check_block_integrity() const;
+ // If block is broken, print out a report to tty (optionally with
+ // hex dump surrounding the broken block), then trigger a fatal error
+ void assert_block_integrity() const;
void print_block_on_error(outputStream* st, address bad_address) const;
void mark_block_as_dead();
@@ -363,6 +362,11 @@ class MallocHeader {
// Cleanup tracking information and mark block as dead before the memory is released.
void release();
+ // If block is broken, fill in a short descriptive text in out,
+ // an option pointer to the corruption in p_corruption, and return false.
+ // Return true if block is fine.
+ bool check_block_integrity(char* msg, size_t msglen, address* p_corruption) const;
+
private:
inline void set_size(size_t size) {
_size = size;
diff --git a/src/hotspot/share/services/virtualMemoryTracker.cpp b/src/hotspot/share/services/virtualMemoryTracker.cpp
index 77fb24927f5..53a2cf10642 100644
--- a/src/hotspot/share/services/virtualMemoryTracker.cpp
+++ b/src/hotspot/share/services/virtualMemoryTracker.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2021, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -671,3 +671,29 @@ bool VirtualMemoryTracker::walk_virtual_memory(VirtualMemoryWalker* walker) {
}
return true;
}
+
+class FindAndSnapshotRegionWalker : public VirtualMemoryWalker {
+private:
+ ReservedMemoryRegion& _region;
+ const address _p;
+ bool _found_region;
+public:
+ FindAndSnapshotRegionWalker(void* p, ReservedMemoryRegion& region) :
+ _region(region), _p((address)p), _found_region(false) { }
+
+ bool do_allocation_site(const ReservedMemoryRegion* rgn) {
+ if (rgn->contain_address(_p)) {
+ _region = *rgn;
+ _found_region = true;
+ return false;
+ }
+ return true;
+ }
+ bool found_region() const { return _found_region; }
+};
+
+const bool VirtualMemoryTracker::snapshot_region_contains(void* p, ReservedMemoryRegion& region) {
+ FindAndSnapshotRegionWalker walker(p, region);
+ walk_virtual_memory(&walker);
+ return walker.found_region();
+}
diff --git a/src/hotspot/share/services/virtualMemoryTracker.hpp b/src/hotspot/share/services/virtualMemoryTracker.hpp
index c96af6b8387..2f04503cf6e 100644
--- a/src/hotspot/share/services/virtualMemoryTracker.hpp
+++ b/src/hotspot/share/services/virtualMemoryTracker.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2021, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -341,7 +341,7 @@ class ReservedMemoryRegion : public VirtualMemoryRegion {
return *this;
}
- const char* flag_name() { return NMTUtil::flag_to_name(_flag); }
+ const char* flag_name() const { return NMTUtil::flag_to_name(_flag); }
private:
// The committed region contains the uncommitted region, subtract the uncommitted
@@ -387,6 +387,8 @@ class VirtualMemoryTracker : AllStatic {
// Walk virtual memory data structure for creating baseline, etc.
static bool walk_virtual_memory(VirtualMemoryWalker* walker);
+ static const bool snapshot_region_contains(void* p, ReservedMemoryRegion& region);
+
// Snapshot current thread stacks
static void snapshot_thread_stacks();
diff --git a/src/hotspot/share/utilities/debug.cpp b/src/hotspot/share/utilities/debug.cpp
index 1a0c3a84647..c3c98d3067f 100644
--- a/src/hotspot/share/utilities/debug.cpp
+++ b/src/hotspot/share/utilities/debug.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2021, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -44,6 +44,7 @@
#include "runtime/handles.inline.hpp"
#include "runtime/java.hpp"
#include "runtime/os.hpp"
+#include "runtime/safefetch.inline.hpp"
#include "runtime/sharedRuntime.hpp"
#include "runtime/stubCodeGenerator.hpp"
#include "runtime/stubRoutines.hpp"
@@ -51,7 +52,9 @@
#include "runtime/vframe.hpp"
#include "runtime/vm_version.hpp"
#include "services/heapDumper.hpp"
+#include "services/mallocTracker.hpp"
#include "services/memTracker.hpp"
+#include "services/virtualMemoryTracker.hpp"
#include "utilities/defaultStream.hpp"
#include "utilities/events.hpp"
#include "utilities/formatBuffer.hpp"
@@ -480,6 +483,41 @@ extern "C" JNIEXPORT void pp(void* p) {
oop obj = cast_to_oop(p);
obj->print();
} else {
+#if INCLUDE_NMT
+ // With NMT
+ if (MemTracker::enabled()) {
+ const NMT_TrackingLevel tracking_level = MemTracker::tracking_level();
+ ReservedMemoryRegion region(0, 0);
+ // Check and snapshot a mmap'd region that contains the pointer
+ if (VirtualMemoryTracker::snapshot_region_contains(p, region)) {
+ tty->print_cr(PTR_FORMAT " in mmap'd memory region [" PTR_FORMAT " - " PTR_FORMAT "] by %s",
+ p2i(p), p2i(region.base()), p2i(region.base() + region.size()), region.flag_name());
+ if (tracking_level == NMT_detail) {
+ region.call_stack()->print_on(tty);
+ tty->cr();
+ }
+ return;
+ }
+ // Check if it is a malloc'd memory block
+ if (CanUseSafeFetchN() && SafeFetchN((intptr_t*)p, 0) != 0) {
+ const MallocHeader* mhdr = (const MallocHeader*)MallocTracker::get_base(p, tracking_level);
+ char msg[256];
+ address p_corrupted;
+ if (SafeFetchN((intptr_t*)mhdr, 0) != 0 && mhdr->check_block_integrity(msg, sizeof(msg), &p_corrupted)) {
+ tty->print_cr(PTR_FORMAT " malloc'd " SIZE_FORMAT " bytes by %s",
+ p2i(p), mhdr->size(), NMTUtil::flag_to_name(mhdr->flags()));
+ if (tracking_level == NMT_detail) {
+ NativeCallStack ncs;
+ if (mhdr->get_stack(ncs)) {
+ ncs.print_on(tty);
+ tty->cr();
+ }
+ }
+ return;
+ }
+ }
+ }
+#endif // INCLUDE_NMT
tty->print(PTR_FORMAT, p2i(p));
}
}
--
GitLab
From 53804720a04b5b314701de82eddf1a55798eba00 Mon Sep 17 00:00:00 2001
From: Andrey Turbanov
Date: Tue, 25 Jan 2022 08:08:17 +0000
Subject: [PATCH 015/400] 8280470: Confusing instanceof check in
HijrahChronology.range
Reviewed-by: rriggs, naoto, dfuchs, iris
---
.../java/time/chrono/HijrahChronology.java | 22 ++++++++-----------
1 file changed, 9 insertions(+), 13 deletions(-)
diff --git a/src/java.base/share/classes/java/time/chrono/HijrahChronology.java b/src/java.base/share/classes/java/time/chrono/HijrahChronology.java
index 87f307e15d3..1ce99906708 100644
--- a/src/java.base/share/classes/java/time/chrono/HijrahChronology.java
+++ b/src/java.base/share/classes/java/time/chrono/HijrahChronology.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2021, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -533,18 +533,14 @@ public final class HijrahChronology extends AbstractChronology implements Serial
@Override
public ValueRange range(ChronoField field) {
checkCalendarInit();
- if (field instanceof ChronoField) {
- ChronoField f = field;
- return switch (f) {
- case DAY_OF_MONTH -> ValueRange.of(1, 1, getMinimumMonthLength(), getMaximumMonthLength());
- case DAY_OF_YEAR -> ValueRange.of(1, getMaximumDayOfYear());
- case ALIGNED_WEEK_OF_MONTH -> ValueRange.of(1, 5);
- case YEAR, YEAR_OF_ERA -> ValueRange.of(getMinimumYear(), getMaximumYear());
- case ERA -> ValueRange.of(1, 1);
- default -> field.range();
- };
- }
- return field.range();
+ return switch (field) {
+ case DAY_OF_MONTH -> ValueRange.of(1, 1, getMinimumMonthLength(), getMaximumMonthLength());
+ case DAY_OF_YEAR -> ValueRange.of(1, getMaximumDayOfYear());
+ case ALIGNED_WEEK_OF_MONTH -> ValueRange.of(1, 5);
+ case YEAR, YEAR_OF_ERA -> ValueRange.of(getMinimumYear(), getMaximumYear());
+ case ERA -> ValueRange.of(1, 1);
+ default -> field.range();
+ };
}
//-----------------------------------------------------------------------
--
GitLab
From b32774653f72f379655192874cb7076079d238e6 Mon Sep 17 00:00:00 2001
From: Thomas Schatzl
Date: Tue, 25 Jan 2022 09:12:18 +0000
Subject: [PATCH 016/400] 8280384: Parallel: Remove VMThread specific
ParCompactionManager
Reviewed-by: ayang, sjohanss
---
.../share/gc/parallel/psCompactionManager.cpp | 13 ++++----
.../share/gc/parallel/psCompactionManager.hpp | 4 ++-
.../share/gc/parallel/psParallelCompact.cpp | 30 ++++---------------
.../share/gc/parallel/psParallelCompact.hpp | 5 ++--
.../gc/parallel/psParallelCompact.inline.hpp | 6 +---
.../share/gc/parallel/psPromotionManager.cpp | 12 ++++----
.../gc/parallel/psPromotionManager.inline.hpp | 2 +-
7 files changed, 23 insertions(+), 49 deletions(-)
diff --git a/src/hotspot/share/gc/parallel/psCompactionManager.cpp b/src/hotspot/share/gc/parallel/psCompactionManager.cpp
index 0a71ec80e3b..3a7fc8ae758 100644
--- a/src/hotspot/share/gc/parallel/psCompactionManager.cpp
+++ b/src/hotspot/share/gc/parallel/psCompactionManager.cpp
@@ -70,7 +70,7 @@ void ParCompactionManager::initialize(ParMarkBitMap* mbm) {
uint parallel_gc_threads = ParallelScavengeHeap::heap()->workers().max_workers();
assert(_manager_array == NULL, "Attempt to initialize twice");
- _manager_array = NEW_C_HEAP_ARRAY(ParCompactionManager*, parallel_gc_threads+1, mtGC);
+ _manager_array = NEW_C_HEAP_ARRAY(ParCompactionManager*, parallel_gc_threads, mtGC);
_oop_task_queues = new OopTaskQueueSet(parallel_gc_threads);
_objarray_task_queues = new ObjArrayTaskQueueSet(parallel_gc_threads);
@@ -84,9 +84,6 @@ void ParCompactionManager::initialize(ParMarkBitMap* mbm) {
region_task_queues()->register_queue(i, _manager_array[i]->region_stack());
}
- // The VMThread gets its own ParCompactionManager, which is not available
- // for work stealing.
- _manager_array[parallel_gc_threads] = new ParCompactionManager();
assert(ParallelScavengeHeap::heap()->workers().max_workers() != 0,
"Not initialized?");
@@ -97,14 +94,14 @@ void ParCompactionManager::initialize(ParMarkBitMap* mbm) {
void ParCompactionManager::reset_all_bitmap_query_caches() {
uint parallel_gc_threads = ParallelScavengeHeap::heap()->workers().max_workers();
- for (uint i=0; i<=parallel_gc_threads; i++) {
+ for (uint i=0; ireset_bitmap_query_cache();
}
}
void ParCompactionManager::flush_all_string_dedup_requests() {
uint parallel_gc_threads = ParallelScavengeHeap::heap()->workers().max_workers();
- for (uint i=0; i<=parallel_gc_threads; i++) {
+ for (uint i=0; iflush_string_dedup_requests();
}
}
@@ -184,14 +181,14 @@ void ParCompactionManager::remove_all_shadow_regions() {
#ifdef ASSERT
void ParCompactionManager::verify_all_marking_stack_empty() {
uint parallel_gc_threads = ParallelGCThreads;
- for (uint i = 0; i <= parallel_gc_threads; i++) {
+ for (uint i = 0; i < parallel_gc_threads; i++) {
assert(_manager_array[i]->marking_stacks_empty(), "Marking stack should be empty");
}
}
void ParCompactionManager::verify_all_region_stack_empty() {
uint parallel_gc_threads = ParallelGCThreads;
- for (uint i = 0; i <= parallel_gc_threads; i++) {
+ for (uint i = 0; i < parallel_gc_threads; i++) {
assert(_manager_array[i]->region_stack()->is_empty(), "Region stack should be empty");
}
}
diff --git a/src/hotspot/share/gc/parallel/psCompactionManager.hpp b/src/hotspot/share/gc/parallel/psCompactionManager.hpp
index 2e73da920b5..4299f7e4c02 100644
--- a/src/hotspot/share/gc/parallel/psCompactionManager.hpp
+++ b/src/hotspot/share/gc/parallel/psCompactionManager.hpp
@@ -147,7 +147,9 @@ class ParCompactionManager : public CHeapObj {
RegionTaskQueue* region_stack() { return &_region_stack; }
- static ParCompactionManager* get_vmthread_cm() { return _manager_array[ParallelGCThreads]; }
+ // Get the compaction manager when doing evacuation work from the VM thread.
+ // Simply use the first compaction manager here.
+ static ParCompactionManager* get_vmthread_cm() { return _manager_array[0]; }
ParCompactionManager();
diff --git a/src/hotspot/share/gc/parallel/psParallelCompact.cpp b/src/hotspot/share/gc/parallel/psParallelCompact.cpp
index 9d30f4bf2e2..4657975b1bc 100644
--- a/src/hotspot/share/gc/parallel/psParallelCompact.cpp
+++ b/src/hotspot/share/gc/parallel/psParallelCompact.cpp
@@ -1595,8 +1595,7 @@ void PSParallelCompact::summary_phase_msg(SpaceId dst_space_id,
}
#endif // #ifndef PRODUCT
-void PSParallelCompact::summary_phase(ParCompactionManager* cm,
- bool maximum_compaction)
+void PSParallelCompact::summary_phase(bool maximum_compaction)
{
GCTraceTime(Info, gc, phases) tm("Summary Phase", &_gc_timer);
@@ -1756,9 +1755,6 @@ bool PSParallelCompact::invoke_no_policy(bool maximum_heap_compaction) {
const PreGenGCValues pre_gc_values = heap->get_pre_gc_values();
- // Get the compaction manager reserved for the VM thread.
- ParCompactionManager* const vmthread_cm = ParCompactionManager::get_vmthread_cm();
-
{
const uint active_workers =
WorkerPolicy::calc_active_workers(ParallelScavengeHeap::heap()->workers().max_workers(),
@@ -1787,11 +1783,11 @@ bool PSParallelCompact::invoke_no_policy(bool maximum_heap_compaction) {
ref_processor()->start_discovery(maximum_heap_compaction);
- marking_phase(vmthread_cm, &_gc_tracer);
+ marking_phase(&_gc_tracer);
bool max_on_system_gc = UseMaximumCompactionOnSystemGC
&& GCCause::is_user_requested_gc(gc_cause);
- summary_phase(vmthread_cm, maximum_heap_compaction || max_on_system_gc);
+ summary_phase(maximum_heap_compaction || max_on_system_gc);
#if COMPILER2_OR_JVMCI
assert(DerivedPointerTable::is_active(), "Sanity");
@@ -2063,8 +2059,7 @@ public:
}
};
-void PSParallelCompact::marking_phase(ParCompactionManager* cm,
- ParallelOldTracer *gc_tracer) {
+void PSParallelCompact::marking_phase(ParallelOldTracer *gc_tracer) {
// Recursively traverse all live objects and mark them
GCTraceTime(Info, gc, phases) tm("Marking Phase", &_gc_timer);
@@ -2125,19 +2120,6 @@ void PSParallelCompact::marking_phase(ParCompactionManager* cm,
_gc_tracer.report_object_count_after_gc(is_alive_closure());
}
-#ifdef ASSERT
-void PCAdjustPointerClosure::verify_cm(ParCompactionManager* cm) {
- assert(cm != NULL, "associate ParCompactionManage should not be NULL");
- auto vmthread_cm = ParCompactionManager::get_vmthread_cm();
- if (Thread::current()->is_VM_thread()) {
- assert(cm == vmthread_cm, "VM threads should use ParCompactionManager from get_vmthread_cm()");
- } else {
- assert(Thread::current()->is_Worker_thread(), "Must be a GC thread");
- assert(cm != vmthread_cm, "GC threads should use ParCompactionManager from gc_thread_compaction_manager()");
- }
-}
-#endif
-
class PSAdjustTask final : public WorkerTask {
SubTasksDone _sub_tasks;
WeakProcessor::Task _weak_proc_task;
@@ -2528,9 +2510,7 @@ void PSParallelCompact::compact() {
{
GCTraceTime(Trace, gc, phases) tm("Deferred Updates", &_gc_timer);
- // Update the deferred objects, if any. In principle, any compaction
- // manager can be used. However, since the current thread is VM thread, we
- // use the rightful one to keep the verification logic happy.
+ // Update the deferred objects, if any.
ParCompactionManager* cm = ParCompactionManager::get_vmthread_cm();
for (unsigned int id = old_space_id; id < last_space_id; ++id) {
update_deferred_objects(cm, SpaceId(id));
diff --git a/src/hotspot/share/gc/parallel/psParallelCompact.hpp b/src/hotspot/share/gc/parallel/psParallelCompact.hpp
index 0b8eb6b0116..77a9d44f9b6 100644
--- a/src/hotspot/share/gc/parallel/psParallelCompact.hpp
+++ b/src/hotspot/share/gc/parallel/psParallelCompact.hpp
@@ -1062,8 +1062,7 @@ class PSParallelCompact : AllStatic {
static void post_compact();
// Mark live objects
- static void marking_phase(ParCompactionManager* cm,
- ParallelOldTracer *gc_tracer);
+ static void marking_phase(ParallelOldTracer *gc_tracer);
// Compute the dense prefix for the designated space. This is an experimental
// implementation currently not used in production.
@@ -1123,7 +1122,7 @@ class PSParallelCompact : AllStatic {
static void summarize_spaces_quick();
static void summarize_space(SpaceId id, bool maximum_compaction);
- static void summary_phase(ParCompactionManager* cm, bool maximum_compaction);
+ static void summary_phase(bool maximum_compaction);
// Adjust addresses in roots. Does not adjust addresses in heap.
static void adjust_roots();
diff --git a/src/hotspot/share/gc/parallel/psParallelCompact.inline.hpp b/src/hotspot/share/gc/parallel/psParallelCompact.inline.hpp
index 001f55c076a..48c5a98fd1a 100644
--- a/src/hotspot/share/gc/parallel/psParallelCompact.inline.hpp
+++ b/src/hotspot/share/gc/parallel/psParallelCompact.inline.hpp
@@ -126,9 +126,7 @@ inline void PSParallelCompact::adjust_pointer(T* p, ParCompactionManager* cm) {
class PCAdjustPointerClosure: public BasicOopIterateClosure {
public:
- PCAdjustPointerClosure(ParCompactionManager* cm) {
- verify_cm(cm);
- _cm = cm;
+ PCAdjustPointerClosure(ParCompactionManager* cm) : _cm(cm) {
}
template void do_oop_nv(T* p) { PSParallelCompact::adjust_pointer(p, _cm); }
virtual void do_oop(oop* p) { do_oop_nv(p); }
@@ -137,8 +135,6 @@ public:
virtual ReferenceIterationMode reference_iteration_mode() { return DO_FIELDS; }
private:
ParCompactionManager* _cm;
-
- static void verify_cm(ParCompactionManager* cm) NOT_DEBUG_RETURN;
};
#endif // SHARE_GC_PARALLEL_PSPARALLELCOMPACT_INLINE_HPP
diff --git a/src/hotspot/share/gc/parallel/psPromotionManager.cpp b/src/hotspot/share/gc/parallel/psPromotionManager.cpp
index 7ef706aba93..f7308366400 100644
--- a/src/hotspot/share/gc/parallel/psPromotionManager.cpp
+++ b/src/hotspot/share/gc/parallel/psPromotionManager.cpp
@@ -54,7 +54,7 @@ void PSPromotionManager::initialize() {
_old_gen = heap->old_gen();
_young_space = heap->young_gen()->to_space();
- const uint promotion_manager_num = ParallelGCThreads + 1;
+ const uint promotion_manager_num = ParallelGCThreads;
// To prevent false sharing, we pad the PSPromotionManagers
// and make sure that the first instance starts at a cache line.
@@ -95,7 +95,7 @@ PSPromotionManager* PSPromotionManager::gc_thread_promotion_manager(uint index)
PSPromotionManager* PSPromotionManager::vm_thread_promotion_manager() {
assert(_manager_array != NULL, "Sanity");
- return &_manager_array[ParallelGCThreads];
+ return &_manager_array[0];
}
void PSPromotionManager::pre_scavenge() {
@@ -104,7 +104,7 @@ void PSPromotionManager::pre_scavenge() {
_preserved_marks_set->assert_empty();
_young_space = heap->young_gen()->to_space();
- for(uint i=0; ireset();
}
}
@@ -113,7 +113,7 @@ bool PSPromotionManager::post_scavenge(YoungGCTracer& gc_tracer) {
bool promotion_failure_occurred = false;
TASKQUEUE_STATS_ONLY(print_taskqueue_stats());
- for (uint i = 0; i < ParallelGCThreads + 1; i++) {
+ for (uint i = 0; i < ParallelGCThreads; i++) {
PSPromotionManager* manager = manager_array(i);
assert(manager->claimed_stack_depth()->is_empty(), "should be empty");
if (manager->_promotion_failed_info.has_failed()) {
@@ -162,7 +162,7 @@ PSPromotionManager::print_taskqueue_stats() {
TaskQueueStats totals;
out->print("thr "); TaskQueueStats::print_header(1, out); out->cr();
out->print("--- "); TaskQueueStats::print_header(2, out); out->cr();
- for (uint i = 0; i < ParallelGCThreads + 1; ++i) {
+ for (uint i = 0; i < ParallelGCThreads; ++i) {
TaskQueueStats& next = manager_array(i)->_claimed_stack_depth.stats;
out->print("%3d ", i); next.print(out); out->cr();
totals += next;
@@ -171,7 +171,7 @@ PSPromotionManager::print_taskqueue_stats() {
const uint hlines = sizeof(pm_stats_hdr) / sizeof(pm_stats_hdr[0]);
for (uint i = 0; i < hlines; ++i) out->print_cr("%s", pm_stats_hdr[i]);
- for (uint i = 0; i < ParallelGCThreads + 1; ++i) {
+ for (uint i = 0; i < ParallelGCThreads; ++i) {
manager_array(i)->print_local_stats(out, i);
}
}
diff --git a/src/hotspot/share/gc/parallel/psPromotionManager.inline.hpp b/src/hotspot/share/gc/parallel/psPromotionManager.inline.hpp
index 733af9bee7f..b3f1c7297f4 100644
--- a/src/hotspot/share/gc/parallel/psPromotionManager.inline.hpp
+++ b/src/hotspot/share/gc/parallel/psPromotionManager.inline.hpp
@@ -44,7 +44,7 @@
inline PSPromotionManager* PSPromotionManager::manager_array(uint index) {
assert(_manager_array != NULL, "access of NULL manager_array");
- assert(index <= ParallelGCThreads, "out of range manager_array access");
+ assert(index < ParallelGCThreads, "out of range manager_array access");
return &_manager_array[index];
}
--
GitLab
From 295b263fa951b9d51bfa92c04e49b2a17a62bd6f Mon Sep 17 00:00:00 2001
From: Thomas Schatzl
Date: Tue, 25 Jan 2022 09:13:50 +0000
Subject: [PATCH 017/400] 8279241: G1 Full GC does not always slide memory to
bottom addresses
Reviewed-by: iwalulya, ayang, sjohanss
---
src/hotspot/share/gc/g1/g1FullCollector.cpp | 65 ++++-
src/hotspot/share/gc/g1/g1FullCollector.hpp | 12 +-
.../share/gc/g1/g1FullCollector.inline.hpp | 6 +-
.../share/gc/g1/g1FullGCHeapRegionAttr.hpp | 6 +-
.../share/gc/g1/g1FullGCPrepareTask.cpp | 239 ++++++------------
.../share/gc/g1/g1FullGCPrepareTask.hpp | 93 ++++---
.../gc/g1/g1FullGCPrepareTask.inline.hpp | 126 +++++++++
src/hotspot/share/gc/g1/g1FullGCScope.cpp | 4 +-
src/hotspot/share/gc/g1/g1FullGCScope.hpp | 4 +-
9 files changed, 346 insertions(+), 209 deletions(-)
create mode 100644 src/hotspot/share/gc/g1/g1FullGCPrepareTask.inline.hpp
diff --git a/src/hotspot/share/gc/g1/g1FullCollector.cpp b/src/hotspot/share/gc/g1/g1FullCollector.cpp
index 603b3818029..dd20a099919 100644
--- a/src/hotspot/share/gc/g1/g1FullCollector.cpp
+++ b/src/hotspot/share/gc/g1/g1FullCollector.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, 2021, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -32,7 +32,7 @@
#include "gc/g1/g1FullGCCompactTask.hpp"
#include "gc/g1/g1FullGCMarker.inline.hpp"
#include "gc/g1/g1FullGCMarkTask.hpp"
-#include "gc/g1/g1FullGCPrepareTask.hpp"
+#include "gc/g1/g1FullGCPrepareTask.inline.hpp"
#include "gc/g1/g1FullGCScope.hpp"
#include "gc/g1/g1OopClosures.hpp"
#include "gc/g1/g1Policy.hpp"
@@ -297,14 +297,67 @@ void G1FullCollector::phase1_mark_live_objects() {
}
void G1FullCollector::phase2_prepare_compaction() {
- GCTraceTime(Info, gc, phases) info("Phase 2: Prepare for compaction", scope()->timer());
+ GCTraceTime(Info, gc, phases) info("Phase 2: Prepare compaction", scope()->timer());
+
+ phase2a_determine_worklists();
+
+ bool has_free_compaction_targets = phase2b_forward_oops();
+
+ // Try to avoid OOM immediately after Full GC in case there are no free regions
+ // left after determining the result locations (i.e. this phase). Prepare to
+ // maximally compact the tail regions of the compaction queues serially.
+ if (!has_free_compaction_targets) {
+ phase2c_prepare_serial_compaction();
+ }
+}
+
+void G1FullCollector::phase2a_determine_worklists() {
+ GCTraceTime(Debug, gc, phases) debug("Phase 2: Determine work lists", scope()->timer());
+
+ G1DetermineCompactionQueueClosure cl(this);
+ _heap->heap_region_iterate(&cl);
+}
+
+bool G1FullCollector::phase2b_forward_oops() {
+ GCTraceTime(Debug, gc, phases) debug("Phase 2: Prepare parallel compaction", scope()->timer());
+
G1FullGCPrepareTask task(this);
run_task(&task);
- // To avoid OOM when there is memory left.
- if (!task.has_freed_regions()) {
- task.prepare_serial_compaction();
+ return task.has_free_compaction_targets();
+}
+
+void G1FullCollector::phase2c_prepare_serial_compaction() {
+ GCTraceTime(Debug, gc, phases) debug("Phase 2: Prepare serial compaction", scope()->timer());
+ // At this point we know that after parallel compaction there will be no
+ // completely free regions. That means that the last region of
+ // all compaction queues still have data in them. We try to compact
+ // these regions in serial to avoid a premature OOM when the mutator wants
+ // to allocate the first eden region after gc.
+ for (uint i = 0; i < workers(); i++) {
+ G1FullGCCompactionPoint* cp = compaction_point(i);
+ if (cp->has_regions()) {
+ serial_compaction_point()->add(cp->remove_last());
+ }
+ }
+
+ // Update the forwarding information for the regions in the serial
+ // compaction point.
+ G1FullGCCompactionPoint* cp = serial_compaction_point();
+ for (GrowableArrayIterator it = cp->regions()->begin(); it != cp->regions()->end(); ++it) {
+ HeapRegion* current = *it;
+ if (!cp->is_initialized()) {
+ // Initialize the compaction point. Nothing more is needed for the first heap region
+ // since it is already prepared for compaction.
+ cp->initialize(current, false);
+ } else {
+ assert(!current->is_humongous(), "Should be no humongous regions in compaction queue");
+ G1SerialRePrepareClosure re_prepare(cp, current);
+ current->set_compaction_top(current->bottom());
+ current->apply_to_marked_objects(mark_bitmap(), &re_prepare);
+ }
}
+ cp->update();
}
void G1FullCollector::phase3_adjust_pointers() {
diff --git a/src/hotspot/share/gc/g1/g1FullCollector.hpp b/src/hotspot/share/gc/g1/g1FullCollector.hpp
index c4d019629dd..f9087298b86 100644
--- a/src/hotspot/share/gc/g1/g1FullCollector.hpp
+++ b/src/hotspot/share/gc/g1/g1FullCollector.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, 2021, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -110,7 +110,7 @@ public:
G1FullGCCompactionPoint* serial_compaction_point() { return &_serial_compaction_point; }
G1CMBitMap* mark_bitmap();
ReferenceProcessor* reference_processor();
- size_t live_words(uint region_index) {
+ size_t live_words(uint region_index) const {
assert(region_index < _heap->max_regions(), "sanity");
return _live_stats[region_index]._live_words;
}
@@ -121,6 +121,9 @@ public:
inline bool is_skip_compacting(uint region_index) const;
inline bool is_skip_marking(oop obj) const;
+ // Are we (potentially) going to compact into this region?
+ inline bool is_compaction_target(uint region_index) const;
+
inline void set_free(uint region_idx);
inline bool is_free(uint region_idx) const;
inline void update_from_compacting_to_skip_compacting(uint region_idx);
@@ -128,6 +131,11 @@ public:
private:
void phase1_mark_live_objects();
void phase2_prepare_compaction();
+
+ void phase2a_determine_worklists();
+ bool phase2b_forward_oops();
+ void phase2c_prepare_serial_compaction();
+
void phase3_adjust_pointers();
void phase4_do_compaction();
diff --git a/src/hotspot/share/gc/g1/g1FullCollector.inline.hpp b/src/hotspot/share/gc/g1/g1FullCollector.inline.hpp
index 5a0863b202a..37e16fc6f78 100644
--- a/src/hotspot/share/gc/g1/g1FullCollector.inline.hpp
+++ b/src/hotspot/share/gc/g1/g1FullCollector.inline.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2020, 2021, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2020, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -43,6 +43,10 @@ bool G1FullCollector::is_skip_marking(oop obj) const {
return _region_attr_table.is_skip_marking(cast_from_oop(obj));
}
+bool G1FullCollector::is_compaction_target(uint region_index) const {
+ return _region_attr_table.is_compacting(region_index) || is_free(region_index);
+}
+
void G1FullCollector::set_free(uint region_idx) {
_region_attr_table.set_free(region_idx);
}
diff --git a/src/hotspot/share/gc/g1/g1FullGCHeapRegionAttr.hpp b/src/hotspot/share/gc/g1/g1FullGCHeapRegionAttr.hpp
index ca2f970edde..017877785f4 100644
--- a/src/hotspot/share/gc/g1/g1FullGCHeapRegionAttr.hpp
+++ b/src/hotspot/share/gc/g1/g1FullGCHeapRegionAttr.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2020, 2021, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2020, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -70,6 +70,10 @@ public:
return get_by_address(obj) == Compacting;
}
+ bool is_compacting(uint idx) const {
+ return get_by_index(idx) == Compacting;
+ }
+
bool is_skip_compacting(uint idx) const {
return get_by_index(idx) == SkipCompacting;
}
diff --git a/src/hotspot/share/gc/g1/g1FullGCPrepareTask.cpp b/src/hotspot/share/gc/g1/g1FullGCPrepareTask.cpp
index 883e0a51f86..4ffe9329dc7 100644
--- a/src/hotspot/share/gc/g1/g1FullGCPrepareTask.cpp
+++ b/src/hotspot/share/gc/g1/g1FullGCPrepareTask.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, 2021, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -23,13 +23,13 @@
*/
#include "precompiled.hpp"
-#include "gc/g1/g1CollectedHeap.hpp"
+#include "gc/g1/g1CollectedHeap.inline.hpp"
#include "gc/g1/g1ConcurrentMarkBitMap.inline.hpp"
#include "gc/g1/g1FullCollector.inline.hpp"
#include "gc/g1/g1FullGCCompactionPoint.hpp"
#include "gc/g1/g1FullGCMarker.hpp"
#include "gc/g1/g1FullGCOopClosures.inline.hpp"
-#include "gc/g1/g1FullGCPrepareTask.hpp"
+#include "gc/g1/g1FullGCPrepareTask.inline.hpp"
#include "gc/g1/g1HotCardCache.hpp"
#include "gc/g1/heapRegion.inline.hpp"
#include "gc/shared/gcTraceTime.inline.hpp"
@@ -39,113 +39,84 @@
#include "oops/oop.inline.hpp"
#include "utilities/ticks.hpp"
-template
-void G1FullGCPrepareTask::G1CalculatePointersClosure::free_pinned_region(HeapRegion* hr) {
- _regions_freed = true;
- if (is_humongous) {
- _g1h->free_humongous_region(hr, nullptr);
- } else {
- _g1h->free_region(hr, nullptr);
- }
- _collector->set_free(hr->hrm_index());
- prepare_for_compaction(hr);
-}
+G1DetermineCompactionQueueClosure::G1DetermineCompactionQueueClosure(G1FullCollector* collector) :
+ _g1h(G1CollectedHeap::heap()),
+ _collector(collector),
+ _cur_worker(0) { }
bool G1FullGCPrepareTask::G1CalculatePointersClosure::do_heap_region(HeapRegion* hr) {
- if (should_compact(hr)) {
- assert(!hr->is_humongous(), "moving humongous objects not supported.");
- prepare_for_compaction(hr);
- } else {
- // There is no need to iterate and forward objects in pinned regions ie.
- // prepare them for compaction. The adjust pointers phase will skip
- // work for them.
- assert(hr->containing_set() == nullptr, "already cleared by PrepareRegionsClosure");
- if (hr->is_humongous()) {
- oop obj = cast_to_oop(hr->humongous_start_region()->bottom());
- if (!_bitmap->is_marked(obj)) {
- free_pinned_region(hr);
- }
- } else if (hr->is_open_archive()) {
- bool is_empty = _collector->live_words(hr->hrm_index()) == 0;
- if (is_empty) {
- free_pinned_region(hr);
- }
- } else if (hr->is_closed_archive()) {
- // nothing to do with closed archive region
- } else {
- assert(MarkSweepDeadRatio > 0,
- "only skip compaction for other regions when MarkSweepDeadRatio > 0");
-
- // Too many live objects; skip compacting it.
- _collector->update_from_compacting_to_skip_compacting(hr->hrm_index());
- if (hr->is_young()) {
- // G1 updates the BOT for old region contents incrementally, but young regions
- // lack BOT information for performance reasons.
- // Recreate BOT information of high live ratio young regions here to keep expected
- // performance during scanning their card tables in the collection pauses later.
- hr->update_bot();
- }
- log_trace(gc, phases)("Phase 2: skip compaction region index: %u, live words: " SIZE_FORMAT,
- hr->hrm_index(), _collector->live_words(hr->hrm_index()));
- }
- }
+ uint region_idx = hr->hrm_index();
+ assert(_collector->is_compaction_target(region_idx), "must be");
- // Reset data structures not valid after Full GC.
- reset_region_metadata(hr);
+ assert(!hr->is_pinned(), "must be");
+ assert(!hr->is_closed_archive(), "must be");
+ assert(!hr->is_open_archive(), "must be");
+
+ prepare_for_compaction(hr);
return false;
}
G1FullGCPrepareTask::G1FullGCPrepareTask(G1FullCollector* collector) :
G1FullGCTask("G1 Prepare Compact Task", collector),
- _freed_regions(false),
+ _has_free_compaction_targets(false),
_hrclaimer(collector->workers()) {
}
-void G1FullGCPrepareTask::set_freed_regions() {
- if (!_freed_regions) {
- _freed_regions = true;
+void G1FullGCPrepareTask::set_has_free_compaction_targets() {
+ if (!_has_free_compaction_targets) {
+ _has_free_compaction_targets = true;
}
}
-bool G1FullGCPrepareTask::has_freed_regions() {
- return _freed_regions;
+bool G1FullGCPrepareTask::has_free_compaction_targets() {
+ return _has_free_compaction_targets;
}
void G1FullGCPrepareTask::work(uint worker_id) {
Ticks start = Ticks::now();
- G1FullGCCompactionPoint* compaction_point = collector()->compaction_point(worker_id);
- G1CalculatePointersClosure closure(collector(), compaction_point);
- G1CollectedHeap::heap()->heap_region_par_iterate_from_start(&closure, &_hrclaimer);
-
- compaction_point->update();
+ // Calculate the target locations for the objects in the non-free regions of
+ // the compaction queues provided by the associate compaction point.
+ {
+ G1FullGCCompactionPoint* compaction_point = collector()->compaction_point(worker_id);
+ G1CalculatePointersClosure closure(collector(), compaction_point);
+
+ for (GrowableArrayIterator it = compaction_point->regions()->begin();
+ it != compaction_point->regions()->end();
+ ++it) {
+ closure.do_heap_region(*it);
+ }
+ compaction_point->update();
+ // Determine if there are any unused compaction targets. This is only the case if
+ // there are
+ // - any regions in queue, so no free ones either.
+ // - and the current region is not the last one in the list.
+ if (compaction_point->has_regions() &&
+ compaction_point->current_region() != compaction_point->regions()->last()) {
+ set_has_free_compaction_targets();
+ }
+ }
- // Check if any regions was freed by this worker and store in task.
- if (closure.freed_regions()) {
- set_freed_regions();
+ // Clear region metadata that is invalid after GC for all regions.
+ {
+ G1ResetMetadataClosure closure(collector());
+ G1CollectedHeap::heap()->heap_region_par_iterate_from_start(&closure, &_hrclaimer);
}
log_task("Prepare compaction task", worker_id, start);
}
G1FullGCPrepareTask::G1CalculatePointersClosure::G1CalculatePointersClosure(G1FullCollector* collector,
G1FullGCCompactionPoint* cp) :
- _g1h(G1CollectedHeap::heap()),
- _collector(collector),
- _bitmap(collector->mark_bitmap()),
- _cp(cp),
- _regions_freed(false) { }
-
-bool G1FullGCPrepareTask::G1CalculatePointersClosure::should_compact(HeapRegion* hr) {
- if (hr->is_pinned()) {
- return false;
- }
- size_t live_words = _collector->live_words(hr->hrm_index());
- size_t live_words_threshold = _collector->scope()->region_compaction_threshold();
- // High live ratio region will not be compacted.
- return live_words <= live_words_threshold;
-}
+ _g1h(G1CollectedHeap::heap()),
+ _collector(collector),
+ _bitmap(collector->mark_bitmap()),
+ _cp(cp) { }
-void G1FullGCPrepareTask::G1CalculatePointersClosure::reset_region_metadata(HeapRegion* hr) {
+G1FullGCPrepareTask::G1ResetMetadataClosure::G1ResetMetadataClosure(G1FullCollector* collector) :
+ _g1h(G1CollectedHeap::heap()),
+ _collector(collector) { }
+
+void G1FullGCPrepareTask::G1ResetMetadataClosure::reset_region_metadata(HeapRegion* hr) {
hr->rem_set()->clear();
hr->clear_cardtable();
@@ -155,6 +126,26 @@ void G1FullGCPrepareTask::G1CalculatePointersClosure::reset_region_metadata(Heap
}
}
+bool G1FullGCPrepareTask::G1ResetMetadataClosure::do_heap_region(HeapRegion* hr) {
+ uint const region_idx = hr->hrm_index();
+ if (!_collector->is_compaction_target(region_idx)) {
+ assert(!hr->is_free(), "all free regions should be compaction targets");
+ assert(_collector->is_skip_compacting(region_idx) || hr->is_closed_archive(), "must be");
+ if (hr->is_young()) {
+ // G1 updates the BOT for old region contents incrementally, but young regions
+ // lack BOT information for performance reasons.
+ // Recreate BOT information of high live ratio young regions here to keep expected
+ // performance during scanning their card tables in the collection pauses later.
+ hr->update_bot();
+ }
+ }
+
+ // Reset data structures not valid after Full GC.
+ reset_region_metadata(hr);
+
+ return false;
+}
+
G1FullGCPrepareTask::G1PrepareCompactLiveClosure::G1PrepareCompactLiveClosure(G1FullGCCompactionPoint* cp) :
_cp(cp) { }
@@ -164,87 +155,9 @@ size_t G1FullGCPrepareTask::G1PrepareCompactLiveClosure::apply(oop object) {
return size;
}
-size_t G1FullGCPrepareTask::G1RePrepareClosure::apply(oop obj) {
- // We only re-prepare objects forwarded within the current region, so
- // skip objects that are already forwarded to another region.
- if (obj->is_forwarded() && !_current->is_in(obj->forwardee())) {
- return obj->size();
- }
-
- // Get size and forward.
- size_t size = obj->size();
- _cp->forward(obj, size);
-
- return size;
-}
-
-void G1FullGCPrepareTask::G1CalculatePointersClosure::prepare_for_compaction_work(G1FullGCCompactionPoint* cp,
- HeapRegion* hr) {
- hr->set_compaction_top(hr->bottom());
+void G1FullGCPrepareTask::G1CalculatePointersClosure::prepare_for_compaction(HeapRegion* hr) {
if (!_collector->is_free(hr->hrm_index())) {
- G1PrepareCompactLiveClosure prepare_compact(cp);
+ G1PrepareCompactLiveClosure prepare_compact(_cp);
hr->apply_to_marked_objects(_bitmap, &prepare_compact);
}
}
-
-void G1FullGCPrepareTask::G1CalculatePointersClosure::prepare_for_compaction(HeapRegion* hr) {
- if (!_cp->is_initialized()) {
- hr->set_compaction_top(hr->bottom());
- _cp->initialize(hr, true);
- }
- // Add region to the compaction queue and prepare it.
- _cp->add(hr);
- prepare_for_compaction_work(_cp, hr);
-}
-
-void G1FullGCPrepareTask::prepare_serial_compaction() {
- GCTraceTime(Debug, gc, phases) debug("Phase 2: Prepare Serial Compaction", collector()->scope()->timer());
- // At this point we know that no regions were completely freed by
- // the parallel compaction. That means that the last region of
- // all compaction queues still have data in them. We try to compact
- // these regions in serial to avoid a premature OOM.
- for (uint i = 0; i < collector()->workers(); i++) {
- G1FullGCCompactionPoint* cp = collector()->compaction_point(i);
- if (cp->has_regions()) {
- collector()->serial_compaction_point()->add(cp->remove_last());
- }
- }
-
- // Update the forwarding information for the regions in the serial
- // compaction point.
- G1FullGCCompactionPoint* cp = collector()->serial_compaction_point();
- for (GrowableArrayIterator it = cp->regions()->begin(); it != cp->regions()->end(); ++it) {
- HeapRegion* current = *it;
- if (!cp->is_initialized()) {
- // Initialize the compaction point. Nothing more is needed for the first heap region
- // since it is already prepared for compaction.
- cp->initialize(current, false);
- } else {
- assert(!current->is_humongous(), "Should be no humongous regions in compaction queue");
- G1RePrepareClosure re_prepare(cp, current);
- current->set_compaction_top(current->bottom());
- current->apply_to_marked_objects(collector()->mark_bitmap(), &re_prepare);
- }
- }
- cp->update();
-}
-
-bool G1FullGCPrepareTask::G1CalculatePointersClosure::freed_regions() {
- if (_regions_freed) {
- return true;
- }
-
- if (!_cp->has_regions()) {
- // No regions in queue, so no free ones either.
- return false;
- }
-
- if (_cp->current_region() != _cp->regions()->last()) {
- // The current region used for compaction is not the last in the
- // queue. That means there is at least one free region in the queue.
- return true;
- }
-
- // No free regions in the queue.
- return false;
-}
diff --git a/src/hotspot/share/gc/g1/g1FullGCPrepareTask.hpp b/src/hotspot/share/gc/g1/g1FullGCPrepareTask.hpp
index d694fc6ffca..41c0c67d87c 100644
--- a/src/hotspot/share/gc/g1/g1FullGCPrepareTask.hpp
+++ b/src/hotspot/share/gc/g1/g1FullGCPrepareTask.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, 2021, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,53 +25,81 @@
#ifndef SHARE_GC_G1_G1FULLGCPREPARETASK_HPP
#define SHARE_GC_G1_G1FULLGCPREPARETASK_HPP
-#include "gc/g1/g1FullGCCompactionPoint.hpp"
-#include "gc/g1/g1FullGCScope.hpp"
#include "gc/g1/g1FullGCTask.hpp"
-#include "gc/g1/g1RootProcessor.hpp"
-#include "gc/g1/heapRegionManager.hpp"
-#include "gc/shared/referenceProcessor.hpp"
+#include "gc/g1/heapRegion.hpp"
+#include "memory/allocation.hpp"
+class G1CollectedHeap;
class G1CMBitMap;
class G1FullCollector;
+class G1FullGCCompactionPoint;
+class HeapRegion;
+
+// Determines the regions in the heap that should be part of the compaction and
+// distributes them among the compaction queues in round-robin fashion.
+class G1DetermineCompactionQueueClosure : public HeapRegionClosure {
+ G1CollectedHeap* _g1h;
+ G1FullCollector* _collector;
+ uint _cur_worker;
+
+ template
+ inline void free_pinned_region(HeapRegion* hr);
+
+ inline bool should_compact(HeapRegion* hr) const;
+
+ // Returns the current worker id to assign a compaction point to, and selects
+ // the next one round-robin style.
+ inline uint next_worker();
+
+ inline G1FullGCCompactionPoint* next_compaction_point();
+
+ inline void add_to_compaction_queue(HeapRegion* hr);
+
+public:
+ G1DetermineCompactionQueueClosure(G1FullCollector* collector);
+
+ inline bool do_heap_region(HeapRegion* hr) override;
+};
class G1FullGCPrepareTask : public G1FullGCTask {
-protected:
- volatile bool _freed_regions;
+ volatile bool _has_free_compaction_targets;
HeapRegionClaimer _hrclaimer;
- void set_freed_regions();
+ void set_has_free_compaction_targets();
public:
G1FullGCPrepareTask(G1FullCollector* collector);
void work(uint worker_id);
- void prepare_serial_compaction();
- bool has_freed_regions();
+ // After the Prepare phase, are there any unused (empty) regions (compaction
+ // targets) at the end of any compaction queues?
+ bool has_free_compaction_targets();
-protected:
+private:
class G1CalculatePointersClosure : public HeapRegionClosure {
- private:
- template
- void free_pinned_region(HeapRegion* hr);
- protected:
G1CollectedHeap* _g1h;
G1FullCollector* _collector;
G1CMBitMap* _bitmap;
G1FullGCCompactionPoint* _cp;
- bool _regions_freed;
- bool should_compact(HeapRegion* hr);
void prepare_for_compaction(HeapRegion* hr);
- void prepare_for_compaction_work(G1FullGCCompactionPoint* cp, HeapRegion* hr);
-
- void reset_region_metadata(HeapRegion* hr);
public:
G1CalculatePointersClosure(G1FullCollector* collector,
G1FullGCCompactionPoint* cp);
bool do_heap_region(HeapRegion* hr);
- bool freed_regions();
+ };
+
+ class G1ResetMetadataClosure : public HeapRegionClosure {
+ G1CollectedHeap* _g1h;
+ G1FullCollector* _collector;
+
+ void reset_region_metadata(HeapRegion* hr);
+
+ public:
+ G1ResetMetadataClosure(G1FullCollector* collector);
+
+ bool do_heap_region(HeapRegion* hr);
};
class G1PrepareCompactLiveClosure : public StackObj {
@@ -81,19 +109,20 @@ protected:
G1PrepareCompactLiveClosure(G1FullGCCompactionPoint* cp);
size_t apply(oop object);
};
+};
- class G1RePrepareClosure : public StackObj {
- G1FullGCCompactionPoint* _cp;
- HeapRegion* _current;
+// Closure to re-prepare objects in the serial compaction point queue regions for
+// serial compaction.
+class G1SerialRePrepareClosure : public StackObj {
+ G1FullGCCompactionPoint* _cp;
+ HeapRegion* _current;
- public:
- G1RePrepareClosure(G1FullGCCompactionPoint* hrcp,
- HeapRegion* hr) :
- _cp(hrcp),
- _current(hr) { }
+public:
+ G1SerialRePrepareClosure(G1FullGCCompactionPoint* hrcp, HeapRegion* hr) :
+ _cp(hrcp),
+ _current(hr) { }
- size_t apply(oop object);
- };
+ inline size_t apply(oop obj);
};
#endif // SHARE_GC_G1_G1FULLGCPREPARETASK_HPP
diff --git a/src/hotspot/share/gc/g1/g1FullGCPrepareTask.inline.hpp b/src/hotspot/share/gc/g1/g1FullGCPrepareTask.inline.hpp
new file mode 100644
index 00000000000..75493b7de4f
--- /dev/null
+++ b/src/hotspot/share/gc/g1/g1FullGCPrepareTask.inline.hpp
@@ -0,0 +1,126 @@
+/*
+ * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ *
+ */
+
+#ifndef SHARE_GC_G1_G1FULLGCPREPARETASK_INLINE_HPP
+#define SHARE_GC_G1_G1FULLGCPREPARETASK_INLINE_HPP
+
+#include "gc/g1/g1FullGCPrepareTask.hpp"
+
+#include "gc/g1/g1CollectedHeap.inline.hpp"
+#include "gc/g1/g1FullCollector.hpp"
+#include "gc/g1/g1FullGCCompactionPoint.hpp"
+#include "gc/g1/g1FullGCScope.hpp"
+#include "gc/g1/heapRegion.inline.hpp"
+
+template
+void G1DetermineCompactionQueueClosure::free_pinned_region(HeapRegion* hr) {
+ if (is_humongous) {
+ _g1h->free_humongous_region(hr, nullptr);
+ } else {
+ _g1h->free_region(hr, nullptr);
+ }
+ _collector->set_free(hr->hrm_index());
+ add_to_compaction_queue(hr);
+}
+
+inline bool G1DetermineCompactionQueueClosure::should_compact(HeapRegion* hr) const {
+ // There is no need to iterate and forward objects in pinned regions ie.
+ // prepare them for compaction.
+ if (hr->is_pinned()) {
+ return false;
+ }
+ size_t live_words = _collector->live_words(hr->hrm_index());
+ size_t live_words_threshold = _collector->scope()->region_compaction_threshold();
+ // High live ratio region will not be compacted.
+ return live_words <= live_words_threshold;
+}
+
+inline uint G1DetermineCompactionQueueClosure::next_worker() {
+ uint result = _cur_worker;
+ _cur_worker = (_cur_worker + 1) % _collector->workers();
+ return result;
+}
+
+inline G1FullGCCompactionPoint* G1DetermineCompactionQueueClosure::next_compaction_point() {
+ return _collector->compaction_point(next_worker());
+}
+
+inline void G1DetermineCompactionQueueClosure::add_to_compaction_queue(HeapRegion* hr) {
+ hr->set_compaction_top(hr->bottom());
+ G1FullGCCompactionPoint* cp = next_compaction_point();
+ if (!cp->is_initialized()) {
+ cp->initialize(hr, true);
+ }
+ // Add region to the compaction queue.
+ cp->add(hr);
+}
+
+inline bool G1DetermineCompactionQueueClosure::do_heap_region(HeapRegion* hr) {
+ if (should_compact(hr)) {
+ assert(!hr->is_humongous(), "moving humongous objects not supported.");
+ add_to_compaction_queue(hr);
+ } else {
+ assert(hr->containing_set() == nullptr, "already cleared by PrepareRegionsClosure");
+ if (hr->is_humongous()) {
+ oop obj = cast_to_oop(hr->humongous_start_region()->bottom());
+ bool is_empty = !_collector->mark_bitmap()->is_marked(obj);
+ if (is_empty) {
+ free_pinned_region(hr);
+ }
+ } else if (hr->is_open_archive()) {
+ bool is_empty = _collector->live_words(hr->hrm_index()) == 0;
+ if (is_empty) {
+ free_pinned_region(hr);
+ }
+ } else if (hr->is_closed_archive()) {
+ // nothing to do with closed archive region
+ } else {
+ assert(MarkSweepDeadRatio > 0,
+ "only skip compaction for other regions when MarkSweepDeadRatio > 0");
+
+ // Too many live objects in the region; skip compacting it.
+ _collector->update_from_compacting_to_skip_compacting(hr->hrm_index());
+ log_trace(gc, phases)("Phase 2: skip compaction region index: %u, live words: " SIZE_FORMAT,
+ hr->hrm_index(), _collector->live_words(hr->hrm_index()));
+ }
+ }
+
+ return false;
+}
+
+inline size_t G1SerialRePrepareClosure::apply(oop obj) {
+ // We only re-prepare objects forwarded within the current region, so
+ // skip objects that are already forwarded to another region.
+ if (obj->is_forwarded() && !_current->is_in(obj->forwardee())) {
+ return obj->size();
+ }
+
+ // Get size and forward.
+ size_t size = obj->size();
+ _cp->forward(obj, size);
+
+ return size;
+}
+
+#endif // SHARE_GC_G1_G1FULLGCPREPARETASK_INLINE_HPP
diff --git a/src/hotspot/share/gc/g1/g1FullGCScope.cpp b/src/hotspot/share/gc/g1/g1FullGCScope.cpp
index b4d3b365603..0437d157eb0 100644
--- a/src/hotspot/share/gc/g1/g1FullGCScope.cpp
+++ b/src/hotspot/share/gc/g1/g1FullGCScope.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, 2021, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -70,6 +70,6 @@ G1FullGCTracer* G1FullGCScope::tracer() {
return &_tracer;
}
-size_t G1FullGCScope::region_compaction_threshold() {
+size_t G1FullGCScope::region_compaction_threshold() const {
return _region_compaction_threshold;
}
diff --git a/src/hotspot/share/gc/g1/g1FullGCScope.hpp b/src/hotspot/share/gc/g1/g1FullGCScope.hpp
index c0035b9052a..a6e079f4d63 100644
--- a/src/hotspot/share/gc/g1/g1FullGCScope.hpp
+++ b/src/hotspot/share/gc/g1/g1FullGCScope.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, 2021, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -71,7 +71,7 @@ public:
STWGCTimer* timer();
G1FullGCTracer* tracer();
G1HeapTransition* heap_transition();
- size_t region_compaction_threshold();
+ size_t region_compaction_threshold() const;
};
#endif // SHARE_GC_G1_G1FULLGCSCOPE_HPP
--
GitLab
From 2155afe2a87d718757b009d712361d7a63946a7f Mon Sep 17 00:00:00 2001
From: Thomas Stuefe
Date: Tue, 25 Jan 2022 09:15:11 +0000
Subject: [PATCH 018/400] 8280503: Use allStatic.hpp instead of allocation.hpp
where possible
Reviewed-by: dholmes, iklam
---
src/hotspot/cpu/aarch64/bytes_aarch64.hpp | 4 ++--
src/hotspot/cpu/aarch64/jniTypes_aarch64.hpp | 4 ++--
src/hotspot/cpu/arm/bytes_arm.hpp | 4 ++--
src/hotspot/cpu/arm/jniTypes_arm.hpp | 4 ++--
src/hotspot/cpu/ppc/bytes_ppc.hpp | 6 +++---
src/hotspot/cpu/ppc/jniTypes_ppc.hpp | 6 +++---
src/hotspot/cpu/s390/bytes_s390.hpp | 6 +++---
src/hotspot/cpu/s390/jniTypes_s390.hpp | 4 ++--
src/hotspot/cpu/x86/bytes_x86.hpp | 4 ++--
src/hotspot/cpu/x86/c2_intelJccErratum_x86.hpp | 4 ++--
src/hotspot/cpu/x86/jniTypes_x86.hpp | 4 ++--
src/hotspot/cpu/x86/rdtsc_x86.hpp | 5 +++--
src/hotspot/cpu/zero/bytes_zero.hpp | 4 ++--
src/hotspot/cpu/zero/jniTypes_zero.hpp | 4 ++--
src/hotspot/os/bsd/gc/z/zNUMA_bsd.cpp | 1 +
src/hotspot/os/linux/gc/z/zSyscall_linux.hpp | 5 +++--
src/hotspot/os/linux/osContainer_linux.hpp | 4 ++--
src/hotspot/os/posix/signals_posix.hpp | 4 ++--
src/hotspot/os/posix/threadLocalStorage_posix.cpp | 3 ++-
src/hotspot/os/windows/gc/z/zMapper_windows.hpp | 2 +-
src/hotspot/os/windows/iphlp_interface.hpp | 4 ++--
src/hotspot/os/windows/pdh_interface.hpp | 4 ++--
src/hotspot/os/windows/threadLocalStorage_windows.cpp | 1 +
src/hotspot/share/c1/c1_Runtime1.hpp | 4 ++--
src/hotspot/share/cds/archiveUtils.cpp | 4 +++-
src/hotspot/share/cds/dynamicArchive.hpp | 4 ++--
src/hotspot/share/classfile/altHashing.hpp | 5 +++--
src/hotspot/share/classfile/klassFactory.hpp | 4 ++--
src/hotspot/share/classfile/modules.hpp | 4 ++--
src/hotspot/share/code/vtableStubs.hpp | 4 ++--
src/hotspot/share/compiler/compilerDefinitions.hpp | 4 ++--
src/hotspot/share/compiler/compilerEvent.hpp | 4 ++--
src/hotspot/share/compiler/compilerOracle.hpp | 4 ++--
src/hotspot/share/gc/g1/g1CollectionSetChooser.hpp | 4 ++--
src/hotspot/share/gc/g1/g1FromCardCache.hpp | 4 ++--
src/hotspot/share/gc/g1/g1HeapRegionEventSender.hpp | 4 ++--
src/hotspot/share/gc/g1/g1HeapRegionTraceType.hpp | 4 ++--
src/hotspot/share/gc/g1/heapRegionBounds.hpp | 5 +++--
src/hotspot/share/gc/g1/heapRegionTracer.hpp | 5 +++--
src/hotspot/share/gc/g1/heapRegionType.hpp | 3 ++-
src/hotspot/share/gc/parallel/psRootType.hpp | 4 ++--
src/hotspot/share/gc/parallel/psScavenge.hpp | 4 ++--
src/hotspot/share/gc/shared/accessBarrierSupport.hpp | 4 ++--
src/hotspot/share/gc/shared/ageTableTracer.hpp | 5 +++--
src/hotspot/share/gc/shared/allocTracer.hpp | 4 ++--
src/hotspot/share/gc/shared/blockOffsetTable.hpp | 4 ++--
src/hotspot/share/gc/shared/concurrentGCBreakpoints.hpp | 4 ++--
src/hotspot/share/gc/shared/gcCause.hpp | 5 +++--
src/hotspot/share/gc/shared/gcConfig.hpp | 2 +-
src/hotspot/share/gc/shared/gcLocker.hpp | 4 ++--
src/hotspot/share/gc/shared/gcLogPrecious.hpp | 2 +-
src/hotspot/share/gc/shared/gcWhen.hpp | 4 ++--
src/hotspot/share/gc/shared/locationPrinter.hpp | 2 +-
src/hotspot/share/gc/shared/objectCountEventSender.hpp | 4 ++--
src/hotspot/share/gc/shared/scavengableNMethods.hpp | 4 ++--
src/hotspot/share/gc/shared/spaceDecorator.hpp | 4 ++--
src/hotspot/share/gc/shared/weakProcessor.hpp | 4 ++--
src/hotspot/share/gc/shared/workerPolicy.hpp | 4 ++--
src/hotspot/share/gc/shenandoah/shenandoahBreakpoint.hpp | 6 +++---
src/hotspot/share/gc/shenandoah/shenandoahCodeRoots.hpp | 4 ++--
src/hotspot/share/gc/shenandoah/shenandoahRuntime.hpp | 4 ++--
src/hotspot/share/gc/shenandoah/shenandoahWorkerPolicy.hpp | 4 ++--
src/hotspot/share/gc/z/zAbort.hpp | 4 ++--
src/hotspot/share/gc/z/zAddress.hpp | 5 +++--
src/hotspot/share/gc/z/zAddressSpaceLimit.hpp | 5 +++--
src/hotspot/share/gc/z/zBarrier.hpp | 4 ++--
src/hotspot/share/gc/z/zBarrierSetRuntime.hpp | 2 +-
src/hotspot/share/gc/z/zBitField.hpp | 5 +++--
src/hotspot/share/gc/z/zBreakpoint.hpp | 4 ++--
src/hotspot/share/gc/z/zCPU.hpp | 4 ++--
src/hotspot/share/gc/z/zHash.hpp | 4 ++--
src/hotspot/share/gc/z/zHeuristics.hpp | 4 ++--
src/hotspot/share/gc/z/zLargePages.hpp | 4 ++--
src/hotspot/share/gc/z/zNMethod.hpp | 4 ++--
src/hotspot/share/gc/z/zNMethodTable.hpp | 4 ++--
src/hotspot/share/gc/z/zNUMA.hpp | 5 +++--
src/hotspot/share/gc/z/zOop.hpp | 4 ++--
src/hotspot/share/gc/z/zResurrection.hpp | 4 ++--
src/hotspot/share/gc/z/zThread.hpp | 4 ++--
src/hotspot/share/gc/z/zThreadLocalAllocBuffer.hpp | 4 ++--
src/hotspot/share/gc/z/zUtils.hpp | 5 +++--
src/hotspot/share/gc/z/zValue.hpp | 4 ++--
src/hotspot/share/gc/z/zVerify.hpp | 4 ++--
src/hotspot/share/interpreter/bytecodeHistogram.hpp | 4 ++--
src/hotspot/share/interpreter/bytecodeTracer.hpp | 4 ++--
src/hotspot/share/interpreter/bytecodeUtils.hpp | 6 +++---
src/hotspot/share/interpreter/bytecodes.hpp | 5 +++--
src/hotspot/share/interpreter/templateTable.hpp | 4 ++--
.../share/jfr/instrumentation/jfrEventClassTransformer.hpp | 4 ++--
src/hotspot/share/jfr/jfr.hpp | 6 ++++--
src/hotspot/share/jfr/leakprofiler/chains/edgeUtils.hpp | 4 ++--
.../jfr/leakprofiler/checkpoint/objectSampleCheckpoint.hpp | 4 ++--
.../share/jfr/leakprofiler/checkpoint/rootResolver.hpp | 4 ++--
src/hotspot/share/jfr/leakprofiler/leakProfiler.hpp | 5 +++--
.../share/jfr/leakprofiler/utilities/granularTimer.hpp | 4 ++--
src/hotspot/share/jfr/leakprofiler/utilities/rootType.hpp | 4 ++--
.../share/jfr/periodic/jfrFinalizerStatisticsEvent.hpp | 4 ++--
src/hotspot/share/jfr/periodic/jfrModuleEvent.hpp | 4 ++--
src/hotspot/share/jfr/periodic/jfrNetworkUtilization.hpp | 4 ++--
src/hotspot/share/jfr/periodic/jfrThreadCPULoadEvent.hpp | 4 ++--
src/hotspot/share/jfr/periodic/jfrThreadDumpEvent.hpp | 4 ++--
.../share/jfr/recorder/checkpoint/jfrMetadataEvent.hpp | 4 ++--
.../share/jfr/recorder/checkpoint/types/jfrThreadState.hpp | 4 ++--
.../jfr/recorder/checkpoint/types/traceid/jfrTraceId.hpp | 4 ++--
.../recorder/checkpoint/types/traceid/jfrTraceIdBits.hpp | 2 +-
.../recorder/checkpoint/types/traceid/jfrTraceIdEpoch.hpp | 4 ++--
.../checkpoint/types/traceid/jfrTraceIdLoadBarrier.hpp | 4 ++--
.../share/jfr/recorder/repository/jfrChunkRotation.hpp | 4 ++--
.../share/jfr/recorder/repository/jfrEmergencyDump.hpp | 4 ++--
src/hotspot/share/jfr/recorder/service/jfrMemorySizer.hpp | 4 ++--
src/hotspot/share/jfr/recorder/service/jfrOptionSet.hpp | 4 ++--
.../share/jfr/recorder/service/jfrRecorderThread.hpp | 4 ++--
src/hotspot/share/jfr/support/jfrJdkJfrEvent.hpp | 4 ++--
src/hotspot/share/jfr/support/jfrKlassUnloading.hpp | 4 ++--
src/hotspot/share/jfr/support/jfrMethodLookup.hpp | 2 +-
src/hotspot/share/jfr/support/jfrObjectAllocationSample.hpp | 4 ++--
src/hotspot/share/jfr/utilities/jfrBigEndian.hpp | 4 ++--
src/hotspot/share/jfr/utilities/jfrJavaLog.hpp | 4 ++--
src/hotspot/share/jfr/utilities/jfrPredicate.hpp | 4 ++--
src/hotspot/share/jfr/utilities/jfrTimeConverter.hpp | 4 ++--
src/hotspot/share/jfr/writers/jfrEncoding.hpp | 4 ++--
src/hotspot/share/jfr/writers/jfrJavaEventWriter.hpp | 4 ++--
src/hotspot/share/logging/logConfiguration.hpp | 5 +++--
src/hotspot/share/logging/logLevel.hpp | 5 +++--
src/hotspot/share/logging/logTag.hpp | 6 ++++--
src/hotspot/share/memory/metaspace/internalStats.hpp | 6 +++---
src/hotspot/share/memory/metaspace/metaspaceReporter.hpp | 6 +++---
src/hotspot/share/memory/metaspace/metaspaceSettings.hpp | 6 +++---
src/hotspot/share/memory/metaspace/runningCounters.hpp | 6 +++---
src/hotspot/share/memory/metaspaceCounters.hpp | 4 ++--
src/hotspot/share/memory/metaspaceCriticalAllocation.hpp | 2 +-
src/hotspot/share/metaprogramming/conditional.hpp | 4 ++--
src/hotspot/share/metaprogramming/decay.hpp | 4 ++--
src/hotspot/share/metaprogramming/removeCV.hpp | 4 ++--
src/hotspot/share/metaprogramming/removeExtent.hpp | 4 ++--
src/hotspot/share/metaprogramming/removePointer.hpp | 4 ++--
src/hotspot/share/metaprogramming/removeReference.hpp | 4 ++--
src/hotspot/share/oops/access.hpp | 4 ++--
src/hotspot/share/oops/accessDecorators.hpp | 4 ++--
src/hotspot/share/oops/compressedOops.hpp | 4 ++--
src/hotspot/share/prims/jniFastGetField.hpp | 4 ++--
src/hotspot/share/prims/jvmtiEventController.hpp | 4 ++--
src/hotspot/share/prims/jvmtiExtensions.hpp | 4 ++--
src/hotspot/share/prims/jvmtiManageCapabilities.hpp | 4 ++--
src/hotspot/share/prims/nativeLookup.hpp | 4 ++--
src/hotspot/share/prims/resolvedMethodTable.hpp | 4 ++--
src/hotspot/share/prims/vectorSupport.hpp | 4 ++--
src/hotspot/share/runtime/abstract_vm_version.hpp | 4 ++--
src/hotspot/share/runtime/arguments.hpp | 4 ++--
src/hotspot/share/runtime/handshake.hpp | 4 ++--
src/hotspot/share/runtime/icache.hpp | 4 ++--
src/hotspot/share/runtime/jniHandles.hpp | 4 ++--
src/hotspot/share/runtime/orderAccess.hpp | 4 ++--
src/hotspot/share/runtime/prefetch.hpp | 4 ++--
src/hotspot/share/runtime/reflectionUtils.hpp | 4 ++--
src/hotspot/share/runtime/safepoint.hpp | 2 +-
src/hotspot/share/runtime/sharedRuntime.hpp | 4 ++--
src/hotspot/share/runtime/stackWatermark.hpp | 4 ++--
src/hotspot/share/runtime/threadLocalStorage.hpp | 4 ++--
src/hotspot/share/services/attachListener.hpp | 4 ++--
src/hotspot/share/services/gcNotifier.hpp | 4 ++--
src/hotspot/share/services/lowMemoryDetector.hpp | 4 ++--
src/hotspot/share/services/nmtCommon.hpp | 4 ++--
src/hotspot/share/services/threadIdTable.hpp | 2 +-
src/hotspot/share/utilities/decoder.hpp | 4 ++--
src/hotspot/share/utilities/globalCounter.hpp | 4 ++--
src/hotspot/share/utilities/quickSort.hpp | 4 ++--
src/hotspot/share/utilities/stringUtils.cpp | 4 +++-
src/hotspot/share/utilities/stringUtils.hpp | 4 ++--
src/hotspot/share/utilities/utf8.cpp | 6 +++++-
src/hotspot/share/utilities/utf8.hpp | 6 ++++--
test/hotspot/gtest/classfile/test_AltHashing.cpp | 3 ++-
172 files changed, 368 insertions(+), 333 deletions(-)
diff --git a/src/hotspot/cpu/aarch64/bytes_aarch64.hpp b/src/hotspot/cpu/aarch64/bytes_aarch64.hpp
index acb2e493a9a..672f03b93a9 100644
--- a/src/hotspot/cpu/aarch64/bytes_aarch64.hpp
+++ b/src/hotspot/cpu/aarch64/bytes_aarch64.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2019, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2022, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2014, Red Hat Inc. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
@@ -26,7 +26,7 @@
#ifndef CPU_AARCH64_BYTES_AARCH64_HPP
#define CPU_AARCH64_BYTES_AARCH64_HPP
-#include "memory/allocation.hpp"
+#include "memory/allStatic.hpp"
class Bytes: AllStatic {
public:
diff --git a/src/hotspot/cpu/aarch64/jniTypes_aarch64.hpp b/src/hotspot/cpu/aarch64/jniTypes_aarch64.hpp
index 4254cdf4cfd..8d20a6a1701 100644
--- a/src/hotspot/cpu/aarch64/jniTypes_aarch64.hpp
+++ b/src/hotspot/cpu/aarch64/jniTypes_aarch64.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2020, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2022, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2014, Red Hat Inc. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
@@ -27,7 +27,7 @@
#define CPU_AARCH64_JNITYPES_AARCH64_HPP
#include "jni.h"
-#include "memory/allocation.hpp"
+#include "memory/allStatic.hpp"
#include "oops/oop.hpp"
// This file holds platform-dependent routines used to write primitive jni
diff --git a/src/hotspot/cpu/arm/bytes_arm.hpp b/src/hotspot/cpu/arm/bytes_arm.hpp
index b0d481f314d..34af43edcac 100644
--- a/src/hotspot/cpu/arm/bytes_arm.hpp
+++ b/src/hotspot/cpu/arm/bytes_arm.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2008, 2019, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,7 @@
#ifndef CPU_ARM_BYTES_ARM_HPP
#define CPU_ARM_BYTES_ARM_HPP
-#include "memory/allocation.hpp"
+#include "memory/allStatic.hpp"
#include "utilities/macros.hpp"
#ifndef VM_LITTLE_ENDIAN
diff --git a/src/hotspot/cpu/arm/jniTypes_arm.hpp b/src/hotspot/cpu/arm/jniTypes_arm.hpp
index 66596eac1a0..660e58110f8 100644
--- a/src/hotspot/cpu/arm/jniTypes_arm.hpp
+++ b/src/hotspot/cpu/arm/jniTypes_arm.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2008, 2019, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,7 +26,7 @@
#define CPU_ARM_JNITYPES_ARM_HPP
#include "jni.h"
-#include "memory/allocation.hpp"
+#include "memory/allStatic.hpp"
#include "oops/oop.hpp"
// This file holds platform-dependent routines used to write primitive jni
diff --git a/src/hotspot/cpu/ppc/bytes_ppc.hpp b/src/hotspot/cpu/ppc/bytes_ppc.hpp
index 8249068ecd6..a4d061e9b73 100644
--- a/src/hotspot/cpu/ppc/bytes_ppc.hpp
+++ b/src/hotspot/cpu/ppc/bytes_ppc.hpp
@@ -1,6 +1,6 @@
/*
- * Copyright (c) 1997, 2019, Oracle and/or its affiliates. All rights reserved.
- * Copyright (c) 2012, 2016 SAP SE. All rights reserved.
+ * Copyright (c) 1997, 2022, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2022 SAP SE. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,7 +26,7 @@
#ifndef CPU_PPC_BYTES_PPC_HPP
#define CPU_PPC_BYTES_PPC_HPP
-#include "memory/allocation.hpp"
+#include "memory/allStatic.hpp"
class Bytes: AllStatic {
public:
diff --git a/src/hotspot/cpu/ppc/jniTypes_ppc.hpp b/src/hotspot/cpu/ppc/jniTypes_ppc.hpp
index ef1fe4acfdf..13ccaf408e9 100644
--- a/src/hotspot/cpu/ppc/jniTypes_ppc.hpp
+++ b/src/hotspot/cpu/ppc/jniTypes_ppc.hpp
@@ -1,6 +1,6 @@
/*
- * Copyright (c) 2002, 2020, Oracle and/or its affiliates. All rights reserved.
- * Copyright (c) 2012, 2013 SAP SE. All rights reserved.
+ * Copyright (c) 2002, 2022, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2022 SAP SE. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,7 +27,7 @@
#define CPU_PPC_JNITYPES_PPC_HPP
#include "jni.h"
-#include "memory/allocation.hpp"
+#include "memory/allStatic.hpp"
#include "oops/oop.hpp"
// This file holds platform-dependent routines used to write primitive
diff --git a/src/hotspot/cpu/s390/bytes_s390.hpp b/src/hotspot/cpu/s390/bytes_s390.hpp
index f6882f980ab..9b4d7b04221 100644
--- a/src/hotspot/cpu/s390/bytes_s390.hpp
+++ b/src/hotspot/cpu/s390/bytes_s390.hpp
@@ -1,6 +1,6 @@
/*
- * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved.
- * Copyright (c) 2016, 2018 SAP SE. All rights reserved.
+ * Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 2022 SAP SE. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,7 +26,7 @@
#ifndef CPU_S390_BYTES_S390_HPP
#define CPU_S390_BYTES_S390_HPP
-#include "memory/allocation.hpp"
+#include "memory/allStatic.hpp"
class Bytes: AllStatic {
public:
diff --git a/src/hotspot/cpu/s390/jniTypes_s390.hpp b/src/hotspot/cpu/s390/jniTypes_s390.hpp
index 56f4a05c6d4..951e7f5f6d2 100644
--- a/src/hotspot/cpu/s390/jniTypes_s390.hpp
+++ b/src/hotspot/cpu/s390/jniTypes_s390.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2016 SAP SE. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
@@ -30,7 +30,7 @@
// jni types to the array of arguments passed into JavaCalls::call.
#include "jni.h"
-#include "memory/allocation.hpp"
+#include "memory/allStatic.hpp"
#include "oops/oop.hpp"
class JNITypes : AllStatic {
diff --git a/src/hotspot/cpu/x86/bytes_x86.hpp b/src/hotspot/cpu/x86/bytes_x86.hpp
index 4ce19a473b4..cb5987d2c82 100644
--- a/src/hotspot/cpu/x86/bytes_x86.hpp
+++ b/src/hotspot/cpu/x86/bytes_x86.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2019, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,7 @@
#ifndef CPU_X86_BYTES_X86_HPP
#define CPU_X86_BYTES_X86_HPP
-#include "memory/allocation.hpp"
+#include "memory/allStatic.hpp"
#include "utilities/align.hpp"
#include "utilities/macros.hpp"
diff --git a/src/hotspot/cpu/x86/c2_intelJccErratum_x86.hpp b/src/hotspot/cpu/x86/c2_intelJccErratum_x86.hpp
index f3f66f3d7bc..415d8a99933 100644
--- a/src/hotspot/cpu/x86/c2_intelJccErratum_x86.hpp
+++ b/src/hotspot/cpu/x86/c2_intelJccErratum_x86.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2020, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,7 @@
#ifndef CPU_X86_INTELJCCERRATUM_X86_HPP
#define CPU_X86_INTELJCCERRATUM_X86_HPP
-#include "memory/allocation.hpp"
+#include "memory/allStatic.hpp"
#include "utilities/globalDefinitions.hpp"
class Block;
diff --git a/src/hotspot/cpu/x86/jniTypes_x86.hpp b/src/hotspot/cpu/x86/jniTypes_x86.hpp
index 403a0b63e2b..5c925474796 100644
--- a/src/hotspot/cpu/x86/jniTypes_x86.hpp
+++ b/src/hotspot/cpu/x86/jniTypes_x86.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2020, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,7 +26,7 @@
#define CPU_X86_JNITYPES_X86_HPP
#include "jni.h"
-#include "memory/allocation.hpp"
+#include "memory/allStatic.hpp"
#include "oops/oop.hpp"
// This file holds platform-dependent routines used to write primitive jni
diff --git a/src/hotspot/cpu/x86/rdtsc_x86.hpp b/src/hotspot/cpu/x86/rdtsc_x86.hpp
index f66997c9cfe..d9e77a0ae6b 100644
--- a/src/hotspot/cpu/x86/rdtsc_x86.hpp
+++ b/src/hotspot/cpu/x86/rdtsc_x86.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2019, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,8 @@
#ifndef CPU_X86_RDTSC_X86_HPP
#define CPU_X86_RDTSC_X86_HPP
-#include "memory/allocation.hpp"
+#include "memory/allStatic.hpp"
+#include "utilities/globalDefinitions.hpp"
#include "utilities/macros.hpp"
// Interface to the x86 rdtsc() time counter, if available.
diff --git a/src/hotspot/cpu/zero/bytes_zero.hpp b/src/hotspot/cpu/zero/bytes_zero.hpp
index 9acd9dd2430..93d49b8a28d 100644
--- a/src/hotspot/cpu/zero/bytes_zero.hpp
+++ b/src/hotspot/cpu/zero/bytes_zero.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2019, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2022, Oracle and/or its affiliates. All rights reserved.
* Copyright 2007, 2008, 2009 Red Hat, Inc.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
@@ -26,7 +26,7 @@
#ifndef CPU_ZERO_BYTES_ZERO_HPP
#define CPU_ZERO_BYTES_ZERO_HPP
-#include "memory/allocation.hpp"
+#include "memory/allStatic.hpp"
typedef union unaligned {
u4 u;
diff --git a/src/hotspot/cpu/zero/jniTypes_zero.hpp b/src/hotspot/cpu/zero/jniTypes_zero.hpp
index 8d5a6bee7fa..9f6fe78005b 100644
--- a/src/hotspot/cpu/zero/jniTypes_zero.hpp
+++ b/src/hotspot/cpu/zero/jniTypes_zero.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2019, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,7 +26,7 @@
#define CPU_ZERO_JNITYPES_ZERO_HPP
#include "jni.h"
-#include "memory/allocation.hpp"
+#include "memory/allStatic.hpp"
#include "oops/oop.hpp"
// This file holds platform-dependent routines used to write primitive jni
diff --git a/src/hotspot/os/bsd/gc/z/zNUMA_bsd.cpp b/src/hotspot/os/bsd/gc/z/zNUMA_bsd.cpp
index a0fe34c6504..e5b3895c44e 100644
--- a/src/hotspot/os/bsd/gc/z/zNUMA_bsd.cpp
+++ b/src/hotspot/os/bsd/gc/z/zNUMA_bsd.cpp
@@ -23,6 +23,7 @@
#include "precompiled.hpp"
#include "gc/z/zNUMA.hpp"
+#include "utilities/globalDefinitions.hpp"
void ZNUMA::pd_initialize() {
_enabled = false;
diff --git a/src/hotspot/os/linux/gc/z/zSyscall_linux.hpp b/src/hotspot/os/linux/gc/z/zSyscall_linux.hpp
index 95b13841b2a..1e1becf5a14 100644
--- a/src/hotspot/os/linux/gc/z/zSyscall_linux.hpp
+++ b/src/hotspot/os/linux/gc/z/zSyscall_linux.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2019, 2020, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2019, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -24,7 +24,8 @@
#ifndef OS_LINUX_GC_Z_ZSYSCALL_LINUX_HPP
#define OS_LINUX_GC_Z_ZSYSCALL_LINUX_HPP
-#include "memory/allocation.hpp"
+#include "memory/allStatic.hpp"
+#include "utilities/globalDefinitions.hpp"
// Flags for get_mempolicy()
#ifndef MPOL_F_NODE
diff --git a/src/hotspot/os/linux/osContainer_linux.hpp b/src/hotspot/os/linux/osContainer_linux.hpp
index 940bc0e3874..1ba4a9dabdc 100644
--- a/src/hotspot/os/linux/osContainer_linux.hpp
+++ b/src/hotspot/os/linux/osContainer_linux.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, 2021, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,7 +27,7 @@
#include "utilities/globalDefinitions.hpp"
#include "utilities/macros.hpp"
-#include "memory/allocation.hpp"
+#include "memory/allStatic.hpp"
#define OSCONTAINER_ERROR (-2)
diff --git a/src/hotspot/os/posix/signals_posix.hpp b/src/hotspot/os/posix/signals_posix.hpp
index 373a02ff3a3..2efdb374c4e 100644
--- a/src/hotspot/os/posix/signals_posix.hpp
+++ b/src/hotspot/os/posix/signals_posix.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2020, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,7 @@
#ifndef OS_POSIX_SIGNALS_POSIX_HPP
#define OS_POSIX_SIGNALS_POSIX_HPP
-#include "memory/allocation.hpp"
+#include "memory/allStatic.hpp"
#include "utilities/globalDefinitions.hpp"
class outputStream;
diff --git a/src/hotspot/os/posix/threadLocalStorage_posix.cpp b/src/hotspot/os/posix/threadLocalStorage_posix.cpp
index cc703ef811f..25bbbe2244f 100644
--- a/src/hotspot/os/posix/threadLocalStorage_posix.cpp
+++ b/src/hotspot/os/posix/threadLocalStorage_posix.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -23,6 +23,7 @@
*/
#include "runtime/threadLocalStorage.hpp"
+#include "utilities/debug.hpp"
#include
static pthread_key_t _thread_key;
diff --git a/src/hotspot/os/windows/gc/z/zMapper_windows.hpp b/src/hotspot/os/windows/gc/z/zMapper_windows.hpp
index 4db80c89956..3e47b470f5f 100644
--- a/src/hotspot/os/windows/gc/z/zMapper_windows.hpp
+++ b/src/hotspot/os/windows/gc/z/zMapper_windows.hpp
@@ -24,7 +24,7 @@
#ifndef OS_WINDOWS_GC_Z_ZMAPPER_WINDOWS_HPP
#define OS_WINDOWS_GC_Z_ZMAPPER_WINDOWS_HPP
-#include "memory/allocation.hpp"
+#include "memory/allStatic.hpp"
#include "utilities/globalDefinitions.hpp"
#include
diff --git a/src/hotspot/os/windows/iphlp_interface.hpp b/src/hotspot/os/windows/iphlp_interface.hpp
index 0ebe971a5f1..3e7e0adef65 100644
--- a/src/hotspot/os/windows/iphlp_interface.hpp
+++ b/src/hotspot/os/windows/iphlp_interface.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2018, 2019, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2018, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,7 @@
#ifndef OS_WINDOWS_IPHLP_INTERFACE_HPP
#define OS_WINDOWS_IPHLP_INTERFACE_HPP
-#include "memory/allocation.hpp"
+#include "memory/allStatic.hpp"
#include "utilities/macros.hpp"
#include
#include
diff --git a/src/hotspot/os/windows/pdh_interface.hpp b/src/hotspot/os/windows/pdh_interface.hpp
index 743c737d998..151f9edd0e9 100644
--- a/src/hotspot/os/windows/pdh_interface.hpp
+++ b/src/hotspot/os/windows/pdh_interface.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2020, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,7 @@
#ifndef OS_WINDOWS_PDH_INTERFACE_HPP
#define OS_WINDOWS_PDH_INTERFACE_HPP
-#include "memory/allocation.hpp"
+#include "memory/allStatic.hpp"
#include
#include
diff --git a/src/hotspot/os/windows/threadLocalStorage_windows.cpp b/src/hotspot/os/windows/threadLocalStorage_windows.cpp
index 5648a672d71..7d809518aab 100644
--- a/src/hotspot/os/windows/threadLocalStorage_windows.cpp
+++ b/src/hotspot/os/windows/threadLocalStorage_windows.cpp
@@ -24,6 +24,7 @@
#include "precompiled.hpp"
#include "runtime/threadLocalStorage.hpp"
+#include "utilities/debug.hpp"
#include
static DWORD _thread_key;
diff --git a/src/hotspot/share/c1/c1_Runtime1.hpp b/src/hotspot/share/c1/c1_Runtime1.hpp
index 9212a4fb249..3dcb27476a6 100644
--- a/src/hotspot/share/c1/c1_Runtime1.hpp
+++ b/src/hotspot/share/c1/c1_Runtime1.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1999, 2019, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -28,7 +28,7 @@
#include "c1/c1_FrameMap.hpp"
#include "code/stubs.hpp"
#include "interpreter/interpreter.hpp"
-#include "memory/allocation.hpp"
+#include "memory/allStatic.hpp"
#include "runtime/deoptimization.hpp"
class StubAssembler;
diff --git a/src/hotspot/share/cds/archiveUtils.cpp b/src/hotspot/share/cds/archiveUtils.cpp
index 8c273c06a8d..27c94290c23 100644
--- a/src/hotspot/share/cds/archiveUtils.cpp
+++ b/src/hotspot/share/cds/archiveUtils.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2019, 2021, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2019, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -39,7 +39,9 @@
#include "oops/compressedOops.inline.hpp"
#include "runtime/arguments.hpp"
#include "utilities/bitMap.inline.hpp"
+#include "utilities/debug.hpp"
#include "utilities/formatBuffer.hpp"
+#include "utilities/globalDefinitions.hpp"
CHeapBitMap* ArchivePtrMarker::_ptrmap = NULL;
VirtualSpace* ArchivePtrMarker::_vs;
diff --git a/src/hotspot/share/cds/dynamicArchive.hpp b/src/hotspot/share/cds/dynamicArchive.hpp
index fbb831ae195..ec8a505978b 100644
--- a/src/hotspot/share/cds/dynamicArchive.hpp
+++ b/src/hotspot/share/cds/dynamicArchive.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2019, 2021, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2019, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,7 +27,7 @@
#include "cds/filemap.hpp"
#include "classfile/compactHashtable.hpp"
-#include "memory/allocation.hpp"
+#include "memory/allStatic.hpp"
#include "memory/memRegion.hpp"
#include "memory/virtualspace.hpp"
#include "oops/oop.hpp"
diff --git a/src/hotspot/share/classfile/altHashing.hpp b/src/hotspot/share/classfile/altHashing.hpp
index f2fc52410d1..555720c0666 100644
--- a/src/hotspot/share/classfile/altHashing.hpp
+++ b/src/hotspot/share/classfile/altHashing.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2021, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,7 +26,8 @@
#define SHARE_CLASSFILE_ALTHASHING_HPP
#include "jni.h"
-#include "memory/allocation.hpp"
+#include "memory/allStatic.hpp"
+#include "utilities/globalDefinitions.hpp"
/**
* Implementation of alternate more secure hashing.
diff --git a/src/hotspot/share/classfile/klassFactory.hpp b/src/hotspot/share/classfile/klassFactory.hpp
index 2b2ee36dfa3..b1584b3e2ca 100644
--- a/src/hotspot/share/classfile/klassFactory.hpp
+++ b/src/hotspot/share/classfile/klassFactory.hpp
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2015, 2020, Oracle and/or its affiliates. All rights reserved.
+* Copyright (c) 2015, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,7 @@
#ifndef SHARE_CLASSFILE_KLASSFACTORY_HPP
#define SHARE_CLASSFILE_KLASSFACTORY_HPP
-#include "memory/allocation.hpp"
+#include "memory/allStatic.hpp"
#include "runtime/handles.hpp"
class ClassFileStream;
diff --git a/src/hotspot/share/classfile/modules.hpp b/src/hotspot/share/classfile/modules.hpp
index 31cab8209fa..5c52a323b0c 100644
--- a/src/hotspot/share/classfile/modules.hpp
+++ b/src/hotspot/share/classfile/modules.hpp
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved.
+* Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,7 @@
#ifndef SHARE_CLASSFILE_MODULES_HPP
#define SHARE_CLASSFILE_MODULES_HPP
-#include "memory/allocation.hpp"
+#include "memory/allStatic.hpp"
#include "runtime/handles.hpp"
class ModuleEntryTable;
diff --git a/src/hotspot/share/code/vtableStubs.hpp b/src/hotspot/share/code/vtableStubs.hpp
index 8fc2bdae94c..9498ad7d329 100644
--- a/src/hotspot/share/code/vtableStubs.hpp
+++ b/src/hotspot/share/code/vtableStubs.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2019, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,7 +27,7 @@
#include "asm/macroAssembler.hpp"
#include "code/vmreg.hpp"
-#include "memory/allocation.hpp"
+#include "memory/allStatic.hpp"
// A VtableStub holds an individual code stub for a pair (vtable index, #args) for either itables or vtables
// There's a one-to-one relationship between a VtableStub and such a pair.
diff --git a/src/hotspot/share/compiler/compilerDefinitions.hpp b/src/hotspot/share/compiler/compilerDefinitions.hpp
index 1c8096918a6..153dfaad364 100644
--- a/src/hotspot/share/compiler/compilerDefinitions.hpp
+++ b/src/hotspot/share/compiler/compilerDefinitions.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,7 +27,7 @@
#include "compiler/compiler_globals.hpp"
#include "jvmci/jvmci_globals.hpp"
-#include "memory/allocation.hpp"
+#include "memory/allStatic.hpp"
#include "runtime/globals.hpp"
// The (closed set) of concrete compiler classes.
diff --git a/src/hotspot/share/compiler/compilerEvent.hpp b/src/hotspot/share/compiler/compilerEvent.hpp
index 65fc296b66b..cf04ce9a436 100644
--- a/src/hotspot/share/compiler/compilerEvent.hpp
+++ b/src/hotspot/share/compiler/compilerEvent.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2020, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,7 +26,7 @@
#include "jni.h"
#include "compiler/compilerDefinitions.hpp"
-#include "memory/allocation.hpp"
+#include "memory/allStatic.hpp"
#include "utilities/macros.hpp"
#include "utilities/ticks.hpp"
diff --git a/src/hotspot/share/compiler/compilerOracle.hpp b/src/hotspot/share/compiler/compilerOracle.hpp
index e5be64cbdd4..f2fc0e8251d 100644
--- a/src/hotspot/share/compiler/compilerOracle.hpp
+++ b/src/hotspot/share/compiler/compilerOracle.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2021, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,7 @@
#ifndef SHARE_COMPILER_COMPILERORACLE_HPP
#define SHARE_COMPILER_COMPILERORACLE_HPP
-#include "memory/allocation.hpp"
+#include "memory/allStatic.hpp"
#include "oops/oopsHierarchy.hpp"
class methodHandle;
diff --git a/src/hotspot/share/gc/g1/g1CollectionSetChooser.hpp b/src/hotspot/share/gc/g1/g1CollectionSetChooser.hpp
index 5692a0c407e..e8894323d65 100644
--- a/src/hotspot/share/gc/g1/g1CollectionSetChooser.hpp
+++ b/src/hotspot/share/gc/g1/g1CollectionSetChooser.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2001, 2021, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,7 +26,7 @@
#define SHARE_GC_G1_G1COLLECTIONSETCHOOSER_HPP
#include "gc/g1/heapRegion.hpp"
-#include "memory/allocation.hpp"
+#include "memory/allStatic.hpp"
#include "runtime/globals.hpp"
class G1CollectionSetCandidates;
diff --git a/src/hotspot/share/gc/g1/g1FromCardCache.hpp b/src/hotspot/share/gc/g1/g1FromCardCache.hpp
index b76d7b1b863..0a01e0102ae 100644
--- a/src/hotspot/share/gc/g1/g1FromCardCache.hpp
+++ b/src/hotspot/share/gc/g1/g1FromCardCache.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2019, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,7 @@
#ifndef SHARE_GC_G1_G1FROMCARDCACHE_HPP
#define SHARE_GC_G1_G1FROMCARDCACHE_HPP
-#include "memory/allocation.hpp"
+#include "memory/allStatic.hpp"
#include "utilities/ostream.hpp"
// G1FromCardCache remembers the most recently processed card on the heap on
diff --git a/src/hotspot/share/gc/g1/g1HeapRegionEventSender.hpp b/src/hotspot/share/gc/g1/g1HeapRegionEventSender.hpp
index c8518a5172e..eb3d60656d4 100644
--- a/src/hotspot/share/gc/g1/g1HeapRegionEventSender.hpp
+++ b/src/hotspot/share/gc/g1/g1HeapRegionEventSender.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,7 @@
#ifndef SHARE_GC_G1_G1HEAPREGIONEVENTSENDER_HPP
#define SHARE_GC_G1_G1HEAPREGIONEVENTSENDER_HPP
-#include "memory/allocation.hpp"
+#include "memory/allStatic.hpp"
class G1HeapRegionEventSender : public AllStatic {
public:
diff --git a/src/hotspot/share/gc/g1/g1HeapRegionTraceType.hpp b/src/hotspot/share/gc/g1/g1HeapRegionTraceType.hpp
index ab3ee03137c..1c5690e566d 100644
--- a/src/hotspot/share/gc/g1/g1HeapRegionTraceType.hpp
+++ b/src/hotspot/share/gc/g1/g1HeapRegionTraceType.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,7 @@
#ifndef SHARE_GC_G1_G1HEAPREGIONTRACETYPE_HPP
#define SHARE_GC_G1_G1HEAPREGIONTRACETYPE_HPP
-#include "memory/allocation.hpp"
+#include "memory/allStatic.hpp"
#include "utilities/debug.hpp"
class G1HeapRegionTraceType : AllStatic {
diff --git a/src/hotspot/share/gc/g1/heapRegionBounds.hpp b/src/hotspot/share/gc/g1/heapRegionBounds.hpp
index 5e748de5928..5a6db9fac3b 100644
--- a/src/hotspot/share/gc/g1/heapRegionBounds.hpp
+++ b/src/hotspot/share/gc/g1/heapRegionBounds.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, 2020, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,8 @@
#ifndef SHARE_GC_G1_HEAPREGIONBOUNDS_HPP
#define SHARE_GC_G1_HEAPREGIONBOUNDS_HPP
-#include "memory/allocation.hpp"
+#include "memory/allStatic.hpp"
+#include "utilities/globalDefinitions.hpp"
class HeapRegionBounds : public AllStatic {
private:
diff --git a/src/hotspot/share/gc/g1/heapRegionTracer.hpp b/src/hotspot/share/gc/g1/heapRegionTracer.hpp
index bdfcd1cfd8e..647744d0d5e 100644
--- a/src/hotspot/share/gc/g1/heapRegionTracer.hpp
+++ b/src/hotspot/share/gc/g1/heapRegionTracer.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,7 +26,8 @@
#define SHARE_GC_G1_HEAPREGIONTRACER_HPP
#include "gc/g1/g1HeapRegionTraceType.hpp"
-#include "memory/allocation.hpp"
+#include "memory/allStatic.hpp"
+#include "utilities/globalDefinitions.hpp"
class HeapRegionTracer : AllStatic {
public:
diff --git a/src/hotspot/share/gc/g1/heapRegionType.hpp b/src/hotspot/share/gc/g1/heapRegionType.hpp
index 74807c37746..9e1c79ea0d0 100644
--- a/src/hotspot/share/gc/g1/heapRegionType.hpp
+++ b/src/hotspot/share/gc/g1/heapRegionType.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, 2019, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,7 @@
#define SHARE_GC_G1_HEAPREGIONTYPE_HPP
#include "gc/g1/g1HeapRegionTraceType.hpp"
+#include "utilities/globalDefinitions.hpp"
#define hrt_assert_is_valid(tag) \
assert(is_valid((tag)), "invalid HR type: %u", (uint) (tag))
diff --git a/src/hotspot/share/gc/parallel/psRootType.hpp b/src/hotspot/share/gc/parallel/psRootType.hpp
index 921bbfdd2b0..cbdc94dc9ab 100644
--- a/src/hotspot/share/gc/parallel/psRootType.hpp
+++ b/src/hotspot/share/gc/parallel/psRootType.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2019, 2020, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2019, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,7 @@
#ifndef SHARE_GC_PARALLEL_PSROOTTYPE_HPP
#define SHARE_GC_PARALLEL_PSROOTTYPE_HPP
-#include "memory/allocation.hpp"
+#include "memory/allStatic.hpp"
#include "utilities/macros.hpp"
class ParallelRootType : public AllStatic {
diff --git a/src/hotspot/share/gc/parallel/psScavenge.hpp b/src/hotspot/share/gc/parallel/psScavenge.hpp
index 80f41a99934..c575e8a3f2c 100644
--- a/src/hotspot/share/gc/parallel/psScavenge.hpp
+++ b/src/hotspot/share/gc/parallel/psScavenge.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2002, 2021, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -29,7 +29,7 @@
#include "gc/parallel/psVirtualspace.hpp"
#include "gc/shared/collectorCounters.hpp"
#include "gc/shared/gcTrace.hpp"
-#include "memory/allocation.hpp"
+#include "memory/allStatic.hpp"
#include "oops/oop.hpp"
#include "utilities/stack.hpp"
diff --git a/src/hotspot/share/gc/shared/accessBarrierSupport.hpp b/src/hotspot/share/gc/shared/accessBarrierSupport.hpp
index 58bc562d988..ca3b4589224 100644
--- a/src/hotspot/share/gc/shared/accessBarrierSupport.hpp
+++ b/src/hotspot/share/gc/shared/accessBarrierSupport.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, 2019, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,7 @@
#ifndef SHARE_GC_SHARED_ACCESSBARRIERSUPPORT_HPP
#define SHARE_GC_SHARED_ACCESSBARRIERSUPPORT_HPP
-#include "memory/allocation.hpp"
+#include "memory/allStatic.hpp"
#include "oops/access.hpp"
class AccessBarrierSupport: AllStatic {
diff --git a/src/hotspot/share/gc/shared/ageTableTracer.hpp b/src/hotspot/share/gc/shared/ageTableTracer.hpp
index cca3f125bfd..02e1fe3338d 100644
--- a/src/hotspot/share/gc/shared/ageTableTracer.hpp
+++ b/src/hotspot/share/gc/shared/ageTableTracer.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,8 @@
#ifndef SHARE_GC_SHARED_AGETABLETRACER_HPP
#define SHARE_GC_SHARED_AGETABLETRACER_HPP
-#include "memory/allocation.hpp"
+#include "memory/allStatic.hpp"
+#include "utilities/globalDefinitions.hpp"
class AgeTableTracer : AllStatic {
public:
diff --git a/src/hotspot/share/gc/shared/allocTracer.hpp b/src/hotspot/share/gc/shared/allocTracer.hpp
index c30628b2889..273f20d70ea 100644
--- a/src/hotspot/share/gc/shared/allocTracer.hpp
+++ b/src/hotspot/share/gc/shared/allocTracer.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2021, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,7 @@
#ifndef SHARE_GC_SHARED_ALLOCTRACER_HPP
#define SHARE_GC_SHARED_ALLOCTRACER_HPP
-#include "memory/allocation.hpp"
+#include "memory/allStatic.hpp"
#include "runtime/handles.hpp"
class AllocTracer : AllStatic {
diff --git a/src/hotspot/share/gc/shared/blockOffsetTable.hpp b/src/hotspot/share/gc/shared/blockOffsetTable.hpp
index 7d6ddfdf799..9a32594c123 100644
--- a/src/hotspot/share/gc/shared/blockOffsetTable.hpp
+++ b/src/hotspot/share/gc/shared/blockOffsetTable.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000, 2021, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -28,7 +28,7 @@
#include "gc/shared/gc_globals.hpp"
#include "gc/shared/memset_with_concurrent_readers.hpp"
#include "gc/shared/cardTable.hpp"
-#include "memory/allocation.hpp"
+#include "memory/allStatic.hpp"
#include "memory/memRegion.hpp"
#include "memory/virtualspace.hpp"
#include "runtime/globals.hpp"
diff --git a/src/hotspot/share/gc/shared/concurrentGCBreakpoints.hpp b/src/hotspot/share/gc/shared/concurrentGCBreakpoints.hpp
index c11c0e116c5..7af1b5746c3 100644
--- a/src/hotspot/share/gc/shared/concurrentGCBreakpoints.hpp
+++ b/src/hotspot/share/gc/shared/concurrentGCBreakpoints.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2020, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,7 +26,7 @@
#define SHARE_GC_SHARED_CONCURRENTGCBREAKPOINTS_HPP
#include "gc/shared/gcCause.hpp"
-#include "memory/allocation.hpp"
+#include "memory/allStatic.hpp"
#include "utilities/globalDefinitions.hpp"
class Monitor;
diff --git a/src/hotspot/share/gc/shared/gcCause.hpp b/src/hotspot/share/gc/shared/gcCause.hpp
index 75f7dc73a8c..a3746fa8745 100644
--- a/src/hotspot/share/gc/shared/gcCause.hpp
+++ b/src/hotspot/share/gc/shared/gcCause.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2002, 2020, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,8 @@
#ifndef SHARE_GC_SHARED_GCCAUSE_HPP
#define SHARE_GC_SHARED_GCCAUSE_HPP
-#include "memory/allocation.hpp"
+#include "memory/allStatic.hpp"
+#include "utilities/debug.hpp"
//
// This class exposes implementation details of the various
diff --git a/src/hotspot/share/gc/shared/gcConfig.hpp b/src/hotspot/share/gc/shared/gcConfig.hpp
index 2dfbf186b7f..9b0da3ad528 100644
--- a/src/hotspot/share/gc/shared/gcConfig.hpp
+++ b/src/hotspot/share/gc/shared/gcConfig.hpp
@@ -26,7 +26,7 @@
#define SHARE_GC_SHARED_GCCONFIG_HPP
#include "gc/shared/collectedHeap.hpp"
-#include "memory/allocation.hpp"
+#include "memory/allStatic.hpp"
class GCArguments;
diff --git a/src/hotspot/share/gc/shared/gcLocker.hpp b/src/hotspot/share/gc/shared/gcLocker.hpp
index 91ed84c41a9..e567d0c1f16 100644
--- a/src/hotspot/share/gc/shared/gcLocker.hpp
+++ b/src/hotspot/share/gc/shared/gcLocker.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2021, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,7 +26,7 @@
#define SHARE_GC_SHARED_GCLOCKER_HPP
#include "gc/shared/gcCause.hpp"
-#include "memory/allocation.hpp"
+#include "memory/allStatic.hpp"
#include "utilities/globalDefinitions.hpp"
#include "utilities/macros.hpp"
diff --git a/src/hotspot/share/gc/shared/gcLogPrecious.hpp b/src/hotspot/share/gc/shared/gcLogPrecious.hpp
index 5f1158caca7..ec8b1c670f3 100644
--- a/src/hotspot/share/gc/shared/gcLogPrecious.hpp
+++ b/src/hotspot/share/gc/shared/gcLogPrecious.hpp
@@ -26,7 +26,7 @@
#include "utilities/globalDefinitions.hpp"
#include "logging/logHandle.hpp"
-#include "memory/allocation.hpp"
+#include "memory/allStatic.hpp"
#include "utilities/debug.hpp"
class Mutex;
diff --git a/src/hotspot/share/gc/shared/gcWhen.hpp b/src/hotspot/share/gc/shared/gcWhen.hpp
index ff489226f65..23e2ef6b229 100644
--- a/src/hotspot/share/gc/shared/gcWhen.hpp
+++ b/src/hotspot/share/gc/shared/gcWhen.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2019, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,7 @@
#ifndef SHARE_GC_SHARED_GCWHEN_HPP
#define SHARE_GC_SHARED_GCWHEN_HPP
-#include "memory/allocation.hpp"
+#include "memory/allStatic.hpp"
#include "utilities/debug.hpp"
class GCWhen : AllStatic {
diff --git a/src/hotspot/share/gc/shared/locationPrinter.hpp b/src/hotspot/share/gc/shared/locationPrinter.hpp
index 2c99e452845..2d5d997376d 100644
--- a/src/hotspot/share/gc/shared/locationPrinter.hpp
+++ b/src/hotspot/share/gc/shared/locationPrinter.hpp
@@ -25,7 +25,7 @@
#ifndef SHARE_GC_SHARED_LOCATIONPRINTER_HPP
#define SHARE_GC_SHARED_LOCATIONPRINTER_HPP
-#include "memory/allocation.hpp"
+#include "memory/allStatic.hpp"
#include "oops/oopsHierarchy.hpp"
#include "utilities/globalDefinitions.hpp"
diff --git a/src/hotspot/share/gc/shared/objectCountEventSender.hpp b/src/hotspot/share/gc/shared/objectCountEventSender.hpp
index 58e6da016da..115fbfdaf7d 100644
--- a/src/hotspot/share/gc/shared/objectCountEventSender.hpp
+++ b/src/hotspot/share/gc/shared/objectCountEventSender.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2019, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,7 +26,7 @@
#define SHARE_GC_SHARED_OBJECTCOUNTEVENTSENDER_HPP
#include "gc/shared/gcTrace.hpp"
-#include "memory/allocation.hpp"
+#include "memory/allStatic.hpp"
#include "utilities/globalDefinitions.hpp"
#include "utilities/macros.hpp"
#include "utilities/ticks.hpp"
diff --git a/src/hotspot/share/gc/shared/scavengableNMethods.hpp b/src/hotspot/share/gc/shared/scavengableNMethods.hpp
index 276ea9843c0..4852e6d32fb 100644
--- a/src/hotspot/share/gc/shared/scavengableNMethods.hpp
+++ b/src/hotspot/share/gc/shared/scavengableNMethods.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2019, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,7 @@
#ifndef SHARE_GC_SHARED_SCAVENGABLENMETHODS_HPP
#define SHARE_GC_SHARED_SCAVENGABLENMETHODS_HPP
-#include "memory/allocation.hpp"
+#include "memory/allStatic.hpp"
#include "utilities/macros.hpp"
class BoolObjectClosure;
diff --git a/src/hotspot/share/gc/shared/spaceDecorator.hpp b/src/hotspot/share/gc/shared/spaceDecorator.hpp
index d421a2a40f5..778881f75a1 100644
--- a/src/hotspot/share/gc/shared/spaceDecorator.hpp
+++ b/src/hotspot/share/gc/shared/spaceDecorator.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2002, 2020, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,7 @@
#ifndef SHARE_GC_SHARED_SPACEDECORATOR_HPP
#define SHARE_GC_SHARED_SPACEDECORATOR_HPP
-#include "memory/allocation.hpp"
+#include "memory/allStatic.hpp"
#include "memory/memRegion.hpp"
#include "utilities/globalDefinitions.hpp"
diff --git a/src/hotspot/share/gc/shared/weakProcessor.hpp b/src/hotspot/share/gc/shared/weakProcessor.hpp
index 5eb2c59f3f2..b86129c9b93 100644
--- a/src/hotspot/share/gc/shared/weakProcessor.hpp
+++ b/src/hotspot/share/gc/shared/weakProcessor.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, 2021, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -28,7 +28,7 @@
#include "gc/shared/oopStorageParState.hpp"
#include "gc/shared/oopStorageSetParState.hpp"
#include "gc/shared/workerThread.hpp"
-#include "memory/allocation.hpp"
+#include "memory/allStatic.hpp"
class WeakProcessorTimes;
class WorkerThreads;
diff --git a/src/hotspot/share/gc/shared/workerPolicy.hpp b/src/hotspot/share/gc/shared/workerPolicy.hpp
index 377c9135d29..769b0e0ed8b 100644
--- a/src/hotspot/share/gc/shared/workerPolicy.hpp
+++ b/src/hotspot/share/gc/shared/workerPolicy.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2018, 2019, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2018, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,7 @@
#ifndef SHARE_GC_SHARED_WORKERPOLICY_HPP
#define SHARE_GC_SHARED_WORKERPOLICY_HPP
-#include "memory/allocation.hpp"
+#include "memory/allStatic.hpp"
#include "utilities/globalDefinitions.hpp"
class WorkerPolicy : public AllStatic {
diff --git a/src/hotspot/share/gc/shenandoah/shenandoahBreakpoint.hpp b/src/hotspot/share/gc/shenandoah/shenandoahBreakpoint.hpp
index f8b7489a3bb..acc497618c9 100644
--- a/src/hotspot/share/gc/shenandoah/shenandoahBreakpoint.hpp
+++ b/src/hotspot/share/gc/shenandoah/shenandoahBreakpoint.hpp
@@ -1,6 +1,6 @@
/*
- * Copyright (c) 2021, Red Hat, Inc. All rights reserved.
- * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2021, 2022, Red Hat, Inc. All rights reserved.
+ * Copyright (c) 2020, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,7 +26,7 @@
#ifndef SHARE_GC_SHENANDOAH_SHENANDOAHBREAKPOINT_HPP
#define SHARE_GC_SHENANDOAH_SHENANDOAHBREAKPOINT_HPP
-#include "memory/allocation.hpp"
+#include "memory/allStatic.hpp"
class ShenandoahBreakpoint : public AllStatic {
private:
diff --git a/src/hotspot/share/gc/shenandoah/shenandoahCodeRoots.hpp b/src/hotspot/share/gc/shenandoah/shenandoahCodeRoots.hpp
index 17bc5b78934..377d7688333 100644
--- a/src/hotspot/share/gc/shenandoah/shenandoahCodeRoots.hpp
+++ b/src/hotspot/share/gc/shenandoah/shenandoahCodeRoots.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, 2020, Red Hat, Inc. All rights reserved.
+ * Copyright (c) 2017, 2022, Red Hat, Inc. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -29,7 +29,7 @@
#include "gc/shenandoah/shenandoahSharedVariables.hpp"
#include "gc/shenandoah/shenandoahLock.hpp"
#include "gc/shenandoah/shenandoahPadding.hpp"
-#include "memory/allocation.hpp"
+#include "memory/allStatic.hpp"
#include "memory/iterator.hpp"
#include "utilities/globalDefinitions.hpp"
diff --git a/src/hotspot/share/gc/shenandoah/shenandoahRuntime.hpp b/src/hotspot/share/gc/shenandoah/shenandoahRuntime.hpp
index 788fe3fbeca..e187e4360b1 100644
--- a/src/hotspot/share/gc/shenandoah/shenandoahRuntime.hpp
+++ b/src/hotspot/share/gc/shenandoah/shenandoahRuntime.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2018, 2019, Red Hat, Inc. All rights reserved.
+ * Copyright (c) 2018, 2022, Red Hat, Inc. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,7 @@
#ifndef SHARE_GC_SHENANDOAH_SHENANDOAHRUNTIME_HPP
#define SHARE_GC_SHENANDOAH_SHENANDOAHRUNTIME_HPP
-#include "memory/allocation.hpp"
+#include "memory/allStatic.hpp"
#include "oops/oopsHierarchy.hpp"
class JavaThread;
diff --git a/src/hotspot/share/gc/shenandoah/shenandoahWorkerPolicy.hpp b/src/hotspot/share/gc/shenandoah/shenandoahWorkerPolicy.hpp
index 10a6fec6535..3f47822f220 100644
--- a/src/hotspot/share/gc/shenandoah/shenandoahWorkerPolicy.hpp
+++ b/src/hotspot/share/gc/shenandoah/shenandoahWorkerPolicy.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, 2019, Red Hat, Inc. All rights reserved.
+ * Copyright (c) 2017, 2022, Red Hat, Inc. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,7 @@
#ifndef SHARE_GC_SHENANDOAH_SHENANDOAHWORKERPOLICY_HPP
#define SHARE_GC_SHENANDOAH_SHENANDOAHWORKERPOLICY_HPP
-#include "memory/allocation.hpp"
+#include "memory/allStatic.hpp"
class ShenandoahWorkerPolicy : AllStatic {
private:
diff --git a/src/hotspot/share/gc/z/zAbort.hpp b/src/hotspot/share/gc/z/zAbort.hpp
index 1a5bcc15f19..f87bca8c0a3 100644
--- a/src/hotspot/share/gc/z/zAbort.hpp
+++ b/src/hotspot/share/gc/z/zAbort.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2021, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -24,7 +24,7 @@
#ifndef SHARE_GC_Z_ZABORT_HPP
#define SHARE_GC_Z_ZABORT_HPP
-#include "memory/allocation.hpp"
+#include "memory/allStatic.hpp"
class ZAbort : public AllStatic {
private:
diff --git a/src/hotspot/share/gc/z/zAddress.hpp b/src/hotspot/share/gc/z/zAddress.hpp
index eddd104189e..2908c37bbe6 100644
--- a/src/hotspot/share/gc/z/zAddress.hpp
+++ b/src/hotspot/share/gc/z/zAddress.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015, 2021, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -24,7 +24,8 @@
#ifndef SHARE_GC_Z_ZADDRESS_HPP
#define SHARE_GC_Z_ZADDRESS_HPP
-#include "memory/allocation.hpp"
+#include "memory/allStatic.hpp"
+#include "utilities/globalDefinitions.hpp"
class ZAddress : public AllStatic {
friend class ZAddressTest;
diff --git a/src/hotspot/share/gc/z/zAddressSpaceLimit.hpp b/src/hotspot/share/gc/z/zAddressSpaceLimit.hpp
index b6a03776f5c..ec0faf2c087 100644
--- a/src/hotspot/share/gc/z/zAddressSpaceLimit.hpp
+++ b/src/hotspot/share/gc/z/zAddressSpaceLimit.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2019, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -24,7 +24,8 @@
#ifndef SHARE_GC_Z_ZADDRESSSPACELIMIT_HPP
#define SHARE_GC_Z_ZADDRESSSPACELIMIT_HPP
-#include "memory/allocation.hpp"
+#include "memory/allStatic.hpp"
+#include "utilities/globalDefinitions.hpp"
class ZAddressSpaceLimit : public AllStatic {
public:
diff --git a/src/hotspot/share/gc/z/zBarrier.hpp b/src/hotspot/share/gc/z/zBarrier.hpp
index d57bef74f91..2dfc1591888 100644
--- a/src/hotspot/share/gc/z/zBarrier.hpp
+++ b/src/hotspot/share/gc/z/zBarrier.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015, 2021, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -24,7 +24,7 @@
#ifndef SHARE_GC_Z_ZBARRIER_HPP
#define SHARE_GC_Z_ZBARRIER_HPP
-#include "memory/allocation.hpp"
+#include "memory/allStatic.hpp"
#include "memory/iterator.hpp"
#include "oops/oop.hpp"
diff --git a/src/hotspot/share/gc/z/zBarrierSetRuntime.hpp b/src/hotspot/share/gc/z/zBarrierSetRuntime.hpp
index f3d4fb9c6bd..b3a143de3e9 100644
--- a/src/hotspot/share/gc/z/zBarrierSetRuntime.hpp
+++ b/src/hotspot/share/gc/z/zBarrierSetRuntime.hpp
@@ -24,7 +24,7 @@
#ifndef SHARE_GC_Z_ZBARRIERSETRUNTIME_HPP
#define SHARE_GC_Z_ZBARRIERSETRUNTIME_HPP
-#include "memory/allocation.hpp"
+#include "memory/allStatic.hpp"
#include "oops/accessDecorators.hpp"
#include "utilities/globalDefinitions.hpp"
diff --git a/src/hotspot/share/gc/z/zBitField.hpp b/src/hotspot/share/gc/z/zBitField.hpp
index 4d7171c41ac..9bec4e05594 100644
--- a/src/hotspot/share/gc/z/zBitField.hpp
+++ b/src/hotspot/share/gc/z/zBitField.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, 2020, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -24,8 +24,9 @@
#ifndef SHARE_GC_Z_ZBITFIELD_HPP
#define SHARE_GC_Z_ZBITFIELD_HPP
-#include "memory/allocation.hpp"
+#include "memory/allStatic.hpp"
#include "utilities/debug.hpp"
+#include "utilities/globalDefinitions.hpp"
//
// Example
diff --git a/src/hotspot/share/gc/z/zBreakpoint.hpp b/src/hotspot/share/gc/z/zBreakpoint.hpp
index 14ba227e189..920169fb6a6 100644
--- a/src/hotspot/share/gc/z/zBreakpoint.hpp
+++ b/src/hotspot/share/gc/z/zBreakpoint.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2020, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -24,7 +24,7 @@
#ifndef SHARE_GC_Z_ZBREAKPOINT_HPP
#define SHARE_GC_Z_ZBREAKPOINT_HPP
-#include "memory/allocation.hpp"
+#include "memory/allStatic.hpp"
class ZBreakpoint : public AllStatic {
private:
diff --git a/src/hotspot/share/gc/z/zCPU.hpp b/src/hotspot/share/gc/z/zCPU.hpp
index 65e04cc75e3..0acc949e508 100644
--- a/src/hotspot/share/gc/z/zCPU.hpp
+++ b/src/hotspot/share/gc/z/zCPU.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015, 2019, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -24,7 +24,7 @@
#ifndef SHARE_GC_Z_ZCPU_HPP
#define SHARE_GC_Z_ZCPU_HPP
-#include "memory/allocation.hpp"
+#include "memory/allStatic.hpp"
#include "memory/padded.hpp"
#include "utilities/globalDefinitions.hpp"
diff --git a/src/hotspot/share/gc/z/zHash.hpp b/src/hotspot/share/gc/z/zHash.hpp
index 5752d2abee3..e6469698488 100644
--- a/src/hotspot/share/gc/z/zHash.hpp
+++ b/src/hotspot/share/gc/z/zHash.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -24,7 +24,7 @@
#ifndef SHARE_GC_Z_ZHASH_HPP
#define SHARE_GC_Z_ZHASH_HPP
-#include "memory/allocation.hpp"
+#include "memory/allStatic.hpp"
#include "utilities/globalDefinitions.hpp"
class ZHash : public AllStatic {
diff --git a/src/hotspot/share/gc/z/zHeuristics.hpp b/src/hotspot/share/gc/z/zHeuristics.hpp
index 5b810a84851..362fd775f0f 100644
--- a/src/hotspot/share/gc/z/zHeuristics.hpp
+++ b/src/hotspot/share/gc/z/zHeuristics.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2019, 2020, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2019, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -24,7 +24,7 @@
#ifndef SHARE_GC_Z_ZHEURISTICS_HPP
#define SHARE_GC_Z_ZHEURISTICS_HPP
-#include "memory/allocation.hpp"
+#include "memory/allStatic.hpp"
class ZHeuristics : public AllStatic {
public:
diff --git a/src/hotspot/share/gc/z/zLargePages.hpp b/src/hotspot/share/gc/z/zLargePages.hpp
index 1201b496266..9f7c8310e50 100644
--- a/src/hotspot/share/gc/z/zLargePages.hpp
+++ b/src/hotspot/share/gc/z/zLargePages.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -24,7 +24,7 @@
#ifndef SHARE_GC_Z_ZLARGEPAGES_HPP
#define SHARE_GC_Z_ZLARGEPAGES_HPP
-#include "memory/allocation.hpp"
+#include "memory/allStatic.hpp"
class ZLargePages : public AllStatic {
private:
diff --git a/src/hotspot/share/gc/z/zNMethod.hpp b/src/hotspot/share/gc/z/zNMethod.hpp
index 40ac93adb8e..117c5e34f4e 100644
--- a/src/hotspot/share/gc/z/zNMethod.hpp
+++ b/src/hotspot/share/gc/z/zNMethod.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, 2020, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -24,7 +24,7 @@
#ifndef SHARE_GC_Z_ZNMETHOD_HPP
#define SHARE_GC_Z_ZNMETHOD_HPP
-#include "memory/allocation.hpp"
+#include "memory/allStatic.hpp"
class nmethod;
class NMethodClosure;
diff --git a/src/hotspot/share/gc/z/zNMethodTable.hpp b/src/hotspot/share/gc/z/zNMethodTable.hpp
index 26ae2d27933..a1af8512f69 100644
--- a/src/hotspot/share/gc/z/zNMethodTable.hpp
+++ b/src/hotspot/share/gc/z/zNMethodTable.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, 2019, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,7 +26,7 @@
#include "gc/z/zNMethodTableIteration.hpp"
#include "gc/z/zSafeDelete.hpp"
-#include "memory/allocation.hpp"
+#include "memory/allStatic.hpp"
class nmethod;
class NMethodClosure;
diff --git a/src/hotspot/share/gc/z/zNUMA.hpp b/src/hotspot/share/gc/z/zNUMA.hpp
index 0dc4390e8b4..fb29e1faaa7 100644
--- a/src/hotspot/share/gc/z/zNUMA.hpp
+++ b/src/hotspot/share/gc/z/zNUMA.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -24,7 +24,8 @@
#ifndef SHARE_GC_Z_ZNUMA_HPP
#define SHARE_GC_Z_ZNUMA_HPP
-#include "memory/allocation.hpp"
+#include "memory/allStatic.hpp"
+#include "utilities/globalDefinitions.hpp"
class ZNUMA : public AllStatic {
private:
diff --git a/src/hotspot/share/gc/z/zOop.hpp b/src/hotspot/share/gc/z/zOop.hpp
index cf752ba61c3..4fb0e6499e1 100644
--- a/src/hotspot/share/gc/z/zOop.hpp
+++ b/src/hotspot/share/gc/z/zOop.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -24,7 +24,7 @@
#ifndef SHARE_GC_Z_ZOOP_HPP
#define SHARE_GC_Z_ZOOP_HPP
-#include "memory/allocation.hpp"
+#include "memory/allStatic.hpp"
#include "oops/oopsHierarchy.hpp"
class ZOop : public AllStatic {
diff --git a/src/hotspot/share/gc/z/zResurrection.hpp b/src/hotspot/share/gc/z/zResurrection.hpp
index a88b9354469..3d6a8f95a1c 100644
--- a/src/hotspot/share/gc/z/zResurrection.hpp
+++ b/src/hotspot/share/gc/z/zResurrection.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -24,7 +24,7 @@
#ifndef SHARE_GC_Z_ZRESURRECTION_HPP
#define SHARE_GC_Z_ZRESURRECTION_HPP
-#include "memory/allocation.hpp"
+#include "memory/allStatic.hpp"
class ZResurrection : public AllStatic {
private:
diff --git a/src/hotspot/share/gc/z/zThread.hpp b/src/hotspot/share/gc/z/zThread.hpp
index f98b7a05fb6..c67807ff96e 100644
--- a/src/hotspot/share/gc/z/zThread.hpp
+++ b/src/hotspot/share/gc/z/zThread.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015, 2020, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -24,7 +24,7 @@
#ifndef SHARE_GC_Z_ZTHREAD_HPP
#define SHARE_GC_Z_ZTHREAD_HPP
-#include "memory/allocation.hpp"
+#include "memory/allStatic.hpp"
#include "utilities/globalDefinitions.hpp"
class ZThread : public AllStatic {
diff --git a/src/hotspot/share/gc/z/zThreadLocalAllocBuffer.hpp b/src/hotspot/share/gc/z/zThreadLocalAllocBuffer.hpp
index d6693fceb00..086c8a5c351 100644
--- a/src/hotspot/share/gc/z/zThreadLocalAllocBuffer.hpp
+++ b/src/hotspot/share/gc/z/zThreadLocalAllocBuffer.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2018, 2020, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2018, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,7 +26,7 @@
#include "gc/shared/threadLocalAllocBuffer.hpp"
#include "gc/z/zValue.hpp"
-#include "memory/allocation.hpp"
+#include "memory/allStatic.hpp"
class JavaThread;
diff --git a/src/hotspot/share/gc/z/zUtils.hpp b/src/hotspot/share/gc/z/zUtils.hpp
index f4abea9c6fe..470329daf0d 100644
--- a/src/hotspot/share/gc/z/zUtils.hpp
+++ b/src/hotspot/share/gc/z/zUtils.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015, 2020, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -24,7 +24,8 @@
#ifndef SHARE_GC_Z_ZUTILS_HPP
#define SHARE_GC_Z_ZUTILS_HPP
-#include "memory/allocation.hpp"
+#include "memory/allStatic.hpp"
+#include "utilities/globalDefinitions.hpp"
class ZUtils : public AllStatic {
public:
diff --git a/src/hotspot/share/gc/z/zValue.hpp b/src/hotspot/share/gc/z/zValue.hpp
index 281a2e48b8c..e2c67e8c48d 100644
--- a/src/hotspot/share/gc/z/zValue.hpp
+++ b/src/hotspot/share/gc/z/zValue.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015, 2019, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -24,7 +24,7 @@
#ifndef SHARE_GC_Z_ZVALUE_HPP
#define SHARE_GC_Z_ZVALUE_HPP
-#include "memory/allocation.hpp"
+#include "memory/allStatic.hpp"
#include "utilities/globalDefinitions.hpp"
//
diff --git a/src/hotspot/share/gc/z/zVerify.hpp b/src/hotspot/share/gc/z/zVerify.hpp
index db2d56d0095..8d7abd4a8d5 100644
--- a/src/hotspot/share/gc/z/zVerify.hpp
+++ b/src/hotspot/share/gc/z/zVerify.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2019, 2020, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2019, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -24,7 +24,7 @@
#ifndef SHARE_GC_Z_ZVERIFY_HPP
#define SHARE_GC_Z_ZVERIFY_HPP
-#include "memory/allocation.hpp"
+#include "memory/allStatic.hpp"
class frame;
class ZPageAllocator;
diff --git a/src/hotspot/share/interpreter/bytecodeHistogram.hpp b/src/hotspot/share/interpreter/bytecodeHistogram.hpp
index b919227702f..44ddca074d0 100644
--- a/src/hotspot/share/interpreter/bytecodeHistogram.hpp
+++ b/src/hotspot/share/interpreter/bytecodeHistogram.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2019, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,7 +26,7 @@
#define SHARE_INTERPRETER_BYTECODEHISTOGRAM_HPP
#include "interpreter/bytecodes.hpp"
-#include "memory/allocation.hpp"
+#include "memory/allStatic.hpp"
// BytecodeCounter counts the number of bytecodes executed
diff --git a/src/hotspot/share/interpreter/bytecodeTracer.hpp b/src/hotspot/share/interpreter/bytecodeTracer.hpp
index 52e91a0e712..38c2b092ce3 100644
--- a/src/hotspot/share/interpreter/bytecodeTracer.hpp
+++ b/src/hotspot/share/interpreter/bytecodeTracer.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2019, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,7 @@
#ifndef SHARE_INTERPRETER_BYTECODETRACER_HPP
#define SHARE_INTERPRETER_BYTECODETRACER_HPP
-#include "memory/allocation.hpp"
+#include "memory/allStatic.hpp"
#include "utilities/ostream.hpp"
// The BytecodeTracer is a helper class used by the interpreter for run-time
diff --git a/src/hotspot/share/interpreter/bytecodeUtils.hpp b/src/hotspot/share/interpreter/bytecodeUtils.hpp
index ede99a995b7..ff23b9c000f 100644
--- a/src/hotspot/share/interpreter/bytecodeUtils.hpp
+++ b/src/hotspot/share/interpreter/bytecodeUtils.hpp
@@ -1,6 +1,6 @@
/*
- * Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved.
- * Copyright (c) 2019 SAP SE. All rights reserved.
+ * Copyright (c) 2019, 2022, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2019, 2022 SAP SE. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,7 +26,7 @@
#ifndef SHARE_INTERPRETER_BYTECODEUTILS_HPP
#define SHARE_INTERPRETER_BYTECODEUTILS_HPP
-#include "memory/allocation.hpp"
+#include "memory/allStatic.hpp"
#include "utilities/globalDefinitions.hpp"
class Method;
diff --git a/src/hotspot/share/interpreter/bytecodes.hpp b/src/hotspot/share/interpreter/bytecodes.hpp
index 9a34a227c04..7c70518d2b1 100644
--- a/src/hotspot/share/interpreter/bytecodes.hpp
+++ b/src/hotspot/share/interpreter/bytecodes.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2019, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,8 @@
#ifndef SHARE_INTERPRETER_BYTECODES_HPP
#define SHARE_INTERPRETER_BYTECODES_HPP
-#include "memory/allocation.hpp"
+#include "memory/allStatic.hpp"
+#include "utilities/globalDefinitions.hpp"
// Bytecodes specifies all bytecodes used in the VM and
// provides utility functions to get bytecode attributes.
diff --git a/src/hotspot/share/interpreter/templateTable.hpp b/src/hotspot/share/interpreter/templateTable.hpp
index ff5d2c33880..e7575eeb40a 100644
--- a/src/hotspot/share/interpreter/templateTable.hpp
+++ b/src/hotspot/share/interpreter/templateTable.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2020, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,7 +26,7 @@
#define SHARE_INTERPRETER_TEMPLATETABLE_HPP
#include "interpreter/bytecodes.hpp"
-#include "memory/allocation.hpp"
+#include "memory/allStatic.hpp"
#include "runtime/frame.hpp"
#include "utilities/macros.hpp"
diff --git a/src/hotspot/share/jfr/instrumentation/jfrEventClassTransformer.hpp b/src/hotspot/share/jfr/instrumentation/jfrEventClassTransformer.hpp
index d34a4e57a78..939c02bfdf4 100644
--- a/src/hotspot/share/jfr/instrumentation/jfrEventClassTransformer.hpp
+++ b/src/hotspot/share/jfr/instrumentation/jfrEventClassTransformer.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,7 @@
#ifndef SHARE_JFR_INSTRUMENTATION_JFREVENTCLASSTRANSFORMER_HPP
#define SHARE_JFR_INSTRUMENTATION_JFREVENTCLASSTRANSFORMER_HPP
-#include "memory/allocation.hpp"
+#include "memory/allStatic.hpp"
#include "utilities/exceptions.hpp"
class ClassFileParser;
diff --git a/src/hotspot/share/jfr/jfr.hpp b/src/hotspot/share/jfr/jfr.hpp
index c97cc807c3b..b4b1ae78adc 100644
--- a/src/hotspot/share/jfr/jfr.hpp
+++ b/src/hotspot/share/jfr/jfr.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2018, 2021, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2018, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,11 +26,13 @@
#define SHARE_JFR_JFR_HPP
#include "jni.h"
-#include "memory/allocation.hpp"
+#include "memory/allStatic.hpp"
+#include "utilities/globalDefinitions.hpp"
class JavaThread;
class Thread;
class Klass;
+class outputStream;
extern "C" void JNICALL jfr_register_natives(JNIEnv*, jclass);
diff --git a/src/hotspot/share/jfr/leakprofiler/chains/edgeUtils.hpp b/src/hotspot/share/jfr/leakprofiler/chains/edgeUtils.hpp
index c9a169e6edb..0f107e7c32e 100644
--- a/src/hotspot/share/jfr/leakprofiler/chains/edgeUtils.hpp
+++ b/src/hotspot/share/jfr/leakprofiler/chains/edgeUtils.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, 2020, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,7 @@
#ifndef SHARE_JFR_LEAKPROFILER_CHAINS_EDGEUTILS_HPP
#define SHARE_JFR_LEAKPROFILER_CHAINS_EDGEUTILS_HPP
-#include "memory/allocation.hpp"
+#include "memory/allStatic.hpp"
class Edge;
class Symbol;
diff --git a/src/hotspot/share/jfr/leakprofiler/checkpoint/objectSampleCheckpoint.hpp b/src/hotspot/share/jfr/leakprofiler/checkpoint/objectSampleCheckpoint.hpp
index 0ed82fd55c8..f9f928699e2 100644
--- a/src/hotspot/share/jfr/leakprofiler/checkpoint/objectSampleCheckpoint.hpp
+++ b/src/hotspot/share/jfr/leakprofiler/checkpoint/objectSampleCheckpoint.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, 2021, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,7 @@
#ifndef SHARE_JFR_LEAKPROFILER_CHECKPOINT_OBJECTSAMPLECHECKPOINT_HPP
#define SHARE_JFR_LEAKPROFILER_CHECKPOINT_OBJECTSAMPLECHECKPOINT_HPP
-#include "memory/allocation.hpp"
+#include "memory/allStatic.hpp"
#include "jfr/utilities/jfrTypes.hpp"
class EdgeStore;
diff --git a/src/hotspot/share/jfr/leakprofiler/checkpoint/rootResolver.hpp b/src/hotspot/share/jfr/leakprofiler/checkpoint/rootResolver.hpp
index 63dca4afc72..279cb5032ff 100644
--- a/src/hotspot/share/jfr/leakprofiler/checkpoint/rootResolver.hpp
+++ b/src/hotspot/share/jfr/leakprofiler/checkpoint/rootResolver.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, 2019, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,7 +27,7 @@
#include "jfr/leakprofiler/utilities/rootType.hpp"
#include "jfr/leakprofiler/utilities/unifiedOopRef.hpp"
-#include "memory/allocation.hpp"
+#include "memory/allStatic.hpp"
#include "oops/oopsHierarchy.hpp"
struct RootCallbackInfo {
diff --git a/src/hotspot/share/jfr/leakprofiler/leakProfiler.hpp b/src/hotspot/share/jfr/leakprofiler/leakProfiler.hpp
index c541ff1086d..6290a10ff74 100644
--- a/src/hotspot/share/jfr/leakprofiler/leakProfiler.hpp
+++ b/src/hotspot/share/jfr/leakprofiler/leakProfiler.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, 2020, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,8 @@
#ifndef SHARE_JFR_LEAKPROFILER_LEAKPROFILER_HPP
#define SHARE_JFR_LEAKPROFILER_LEAKPROFILER_HPP
-#include "memory/allocation.hpp"
+#include "memory/allStatic.hpp"
+#include "utilities/globalDefinitions.hpp"
class JavaThread;
diff --git a/src/hotspot/share/jfr/leakprofiler/utilities/granularTimer.hpp b/src/hotspot/share/jfr/leakprofiler/utilities/granularTimer.hpp
index 231c1b26df4..e42a815c10d 100644
--- a/src/hotspot/share/jfr/leakprofiler/utilities/granularTimer.hpp
+++ b/src/hotspot/share/jfr/leakprofiler/utilities/granularTimer.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, 2019, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,7 +26,7 @@
#define SHARE_JFR_LEAKPROFILER_UTILITIES_GRANULARTIMER_HPP
#include "jfr/utilities/jfrTime.hpp"
-#include "memory/allocation.hpp"
+#include "memory/allStatic.hpp"
class GranularTimer : public AllStatic {
private:
diff --git a/src/hotspot/share/jfr/leakprofiler/utilities/rootType.hpp b/src/hotspot/share/jfr/leakprofiler/utilities/rootType.hpp
index ffc47c7b833..ce975e9b802 100644
--- a/src/hotspot/share/jfr/leakprofiler/utilities/rootType.hpp
+++ b/src/hotspot/share/jfr/leakprofiler/utilities/rootType.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, 2021, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,7 +26,7 @@
#define SHARE_JFR_LEAKPROFILER_UTILITIES_ROOTTYPE_HPP
#include "gc/shared/oopStorageSet.hpp"
-#include "memory/allocation.hpp"
+#include "memory/allStatic.hpp"
#include "utilities/enumIterator.hpp"
class OldObjectRoot : public AllStatic {
diff --git a/src/hotspot/share/jfr/periodic/jfrFinalizerStatisticsEvent.hpp b/src/hotspot/share/jfr/periodic/jfrFinalizerStatisticsEvent.hpp
index fe739495718..756b5318298 100644
--- a/src/hotspot/share/jfr/periodic/jfrFinalizerStatisticsEvent.hpp
+++ b/src/hotspot/share/jfr/periodic/jfrFinalizerStatisticsEvent.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2021, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,7 @@
#ifndef SHARE_JFR_PERIODIC_JFRFINALIZERSTATISTICSEVENT_HPP
#define SHARE_JFR_PERIODIC_JFRFINALIZERSTATISTICSEVENT_HPP
-#include "memory/allocation.hpp"
+#include "memory/allStatic.hpp"
class InstanceKlass;
diff --git a/src/hotspot/share/jfr/periodic/jfrModuleEvent.hpp b/src/hotspot/share/jfr/periodic/jfrModuleEvent.hpp
index aec662be231..a417ab1bb48 100644
--- a/src/hotspot/share/jfr/periodic/jfrModuleEvent.hpp
+++ b/src/hotspot/share/jfr/periodic/jfrModuleEvent.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015, 2019, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,7 @@
#ifndef SHARE_JFR_PERIODIC_JFRMODULEEVENT_HPP
#define SHARE_JFR_PERIODIC_JFRMODULEEVENT_HPP
-#include "memory/allocation.hpp"
+#include "memory/allStatic.hpp"
class JfrModuleEvent : AllStatic {
public:
diff --git a/src/hotspot/share/jfr/periodic/jfrNetworkUtilization.hpp b/src/hotspot/share/jfr/periodic/jfrNetworkUtilization.hpp
index b7a78498a9f..0ec3de18dee 100644
--- a/src/hotspot/share/jfr/periodic/jfrNetworkUtilization.hpp
+++ b/src/hotspot/share/jfr/periodic/jfrNetworkUtilization.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2018, 2019, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2018, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,7 @@
#ifndef SHARE_JFR_PERIODIC_JFRNETWORKUTILIZATION_HPP
#define SHARE_JFR_PERIODIC_JFRNETWORKUTILIZATION_HPP
-#include "memory/allocation.hpp"
+#include "memory/allStatic.hpp"
class NetworkInterface;
diff --git a/src/hotspot/share/jfr/periodic/jfrThreadCPULoadEvent.hpp b/src/hotspot/share/jfr/periodic/jfrThreadCPULoadEvent.hpp
index 84d3099e825..d5bed0fd821 100644
--- a/src/hotspot/share/jfr/periodic/jfrThreadCPULoadEvent.hpp
+++ b/src/hotspot/share/jfr/periodic/jfrThreadCPULoadEvent.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, 2019, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,7 +26,7 @@
#define SHARE_JFR_PERIODIC_JFRTHREADCPULOADEVENT_HPP
#include "jni.h"
-#include "memory/allocation.hpp"
+#include "memory/allStatic.hpp"
class JavaThread;
class EventThreadCPULoad;
diff --git a/src/hotspot/share/jfr/periodic/jfrThreadDumpEvent.hpp b/src/hotspot/share/jfr/periodic/jfrThreadDumpEvent.hpp
index 23af6a3060b..c00925903b1 100644
--- a/src/hotspot/share/jfr/periodic/jfrThreadDumpEvent.hpp
+++ b/src/hotspot/share/jfr/periodic/jfrThreadDumpEvent.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015, 2019, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,7 @@
#ifndef SHARE_JFR_PERIODIC_JFRTHREADDUMPEVENT_HPP
#define SHARE_JFR_PERIODIC_JFRTHREADDUMPEVENT_HPP
-#include "memory/allocation.hpp"
+#include "memory/allStatic.hpp"
/*
* Helper for generating jfr events using output data from Dcmd's.
diff --git a/src/hotspot/share/jfr/recorder/checkpoint/jfrMetadataEvent.hpp b/src/hotspot/share/jfr/recorder/checkpoint/jfrMetadataEvent.hpp
index 0111d3becbe..abadbfb0b13 100644
--- a/src/hotspot/share/jfr/recorder/checkpoint/jfrMetadataEvent.hpp
+++ b/src/hotspot/share/jfr/recorder/checkpoint/jfrMetadataEvent.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,7 +26,7 @@
#define SHARE_JFR_RECORDER_CHECKPOINT_JFRMETADATAEVENT_HPP
#include "jni.h"
-#include "memory/allocation.hpp"
+#include "memory/allStatic.hpp"
class JfrChunkWriter;
diff --git a/src/hotspot/share/jfr/recorder/checkpoint/types/jfrThreadState.hpp b/src/hotspot/share/jfr/recorder/checkpoint/types/jfrThreadState.hpp
index 9421273dca7..4fd519b5064 100644
--- a/src/hotspot/share/jfr/recorder/checkpoint/types/jfrThreadState.hpp
+++ b/src/hotspot/share/jfr/recorder/checkpoint/types/jfrThreadState.hpp
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved.
+* Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,7 @@
#ifndef SHARE_JFR_RECORDER_CHECKPOINT_TYPES_JFRTHREADSTATE_HPP
#define SHARE_JFR_RECORDER_CHECKPOINT_TYPES_JFRTHREADSTATE_HPP
-#include "memory/allocation.hpp"
+#include "memory/allStatic.hpp"
class JfrCheckpointWriter;
class Thread;
diff --git a/src/hotspot/share/jfr/recorder/checkpoint/types/traceid/jfrTraceId.hpp b/src/hotspot/share/jfr/recorder/checkpoint/types/traceid/jfrTraceId.hpp
index 8136d125804..456599b45f3 100644
--- a/src/hotspot/share/jfr/recorder/checkpoint/types/traceid/jfrTraceId.hpp
+++ b/src/hotspot/share/jfr/recorder/checkpoint/types/traceid/jfrTraceId.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011, 2021, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,7 +27,7 @@
#include "jni.h"
#include "jfr/utilities/jfrTypes.hpp"
-#include "memory/allocation.hpp"
+#include "memory/allStatic.hpp"
class ClassLoaderData;
class Klass;
diff --git a/src/hotspot/share/jfr/recorder/checkpoint/types/traceid/jfrTraceIdBits.hpp b/src/hotspot/share/jfr/recorder/checkpoint/types/traceid/jfrTraceIdBits.hpp
index 7fba5d8d1e8..d7f7effdc3e 100644
--- a/src/hotspot/share/jfr/recorder/checkpoint/types/traceid/jfrTraceIdBits.hpp
+++ b/src/hotspot/share/jfr/recorder/checkpoint/types/traceid/jfrTraceIdBits.hpp
@@ -27,7 +27,7 @@
#include "jni.h"
#include "jfr/utilities/jfrTypes.hpp"
-#include "memory/allocation.hpp"
+#include "memory/allStatic.hpp"
class JfrTraceIdBits : AllStatic {
public:
diff --git a/src/hotspot/share/jfr/recorder/checkpoint/types/traceid/jfrTraceIdEpoch.hpp b/src/hotspot/share/jfr/recorder/checkpoint/types/traceid/jfrTraceIdEpoch.hpp
index ba14919c935..1216f6956ef 100644
--- a/src/hotspot/share/jfr/recorder/checkpoint/types/traceid/jfrTraceIdEpoch.hpp
+++ b/src/hotspot/share/jfr/recorder/checkpoint/types/traceid/jfrTraceIdEpoch.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,7 +27,7 @@
#include "jfr/utilities/jfrSignal.hpp"
#include "jfr/utilities/jfrTypes.hpp"
-#include "memory/allocation.hpp"
+#include "memory/allStatic.hpp"
#include "runtime/atomic.hpp"
#define BIT 1
diff --git a/src/hotspot/share/jfr/recorder/checkpoint/types/traceid/jfrTraceIdLoadBarrier.hpp b/src/hotspot/share/jfr/recorder/checkpoint/types/traceid/jfrTraceIdLoadBarrier.hpp
index 7113a65bd42..e7b7e1a8780 100644
--- a/src/hotspot/share/jfr/recorder/checkpoint/types/traceid/jfrTraceIdLoadBarrier.hpp
+++ b/src/hotspot/share/jfr/recorder/checkpoint/types/traceid/jfrTraceIdLoadBarrier.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2020, 2021, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2020, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,7 +26,7 @@
#define SHARE_JFR_RECORDER_CHECKPOINT_TYPES_TRACEID_JFRTRACEIDLOADBARRIER_HPP
#include "jfr/utilities/jfrTypes.hpp"
-#include "memory/allocation.hpp"
+#include "memory/allStatic.hpp"
class ClassLoaderData;
class JfrBuffer;
diff --git a/src/hotspot/share/jfr/recorder/repository/jfrChunkRotation.hpp b/src/hotspot/share/jfr/recorder/repository/jfrChunkRotation.hpp
index 973fa611718..76603b1cd5e 100644
--- a/src/hotspot/share/jfr/recorder/repository/jfrChunkRotation.hpp
+++ b/src/hotspot/share/jfr/recorder/repository/jfrChunkRotation.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2019, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,7 @@
#ifndef SHARE_JFR_RECORDER_REPOSITORY_JFRCHUNKROTATION_HPP
#define SHARE_JFR_RECORDER_REPOSITORY_JFRCHUNKROTATION_HPP
-#include "memory/allocation.hpp"
+#include "memory/allStatic.hpp"
class JfrChunkWriter;
diff --git a/src/hotspot/share/jfr/recorder/repository/jfrEmergencyDump.hpp b/src/hotspot/share/jfr/recorder/repository/jfrEmergencyDump.hpp
index c96a7d802dc..7912daf35c9 100644
--- a/src/hotspot/share/jfr/recorder/repository/jfrEmergencyDump.hpp
+++ b/src/hotspot/share/jfr/recorder/repository/jfrEmergencyDump.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2018, 2021, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2018, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,7 @@
#ifndef SHARE_JFR_RECORDER_REPOSITORY_JFREMERGENCYDUMP_HPP
#define SHARE_JFR_RECORDER_REPOSITORY_JFREMERGENCYDUMP_HPP
-#include "memory/allocation.hpp"
+#include "memory/allStatic.hpp"
#include "utilities/ostream.hpp"
//
diff --git a/src/hotspot/share/jfr/recorder/service/jfrMemorySizer.hpp b/src/hotspot/share/jfr/recorder/service/jfrMemorySizer.hpp
index 8f056e95398..5e226437987 100644
--- a/src/hotspot/share/jfr/recorder/service/jfrMemorySizer.hpp
+++ b/src/hotspot/share/jfr/recorder/service/jfrMemorySizer.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2021, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,7 @@
#ifndef SHARE_JFR_RECORDER_SERVICE_JFRMEMORYSIZER_HPP
#define SHARE_JFR_RECORDER_SERVICE_JFRMEMORYSIZER_HPP
-#include "memory/allocation.hpp"
+#include "memory/allStatic.hpp"
#include "utilities/globalDefinitions.hpp"
extern const julong MIN_BUFFER_COUNT;
diff --git a/src/hotspot/share/jfr/recorder/service/jfrOptionSet.hpp b/src/hotspot/share/jfr/recorder/service/jfrOptionSet.hpp
index 9e1dd6cef11..9ad810bc3cd 100644
--- a/src/hotspot/share/jfr/recorder/service/jfrOptionSet.hpp
+++ b/src/hotspot/share/jfr/recorder/service/jfrOptionSet.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2021, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,7 +26,7 @@
#define SHARE_JFR_RECORDER_SERVICE_JFROPTIONSET_HPP
#include "jni.h"
-#include "memory/allocation.hpp"
+#include "memory/allStatic.hpp"
#include "utilities/exceptions.hpp"
template
diff --git a/src/hotspot/share/jfr/recorder/service/jfrRecorderThread.hpp b/src/hotspot/share/jfr/recorder/service/jfrRecorderThread.hpp
index 736cc350833..ca8d3e87841 100644
--- a/src/hotspot/share/jfr/recorder/service/jfrRecorderThread.hpp
+++ b/src/hotspot/share/jfr/recorder/service/jfrRecorderThread.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2019, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,7 @@
#ifndef SHARE_JFR_RECORDER_SERVICE_JFRRECORDERTHREAD_HPP
#define SHARE_JFR_RECORDER_SERVICE_JFRRECORDERTHREAD_HPP
-#include "memory/allocation.hpp"
+#include "memory/allStatic.hpp"
#include "utilities/debug.hpp"
class JavaThread;
diff --git a/src/hotspot/share/jfr/support/jfrJdkJfrEvent.hpp b/src/hotspot/share/jfr/support/jfrJdkJfrEvent.hpp
index 06dddd6d39e..3c3a6d69377 100644
--- a/src/hotspot/share/jfr/support/jfrJdkJfrEvent.hpp
+++ b/src/hotspot/share/jfr/support/jfrJdkJfrEvent.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2019, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,7 +26,7 @@
#define SHARE_JFR_SUPPORT_JFRJDKJFREVENT_HPP
#include "jni.h"
-#include "memory/allocation.hpp"
+#include "memory/allStatic.hpp"
#include "utilities/exceptions.hpp"
class Klass;
diff --git a/src/hotspot/share/jfr/support/jfrKlassUnloading.hpp b/src/hotspot/share/jfr/support/jfrKlassUnloading.hpp
index dcbe11ab8f6..5d380df436c 100644
--- a/src/hotspot/share/jfr/support/jfrKlassUnloading.hpp
+++ b/src/hotspot/share/jfr/support/jfrKlassUnloading.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2020, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,7 +26,7 @@
#define SHARE_JFR_SUPPORT_JFRKLASSUNLOADING_HPP
#include "jfr/utilities/jfrTypes.hpp"
-#include "memory/allocation.hpp"
+#include "memory/allStatic.hpp"
class Klass;
diff --git a/src/hotspot/share/jfr/support/jfrMethodLookup.hpp b/src/hotspot/share/jfr/support/jfrMethodLookup.hpp
index 2f998a9def3..106648b25d7 100644
--- a/src/hotspot/share/jfr/support/jfrMethodLookup.hpp
+++ b/src/hotspot/share/jfr/support/jfrMethodLookup.hpp
@@ -26,7 +26,7 @@
#define SHARE_JFR_SUPPORT_JFRMETHODLOOKUP_HPP
#include "jfr/utilities/jfrTypes.hpp"
-#include "memory/allocation.hpp"
+#include "memory/allStatic.hpp"
class InstanceKlass;
class Method;
diff --git a/src/hotspot/share/jfr/support/jfrObjectAllocationSample.hpp b/src/hotspot/share/jfr/support/jfrObjectAllocationSample.hpp
index 0902db68f5b..f58caf3c2a6 100644
--- a/src/hotspot/share/jfr/support/jfrObjectAllocationSample.hpp
+++ b/src/hotspot/share/jfr/support/jfrObjectAllocationSample.hpp
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved.
+* Copyright (c) 2020, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,7 @@
#ifndef SHARE_JFR_SUPPORT_JFROBJECTALLOCATIONSAMPLE_HPP
#define SHARE_JFR_SUPPORT_JFROBJECTALLOCATIONSAMPLE_HPP
-#include "memory/allocation.hpp"
+#include "memory/allStatic.hpp"
class Klass;
class Thread;
diff --git a/src/hotspot/share/jfr/utilities/jfrBigEndian.hpp b/src/hotspot/share/jfr/utilities/jfrBigEndian.hpp
index db2e7ebaad2..b2e641269e0 100644
--- a/src/hotspot/share/jfr/utilities/jfrBigEndian.hpp
+++ b/src/hotspot/share/jfr/utilities/jfrBigEndian.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2020, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,7 @@
#ifndef SHARE_JFR_UTILITIES_JFRBIGENDIAN_HPP
#define SHARE_JFR_UTILITIES_JFRBIGENDIAN_HPP
-#include "memory/allocation.hpp"
+#include "memory/allStatic.hpp"
#include "utilities/bytes.hpp"
#include "utilities/macros.hpp"
diff --git a/src/hotspot/share/jfr/utilities/jfrJavaLog.hpp b/src/hotspot/share/jfr/utilities/jfrJavaLog.hpp
index daef51ac81e..3b5ccc661fe 100644
--- a/src/hotspot/share/jfr/utilities/jfrJavaLog.hpp
+++ b/src/hotspot/share/jfr/utilities/jfrJavaLog.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,7 @@
#ifndef SHARE_JFR_UTILITIES_JFRJAVALOG_HPP
#define SHARE_JFR_UTILITIES_JFRJAVALOG_HPP
-#include "memory/allocation.hpp"
+#include "memory/allStatic.hpp"
#include "utilities/exceptions.hpp"
/*
diff --git a/src/hotspot/share/jfr/utilities/jfrPredicate.hpp b/src/hotspot/share/jfr/utilities/jfrPredicate.hpp
index b5f87b4c1e0..51ad1fec0c9 100644
--- a/src/hotspot/share/jfr/utilities/jfrPredicate.hpp
+++ b/src/hotspot/share/jfr/utilities/jfrPredicate.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2020, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,7 @@
#ifndef SHARE_JFR_UTILITIES_JFRPREDICATE_HPP
#define SHARE_JFR_UTILITIES_JFRPREDICATE_HPP
-#include "memory/allocation.hpp"
+#include "memory/allStatic.hpp"
#include "utilities/growableArray.hpp"
/*
diff --git a/src/hotspot/share/jfr/utilities/jfrTimeConverter.hpp b/src/hotspot/share/jfr/utilities/jfrTimeConverter.hpp
index 9ce2308a551..6871fbb5461 100644
--- a/src/hotspot/share/jfr/utilities/jfrTimeConverter.hpp
+++ b/src/hotspot/share/jfr/utilities/jfrTimeConverter.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011, 2019, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,7 @@
#ifndef SHARE_JFR_UTILITIES_JFRTIMECONVERTER_HPP
#define SHARE_JFR_UTILITIES_JFRTIMECONVERTER_HPP
-#include "memory/allocation.hpp"
+#include "memory/allStatic.hpp"
#include "utilities/globalDefinitions.hpp"
class JfrTimeConverter : AllStatic {
diff --git a/src/hotspot/share/jfr/writers/jfrEncoding.hpp b/src/hotspot/share/jfr/writers/jfrEncoding.hpp
index 4684cc4bc9d..3d4c7c55e0e 100644
--- a/src/hotspot/share/jfr/writers/jfrEncoding.hpp
+++ b/src/hotspot/share/jfr/writers/jfrEncoding.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,7 +26,7 @@
#define SHARE_JFR_WRITERS_JFRENCODING_HPP
#include "jfr/writers/jfrEncoders.hpp"
-#include "memory/allocation.hpp"
+#include "memory/allStatic.hpp"
#include "utilities/globalDefinitions.hpp"
enum JfrStringEncoding {
diff --git a/src/hotspot/share/jfr/writers/jfrJavaEventWriter.hpp b/src/hotspot/share/jfr/writers/jfrJavaEventWriter.hpp
index 844ce51a3d9..1159766428e 100644
--- a/src/hotspot/share/jfr/writers/jfrJavaEventWriter.hpp
+++ b/src/hotspot/share/jfr/writers/jfrJavaEventWriter.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,7 +26,7 @@
#define SHARE_JFR_WRITERS_JFRJAVAEVENTWRITER_HPP
#include "jni.h"
-#include "memory/allocation.hpp"
+#include "memory/allStatic.hpp"
class JavaThread;
class Thread;
diff --git a/src/hotspot/share/logging/logConfiguration.hpp b/src/hotspot/share/logging/logConfiguration.hpp
index 542aaa2433b..35491d7459b 100644
--- a/src/hotspot/share/logging/logConfiguration.hpp
+++ b/src/hotspot/share/logging/logConfiguration.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015, 2019, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,12 +25,13 @@
#define SHARE_LOGGING_LOGCONFIGURATION_HPP
#include "logging/logLevel.hpp"
-#include "memory/allocation.hpp"
+#include "memory/allStatic.hpp"
#include "utilities/globalDefinitions.hpp"
class LogOutput;
class LogDecorators;
class LogSelectionList;
+class outputStream;
// Global configuration of logging. Handles parsing and configuration of the logging framework,
// and manages the list of configured log outputs. The actual tag and level configuration is
diff --git a/src/hotspot/share/logging/logLevel.hpp b/src/hotspot/share/logging/logLevel.hpp
index 7fe2d31f999..56ea7f5958a 100644
--- a/src/hotspot/share/logging/logLevel.hpp
+++ b/src/hotspot/share/logging/logLevel.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015, 2019, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -24,7 +24,8 @@
#ifndef SHARE_LOGGING_LOGLEVEL_HPP
#define SHARE_LOGGING_LOGLEVEL_HPP
-#include "memory/allocation.hpp"
+#include "memory/allStatic.hpp"
+#include "utilities/debug.hpp"
#include "utilities/macros.hpp"
// The list of log levels:
diff --git a/src/hotspot/share/logging/logTag.hpp b/src/hotspot/share/logging/logTag.hpp
index 78e0a88d112..9b216a9d35f 100644
--- a/src/hotspot/share/logging/logTag.hpp
+++ b/src/hotspot/share/logging/logTag.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015, 2021, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -24,9 +24,11 @@
#ifndef SHARE_LOGGING_LOGTAG_HPP
#define SHARE_LOGGING_LOGTAG_HPP
-#include "memory/allocation.hpp"
+#include "memory/allStatic.hpp"
#include "utilities/globalDefinitions.hpp"
+class outputStream;
+
// List of available logging tags. New tags should be added here, in
// alphabetical order.
// (The tags 'all', 'disable' and 'help' are special tags that can
diff --git a/src/hotspot/share/memory/metaspace/internalStats.hpp b/src/hotspot/share/memory/metaspace/internalStats.hpp
index dff2534e303..9c127568e57 100644
--- a/src/hotspot/share/memory/metaspace/internalStats.hpp
+++ b/src/hotspot/share/memory/metaspace/internalStats.hpp
@@ -1,6 +1,6 @@
/*
- * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved.
- * Copyright (c) 2020 SAP SE. All rights reserved.
+ * Copyright (c) 2020, 2022, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2020, 2022 SAP SE. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,7 +26,7 @@
#ifndef SHARE_MEMORY_METASPACE_INTERNALSTATS_HPP
#define SHARE_MEMORY_METASPACE_INTERNALSTATS_HPP
-#include "memory/allocation.hpp"
+#include "memory/allStatic.hpp"
#include "runtime/atomic.hpp"
#include "utilities/globalDefinitions.hpp"
diff --git a/src/hotspot/share/memory/metaspace/metaspaceReporter.hpp b/src/hotspot/share/memory/metaspace/metaspaceReporter.hpp
index 2aab2063379..acc5ca211e8 100644
--- a/src/hotspot/share/memory/metaspace/metaspaceReporter.hpp
+++ b/src/hotspot/share/memory/metaspace/metaspaceReporter.hpp
@@ -1,6 +1,6 @@
/*
- * Copyright (c) 2018, 2020, Oracle and/or its affiliates. All rights reserved.
- * Copyright (c) 2018, 2020 SAP SE. All rights reserved.
+ * Copyright (c) 2018, 2022, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2018, 2022 SAP SE. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,7 +26,7 @@
#ifndef SHARE_MEMORY_METASPACE_METASPACEREPORTER_HPP
#define SHARE_MEMORY_METASPACE_METASPACEREPORTER_HPP
-#include "memory/allocation.hpp"
+#include "memory/allStatic.hpp"
namespace metaspace {
diff --git a/src/hotspot/share/memory/metaspace/metaspaceSettings.hpp b/src/hotspot/share/memory/metaspace/metaspaceSettings.hpp
index e6d47fec3f4..d2dc3f97441 100644
--- a/src/hotspot/share/memory/metaspace/metaspaceSettings.hpp
+++ b/src/hotspot/share/memory/metaspace/metaspaceSettings.hpp
@@ -1,6 +1,6 @@
/*
- * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved.
- * Copyright (c) 2020 SAP SE. All rights reserved.
+ * Copyright (c) 2020, 2022, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2020, 2022 SAP SE. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,7 +26,7 @@
#ifndef SHARE_MEMORY_METASPACE_METASPACESETTINGS_HPP
#define SHARE_MEMORY_METASPACE_METASPACESETTINGS_HPP
-#include "memory/allocation.hpp"
+#include "memory/allStatic.hpp"
#include "memory/metaspace/chunklevel.hpp"
#include "utilities/globalDefinitions.hpp"
diff --git a/src/hotspot/share/memory/metaspace/runningCounters.hpp b/src/hotspot/share/memory/metaspace/runningCounters.hpp
index 8ef751896d3..ff24ead7ebd 100644
--- a/src/hotspot/share/memory/metaspace/runningCounters.hpp
+++ b/src/hotspot/share/memory/metaspace/runningCounters.hpp
@@ -1,6 +1,6 @@
/*
- * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved.
- * Copyright (c) 2020 SAP SE. All rights reserved.
+ * Copyright (c) 2020, 2022, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2020, 2022 SAP SE. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,7 +26,7 @@
#ifndef SHARE_MEMORY_METASPACE_RUNNINGCOUNTERS_HPP
#define SHARE_MEMORY_METASPACE_RUNNINGCOUNTERS_HPP
-#include "memory/allocation.hpp"
+#include "memory/allStatic.hpp"
#include "memory/metaspace/counters.hpp"
namespace metaspace {
diff --git a/src/hotspot/share/memory/metaspaceCounters.hpp b/src/hotspot/share/memory/metaspaceCounters.hpp
index 38d9c94ddb6..b83e1fdb1ba 100644
--- a/src/hotspot/share/memory/metaspaceCounters.hpp
+++ b/src/hotspot/share/memory/metaspaceCounters.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2021, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2022, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2021 SAP SE. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
@@ -26,7 +26,7 @@
#ifndef SHARE_MEMORY_METASPACECOUNTERS_HPP
#define SHARE_MEMORY_METASPACECOUNTERS_HPP
-#include "memory/allocation.hpp"
+#include "memory/allStatic.hpp"
// Perf Counters for Metaspace
diff --git a/src/hotspot/share/memory/metaspaceCriticalAllocation.hpp b/src/hotspot/share/memory/metaspaceCriticalAllocation.hpp
index 71e8819aef3..bdc9ad8cf2c 100644
--- a/src/hotspot/share/memory/metaspaceCriticalAllocation.hpp
+++ b/src/hotspot/share/memory/metaspaceCriticalAllocation.hpp
@@ -25,7 +25,7 @@
#ifndef SHARE_MEMORY_METASPACECRITICALALLOCATION_HPP
#define SHARE_MEMORY_METASPACECRITICALALLOCATION_HPP
-#include "memory/allocation.hpp"
+#include "memory/allStatic.hpp"
#include "memory/metaspace.hpp"
class MetadataAllocationRequest;
diff --git a/src/hotspot/share/metaprogramming/conditional.hpp b/src/hotspot/share/metaprogramming/conditional.hpp
index 2d4fe1a86e8..3ba2fb7594e 100644
--- a/src/hotspot/share/metaprogramming/conditional.hpp
+++ b/src/hotspot/share/metaprogramming/conditional.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, 2019, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,7 @@
#ifndef SHARE_METAPROGRAMMING_CONDITIONAL_HPP
#define SHARE_METAPROGRAMMING_CONDITIONAL_HPP
-#include "memory/allocation.hpp"
+#include "memory/allStatic.hpp"
// This trait evaluates its typedef called "type" to TrueType iff the condition
// is true. Otherwise it evaluates to FalseType.
diff --git a/src/hotspot/share/metaprogramming/decay.hpp b/src/hotspot/share/metaprogramming/decay.hpp
index 4dff0500f13..f504c099e4d 100644
--- a/src/hotspot/share/metaprogramming/decay.hpp
+++ b/src/hotspot/share/metaprogramming/decay.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, 2019, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,7 @@
#ifndef SHARE_METAPROGRAMMING_DECAY_HPP
#define SHARE_METAPROGRAMMING_DECAY_HPP
-#include "memory/allocation.hpp"
+#include "memory/allStatic.hpp"
#include "metaprogramming/removeCV.hpp"
#include "metaprogramming/removeReference.hpp"
diff --git a/src/hotspot/share/metaprogramming/removeCV.hpp b/src/hotspot/share/metaprogramming/removeCV.hpp
index 0c0b2f47fa7..5ddafc54746 100644
--- a/src/hotspot/share/metaprogramming/removeCV.hpp
+++ b/src/hotspot/share/metaprogramming/removeCV.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, 2019, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,7 @@
#ifndef SHARE_METAPROGRAMMING_REMOVECV_HPP
#define SHARE_METAPROGRAMMING_REMOVECV_HPP
-#include "memory/allocation.hpp"
+#include "memory/allStatic.hpp"
template
struct RemoveCV: AllStatic {
diff --git a/src/hotspot/share/metaprogramming/removeExtent.hpp b/src/hotspot/share/metaprogramming/removeExtent.hpp
index f188e0db264..3f93dd3eeb6 100644
--- a/src/hotspot/share/metaprogramming/removeExtent.hpp
+++ b/src/hotspot/share/metaprogramming/removeExtent.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2019, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,7 @@
#ifndef SHARE_METAPROGRAMMING_REMOVEEXTENT_HPP
#define SHARE_METAPROGRAMMING_REMOVEEXTENT_HPP
-#include "memory/allocation.hpp"
+#include "memory/allStatic.hpp"
template struct RemoveExtent: AllStatic { typedef T type; };
diff --git a/src/hotspot/share/metaprogramming/removePointer.hpp b/src/hotspot/share/metaprogramming/removePointer.hpp
index be0f5b6e6fb..eb267c0702d 100644
--- a/src/hotspot/share/metaprogramming/removePointer.hpp
+++ b/src/hotspot/share/metaprogramming/removePointer.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, 2019, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,7 @@
#ifndef SHARE_METAPROGRAMMING_REMOVEPOINTER_HPP
#define SHARE_METAPROGRAMMING_REMOVEPOINTER_HPP
-#include "memory/allocation.hpp"
+#include "memory/allStatic.hpp"
// This metafunction returns for a type T either the underlying type behind
// the pointer iff T is a pointer type (irrespective of CV qualifiers),
diff --git a/src/hotspot/share/metaprogramming/removeReference.hpp b/src/hotspot/share/metaprogramming/removeReference.hpp
index 274c327a0ad..bd263d911a5 100644
--- a/src/hotspot/share/metaprogramming/removeReference.hpp
+++ b/src/hotspot/share/metaprogramming/removeReference.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, 2019, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,7 @@
#ifndef SHARE_METAPROGRAMMING_REMOVEREFERENCE_HPP
#define SHARE_METAPROGRAMMING_REMOVEREFERENCE_HPP
-#include "memory/allocation.hpp"
+#include "memory/allStatic.hpp"
// This metafunction returns for a type T either the underlying type behind
// the reference iff T is a reference type, or the same type T if T is not
diff --git a/src/hotspot/share/oops/access.hpp b/src/hotspot/share/oops/access.hpp
index c3f3d0ba45c..47e6bd27ea0 100644
--- a/src/hotspot/share/oops/access.hpp
+++ b/src/hotspot/share/oops/access.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, 2020, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,7 @@
#ifndef SHARE_OOPS_ACCESS_HPP
#define SHARE_OOPS_ACCESS_HPP
-#include "memory/allocation.hpp"
+#include "memory/allStatic.hpp"
#include "oops/accessBackend.hpp"
#include "oops/accessDecorators.hpp"
#include "oops/oopsHierarchy.hpp"
diff --git a/src/hotspot/share/oops/accessDecorators.hpp b/src/hotspot/share/oops/accessDecorators.hpp
index 21bcff9113d..976f2e355e1 100644
--- a/src/hotspot/share/oops/accessDecorators.hpp
+++ b/src/hotspot/share/oops/accessDecorators.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2018, 2020, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2018, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,7 +26,7 @@
#define SHARE_OOPS_ACCESSDECORATORS_HPP
#include "gc/shared/barrierSetConfig.hpp"
-#include "memory/allocation.hpp"
+#include "memory/allStatic.hpp"
#include "metaprogramming/integralConstant.hpp"
#include "utilities/globalDefinitions.hpp"
diff --git a/src/hotspot/share/oops/compressedOops.hpp b/src/hotspot/share/oops/compressedOops.hpp
index 83f18138b5a..2755b1eef92 100644
--- a/src/hotspot/share/oops/compressedOops.hpp
+++ b/src/hotspot/share/oops/compressedOops.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2019, 2021, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2019, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,7 @@
#ifndef SHARE_OOPS_COMPRESSEDOOPS_HPP
#define SHARE_OOPS_COMPRESSEDOOPS_HPP
-#include "memory/allocation.hpp"
+#include "memory/allStatic.hpp"
#include "memory/memRegion.hpp"
#include "oops/oopsHierarchy.hpp"
#include "utilities/globalDefinitions.hpp"
diff --git a/src/hotspot/share/prims/jniFastGetField.hpp b/src/hotspot/share/prims/jniFastGetField.hpp
index 4673d2cb5c9..525ff0aba87 100644
--- a/src/hotspot/share/prims/jniFastGetField.hpp
+++ b/src/hotspot/share/prims/jniFastGetField.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2004, 2019, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2004, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,7 @@
#ifndef SHARE_PRIMS_JNIFASTGETFIELD_HPP
#define SHARE_PRIMS_JNIFASTGETFIELD_HPP
-#include "memory/allocation.hpp"
+#include "memory/allStatic.hpp"
#include "prims/jvm_misc.hpp"
// Basic logic of a fast version of jni_GetField:
diff --git a/src/hotspot/share/prims/jvmtiEventController.hpp b/src/hotspot/share/prims/jvmtiEventController.hpp
index 69156d27108..06a3e801876 100644
--- a/src/hotspot/share/prims/jvmtiEventController.hpp
+++ b/src/hotspot/share/prims/jvmtiEventController.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2019, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,7 +26,7 @@
#define SHARE_PRIMS_JVMTIEVENTCONTROLLER_HPP
#include "jvmtifiles/jvmti.h"
-#include "memory/allocation.hpp"
+#include "memory/allStatic.hpp"
#include "utilities/globalDefinitions.hpp"
// forward declaration
diff --git a/src/hotspot/share/prims/jvmtiExtensions.hpp b/src/hotspot/share/prims/jvmtiExtensions.hpp
index b1156b8be49..d44c6dd4f51 100644
--- a/src/hotspot/share/prims/jvmtiExtensions.hpp
+++ b/src/hotspot/share/prims/jvmtiExtensions.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2019, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,7 +27,7 @@
#include "jvmtifiles/jvmti.h"
#include "jvmtifiles/jvmtiEnv.hpp"
-#include "memory/allocation.hpp"
+#include "memory/allStatic.hpp"
// JvmtiExtensions
//
diff --git a/src/hotspot/share/prims/jvmtiManageCapabilities.hpp b/src/hotspot/share/prims/jvmtiManageCapabilities.hpp
index fc6ef884f07..e588be4fa15 100644
--- a/src/hotspot/share/prims/jvmtiManageCapabilities.hpp
+++ b/src/hotspot/share/prims/jvmtiManageCapabilities.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2019, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,7 +26,7 @@
#define SHARE_PRIMS_JVMTIMANAGECAPABILITIES_HPP
#include "jvmtifiles/jvmti.h"
-#include "memory/allocation.hpp"
+#include "memory/allStatic.hpp"
class JvmtiManageCapabilities : public AllStatic {
diff --git a/src/hotspot/share/prims/nativeLookup.hpp b/src/hotspot/share/prims/nativeLookup.hpp
index a00b16c2fa4..9aafed6f272 100644
--- a/src/hotspot/share/prims/nativeLookup.hpp
+++ b/src/hotspot/share/prims/nativeLookup.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2021, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,7 @@
#ifndef SHARE_PRIMS_NATIVELOOKUP_HPP
#define SHARE_PRIMS_NATIVELOOKUP_HPP
-#include "memory/allocation.hpp"
+#include "memory/allStatic.hpp"
#include "runtime/handles.hpp"
// NativeLookup provides an interface for finding DLL entry points for
diff --git a/src/hotspot/share/prims/resolvedMethodTable.hpp b/src/hotspot/share/prims/resolvedMethodTable.hpp
index b89de0e419a..b437f012946 100644
--- a/src/hotspot/share/prims/resolvedMethodTable.hpp
+++ b/src/hotspot/share/prims/resolvedMethodTable.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, 2019, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,7 @@
#ifndef SHARE_PRIMS_RESOLVEDMETHODTABLE_HPP
#define SHARE_PRIMS_RESOLVEDMETHODTABLE_HPP
-#include "memory/allocation.hpp"
+#include "memory/allStatic.hpp"
#include "oops/symbol.hpp"
#include "oops/weakHandle.hpp"
diff --git a/src/hotspot/share/prims/vectorSupport.hpp b/src/hotspot/share/prims/vectorSupport.hpp
index 324400c198d..ccae8bbcfc0 100644
--- a/src/hotspot/share/prims/vectorSupport.hpp
+++ b/src/hotspot/share/prims/vectorSupport.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2021, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,7 +27,7 @@
#include "jni.h"
#include "code/debugInfo.hpp"
-#include "memory/allocation.hpp"
+#include "memory/allStatic.hpp"
#include "oops/typeArrayOop.hpp"
#include "runtime/registerMap.hpp"
#include "utilities/exceptions.hpp"
diff --git a/src/hotspot/share/runtime/abstract_vm_version.hpp b/src/hotspot/share/runtime/abstract_vm_version.hpp
index d2f210ca04d..a1dd51dad2c 100644
--- a/src/hotspot/share/runtime/abstract_vm_version.hpp
+++ b/src/hotspot/share/runtime/abstract_vm_version.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2021, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,7 @@
#ifndef SHARE_RUNTIME_ABSTRACT_VM_VERSION_HPP
#define SHARE_RUNTIME_ABSTRACT_VM_VERSION_HPP
-#include "memory/allocation.hpp" // For declaration of class AllStatic
+#include "memory/allStatic.hpp" // For declaration of class AllStatic
#include "utilities/globalDefinitions.hpp"
typedef enum {
diff --git a/src/hotspot/share/runtime/arguments.hpp b/src/hotspot/share/runtime/arguments.hpp
index 7b03205cb08..19bb12196e3 100644
--- a/src/hotspot/share/runtime/arguments.hpp
+++ b/src/hotspot/share/runtime/arguments.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2021, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,7 +27,7 @@
#include "logging/logLevel.hpp"
#include "logging/logTag.hpp"
-#include "memory/allocation.hpp"
+#include "memory/allStatic.hpp"
#include "runtime/globals.hpp"
#include "runtime/java.hpp"
#include "runtime/os.hpp"
diff --git a/src/hotspot/share/runtime/handshake.hpp b/src/hotspot/share/runtime/handshake.hpp
index f66c731cc2d..f6a8e28a037 100644
--- a/src/hotspot/share/runtime/handshake.hpp
+++ b/src/hotspot/share/runtime/handshake.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, 2021, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,7 @@
#ifndef SHARE_RUNTIME_HANDSHAKE_HPP
#define SHARE_RUNTIME_HANDSHAKE_HPP
-#include "memory/allocation.hpp"
+#include "memory/allStatic.hpp"
#include "memory/iterator.hpp"
#include "runtime/flags/flagSetting.hpp"
#include "runtime/mutex.hpp"
diff --git a/src/hotspot/share/runtime/icache.hpp b/src/hotspot/share/runtime/icache.hpp
index 522fc5ed1fe..d273372a877 100644
--- a/src/hotspot/share/runtime/icache.hpp
+++ b/src/hotspot/share/runtime/icache.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2019, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,7 @@
#ifndef SHARE_RUNTIME_ICACHE_HPP
#define SHARE_RUNTIME_ICACHE_HPP
-#include "memory/allocation.hpp"
+#include "memory/allStatic.hpp"
#include "runtime/stubCodeGenerator.hpp"
#include "utilities/macros.hpp"
diff --git a/src/hotspot/share/runtime/jniHandles.hpp b/src/hotspot/share/runtime/jniHandles.hpp
index 0ec73966f20..f1d9ee43529 100644
--- a/src/hotspot/share/runtime/jniHandles.hpp
+++ b/src/hotspot/share/runtime/jniHandles.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2021, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,7 @@
#ifndef SHARE_RUNTIME_JNIHANDLES_HPP
#define SHARE_RUNTIME_JNIHANDLES_HPP
-#include "memory/allocation.hpp"
+#include "memory/allStatic.hpp"
#include "runtime/handles.hpp"
class JavaThread;
diff --git a/src/hotspot/share/runtime/orderAccess.hpp b/src/hotspot/share/runtime/orderAccess.hpp
index 8e5944916f9..159fbd9038d 100644
--- a/src/hotspot/share/runtime/orderAccess.hpp
+++ b/src/hotspot/share/runtime/orderAccess.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2020, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,7 @@
#ifndef SHARE_RUNTIME_ORDERACCESS_HPP
#define SHARE_RUNTIME_ORDERACCESS_HPP
-#include "memory/allocation.hpp"
+#include "memory/allStatic.hpp"
#include "runtime/vm_version.hpp"
#include "utilities/macros.hpp"
diff --git a/src/hotspot/share/runtime/prefetch.hpp b/src/hotspot/share/runtime/prefetch.hpp
index dac34f6cd26..d949899813c 100644
--- a/src/hotspot/share/runtime/prefetch.hpp
+++ b/src/hotspot/share/runtime/prefetch.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2021, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,7 @@
#ifndef SHARE_RUNTIME_PREFETCH_HPP
#define SHARE_RUNTIME_PREFETCH_HPP
-#include "memory/allocation.hpp"
+#include "memory/allStatic.hpp"
// If calls to prefetch methods are in a loop, the loop should be cloned
// such that if Prefetch{Scan,Copy}Interval and/or PrefetchFieldInterval
diff --git a/src/hotspot/share/runtime/reflectionUtils.hpp b/src/hotspot/share/runtime/reflectionUtils.hpp
index a928c50596e..ef9f8bbd62e 100644
--- a/src/hotspot/share/runtime/reflectionUtils.hpp
+++ b/src/hotspot/share/runtime/reflectionUtils.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1999, 2019, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,7 @@
#ifndef SHARE_RUNTIME_REFLECTIONUTILS_HPP
#define SHARE_RUNTIME_REFLECTIONUTILS_HPP
-#include "memory/allocation.hpp"
+#include "memory/allStatic.hpp"
#include "oops/instanceKlass.hpp"
#include "oops/objArrayOop.hpp"
#include "oops/oopsHierarchy.hpp"
diff --git a/src/hotspot/share/runtime/safepoint.hpp b/src/hotspot/share/runtime/safepoint.hpp
index 8024ade2520..e67c960626b 100644
--- a/src/hotspot/share/runtime/safepoint.hpp
+++ b/src/hotspot/share/runtime/safepoint.hpp
@@ -25,7 +25,7 @@
#ifndef SHARE_RUNTIME_SAFEPOINT_HPP
#define SHARE_RUNTIME_SAFEPOINT_HPP
-#include "memory/allocation.hpp"
+#include "memory/allStatic.hpp"
#include "runtime/os.hpp"
#include "runtime/thread.hpp"
#include "runtime/vmOperation.hpp"
diff --git a/src/hotspot/share/runtime/sharedRuntime.hpp b/src/hotspot/share/runtime/sharedRuntime.hpp
index 1adc9661985..10e4b0ec0af 100644
--- a/src/hotspot/share/runtime/sharedRuntime.hpp
+++ b/src/hotspot/share/runtime/sharedRuntime.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2021, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -29,7 +29,7 @@
#include "code/vmreg.hpp"
#include "interpreter/bytecodeTracer.hpp"
#include "interpreter/linkResolver.hpp"
-#include "memory/allocation.hpp"
+#include "memory/allStatic.hpp"
#include "memory/resourceArea.hpp"
#include "utilities/hashtable.hpp"
#include "utilities/macros.hpp"
diff --git a/src/hotspot/share/runtime/stackWatermark.hpp b/src/hotspot/share/runtime/stackWatermark.hpp
index 3cf7ce59cd9..6210a0bc2bf 100644
--- a/src/hotspot/share/runtime/stackWatermark.hpp
+++ b/src/hotspot/share/runtime/stackWatermark.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2020, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,7 @@
#ifndef SHARE_RUNTIME_STACKWATERMARK_HPP
#define SHARE_RUNTIME_STACKWATERMARK_HPP
-#include "memory/allocation.hpp"
+#include "memory/allStatic.hpp"
#include "runtime/mutex.hpp"
#include "runtime/stackWatermarkKind.hpp"
diff --git a/src/hotspot/share/runtime/threadLocalStorage.hpp b/src/hotspot/share/runtime/threadLocalStorage.hpp
index 93607612a4d..604b624757e 100644
--- a/src/hotspot/share/runtime/threadLocalStorage.hpp
+++ b/src/hotspot/share/runtime/threadLocalStorage.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2019, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,7 @@
#ifndef SHARE_RUNTIME_THREADLOCALSTORAGE_HPP
#define SHARE_RUNTIME_THREADLOCALSTORAGE_HPP
-#include "memory/allocation.hpp"
+#include "memory/allStatic.hpp"
// forward-decl as we can't have an include cycle
class Thread;
diff --git a/src/hotspot/share/services/attachListener.hpp b/src/hotspot/share/services/attachListener.hpp
index 25fad127d0f..5765240c16c 100644
--- a/src/hotspot/share/services/attachListener.hpp
+++ b/src/hotspot/share/services/attachListener.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2021, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,7 @@
#ifndef SHARE_SERVICES_ATTACHLISTENER_HPP
#define SHARE_SERVICES_ATTACHLISTENER_HPP
-#include "memory/allocation.hpp"
+#include "memory/allStatic.hpp"
#include "runtime/atomic.hpp"
#include "runtime/globals.hpp"
#include "utilities/debug.hpp"
diff --git a/src/hotspot/share/services/gcNotifier.hpp b/src/hotspot/share/services/gcNotifier.hpp
index a13b85e0e69..1a4582025c4 100644
--- a/src/hotspot/share/services/gcNotifier.hpp
+++ b/src/hotspot/share/services/gcNotifier.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011, 2019, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,7 @@
#ifndef SHARE_SERVICES_GCNOTIFIER_HPP
#define SHARE_SERVICES_GCNOTIFIER_HPP
-#include "memory/allocation.hpp"
+#include "memory/allStatic.hpp"
#include "services/memoryPool.hpp"
#include "services/memoryService.hpp"
#include "services/memoryManager.hpp"
diff --git a/src/hotspot/share/services/lowMemoryDetector.hpp b/src/hotspot/share/services/lowMemoryDetector.hpp
index 09bb1ce6406..3070eb00ab7 100644
--- a/src/hotspot/share/services/lowMemoryDetector.hpp
+++ b/src/hotspot/share/services/lowMemoryDetector.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2021, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,7 @@
#ifndef SHARE_SERVICES_LOWMEMORYDETECTOR_HPP
#define SHARE_SERVICES_LOWMEMORYDETECTOR_HPP
-#include "memory/allocation.hpp"
+#include "memory/allStatic.hpp"
#include "oops/oopHandle.hpp"
#include "runtime/atomic.hpp"
#include "services/memoryPool.hpp"
diff --git a/src/hotspot/share/services/nmtCommon.hpp b/src/hotspot/share/services/nmtCommon.hpp
index b573fb6b7df..dc85338c025 100644
--- a/src/hotspot/share/services/nmtCommon.hpp
+++ b/src/hotspot/share/services/nmtCommon.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, 2021, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,7 @@
#ifndef SHARE_SERVICES_NMTCOMMON_HPP
#define SHARE_SERVICES_NMTCOMMON_HPP
-#include "memory/allocation.hpp"
+#include "memory/allocation.hpp" // for MEMFLAGS only
#include "utilities/align.hpp"
#include "utilities/globalDefinitions.hpp"
diff --git a/src/hotspot/share/services/threadIdTable.hpp b/src/hotspot/share/services/threadIdTable.hpp
index 223b57fcecb..12772aed88c 100644
--- a/src/hotspot/share/services/threadIdTable.hpp
+++ b/src/hotspot/share/services/threadIdTable.hpp
@@ -26,7 +26,7 @@
#ifndef SHARE_SERVICES_THREADIDTABLE_HPP
#define SHARE_SERVICES_THREADIDTABLE_HPP
-#include "memory/allocation.hpp"
+#include "memory/allStatic.hpp"
class JavaThread;
class ThreadsList;
diff --git a/src/hotspot/share/utilities/decoder.hpp b/src/hotspot/share/utilities/decoder.hpp
index ccf3ac4ba3c..b0a368fd058 100644
--- a/src/hotspot/share/utilities/decoder.hpp
+++ b/src/hotspot/share/utilities/decoder.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2019, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,7 +26,7 @@
#ifndef SHARE_UTILITIES_DECODER_HPP
#define SHARE_UTILITIES_DECODER_HPP
-#include "memory/allocation.hpp"
+#include "memory/allStatic.hpp"
#include "runtime/mutex.hpp"
#include "runtime/mutexLocker.hpp"
#include "utilities/ostream.hpp"
diff --git a/src/hotspot/share/utilities/globalCounter.hpp b/src/hotspot/share/utilities/globalCounter.hpp
index beba72a954a..5f5eba263b9 100644
--- a/src/hotspot/share/utilities/globalCounter.hpp
+++ b/src/hotspot/share/utilities/globalCounter.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2018, 2021, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2018, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,7 @@
#ifndef SHARE_UTILITIES_GLOBALCOUNTER_HPP
#define SHARE_UTILITIES_GLOBALCOUNTER_HPP
-#include "memory/allocation.hpp"
+#include "memory/allStatic.hpp"
#include "memory/padded.hpp"
class Thread;
diff --git a/src/hotspot/share/utilities/quickSort.hpp b/src/hotspot/share/utilities/quickSort.hpp
index 000f1bf4f42..a94a7cd8b6c 100644
--- a/src/hotspot/share/utilities/quickSort.hpp
+++ b/src/hotspot/share/utilities/quickSort.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011, 2019, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,7 @@
#ifndef SHARE_UTILITIES_QUICKSORT_HPP
#define SHARE_UTILITIES_QUICKSORT_HPP
-#include "memory/allocation.hpp"
+#include "memory/allStatic.hpp"
#include "runtime/globals.hpp"
#include "utilities/debug.hpp"
diff --git a/src/hotspot/share/utilities/stringUtils.cpp b/src/hotspot/share/utilities/stringUtils.cpp
index 21fb7a6e8d3..0ee73de809a 100644
--- a/src/hotspot/share/utilities/stringUtils.cpp
+++ b/src/hotspot/share/utilities/stringUtils.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,8 @@
#include "utilities/debug.hpp"
#include "utilities/stringUtils.hpp"
+#include
+
int StringUtils::replace_no_expand(char* string, const char* from, const char* to) {
int replace_count = 0;
size_t from_len = strlen(from);
diff --git a/src/hotspot/share/utilities/stringUtils.hpp b/src/hotspot/share/utilities/stringUtils.hpp
index 372222d7c70..54d6847a4c4 100644
--- a/src/hotspot/share/utilities/stringUtils.hpp
+++ b/src/hotspot/share/utilities/stringUtils.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, 2019, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,7 @@
#ifndef SHARE_UTILITIES_STRINGUTILS_HPP
#define SHARE_UTILITIES_STRINGUTILS_HPP
-#include "memory/allocation.hpp"
+#include "memory/allStatic.hpp"
class StringUtils : AllStatic {
public:
diff --git a/src/hotspot/share/utilities/utf8.cpp b/src/hotspot/share/utilities/utf8.cpp
index 6ebeb9a6c9b..81ad02a9ba6 100644
--- a/src/hotspot/share/utilities/utf8.cpp
+++ b/src/hotspot/share/utilities/utf8.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2019, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -23,8 +23,12 @@
*/
#include "precompiled.hpp"
+#include "memory/allocation.hpp"
+#include "utilities/debug.hpp"
+#include "utilities/globalDefinitions.hpp"
#include "utilities/utf8.hpp"
+
// Assume the utf8 string is in legal form and has been
// checked in the class file parser/format checker.
template char* UTF8::next(const char* str, T* value) {
diff --git a/src/hotspot/share/utilities/utf8.hpp b/src/hotspot/share/utilities/utf8.hpp
index 0ebd65b0658..e7b2905e046 100644
--- a/src/hotspot/share/utilities/utf8.hpp
+++ b/src/hotspot/share/utilities/utf8.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2019, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,9 @@
#ifndef SHARE_UTILITIES_UTF8_HPP
#define SHARE_UTILITIES_UTF8_HPP
-#include "memory/allocation.hpp"
+#include "jni.h"
+#include "memory/allStatic.hpp"
+#include "utilities/debug.hpp"
// Low-level interface for UTF8 strings
diff --git a/test/hotspot/gtest/classfile/test_AltHashing.cpp b/test/hotspot/gtest/classfile/test_AltHashing.cpp
index d11dc0fb4a2..0070c4fd2c1 100644
--- a/test/hotspot/gtest/classfile/test_AltHashing.cpp
+++ b/test/hotspot/gtest/classfile/test_AltHashing.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -24,6 +24,7 @@
#include "classfile/altHashing.hpp"
#include "utilities/debug.hpp"
#include "utilities/formatBuffer.hpp"
+#include "utilities/globalDefinitions.hpp"
#include "unittest.hpp"
class AltHashingTest : public ::testing::Test {
--
GitLab
From 1b14157677b34891385f643a76a7aa19d7003acf Mon Sep 17 00:00:00 2001
From: Tobias Holenstein <71546117+tobiasholenstein@users.noreply.github.com>
Date: Tue, 25 Jan 2022 09:59:55 +0000
Subject: [PATCH 019/400] 8280274: Guard printing code of Compile::print_method
in PRODUCT
Reviewed-by: thartmann, neliasso
---
src/hotspot/share/opto/compile.cpp | 10 ++++++----
src/hotspot/share/opto/compile.hpp | 4 ++--
2 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/src/hotspot/share/opto/compile.cpp b/src/hotspot/share/opto/compile.cpp
index b0a2b3241e7..c730d1d9c98 100644
--- a/src/hotspot/share/opto/compile.cpp
+++ b/src/hotspot/share/opto/compile.cpp
@@ -2357,7 +2357,7 @@ void Compile::inline_vector_reboxing_calls() {
CallGenerator* cg = _vector_reboxing_late_inlines.pop();
cg->do_late_inline();
if (failing()) return;
- print_method(PHASE_INLINE_VECTOR_REBOX, cg->call_node());
+ print_method(PHASE_INLINE_VECTOR_REBOX, cg->call_node(), 3);
}
_vector_reboxing_late_inlines.trunc_to(0);
}
@@ -4815,10 +4815,11 @@ void Compile::sort_macro_nodes() {
}
void Compile::print_method(CompilerPhaseType cpt, int level) {
- print_method_impl(cpt, CompilerPhaseTypeHelper::to_string(cpt), level);
+ print_method_impl(cpt, NOT_PRODUCT(CompilerPhaseTypeHelper::to_string(cpt) COMMA) level);
}
void Compile::print_method(CompilerPhaseType cpt, Node* n, int level) {
+#ifndef PRODUCT
ResourceMark rm;
stringStream ss;
ss.print_raw(CompilerPhaseTypeHelper::to_string(cpt));
@@ -4827,10 +4828,11 @@ void Compile::print_method(CompilerPhaseType cpt, Node* n, int level) {
} else {
ss.print_raw(": NULL");
}
- C->print_method_impl(cpt, ss.as_string(), level);
+#endif
+ C->print_method_impl(cpt, NOT_PRODUCT(ss.as_string() COMMA) level);
}
-void Compile::print_method_impl(CompilerPhaseType cpt, const char *name, int level) {
+void Compile::print_method_impl(CompilerPhaseType cpt, NOT_PRODUCT(const char* name COMMA) int level) {
EventCompilerPhase event;
if (event.should_commit()) {
CompilerEvent::PhaseEvent::post(event, C->_latest_stage_start_counter, cpt, C->_compile_id, level);
diff --git a/src/hotspot/share/opto/compile.hpp b/src/hotspot/share/opto/compile.hpp
index 9b2fd80b589..0bf6b88eb17 100644
--- a/src/hotspot/share/opto/compile.hpp
+++ b/src/hotspot/share/opto/compile.hpp
@@ -656,8 +656,8 @@ class Compile : public Phase {
bool should_print_igv(int level);
void print_method(CompilerPhaseType cpt, int level);
- void print_method(CompilerPhaseType cpt, Node* n, int level = 3);
- void print_method_impl(CompilerPhaseType cpt, const char *name, int level);
+ void print_method(CompilerPhaseType cpt, Node* n, int level);
+ void print_method_impl(CompilerPhaseType cpt, NOT_PRODUCT(const char* name COMMA) int level);
#ifndef PRODUCT
void igv_print_method_to_file(const char* phase_name = "Debug", bool append = false);
--
GitLab
From c43ce85f01c96a4b80b971865306254c9417e549 Mon Sep 17 00:00:00 2001
From: Lutz Schmidt
Date: Tue, 25 Jan 2022 10:07:07 +0000
Subject: [PATCH 020/400] 8278302: [s390] Implement fast-path for
ASCII-compatible CharsetEncoders
Reviewed-by: mdoerr
---
.../cpu/s390/c2_MacroAssembler_s390.cpp | 83 +++++++++++++------
.../cpu/s390/c2_MacroAssembler_s390.hpp | 5 +-
src/hotspot/cpu/s390/matcher_s390.hpp | 5 +-
src/hotspot/cpu/s390/s390.ad | 24 ++++--
4 files changed, 82 insertions(+), 35 deletions(-)
diff --git a/src/hotspot/cpu/s390/c2_MacroAssembler_s390.cpp b/src/hotspot/cpu/s390/c2_MacroAssembler_s390.cpp
index 83040fb6b7f..04a6b88052c 100644
--- a/src/hotspot/cpu/s390/c2_MacroAssembler_s390.cpp
+++ b/src/hotspot/cpu/s390/c2_MacroAssembler_s390.cpp
@@ -1,5 +1,6 @@
/*
- * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2020, 2022, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2022 SAP SE. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -46,22 +47,44 @@
// Note:
// cnt is signed int. Do not rely on high word!
// counts # characters, not bytes.
-// The result is the number of characters copied before the first incompatible character was found.
-// If precise is true, the processing stops exactly at this point. Otherwise, the result may be off
-// by a few bytes. The result always indicates the number of copied characters.
-// When used as a character index, the returned value points to the first incompatible character.
//
-// Note: Does not behave exactly like package private StringUTF16 compress java implementation in case of failure:
-// - Different number of characters may have been written to dead array (if precise is false).
-// - Returns a number ---
- // Strings with 4 and 8 characters were fond to occur very frequently.
+ // Strings with 4 and 8 characters were found to occur very frequently.
// Therefore, we handle them right away with minimal overhead.
Label skipShortcut, skip4Shortcut, skip8Shortcut;
Register Rout = Z_R0;
@@ -133,7 +156,8 @@ unsigned int C2_MacroAssembler::string_compress(Register result, Register src, R
if (VM_Version::has_VectorFacility()) {
const int min_vcnt = 32; // Minimum #characters required to use vector instructions.
// Otherwise just do nothing in vector mode.
- // Must be multiple of 2*(vector register length in chars (8 HW = 128 bits)).
+ // Must correspond to # vector registers used by implementation,
+ // and must be a power of 2.
const int log_min_vcnt = exact_log2(min_vcnt);
Label VectorLoop, VectorDone, VectorBreak;
@@ -150,7 +174,7 @@ unsigned int C2_MacroAssembler::string_compress(Register result, Register src, R
z_brz(VectorDone); // not enough data for vector loop
z_vzero(Vzero); // all zeroes
- z_vgmh(Vmask, 0, 7); // generate 0xff00 mask for all 2-byte elements
+ z_vgmh(Vmask, mask_ix_l, mask_ix_r); // generate 0xff00/0xff80 mask for all 2-byte elements
z_sllg(Z_R0, Rix, log_min_vcnt); // remember #chars that will be processed by vector loop
bind(VectorLoop);
@@ -162,7 +186,7 @@ unsigned int C2_MacroAssembler::string_compress(Register result, Register src, R
z_vo(Vtmp2, Z_V22, Z_V23);
z_vo(Vtmp1, Vtmp1, Vtmp2);
z_vn(Vtmp1, Vtmp1, Vmask);
- z_vceqhs(Vtmp1, Vtmp1, Vzero); // high half of all chars must be zero for successful compress.
+ z_vceqhs(Vtmp1, Vtmp1, Vzero); // all bits selected by mask must be zero for successful compress.
z_bvnt(VectorBreak); // break vector loop if not all vector elements compare eq -> incompatible character found.
// re-process data from current iteration in break handler.
@@ -187,7 +211,8 @@ unsigned int C2_MacroAssembler::string_compress(Register result, Register src, R
{
const int min_cnt = 8; // Minimum #characters required to use unrolled loop.
// Otherwise just do nothing in unrolled loop.
- // Must be multiple of 8.
+ // Must correspond to # registers used by implementation,
+ // and must be a power of 2.
const int log_min_cnt = exact_log2(min_cnt);
Label UnrolledLoop, UnrolledDone, UnrolledBreak;
@@ -197,7 +222,7 @@ unsigned int C2_MacroAssembler::string_compress(Register result, Register src, R
z_lr(Rix, Rcnt);
z_sr(Rix, Z_R0);
}
- z_sra(Rix, log_min_cnt); // unrolled loop count
+ z_sra(Rix, log_min_cnt); // unrolled loop count
z_brz(UnrolledDone);
bind(UnrolledLoop);
@@ -244,6 +269,8 @@ unsigned int C2_MacroAssembler::string_compress(Register result, Register src, R
z_sll(Rix, log_min_cnt); // # chars not yet processed in UnrolledLoop (due to break), broken iteration not included.
z_sr(Z_R0, Rix); // fix # chars processed OK so far.
if (!precise) {
+ // Because we don't need to be precise, we just return the # of characters which have been written.
+ // The first illegal character is in the index range [result-min_cnt/2, result+min_cnt/2).
z_lgfr(result, Z_R0);
z_sllg(Z_R1, Z_R0, 1); // # src bytes already processed. Only lower 32 bits are valid!
// Z_R1 contents must be treated as unsigned operand! For huge strings,
@@ -274,7 +301,7 @@ unsigned int C2_MacroAssembler::string_compress(Register result, Register src, R
z_brh(ScalarDoit);
z_llh(Z_R1, 0, Z_R0, Rsrc);
z_bre(Scalar2Char);
- z_tmll(Z_R1, 0xff00);
+ z_tmll(Z_R1, char_mask);
z_lghi(result, 0); // cnt == 1, first char invalid, no chars successfully processed
z_brnaz(AllDone);
z_stc(Z_R1, 0, Z_R0, Rdst);
@@ -283,11 +310,11 @@ unsigned int C2_MacroAssembler::string_compress(Register result, Register src, R
bind(Scalar2Char);
z_llh(Z_R0, 2, Z_R0, Rsrc);
- z_tmll(Z_R1, 0xff00);
+ z_tmll(Z_R1, char_mask);
z_lghi(result, 0); // cnt == 2, first char invalid, no chars successfully processed
z_brnaz(AllDone);
z_stc(Z_R1, 0, Z_R0, Rdst);
- z_tmll(Z_R0, 0xff00);
+ z_tmll(Z_R0, char_mask);
z_lghi(result, 1); // cnt == 2, second char invalid, one char successfully processed
z_brnaz(AllDone);
z_stc(Z_R0, 1, Z_R0, Rdst);
@@ -299,17 +326,17 @@ unsigned int C2_MacroAssembler::string_compress(Register result, Register src, R
#endif
if (VM_Version::has_DistinctOpnds()) {
- z_srk(Rix, Rcnt, Z_R0); // remaining # chars to compress in unrolled loop
+ z_srk(Rix, Rcnt, Z_R0); // remaining # chars to compress in scalar loop
} else {
z_lr(Rix, Rcnt);
z_sr(Rix, Z_R0);
}
- z_lgfr(result, Rcnt); // # processed characters (if all runs ok).
- z_brz(ScalarDone); // uses CC from Rix calculation
+ z_lgfr(result, Rcnt); // # processed characters (if all encodes ok).
+ z_brz(ScalarDone); // anything left to do? (uses CC from Rix calculation)
bind(ScalarLoop);
z_llh(Z_R1, 0, Z_R0, Rsrc);
- z_tmll(Z_R1, 0xff00);
+ z_tmll(Z_R1, char_mask);
z_brnaz(ScalarBreak);
z_stc(Z_R1, 0, Z_R0, Rdst);
add2reg(Rsrc, 2);
@@ -329,7 +356,11 @@ unsigned int C2_MacroAssembler::string_compress(Register result, Register src, R
bind(AllDone);
if (precise) {
- BLOCK_COMMENT("} encode_iso_array");
+ if (toASCII) {
+ BLOCK_COMMENT("} encode_ascii_array");
+ } else {
+ BLOCK_COMMENT("} encode_iso_array");
+ }
} else {
BLOCK_COMMENT("} string_compress");
}
diff --git a/src/hotspot/cpu/s390/c2_MacroAssembler_s390.hpp b/src/hotspot/cpu/s390/c2_MacroAssembler_s390.hpp
index 08112a482d0..a6c98656495 100644
--- a/src/hotspot/cpu/s390/c2_MacroAssembler_s390.hpp
+++ b/src/hotspot/cpu/s390/c2_MacroAssembler_s390.hpp
@@ -1,5 +1,6 @@
/*
- * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2020, 2022, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2022 SAP SE. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -38,7 +39,7 @@
// Early clobber: result.
// Boolean precise controls accuracy of result value.
unsigned int string_compress(Register result, Register src, Register dst, Register cnt,
- Register tmp, bool precise);
+ Register tmp, bool precise, bool toASCII);
// Inflate byte[] to char[].
unsigned int string_inflate_trot(Register src, Register dst, Register cnt, Register tmp);
diff --git a/src/hotspot/cpu/s390/matcher_s390.hpp b/src/hotspot/cpu/s390/matcher_s390.hpp
index d95e3c17f43..ac55bd84dff 100644
--- a/src/hotspot/cpu/s390/matcher_s390.hpp
+++ b/src/hotspot/cpu/s390/matcher_s390.hpp
@@ -1,5 +1,6 @@
/*
- * Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2021, 2022, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2022 SAP SE. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -150,6 +151,6 @@
}
// Implements a variant of EncodeISOArrayNode that encode ASCII only
- static const bool supports_encode_ascii_array = false;
+ static const bool supports_encode_ascii_array = true;
#endif // CPU_S390_MATCHER_S390_HPP
diff --git a/src/hotspot/cpu/s390/s390.ad b/src/hotspot/cpu/s390/s390.ad
index 8a6e62a809b..74ad8ef40d3 100644
--- a/src/hotspot/cpu/s390/s390.ad
+++ b/src/hotspot/cpu/s390/s390.ad
@@ -1,6 +1,6 @@
//
-// Copyright (c) 2017, 2021, Oracle and/or its affiliates. All rights reserved.
-// Copyright (c) 2017, 2020 SAP SE. All rights reserved.
+// Copyright (c) 2017, 2022, Oracle and/or its affiliates. All rights reserved.
+// Copyright (c) 2017, 2022 SAP SE. All rights reserved.
// DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
//
// This code is free software; you can redistribute it and/or modify it
@@ -10230,7 +10230,7 @@ instruct string_compress(iRegP src, iRegP dst, iRegI result, iRegI len, iRegI tm
format %{ "String Compress $src->$dst($len) -> $result" %}
ins_encode %{
__ string_compress($result$$Register, $src$$Register, $dst$$Register, $len$$Register,
- $tmp$$Register, false);
+ $tmp$$Register, false, false);
%}
ins_pipe(pipe_class_dummy);
%}
@@ -10291,10 +10291,24 @@ instruct encode_iso_array(iRegP src, iRegP dst, iRegI result, iRegI len, iRegI t
match(Set result (EncodeISOArray src (Binary dst len)));
effect(TEMP_DEF result, TEMP tmp, KILL cr); // R0, R1 are killed, too.
ins_cost(300);
- format %{ "Encode array $src->$dst($len) -> $result" %}
+ format %{ "Encode iso array $src->$dst($len) -> $result" %}
ins_encode %{
__ string_compress($result$$Register, $src$$Register, $dst$$Register, $len$$Register,
- $tmp$$Register, true);
+ $tmp$$Register, true, false);
+ %}
+ ins_pipe(pipe_class_dummy);
+%}
+
+// encode char[] to byte[] in ASCII
+instruct encode_ascii_array(iRegP src, iRegP dst, iRegI result, iRegI len, iRegI tmp, flagsReg cr) %{
+ predicate(((EncodeISOArrayNode*)n)->is_ascii());
+ match(Set result (EncodeISOArray src (Binary dst len)));
+ effect(TEMP_DEF result, TEMP tmp, KILL cr); // R0, R1 are killed, too.
+ ins_cost(300);
+ format %{ "Encode ascii array $src->$dst($len) -> $result" %}
+ ins_encode %{
+ __ string_compress($result$$Register, $src$$Register, $dst$$Register, $len$$Register,
+ $tmp$$Register, true, true);
%}
ins_pipe(pipe_class_dummy);
%}
--
GitLab
From 28796cbd1d15de678b80295418f5d1f9f59176a6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Daniel=20Jeli=C5=84ski?=
Date: Tue, 25 Jan 2022 11:10:51 +0000
Subject: [PATCH 021/400] 8163921: HttpURLConnection default Accept header is
malformed according to HTTP/1.1 RFC
Reviewed-by: dfuchs, michaelm
---
.../net/www/protocol/http/HttpURLConnection.java | 5 ++---
test/jdk/sun/net/www/B8185898.java | 16 ++++++++--------
2 files changed, 10 insertions(+), 11 deletions(-)
diff --git a/src/java.base/share/classes/sun/net/www/protocol/http/HttpURLConnection.java b/src/java.base/share/classes/sun/net/www/protocol/http/HttpURLConnection.java
index cba385f04fa..c3d33014409 100644
--- a/src/java.base/share/classes/sun/net/www/protocol/http/HttpURLConnection.java
+++ b/src/java.base/share/classes/sun/net/www/protocol/http/HttpURLConnection.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1995, 2021, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1995, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -288,8 +288,7 @@ public class HttpURLConnection extends java.net.HttpURLConnection {
}
static final String httpVersion = "HTTP/1.1";
- static final String acceptString =
- "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2";
+ static final String acceptString = "*/*";
// the following http request headers should NOT have their values
// returned for security reasons.
diff --git a/test/jdk/sun/net/www/B8185898.java b/test/jdk/sun/net/www/B8185898.java
index a50c6f93c7e..cfa54e15a52 100644
--- a/test/jdk/sun/net/www/B8185898.java
+++ b/test/jdk/sun/net/www/B8185898.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2019, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -23,7 +23,7 @@
/**
* @test
- * @bug 8185898
+ * @bug 8185898 8163921
* @modules java.base/sun.net.www
* @library /test/lib
* @run main/othervm B8185898
@@ -143,32 +143,32 @@ public class B8185898 {
// {{inputString1, expectedToString1, expectedPrint1}, {...}}
String[][] strings = {
{"HTTP/1.1 200 OK\r\n"
- + "Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2\r\n"
+ + "Accept: */*\r\n"
+ "Connection: keep-alive\r\n"
+ "Host: 127.0.0.1:12345\r\n"
+ "User-agent: Java/12\r\n\r\nfoooo",
"pairs: {null: HTTP/1.1 200 OK}"
- + "{Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2}"
+ + "{Accept: */*}"
+ "{Connection: keep-alive}"
+ "{Host: 127.0.0.1:12345}"
+ "{User-agent: Java/12}",
- "Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2\r\n"
+ "Accept: */*\r\n"
+ "Connection: keep-alive\r\n"
+ "Host: 127.0.0.1:12345\r\n"
+ "User-agent: Java/12\r\n\r\n"},
{"HTTP/1.1 200 OK\r\n"
- + "Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2\r\n"
+ + "Accept: */*\r\n"
+ "Connection: keep-alive\r\n"
+ "Host: 127.0.0.1:12345\r\n"
+ "User-agent: Java/12\r\n"
+ "X-Header:\r\n\r\n",
"pairs: {null: HTTP/1.1 200 OK}"
- + "{Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2}"
+ + "{Accept: */*}"
+ "{Connection: keep-alive}"
+ "{Host: 127.0.0.1:12345}"
+ "{User-agent: Java/12}"
+ "{X-Header: }",
- "Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2\r\n"
+ "Accept: */*\r\n"
+ "Connection: keep-alive\r\n"
+ "Host: 127.0.0.1:12345\r\n"
+ "User-agent: Java/12\r\n"
--
GitLab
From 36fbec78be837fe1defb72f39c6e3f2b5135fddf Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Daniel=20Jeli=C5=84ski?=
Date: Tue, 25 Jan 2022 11:15:47 +0000
Subject: [PATCH 022/400] 8280241: (aio) AsynchronousSocketChannel init fails
in IPv6 only Windows env
Reviewed-by: dfuchs, alanb
---
.../libnio/ch/WindowsAsynchronousServerSocketChannelImpl.c | 6 +++++-
.../native/libnio/ch/WindowsAsynchronousSocketChannelImpl.c | 6 +++++-
2 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/src/java.base/windows/native/libnio/ch/WindowsAsynchronousServerSocketChannelImpl.c b/src/java.base/windows/native/libnio/ch/WindowsAsynchronousServerSocketChannelImpl.c
index a08f3a3564f..340bbb9c8de 100644
--- a/src/java.base/windows/native/libnio/ch/WindowsAsynchronousServerSocketChannelImpl.c
+++ b/src/java.base/windows/native/libnio/ch/WindowsAsynchronousServerSocketChannelImpl.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2008, 2009, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -69,6 +69,10 @@ Java_sun_nio_ch_WindowsAsynchronousServerSocketChannelImpl_initIDs(JNIEnv* env,
DWORD dwBytes;
s = socket(AF_INET, SOCK_STREAM, 0);
+ if (s == INVALID_SOCKET && WSAGetLastError() == WSAEAFNOSUPPORT) {
+ /* IPv4 unavailable... try IPv6 instead */
+ s = socket(AF_INET6, SOCK_STREAM, 0);
+ }
if (s == INVALID_SOCKET) {
JNU_ThrowIOExceptionWithLastError(env, "socket failed");
return;
diff --git a/src/java.base/windows/native/libnio/ch/WindowsAsynchronousSocketChannelImpl.c b/src/java.base/windows/native/libnio/ch/WindowsAsynchronousSocketChannelImpl.c
index 40b8d8ba8dc..6b1fa64e708 100644
--- a/src/java.base/windows/native/libnio/ch/WindowsAsynchronousSocketChannelImpl.c
+++ b/src/java.base/windows/native/libnio/ch/WindowsAsynchronousSocketChannelImpl.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -66,6 +66,10 @@ Java_sun_nio_ch_WindowsAsynchronousSocketChannelImpl_initIDs(JNIEnv* env, jclass
DWORD dwBytes;
s = socket(AF_INET, SOCK_STREAM, 0);
+ if (s == INVALID_SOCKET && WSAGetLastError() == WSAEAFNOSUPPORT) {
+ /* IPv4 unavailable... try IPv6 instead */
+ s = socket(AF_INET6, SOCK_STREAM, 0);
+ }
if (s == INVALID_SOCKET) {
JNU_ThrowIOExceptionWithLastError(env, "socket failed");
return;
--
GitLab
From 4503d0431c0dd4d177cf5eb4df592f26b9d372bb Mon Sep 17 00:00:00 2001
From: Hamlin Li
Date: Tue, 25 Jan 2022 12:11:21 +0000
Subject: [PATCH 023/400] 8280375: G1: Tighten mem region limit in
G1RebuildRemSetHeapRegionClosure
Reviewed-by: tschatzl, ayang
---
src/hotspot/share/gc/g1/g1RemSet.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/hotspot/share/gc/g1/g1RemSet.cpp b/src/hotspot/share/gc/g1/g1RemSet.cpp
index 603ddbc1e26..13977348825 100644
--- a/src/hotspot/share/gc/g1/g1RemSet.cpp
+++ b/src/hotspot/share/gc/g1/g1RemSet.cpp
@@ -1958,7 +1958,7 @@ public:
HeapWord* const top_at_mark_start = hr->prev_top_at_mark_start();
HeapWord* cur = hr->bottom();
- while (cur < hr->end()) {
+ while (true) {
// After every iteration (yield point) we need to check whether the region's
// TARS changed due to e.g. eager reclaim.
HeapWord* const top_at_rebuild_start = _cm->top_at_rebuild_start(region_idx);
--
GitLab
From 496baada1021eecae03e737afe838ad6d383cba9 Mon Sep 17 00:00:00 2001
From: Albert Mingkun Yang
Date: Tue, 25 Jan 2022 14:09:53 +0000
Subject: [PATCH 024/400] 8280030: [REDO] Parallel: More precise boundary in
ObjectStartArray::object_starts_in_range
Reviewed-by: sjohanss, tschatzl
---
src/hotspot/share/gc/parallel/objectStartArray.cpp | 9 ++++++++-
src/hotspot/share/gc/parallel/objectStartArray.hpp | 8 +++++---
2 files changed, 13 insertions(+), 4 deletions(-)
diff --git a/src/hotspot/share/gc/parallel/objectStartArray.cpp b/src/hotspot/share/gc/parallel/objectStartArray.cpp
index 827ff73fb58..3e4820aa941 100644
--- a/src/hotspot/share/gc/parallel/objectStartArray.cpp
+++ b/src/hotspot/share/gc/parallel/objectStartArray.cpp
@@ -132,8 +132,15 @@ bool ObjectStartArray::object_starts_in_range(HeapWord* start_addr,
"Range is wrong. start_addr (" PTR_FORMAT ") is after end_addr (" PTR_FORMAT ")",
p2i(start_addr), p2i(end_addr));
+ assert(is_aligned(start_addr, _card_size), "precondition");
+
+ if (start_addr == end_addr) {
+ // No objects in empty range.
+ return false;
+ }
+
jbyte* start_block = block_for_addr(start_addr);
- jbyte* end_block = block_for_addr(end_addr);
+ jbyte* end_block = block_for_addr(end_addr - 1);
for (jbyte* block = start_block; block <= end_block; block++) {
if (*block != clean_block) {
diff --git a/src/hotspot/share/gc/parallel/objectStartArray.hpp b/src/hotspot/share/gc/parallel/objectStartArray.hpp
index be91b51cd94..06005fc0075 100644
--- a/src/hotspot/share/gc/parallel/objectStartArray.hpp
+++ b/src/hotspot/share/gc/parallel/objectStartArray.hpp
@@ -165,9 +165,11 @@ class ObjectStartArray : public CHeapObj {
return *block != clean_block;
}
- // Return true if an object starts in the range of heap addresses.
- // If an object starts at an address corresponding to
- // "start", the method will return true.
+ // Return true iff an object starts in
+ // [start_addr, end_addr_aligned_up)
+ // where
+ // end_addr_aligned_up = align_up(end_addr, _card_size)
+ // Precondition: start_addr is card-size aligned
bool object_starts_in_range(HeapWord* start_addr, HeapWord* end_addr) const;
};
--
GitLab
From fe77250fa450ec803d2818dc90c5bf156521d537 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Daniel=20Jeli=C5=84ski?=
Date: Tue, 25 Jan 2022 14:41:41 +0000
Subject: [PATCH 025/400] 8280414: Memory leak in DefaultProxySelector
Reviewed-by: dfuchs
---
.../native/libnet/DefaultProxySelector.c | 18 ++++++++----------
1 file changed, 8 insertions(+), 10 deletions(-)
diff --git a/src/java.base/windows/native/libnet/DefaultProxySelector.c b/src/java.base/windows/native/libnet/DefaultProxySelector.c
index d9107e738b3..6b91874eda1 100644
--- a/src/java.base/windows/native/libnet/DefaultProxySelector.c
+++ b/src/java.base/windows/native/libnet/DefaultProxySelector.c
@@ -104,7 +104,6 @@ static int createProxyList(LPWSTR win_proxy, const WCHAR *pproto, list_item **he
int nr_elems = 0;
wchar_t *context = NULL;
wchar_t *current_proxy = NULL;
- BOOL error = FALSE;
/*
* The proxy server list contains one or more of the following strings
@@ -116,7 +115,6 @@ static int createProxyList(LPWSTR win_proxy, const WCHAR *pproto, list_item **he
LPWSTR pport;
LPWSTR phost;
int portVal = 0;
- wchar_t *next_proxy = NULL;
list_item *proxy = NULL;
wchar_t* pos = NULL;
@@ -292,7 +290,6 @@ Java_sun_net_spi_DefaultProxySelector_getSystemProxies(JNIEnv *env,
}
if (win_proxy != NULL) {
- wchar_t *context = NULL;
int defport = 0;
int nr_elems = 0;
@@ -315,27 +312,28 @@ Java_sun_net_spi_DefaultProxySelector_getSystemProxies(JNIEnv *env,
nr_elems = createProxyList(win_proxy, lpProto, &head);
if (nr_elems != 0 && head != NULL) {
int index = 0;
+ list_item *current = head;
proxy_array = (*env)->NewObjectArray(env, nr_elems, proxy_class, NULL);
if (proxy_array == NULL || (*env)->ExceptionCheck(env)) {
goto noproxy;
}
- while (head != NULL && index < nr_elems) {
+ while (current != NULL && index < nr_elems) {
jstring jhost;
jobject isa;
jobject proxy;
- if (head->host != NULL && proxy_array != NULL) {
+ if (current->host != NULL && proxy_array != NULL) {
/* Let's create the appropriate Proxy object then. */
- if (head->port == 0) {
- head->port = defport;
+ if (current->port == 0) {
+ current->port = defport;
}
- jhost = (*env)->NewString(env, head->host, (jsize)wcslen(head->host));
+ jhost = (*env)->NewString(env, current->host, (jsize)wcslen(current->host));
if (jhost == NULL || (*env)->ExceptionCheck(env)) {
proxy_array = NULL;
}
isa = (*env)->CallStaticObjectMethod(env, isaddr_class,
isaddr_createUnresolvedID, jhost,
- head->port);
+ current->port);
if (isa == NULL || (*env)->ExceptionCheck(env)) {
proxy_array = NULL;
}
@@ -349,7 +347,7 @@ Java_sun_net_spi_DefaultProxySelector_getSystemProxies(JNIEnv *env,
}
index++;
}
- head = head->next;
+ current = current->next;
}
}
}
--
GitLab
From 674a97b27ef621e7b54c13c121c625f91df5ee60 Mon Sep 17 00:00:00 2001
From: Thomas Schatzl
Date: Tue, 25 Jan 2022 16:27:30 +0000
Subject: [PATCH 026/400] 8280396: G1: Full gc mark stack draining should
prefer to make work available to other threads
Reviewed-by: sjohanss, ayang
---
src/hotspot/share/gc/g1/g1FullGCMarker.hpp | 12 +++--
.../share/gc/g1/g1FullGCMarker.inline.hpp | 46 +++++++++++++------
2 files changed, 40 insertions(+), 18 deletions(-)
diff --git a/src/hotspot/share/gc/g1/g1FullGCMarker.hpp b/src/hotspot/share/gc/g1/g1FullGCMarker.hpp
index ec7f029b7ce..2d935d863c5 100644
--- a/src/hotspot/share/gc/g1/g1FullGCMarker.hpp
+++ b/src/hotspot/share/gc/g1/g1FullGCMarker.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, 2021, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -71,8 +71,6 @@ class G1FullGCMarker : public CHeapObj {
G1RegionMarkStatsCache _mark_stats_cache;
inline bool is_empty();
- inline bool pop_object(oop& obj);
- inline bool pop_objarray(ObjArrayTask& array);
inline void push_objarray(oop obj, size_t index);
inline bool mark_object(oop obj);
@@ -80,6 +78,14 @@ class G1FullGCMarker : public CHeapObj {
inline void follow_object(oop obj);
inline void follow_array(objArrayOop array);
inline void follow_array_chunk(objArrayOop array, int index);
+
+ inline void drain_oop_stack();
+ // Transfer contents from the objArray task queue overflow stack to the shared
+ // objArray stack.
+ // Returns true and a valid task if there has not been enough space in the shared
+ // objArray stack, otherwise the task is invalid.
+ inline bool transfer_objArray_overflow_stack(ObjArrayTask& task);
+
public:
G1FullGCMarker(G1FullCollector* collector,
uint worker_id,
diff --git a/src/hotspot/share/gc/g1/g1FullGCMarker.inline.hpp b/src/hotspot/share/gc/g1/g1FullGCMarker.inline.hpp
index c261c150e46..a68bae5ced6 100644
--- a/src/hotspot/share/gc/g1/g1FullGCMarker.inline.hpp
+++ b/src/hotspot/share/gc/g1/g1FullGCMarker.inline.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, 2021, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -91,20 +91,12 @@ inline bool G1FullGCMarker::is_empty() {
return _oop_stack.is_empty() && _objarray_stack.is_empty();
}
-inline bool G1FullGCMarker::pop_object(oop& oop) {
- return _oop_stack.pop_overflow(oop) || _oop_stack.pop_local(oop);
-}
-
inline void G1FullGCMarker::push_objarray(oop obj, size_t index) {
ObjArrayTask task(obj, index);
assert(task.is_valid(), "bad ObjArrayTask");
_objarray_stack.push(task);
}
-inline bool G1FullGCMarker::pop_objarray(ObjArrayTask& arr) {
- return _objarray_stack.pop_overflow(arr) || _objarray_stack.pop_local(arr);
-}
-
inline void G1FullGCMarker::follow_array(objArrayOop array) {
follow_klass(array->klass());
// Don't push empty arrays to avoid unnecessary work.
@@ -159,16 +151,40 @@ inline void G1FullGCMarker::follow_object(oop obj) {
}
}
-void G1FullGCMarker::drain_stack() {
- do {
- oop obj;
- while (pop_object(obj)) {
+inline void G1FullGCMarker::drain_oop_stack() {
+ oop obj;
+ while (_oop_stack.pop_overflow(obj)) {
+ if (!_oop_stack.try_push_to_taskqueue(obj)) {
assert(_bitmap->is_marked(obj), "must be marked");
follow_object(obj);
}
- // Process ObjArrays one at a time to avoid marking stack bloat.
+ }
+ while (_oop_stack.pop_local(obj)) {
+ assert(_bitmap->is_marked(obj), "must be marked");
+ follow_object(obj);
+ }
+}
+
+inline bool G1FullGCMarker::transfer_objArray_overflow_stack(ObjArrayTask& task) {
+ // It is desirable to move as much as possible work from the overflow queue to
+ // the shared queue as quickly as possible.
+ while (_objarray_stack.pop_overflow(task)) {
+ if (!_objarray_stack.try_push_to_taskqueue(task)) {
+ return true;
+ }
+ }
+ return false;
+}
+
+void G1FullGCMarker::drain_stack() {
+ do {
+ // First, drain regular oop stack.
+ drain_oop_stack();
+
+ // Then process ObjArrays one at a time to avoid marking stack bloat.
ObjArrayTask task;
- if (pop_objarray(task)) {
+ if (transfer_objArray_overflow_stack(task) ||
+ _objarray_stack.pop_local(task)) {
follow_array_chunk(objArrayOop(task.obj()), task.index());
}
} while (!is_empty());
--
GitLab
From f4575e4052bf66f1259c626e01a74d3ac593e645 Mon Sep 17 00:00:00 2001
From: Brian Burkhalter
Date: Tue, 25 Jan 2022 18:02:18 +0000
Subject: [PATCH 027/400] 8279946: (ch) java.nio.channels.FileChannel tryLock
and write methods are missing @throws NonWritableChannelException
Reviewed-by: alanb
---
.../java/nio/channels/FileChannel.java | 33 ++++++++++++++++---
1 file changed, 28 insertions(+), 5 deletions(-)
diff --git a/src/java.base/share/classes/java/nio/channels/FileChannel.java b/src/java.base/share/classes/java/nio/channels/FileChannel.java
index 2ea213b3509..d8fee6ca995 100644
--- a/src/java.base/share/classes/java/nio/channels/FileChannel.java
+++ b/src/java.base/share/classes/java/nio/channels/FileChannel.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000, 2021, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,13 +25,16 @@
package java.nio.channels;
-import java.io.*;
+import java.io.IOException;
import java.nio.ByteBuffer;
import java.nio.MappedByteBuffer;
import java.nio.channels.spi.AbstractInterruptibleChannel;
-import java.nio.file.*;
+import java.nio.file.FileAlreadyExistsException;
+import java.nio.file.OpenOption;
+import java.nio.file.Path;
+import java.nio.file.StandardOpenOption;
import java.nio.file.attribute.FileAttribute;
-import java.nio.file.spi.*;
+import java.nio.file.spi.FileSystemProvider;
import java.util.Set;
import java.util.HashSet;
import java.util.Collections;
@@ -403,6 +406,9 @@ public abstract class FileChannel
* with the number of bytes actually written. Otherwise this method
* behaves exactly as specified by the {@link WritableByteChannel}
* interface.
+ *
+ * @throws NonWritableChannelException
+ * If this channel was not opened for writing
*/
public abstract int write(ByteBuffer src) throws IOException;
@@ -417,6 +423,9 @@ public abstract class FileChannel
* with the number of bytes actually written. Otherwise this method
* behaves exactly as specified in the {@link GatheringByteChannel}
* interface.
+ *
+ * @throws NonWritableChannelException
+ * If this channel was not opened for writing
*/
public abstract long write(ByteBuffer[] srcs, int offset, int length)
throws IOException;
@@ -431,6 +440,9 @@ public abstract class FileChannel
* with the number of bytes actually written. Otherwise this method
* behaves exactly as specified in the {@link GatheringByteChannel}
* interface.
+ *
+ * @throws NonWritableChannelException
+ * If this channel was not opened for writing
*/
public final long write(ByteBuffer[] srcs) throws IOException {
return write(srcs, 0, srcs.length);
@@ -1030,7 +1042,7 @@ public abstract class FileChannel
* region
*
* @throws NonReadableChannelException
- * If {@code shared} is {@code true} this channel was not
+ * If {@code shared} is {@code true} but this channel was not
* opened for reading
*
* @throws NonWritableChannelException
@@ -1148,6 +1160,14 @@ public abstract class FileChannel
* blocked in this method and is attempting to lock an overlapping
* region of the same file
*
+ * @throws NonReadableChannelException
+ * If {@code shared} is {@code true} but this channel was not
+ * opened for reading
+ *
+ * @throws NonWritableChannelException
+ * If {@code shared} is {@code false} but this channel was not
+ * opened for writing
+ *
* @throws IOException
* If some other I/O error occurs
*
@@ -1180,6 +1200,9 @@ public abstract class FileChannel
* blocked in this method and is attempting to lock an overlapping
* region
*
+ * @throws NonWritableChannelException
+ * If this channel was not opened for writing
+ *
* @throws IOException
* If some other I/O error occurs
*
--
GitLab
From cbe8395ace3230dc599c7f082e3524a861b2da8e Mon Sep 17 00:00:00 2001
From: Joe Darcy
Date: Tue, 25 Jan 2022 18:15:37 +0000
Subject: [PATCH 028/400] 8280168: Add Objects.toIdentityString
Reviewed-by: alanb, mchung, rriggs, smarks
---
.../java/lang/invoke/MethodHandleProxies.java | 2 +-
.../share/classes/java/util/Objects.java | 26 ++++++++++++-
.../java/util/Objects/BasicObjectsTest.java | 37 +++++++++++++++++--
3 files changed, 60 insertions(+), 5 deletions(-)
diff --git a/src/java.base/share/classes/java/lang/invoke/MethodHandleProxies.java b/src/java.base/share/classes/java/lang/invoke/MethodHandleProxies.java
index 784d672ff8f..c1c34185ffb 100644
--- a/src/java.base/share/classes/java/lang/invoke/MethodHandleProxies.java
+++ b/src/java.base/share/classes/java/lang/invoke/MethodHandleProxies.java
@@ -292,7 +292,7 @@ public class MethodHandleProxies {
private static Object callObjectMethod(Object self, Method m, Object[] args) {
assert(isObjectMethod(m)) : m;
return switch (m.getName()) {
- case "toString" -> self.getClass().getName() + "@" + Integer.toHexString(self.hashCode());
+ case "toString" -> java.util.Objects.toIdentityString(self);
case "hashCode" -> System.identityHashCode(self);
case "equals" -> (self == args[0]);
default -> null;
diff --git a/src/java.base/share/classes/java/util/Objects.java b/src/java.base/share/classes/java/util/Objects.java
index c32a67441da..0b727d6310b 100644
--- a/src/java.base/share/classes/java/util/Objects.java
+++ b/src/java.base/share/classes/java/util/Objects.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2009, 2020, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -164,6 +164,30 @@ public final class Objects {
return (o != null) ? o.toString() : nullDefault;
}
+ /**
+ * {@return a string equivalent to the string returned by {@code
+ * Object.toString} if that method and {@code hashCode} are not
+ * overridden}
+ *
+ * @implNote
+ * This method constructs a string for an object without calling
+ * any overridable methods of the object.
+ *
+ * @implSpec
+ * The method returns a string equivalent to:
+ * {@code o.getClass().getName() + "@" + Integer.toHexString(System.identityHashCode(o))}
+ *
+ * @param o an object
+ * @throws NullPointerException if the argument is null
+ * @see Object#toString
+ * @see System#identityHashCode(Object)
+ * @since 19
+ */
+ public static String toIdentityString(Object o) {
+ requireNonNull(o);
+ return o.getClass().getName() + "@" + Integer.toHexString(System.identityHashCode(o));
+ }
+
/**
* Returns 0 if the arguments are identical and {@code
* c.compare(a, b)} otherwise.
diff --git a/test/jdk/java/util/Objects/BasicObjectsTest.java b/test/jdk/java/util/Objects/BasicObjectsTest.java
index a7636ef11d5..51268d4cbaf 100644
--- a/test/jdk/java/util/Objects/BasicObjectsTest.java
+++ b/test/jdk/java/util/Objects/BasicObjectsTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2009, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -23,9 +23,8 @@
/*
* @test
- * @bug 6797535 6889858 6891113 8013712 8011800 8014365
+ * @bug 6797535 6889858 6891113 8013712 8011800 8014365 8280168
* @summary Basic tests for methods in java.util.Objects
- * @author Joseph D. Darcy
*/
import java.util.*;
@@ -40,6 +39,7 @@ public class BasicObjectsTest {
errors += testHash();
errors += testToString();
errors += testToString2();
+ errors += testToIdentityString();
errors += testCompare();
errors += testRequireNonNull();
errors += testIsNull();
@@ -134,6 +134,37 @@ public class BasicObjectsTest {
return errors;
}
+ private static int testToIdentityString() {
+ int errors = 0;
+ // Test null behavior
+ try {
+ Objects.toIdentityString(null);
+ errors++;
+ } catch (NullPointerException npe) {
+ ; // Expected
+ }
+ // Behavior on typical objects
+ Object o = new Object(){};
+ errors += (Objects.toIdentityString(o).equals(o.toString()))? 0 : 1;
+ // Verify object's toString *not* called
+ Object badToString = new Object() {
+ @Override
+ public String toString() {
+ throw new RuntimeException();
+ }
+ };
+ Objects.toIdentityString(badToString);
+ // Verify object's hashCode *not* called
+ Object badHashCode = new Object() {
+ @Override
+ public int hashCode() {
+ throw new RuntimeException("0xDEADBEFF");
+ }
+ };
+ Objects.toIdentityString(badHashCode);
+ return errors;
+ }
+
private static int testCompare() {
int errors = 0;
String[] values = {"e. e. cummings", "zzz"};
--
GitLab
From cebaad1c94c301304fd146526cac95bfeaac66bf Mon Sep 17 00:00:00 2001
From: Aleksey Shipilev
Date: Tue, 25 Jan 2022 19:22:07 +0000
Subject: [PATCH 029/400] 8280041: Retry loop issues in java.io.ClassCache
Co-authored-by: Peter Levart
Reviewed-by: rkennke, rriggs, plevart
---
.../share/classes/java/io/ClassCache.java | 53 ++++++++++++++-----
.../java/io/ClassCache/ContinuousGCTest.java | 50 +++++++++++++++++
.../jdk/java/io/ClassCache/NullValueTest.java | 42 +++++++++++++++
.../java.base/java/io/NameClassCache.java | 35 ++++++++++++
.../java.base/java/io/NullClassCache.java | 34 ++++++++++++
5 files changed, 202 insertions(+), 12 deletions(-)
create mode 100644 test/jdk/java/io/ClassCache/ContinuousGCTest.java
create mode 100644 test/jdk/java/io/ClassCache/NullValueTest.java
create mode 100644 test/jdk/java/io/ClassCache/java.base/java/io/NameClassCache.java
create mode 100644 test/jdk/java/io/ClassCache/java.base/java/io/NullClassCache.java
diff --git a/src/java.base/share/classes/java/io/ClassCache.java b/src/java.base/share/classes/java/io/ClassCache.java
index a3901d479ef..48e7a36c05a 100644
--- a/src/java.base/share/classes/java/io/ClassCache.java
+++ b/src/java.base/share/classes/java/io/ClassCache.java
@@ -28,6 +28,7 @@ package java.io;
import java.lang.ref.Reference;
import java.lang.ref.ReferenceQueue;
import java.lang.ref.SoftReference;
+import java.util.Objects;
// Maps Class instances to values of type T. Under memory pressure, the
// mapping is released (under soft references GC policy) and would be
@@ -38,19 +39,29 @@ abstract class ClassCache {
private static class CacheRef extends SoftReference {
private final Class> type;
+ private T strongReferent;
CacheRef(T referent, ReferenceQueue queue, Class> type) {
super(referent, queue);
this.type = type;
+ this.strongReferent = referent;
}
Class> getType() {
return type;
}
+
+ T getStrong() {
+ return strongReferent;
+ }
+
+ void clearStrong() {
+ strongReferent = null;
+ }
}
private final ReferenceQueue queue;
- private final ClassValue> map;
+ private final ClassValue> map;
protected abstract T computeValue(Class> cl);
@@ -58,23 +69,41 @@ abstract class ClassCache {
queue = new ReferenceQueue<>();
map = new ClassValue<>() {
@Override
- protected SoftReference computeValue(Class> type) {
- return new CacheRef<>(ClassCache.this.computeValue(type), queue, type);
+ protected CacheRef computeValue(Class> type) {
+ T v = ClassCache.this.computeValue(type);
+ Objects.requireNonNull(v);
+ return new CacheRef<>(v, queue, type);
}
};
}
T get(Class> cl) {
- processQueue();
- T val;
- do {
- SoftReference ref = map.get(cl);
- val = ref.get();
- if (val == null) {
- map.remove(cl);
+ while (true) {
+ processQueue();
+
+ CacheRef ref = map.get(cl);
+
+ // Case 1: A recently created CacheRef.
+ // We might still have strong referent, and can return it.
+ // This guarantees progress for at least one thread on every CacheRef.
+ // Clear the strong referent before returning to make the cache soft.
+ T strongVal = ref.getStrong();
+ if (strongVal != null) {
+ ref.clearStrong();
+ return strongVal;
+ }
+
+ // Case 2: Older or recently cleared CacheRef.
+ // Check if its soft referent is still available, and return it.
+ T val = ref.get();
+ if (val != null) {
+ return val;
}
- } while (val == null);
- return val;
+
+ // Case 3: The reference was cleared.
+ // Clear the mapping and retry.
+ map.remove(cl);
+ }
}
private void processQueue() {
diff --git a/test/jdk/java/io/ClassCache/ContinuousGCTest.java b/test/jdk/java/io/ClassCache/ContinuousGCTest.java
new file mode 100644
index 00000000000..681663029e4
--- /dev/null
+++ b/test/jdk/java/io/ClassCache/ContinuousGCTest.java
@@ -0,0 +1,50 @@
+/*
+ * Copyright (c) 2022, Red Hat, Inc. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+import java.io.NameClassCache;
+
+/**
+ * @test
+ * @bug 8280041
+ * @summary Sanity test for ClassCache under continuous GC
+ * @compile/module=java.base java/io/NameClassCache.java
+ * @run main ContinuousGCTest
+ */
+public class ContinuousGCTest {
+ static final NameClassCache CACHE = new NameClassCache();
+ static final String VALUE = "ClassCache-ContinuousGCTest";
+
+ public static void main(String... args) throws Throwable {
+ for (int c = 0; c < 1000; c++) {
+ test();
+ System.gc();
+ }
+ }
+
+ public static void test() {
+ String cached = CACHE.get(ContinuousGCTest.class);
+ if (!cached.equals(VALUE)) {
+ throw new IllegalStateException("Cache failure, got: " + cached);
+ }
+ }
+}
diff --git a/test/jdk/java/io/ClassCache/NullValueTest.java b/test/jdk/java/io/ClassCache/NullValueTest.java
new file mode 100644
index 00000000000..22b41fa071d
--- /dev/null
+++ b/test/jdk/java/io/ClassCache/NullValueTest.java
@@ -0,0 +1,42 @@
+/*
+ * Copyright (c) 2022, Red Hat, Inc. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+import java.io.NullClassCache;
+
+/**
+ * @test
+ * @bug 8280041
+ * @summary Test that ClassCache throws on trying to pass null value
+ * @compile/module=java.base java/io/NullClassCache.java
+ * @run main NullValueTest
+ */
+public class NullValueTest {
+ public static void main(String... args) throws Throwable {
+ try {
+ new NullClassCache().get(Object.class);
+ throw new IllegalStateException("Should have failed");
+ } catch (NullPointerException npe) {
+ // Expected
+ }
+ }
+}
diff --git a/test/jdk/java/io/ClassCache/java.base/java/io/NameClassCache.java b/test/jdk/java/io/ClassCache/java.base/java/io/NameClassCache.java
new file mode 100644
index 00000000000..ff2149fc6a2
--- /dev/null
+++ b/test/jdk/java/io/ClassCache/java.base/java/io/NameClassCache.java
@@ -0,0 +1,35 @@
+/*
+ * Copyright (c) 2022, Red Hat, Inc. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package java.io;
+
+public class NameClassCache extends ClassCache {
+ protected String computeValue(Class> cl) {
+ // Return string that is not interned and specific to class
+ return "ClassCache-" + cl.getName();
+ }
+
+ public String get(Class> cl) {
+ return super.get(cl);
+ }
+}
diff --git a/test/jdk/java/io/ClassCache/java.base/java/io/NullClassCache.java b/test/jdk/java/io/ClassCache/java.base/java/io/NullClassCache.java
new file mode 100644
index 00000000000..58c92ef1399
--- /dev/null
+++ b/test/jdk/java/io/ClassCache/java.base/java/io/NullClassCache.java
@@ -0,0 +1,34 @@
+/*
+ * Copyright (c) 2022, Red Hat, Inc. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package java.io;
+
+public class NullClassCache extends ClassCache