diff --git a/make/Images.gmk b/make/Images.gmk index 515a8ad7bbc..a48e2a19026 100644 --- a/make/Images.gmk +++ b/make/Images.gmk @@ -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) @@ -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 diff --git a/make/RunTests.gmk b/make/RunTests.gmk index 02ea632e3ec..4a27b6ec7de 100644 --- a/make/RunTests.gmk +++ b/make/RunTests.gmk @@ -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 \ diff --git a/src/hotspot/share/cds/cdsConfig.cpp b/src/hotspot/share/cds/cdsConfig.cpp index ba73d0ec8eb..9679f4fc31d 100644 --- a/src/hotspot/share/cds/cdsConfig.cpp +++ b/src/hotspot/share/cds/cdsConfig.cpp @@ -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()) { diff --git a/src/hotspot/share/runtime/globals.hpp b/src/hotspot/share/runtime/globals.hpp index 51ef6541b32..108c8e18c9b 100644 --- a/src/hotspot/share/runtime/globals.hpp +++ b/src/hotspot/share/runtime/globals.hpp @@ -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, \ diff --git a/test/hotspot/jtreg/runtime/cds/TestDefaultArchiveLoading.java b/test/hotspot/jtreg/runtime/cds/TestDefaultArchiveLoading.java index 9160046ff5b..e85a064c5eb 100644 --- a/test/hotspot/jtreg/runtime/cds/TestDefaultArchiveLoading.java +++ b/test/hotspot/jtreg/runtime/cds/TestDefaultArchiveLoading.java @@ -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"); @@ -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"); @@ -138,7 +138,7 @@ 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"); @@ -146,7 +146,7 @@ public static void main(String[] args) throws Exception { 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"); diff --git a/test/jdk/ProblemList-coh.txt b/test/jdk/ProblemList-coh.txt index ed5e94b6fe4..92ac42d71fe 100644 --- a/test/jdk/ProblemList-coh.txt +++ b/test/jdk/ProblemList-coh.txt @@ -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 diff --git a/test/jdk/tools/jlink/plugins/CDSPluginTest.java b/test/jdk/tools/jlink/plugins/CDSPluginTest.java index 4193c0a0244..3256d5e6464 100644 --- a/test/jdk/tools/jlink/plugins/CDSPluginTest.java +++ b/test/jdk/tools/jlink/plugins/CDSPluginTest.java @@ -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 @@ -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 });