Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 6 additions & 7 deletions make/Images.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -143,11 +143,10 @@ define CreateCDSArchive
$1_$2_COOPS_OPTION := $(if $(findstring _nocoops, $2),-XX:-UseCompressedOops)
# enable and also explicitly disable coh as needed.
ifeq ($(call isTargetCpuBits, 64), true)
$1_$2_COH_OPTION := -XX:+UnlockExperimentalVMOptions \
$(if $(findstring _coh, $2),-XX:+UseCompactObjectHeaders,-XX:-UseCompactObjectHeaders)
$1_$2_COH_OPTION := $(if $(findstring _nocoh, $2),-XX:-UseCompactObjectHeaders,-XX:+UseCompactObjectHeaders)
endif
$1_$2_$3_DUMP_EXTRA_ARG := $$($1_$2_COOPS_OPTION) $$($1_$2_COH_OPTION) $(if $(findstring _preview, $3), --enable-preview,)
$1_$2_$3_DUMP_TYPE := $(if $(findstring _nocoops, $2),-NOCOOPS,)$(if $(findstring _coh, $2),-COH,)$(if $(findstring _preview, $3),-PREVIEW,)
$1_$2_$3_DUMP_TYPE := $(if $(findstring _nocoops, $2),-NOCOOPS,)$(if $(findstring _nocoh, $2),-NOCOH,)$(if $(findstring _preview, $3),-PREVIEW,)

$1_$2_$3_CDS_DUMP_FLAGS := $(CDS_DUMP_FLAGS) $(if $(filter g1gc, $(JVM_FEATURES_$1)), -XX:+UseG1GC)

Expand Down Expand Up @@ -205,12 +204,12 @@ ifeq ($(BUILD_CDS_ARCHIVE), true)
)
ifeq ($(BUILD_CDS_ARCHIVE_COH), true)
$(foreach v, $(JVM_VARIANTS), \
$(eval $(call CreateCDSArchive,$v,_coh)) \
$(eval $(call CreateCDSArchive,$v,_coh,_preview)) \
$(eval $(call CreateCDSArchive,$v,_nocoh)) \
$(eval $(call CreateCDSArchive,$v,_nocoh,_preview)) \
)
$(foreach v, $(JVM_VARIANTS), \
$(eval $(call CreateCDSArchive,$v,_nocoops_coh)) \
$(eval $(call CreateCDSArchive,$v,_nocoops_coh,_preview)) \
$(eval $(call CreateCDSArchive,$v,_nocoops_nocoh)) \
$(eval $(call CreateCDSArchive,$v,_nocoops_nocoh,_preview)) \
)
endif
endif
Expand Down
5 changes: 0 additions & 5 deletions make/RunTests.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -972,11 +972,6 @@ define SetupRunJtregTestBody
JTREG_AUTO_PROBLEM_LISTS += ProblemList-enable-preview.txt
endif

ifneq ($$(findstring -XX:+UseCompactObjectHeaders, $$(JTREG_ALL_OPTIONS)), )
JTREG_AUTO_PROBLEM_LISTS += ProblemList-coh.txt
endif


ifneq ($$(JTREG_EXTRA_PROBLEM_LISTS), )
# Accept both absolute paths as well as relative to the current test root.
$1_JTREG_BASIC_OPTIONS += $$(addprefix $$(JTREG_PROBLEM_LIST_PREFIX), $$(wildcard \
Expand Down
4 changes: 2 additions & 2 deletions src/hotspot/share/cds/cdsConfig.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -138,10 +138,10 @@ const char* CDSConfig::default_archive_path() {
if (!UseCompressedOops) {
tmp.print_raw("_nocoops");
}
if (UseCompactObjectHeaders) {
if (!UseCompactObjectHeaders) {
// Note that generation of xxx_coh.jsa variants require
// --enable-cds-archive-coh at build time
tmp.print_raw("_coh");
tmp.print_raw("_nocoh");
}
#endif
if (Arguments::is_valhalla_enabled()) {
Expand Down
2 changes: 1 addition & 1 deletion src/hotspot/share/runtime/globals.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ const size_t minimumSymbolTableSize = 1024;
"Use 32-bit object references in 64-bit VM. " \
"lp64_product means flag is always constant in 32 bit VM") \
\
product(bool, UseCompactObjectHeaders, false, \
product(bool, UseCompactObjectHeaders, true, \
"Use compact 64-bit object headers in 64-bit VM") \
\
product(int, ObjectAlignmentInBytes, 8, \
Expand Down
8 changes: 4 additions & 4 deletions test/hotspot/jtreg/runtime/cds/TestDefaultArchiveLoading.java
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ public static void main(String[] args) throws Exception {
switch (args[0]) {
case "nocoops_nocoh":
coh = coops = '-';
archiveSuffix = "_nocoops";
archiveSuffix = "_nocoops_nocoh";
if (!isArchiveAvailable(coops, coh, archiveSuffix)) {
throw new SkippedException("Skipping test due to " +
archivePath(archiveSuffix).toString() + " not available");
Expand All @@ -129,7 +129,7 @@ public static void main(String[] args) throws Exception {
case "nocoops_coh":
coops = '-';
coh = '+';
archiveSuffix = "_nocoops_coh";
archiveSuffix = "_nocoops";
if (!isArchiveAvailable(coops, coh, archiveSuffix)) {
throw new SkippedException("Skipping test due to " +
archivePath(archiveSuffix).toString() + " not available");
Expand All @@ -138,15 +138,15 @@ public static void main(String[] args) throws Exception {
case "coops_nocoh":
coops = '+';
coh = '-';
archiveSuffix = "";
archiveSuffix = "_nocoh";
if (!isArchiveAvailable(coops, coh, archiveSuffix)) {
throw new SkippedException("Skipping test due to " +
archivePath(archiveSuffix).toString() + " not available");
}
break;
case "coops_coh":
coh = coops = '+';
archiveSuffix = "_coh";
archiveSuffix = "";
if (!isArchiveAvailable(coops, coh, archiveSuffix)) {
throw new SkippedException("Skipping test due to " +
archivePath(archiveSuffix).toString() + " not available");
Expand Down
41 changes: 0 additions & 41 deletions test/jdk/ProblemList-coh.txt
Original file line number Diff line number Diff line change
@@ -1,44 +1,3 @@
#
# Copyright (c) 2026, 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.
#

#############################################################################
#
# List of quarantined tests for testing with -XX:+UseCompactObjectHeaders
#
#############################################################################

#############################################################################

# Preview project specific failures go here at the end of the file.
#
# These are NOT failures that occur with the '--enable-preview' option
# specified; those go in the appropriate ProblemList-enable-preview.txt file.
# These are failures that occur WITHOUT the '--enable-preview' option
# specified AND occur because of some issue with preview project code,
# in either implementation or test code.

#############################################################################

# Valhalla failures start here:

# The following test failures DID NOT reproduce during Tier[1-8] testing
Expand Down
10 changes: 3 additions & 7 deletions test/jdk/tools/jlink/plugins/CDSPluginTest.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2021, 2024, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2021, 2026, 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
Expand Down Expand Up @@ -77,15 +77,11 @@ public static void main(String[] args) throws Throwable {
subDir += "server" + sep;

WhiteBox wb = WhiteBox.getWhiteBox();
boolean COMPACT_HEADERS = Platform.is64bit() &&
wb.getBooleanVMFlag("UseCompactObjectHeaders") &&
wb.isDefaultVMFlag("UseCompactObjectHeaders");

String suffix = COMPACT_HEADERS ? "_coh.jsa" : ".jsa";
String suffix = ".jsa";

if (Platform.isAArch64() || Platform.isX64()) {
helper.checkImage(image, module, null, null,
new String[] { subDir + "classes" + suffix, subDir + "classes_nocoops" + suffix });
new String[] { subDir + "classes" + suffix, subDir + "classes_nocoops" + suffix});
} else {
helper.checkImage(image, module, null, null,
new String[] { subDir + "classes" + suffix });
Expand Down