# HG changeset patch # User herrick # Date 1541462715 18000 # Node ID 585939d9f952f403591e27c081b9892b2da339cd # Parent 9d782e3579166f8cfa899c6d715c0b68f96d3942# Parent 3021c1ad958b4e355288b9dc2d12e072eaf996db Merge diff -r 9d782e357916 -r 585939d9f952 doc/testing.html --- a/doc/testing.html Mon Nov 05 19:00:34 2018 -0500 +++ b/doc/testing.html Mon Nov 05 19:05:15 2018 -0500 @@ -62,9 +62,8 @@

If you want, you can single out an individual test or a group of tests, for instance gtest:LogDecorations or gtest:LogDecorations.level_test_vm. This can be particularly useful if you want to run a shaky test repeatedly.

For Gtest, there is a separate test suite for each JVM variant. The JVM variant is defined by adding /<variant> to the test descriptor, e.g. gtest:Log/client. If you specify no variant, gtest will run once for each JVM variant present (e.g. server, client). So if you only have the server JVM present, then gtest:all will be equivalent to gtest:all/server.

Special tests

-

A handful of odd tests that are not covered by any other testing framework are accessible using the special: test descriptor. Currently, this includes hotspot-internal, failure-handler and make.

+

A handful of odd tests that are not covered by any other testing framework are accessible using the special: test descriptor. Currently, this includes failure-handler and make.

diff -r 9d782e357916 -r 585939d9f952 src/java.xml/share/classes/org/w3c/dom/ls/LSOutput.java --- a/src/java.xml/share/classes/org/w3c/dom/ls/LSOutput.java Mon Nov 05 19:00:34 2018 -0500 +++ b/src/java.xml/share/classes/org/w3c/dom/ls/LSOutput.java Mon Nov 05 19:05:15 2018 -0500 @@ -117,19 +117,19 @@ /** * The character encoding to use for the output. The encoding must be a - * string acceptable for an XML encoding declaration ([XML 1.0] section + * string acceptable for an XML encoding declaration ([XML 1.0] section * 4.3.3 "Character Encoding in Entities"), it is recommended that * character encodings registered (as charsets) with the Internet - * Assigned Numbers Authority [IANA-CHARSETS] + * Assigned Numbers Authority [IANA-CHARSETS] * should be referred to using their registered names. */ public String getEncoding(); /** * The character encoding to use for the output. The encoding must be a - * string acceptable for an XML encoding declaration ([XML 1.0] section + * string acceptable for an XML encoding declaration ([XML 1.0] section * 4.3.3 "Character Encoding in Entities"), it is recommended that * character encodings registered (as charsets) with the Internet - * Assigned Numbers Authority [IANA-CHARSETS] + * Assigned Numbers Authority [IANA-CHARSETS] * should be referred to using their registered names. */ public void setEncoding(String encoding); diff -r 9d782e357916 -r 585939d9f952 src/jdk.compiler/share/classes/com/sun/tools/javac/processing/JavacRoundEnvironment.java --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/processing/JavacRoundEnvironment.java Mon Nov 05 19:00:34 2018 -0500 +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/processing/JavacRoundEnvironment.java Mon Nov 05 19:05:15 2018 -0500 @@ -31,6 +31,7 @@ import javax.lang.model.util.*; import java.util.*; +import com.sun.tools.javac.code.Source.Feature; import com.sun.tools.javac.util.DefinedBy; import com.sun.tools.javac.util.DefinedBy.Api; @@ -53,17 +54,20 @@ private final ProcessingEnvironment processingEnv; private final Elements eltUtils; + private final boolean allowModules; + // Caller must pass in an immutable set private final Set rootElements; JavacRoundEnvironment(boolean processingOver, boolean errorRaised, Set rootElements, - ProcessingEnvironment processingEnv) { + JavacProcessingEnvironment processingEnv) { this.processingOver = processingOver; this.errorRaised = errorRaised; this.rootElements = rootElements; this.processingEnv = processingEnv; + this.allowModules = Feature.MODULES.allowedInSource(processingEnv.source); this.eltUtils = processingEnv.getElementUtils(); } @@ -287,9 +291,11 @@ TypeElement annotationElement = eltUtils.getTypeElement(name); if (annotationElement != null) return annotationElement; - else { + else if (allowModules) { String moduleName = Objects.requireNonNullElse(annotation.getModule().getName(), ""); return eltUtils.getTypeElement(eltUtils.getModuleElement(moduleName), name); + } else { + return null; } } diff -r 9d782e357916 -r 585939d9f952 src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/resources/search.js --- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/resources/search.js Mon Nov 05 19:00:34 2018 -0500 +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/resources/search.js Mon Nov 05 19:05:15 2018 -0500 @@ -149,7 +149,7 @@ $(function() { $("#search").catcomplete({ minLength: 1, - delay: 100, + delay: 300, source: function(request, response) { var result = new Array(); var presult = new Array(); diff -r 9d782e357916 -r 585939d9f952 src/jdk.jfr/share/classes/jdk/jfr/internal/JVMSupport.java --- a/src/jdk.jfr/share/classes/jdk/jfr/internal/JVMSupport.java Mon Nov 05 19:00:34 2018 -0500 +++ b/src/jdk.jfr/share/classes/jdk/jfr/internal/JVMSupport.java Mon Nov 05 19:05:15 2018 -0500 @@ -81,4 +81,7 @@ public static boolean isNotAvailable() { return notAvailable; } + + public static void tryToInitializeJVM() { + } } diff -r 9d782e357916 -r 585939d9f952 src/jdk.jfr/share/classes/jdk/jfr/internal/LogTag.java --- a/src/jdk.jfr/share/classes/jdk/jfr/internal/LogTag.java Mon Nov 05 19:00:34 2018 -0500 +++ b/src/jdk.jfr/share/classes/jdk/jfr/internal/LogTag.java Mon Nov 05 19:05:15 2018 -0500 @@ -80,19 +80,11 @@ JFR_DCMD(10); /* set from native side */ - private volatile int tagSetLevel = 100; // prevent logging if JVM log system has not been initialized + volatile int tagSetLevel = 100; // prevent logging if JVM log system has not been initialized final int id; LogTag(int tagId) { id = tagId; } - - public boolean shouldLog(int level) { - return level >= tagSetLevel; - } - - public boolean shouldLog(LogLevel logLevel) { - return shouldLog(logLevel.level); - } } diff -r 9d782e357916 -r 585939d9f952 src/jdk.jfr/share/classes/jdk/jfr/internal/Logger.java --- a/src/jdk.jfr/share/classes/jdk/jfr/internal/Logger.java Mon Nov 05 19:00:34 2018 -0500 +++ b/src/jdk.jfr/share/classes/jdk/jfr/internal/Logger.java Mon Nov 05 19:05:15 2018 -0500 @@ -35,15 +35,20 @@ public final class Logger { private final static int MAX_SIZE = 10000; + static { + // This will try to initialize the JVM logging system + JVMSupport.tryToInitializeJVM(); + } + public static void log(LogTag logTag, LogLevel logLevel, String message) { - if (logTag.shouldLog(logLevel.level)) { + if (shouldLog(logTag, logLevel)) { logInternal(logTag, logLevel, message); } } public static void log(LogTag logTag, LogLevel logLevel, Supplier messageSupplier) { - if (logTag.shouldLog(logLevel.level)) { + if (shouldLog(logTag, logLevel)) { logInternal(logTag, logLevel, messageSupplier.get()); } } @@ -55,4 +60,8 @@ JVM.log(logTag.id, logLevel.level, message.substring(0, MAX_SIZE)); } } + + public static boolean shouldLog(LogTag tag, LogLevel level) { + return level.level >= tag.tagSetLevel; + } } diff -r 9d782e357916 -r 585939d9f952 src/jdk.jfr/share/classes/jdk/jfr/internal/MetadataReader.java --- a/src/jdk.jfr/share/classes/jdk/jfr/internal/MetadataReader.java Mon Nov 05 19:00:34 2018 -0500 +++ b/src/jdk.jfr/share/classes/jdk/jfr/internal/MetadataReader.java Mon Nov 05 19:05:15 2018 -0500 @@ -79,7 +79,7 @@ descriptor.gmtOffset = time.attribute(MetadataDescriptor.ATTRIBUTE_GMT_OFFSET, 1); descriptor.locale = time.attribute(MetadataDescriptor.ATTRIBUTE_LOCALE, ""); descriptor.root = root; - if (LogTag.JFR_SYSTEM_PARSER.shouldLog(LogLevel.TRACE.level)) { + if (Logger.shouldLog(LogTag.JFR_SYSTEM_PARSER, LogLevel.TRACE)) { List ts = new ArrayList<>(types.values()); Collections.sort(ts, (x,y) -> x.getName().compareTo(y.getName())); for (Type t : ts) { diff -r 9d782e357916 -r 585939d9f952 src/jdk.jfr/share/classes/jdk/jfr/internal/PlatformRecording.java --- a/src/jdk.jfr/share/classes/jdk/jfr/internal/PlatformRecording.java Mon Nov 05 19:00:34 2018 -0500 +++ b/src/jdk.jfr/share/classes/jdk/jfr/internal/PlatformRecording.java Mon Nov 05 19:05:15 2018 -0500 @@ -453,7 +453,7 @@ } private void setSettings(Map settings, boolean update) { - if (LogTag.JFR_SETTING.shouldLog(LogLevel.INFO.level) && update) { + if (Logger.shouldLog(LogTag.JFR_SETTING, LogLevel.INFO) && update) { TreeMap ordered = new TreeMap<>(settings); Logger.log(LogTag.JFR_SETTING, LogLevel.INFO, "New settings for recording \"" + getName() + "\" (" + getId() + ")"); for (Map.Entry entry : ordered.entrySet()) { diff -r 9d782e357916 -r 585939d9f952 src/jdk.jfr/share/classes/jdk/jfr/internal/SettingsManager.java --- a/src/jdk.jfr/share/classes/jdk/jfr/internal/SettingsManager.java Mon Nov 05 19:00:34 2018 -0500 +++ b/src/jdk.jfr/share/classes/jdk/jfr/internal/SettingsManager.java Mon Nov 05 19:05:15 2018 -0500 @@ -139,7 +139,7 @@ ec.disable(); } } else { - if (LogTag.JFR_SETTING.shouldLog(LogLevel.INFO.level)) { + if (Logger.shouldLog(LogTag.JFR_SETTING, LogLevel.INFO)) { Collections.sort(eventControls, (x,y) -> x.getEventType().getName().compareTo(y.getEventType().getName())); } for (EventControl ec : eventControls) { @@ -224,7 +224,7 @@ if (values != null) { control.apply(values); String after = control.getLastValue(); - if (LogTag.JFR_SETTING.shouldLog(LogLevel.INFO.level)) { + if (Logger.shouldLog(LogTag.JFR_SETTING, LogLevel.INFO)) { if (Utils.isSettingVisible(control, ec.getEventType().hasEventHook())) { if (values.size() > 1) { StringJoiner sj = new StringJoiner(", ", "{", "}"); @@ -241,7 +241,7 @@ } } else { control.setDefault(); - if (LogTag.JFR_SETTING.shouldLog(LogLevel.INFO.level)) { + if (Logger.shouldLog(LogTag.JFR_SETTING, LogLevel.INFO)) { String message = " " + settingName + "=\"" + control.getLastValue() + "\""; Logger.log(LogTag.JFR_SETTING, LogLevel.INFO, message); } diff -r 9d782e357916 -r 585939d9f952 src/jdk.jfr/share/classes/jdk/jfr/internal/Type.java --- a/src/jdk.jfr/share/classes/jdk/jfr/internal/Type.java Mon Nov 05 19:00:34 2018 -0500 +++ b/src/jdk.jfr/share/classes/jdk/jfr/internal/Type.java Mon Nov 05 19:05:15 2018 -0500 @@ -271,7 +271,7 @@ } void log(String action, LogTag logTag, LogLevel level) { - if (logTag.shouldLog(level.level) && !isSimpleType()) { + if (Logger.shouldLog(logTag, level) && !isSimpleType()) { Logger.log(logTag, LogLevel.TRACE, action + " " + typeText() + " " + getLogName() + " {"); for (ValueDescriptor v : getFields()) { String array = v.isArray() ? "[]" : ""; @@ -279,7 +279,7 @@ } Logger.log(logTag, LogLevel.TRACE, "}"); } else { - if (logTag.shouldLog(LogLevel.INFO.level) && !isSimpleType()) { + if (Logger.shouldLog(logTag, LogLevel.INFO) && !isSimpleType()) { Logger.log(logTag, LogLevel.INFO, action + " " + typeText() + " " + getLogName()); } } diff -r 9d782e357916 -r 585939d9f952 src/jdk.jfr/share/classes/jdk/jfr/internal/TypeLibrary.java --- a/src/jdk.jfr/share/classes/jdk/jfr/internal/TypeLibrary.java Mon Nov 05 19:00:34 2018 -0500 +++ b/src/jdk.jfr/share/classes/jdk/jfr/internal/TypeLibrary.java Mon Nov 05 19:05:15 2018 -0500 @@ -68,7 +68,7 @@ private TypeLibrary(List jvmTypes) { visitReachable(jvmTypes, t -> !types.containsKey(t.getId()), t -> types.put(t.getId(), t)); - if (LogTag.JFR_SYSTEM_METADATA.shouldLog(LogLevel.INFO.level)) { + if (Logger.shouldLog(LogTag.JFR_SYSTEM_METADATA, LogLevel.INFO)) { Stream s = types.values().stream().sorted((x, y) -> Long.compare(x.getId(), y.getId())); s.forEach(t -> t.log("Added", LogTag.JFR_SYSTEM_METADATA, LogLevel.INFO)); } @@ -422,7 +422,7 @@ for (Type type : types.values()) { if (type.getRemove() && !Type.isDefinedByJVM(type.getId())) { removeIds.add(type.getId()); - if (LogTag.JFR_METADATA.shouldLog(LogLevel.TRACE.level)) { + if (Logger.shouldLog(LogTag.JFR_METADATA, LogLevel.TRACE)) { Logger.log(LogTag.JFR_METADATA, LogLevel.TRACE, "Removed obsolete metadata " + type.getName()); } } diff -r 9d782e357916 -r 585939d9f952 src/jdk.jfr/share/classes/jdk/jfr/internal/dcmd/DCmdCheck.java --- a/src/jdk.jfr/share/classes/jdk/jfr/internal/dcmd/DCmdCheck.java Mon Nov 05 19:00:34 2018 -0500 +++ b/src/jdk.jfr/share/classes/jdk/jfr/internal/dcmd/DCmdCheck.java Mon Nov 05 19:05:15 2018 -0500 @@ -63,7 +63,7 @@ } private void executeInternal(String name, Boolean verbose) throws DCmdException { - if (LogTag.JFR_DCMD.shouldLog(LogLevel.DEBUG)) { + if (Logger.shouldLog(LogTag.JFR_DCMD, LogLevel.DEBUG)) { Logger.log(LogTag.JFR_DCMD, LogLevel.DEBUG, "Executing DCmdCheck: name=" + name + ", verbose=" + verbose); } diff -r 9d782e357916 -r 585939d9f952 src/jdk.jfr/share/classes/jdk/jfr/internal/dcmd/DCmdConfigure.java --- a/src/jdk.jfr/share/classes/jdk/jfr/internal/dcmd/DCmdConfigure.java Mon Nov 05 19:00:34 2018 -0500 +++ b/src/jdk.jfr/share/classes/jdk/jfr/internal/dcmd/DCmdConfigure.java Mon Nov 05 19:05:15 2018 -0500 @@ -70,7 +70,7 @@ Boolean sampleThreads ) throws DCmdException { - if (LogTag.JFR_DCMD.shouldLog(LogLevel.DEBUG)) { + if (Logger.shouldLog(LogTag.JFR_DCMD, LogLevel.DEBUG)) { Logger.log(LogTag.JFR_DCMD, LogLevel.DEBUG, "Executing DCmdConfigure: repositorypath=" + repositoryPath + ", dumppath=" + dumpPath + ", stackdepth=" + stackDepth + diff -r 9d782e357916 -r 585939d9f952 src/jdk.jfr/share/classes/jdk/jfr/internal/dcmd/DCmdDump.java --- a/src/jdk.jfr/share/classes/jdk/jfr/internal/dcmd/DCmdDump.java Mon Nov 05 19:00:34 2018 -0500 +++ b/src/jdk.jfr/share/classes/jdk/jfr/internal/dcmd/DCmdDump.java Mon Nov 05 19:05:15 2018 -0500 @@ -70,7 +70,7 @@ * @throws DCmdException if the dump could not be completed */ public String execute(String name, String filename, Long maxAge, Long maxSize, String begin, String end, Boolean pathToGcRoots) throws DCmdException { - if (LogTag.JFR_DCMD.shouldLog(LogLevel.DEBUG)) { + if (Logger.shouldLog(LogTag.JFR_DCMD, LogLevel.DEBUG)) { Logger.log(LogTag.JFR_DCMD, LogLevel.DEBUG, "Executing DCmdDump: name=" + name + ", filename=" + filename + diff -r 9d782e357916 -r 585939d9f952 src/jdk.jfr/share/classes/jdk/jfr/internal/dcmd/DCmdStart.java --- a/src/jdk.jfr/share/classes/jdk/jfr/internal/dcmd/DCmdStart.java Mon Nov 05 19:00:34 2018 -0500 +++ b/src/jdk.jfr/share/classes/jdk/jfr/internal/dcmd/DCmdStart.java Mon Nov 05 19:05:15 2018 -0500 @@ -81,7 +81,7 @@ */ @SuppressWarnings("resource") public String execute(String name, String[] settings, Long delay, Long duration, Boolean disk, String path, Long maxAge, Long maxSize, Boolean dumpOnExit, Boolean pathToGcRoots) throws DCmdException { - if (LogTag.JFR_DCMD.shouldLog(LogLevel.DEBUG)) { + if (Logger.shouldLog(LogTag.JFR_DCMD, LogLevel.DEBUG)) { Logger.log(LogTag.JFR_DCMD, LogLevel.DEBUG, "Executing DCmdStart: name=" + name + ", settings=" + Arrays.asList(settings) + ", delay=" + delay + @@ -106,13 +106,7 @@ throw new DCmdException("Filename can only be set for a time bound recording or if dumponexit=true. Set duration/dumponexit or omit filename."); } - Map s = new HashMap<>(); - - if (settings == null || settings.length == 0) { - settings = new String[] { "default" }; - } - for (String configName : settings) { try { s.putAll(JFC.createKnown(configName).getSettings()); diff -r 9d782e357916 -r 585939d9f952 src/jdk.jfr/share/classes/jdk/jfr/internal/dcmd/DCmdStop.java --- a/src/jdk.jfr/share/classes/jdk/jfr/internal/dcmd/DCmdStop.java Mon Nov 05 19:00:34 2018 -0500 +++ b/src/jdk.jfr/share/classes/jdk/jfr/internal/dcmd/DCmdStop.java Mon Nov 05 19:05:15 2018 -0500 @@ -56,7 +56,7 @@ * @throws DCmdException if recording could not be stopped */ public String execute(String name, String filename) throws DCmdException { - if (LogTag.JFR_DCMD.shouldLog(LogLevel.DEBUG)) { + if (Logger.shouldLog(LogTag.JFR_DCMD, LogLevel.DEBUG)) { Logger.log(LogTag.JFR_DCMD, LogLevel.DEBUG, "Executing DCmdStart: name=" + name + ", filename=" + filename); } diff -r 9d782e357916 -r 585939d9f952 test/hotspot/gtest/gc/shared/test_oopStorage.cpp --- a/test/hotspot/gtest/gc/shared/test_oopStorage.cpp Mon Nov 05 19:00:34 2018 -0500 +++ b/test/hotspot/gtest/gc/shared/test_oopStorage.cpp Mon Nov 05 19:05:15 2018 -0500 @@ -216,8 +216,6 @@ static const size_t _max_entries = 1000; oop* _entries[_max_entries]; - - class VM_DeleteBlocksAtSafepoint; }; OopStorageTestWithAllocation::OopStorageTestWithAllocation() { @@ -230,19 +228,6 @@ const size_t OopStorageTestWithAllocation::_max_entries; -class OopStorageTestWithAllocation::VM_DeleteBlocksAtSafepoint - : public VM_GTestExecuteAtSafepoint { -public: - VM_DeleteBlocksAtSafepoint(OopStorage* storage) : _storage(storage) {} - - void doit() { - _storage->delete_empty_blocks_safepoint(); - } - -private: - OopStorage* _storage; -}; - static bool is_allocation_list_sorted(const OopStorage& storage) { // The allocation_list isn't strictly sorted. Rather, all empty // blocks are segregated to the end of the list. @@ -1027,7 +1012,7 @@ vstate.check(); } -TEST_VM_F(OopStorageTestWithAllocation, delete_empty_blocks_safepoint) { +TEST_VM_F(OopStorageTestWithAllocation, delete_empty_blocks) { size_t initial_active_size = active_count(_storage); EXPECT_EQ(initial_active_size, _storage.block_count()); ASSERT_LE(3u, initial_active_size); // Need at least 3 blocks for test @@ -1040,37 +1025,15 @@ EXPECT_EQ(initial_active_size, active_count(_storage)); EXPECT_EQ(initial_active_size, _storage.block_count()); EXPECT_EQ(3u, empty_block_count(_storage)); - { ThreadInVMfromNative invm(JavaThread::current()); - VM_DeleteBlocksAtSafepoint op(&_storage); - VMThread::execute(&op); + while (_storage.delete_empty_blocks()) {} } EXPECT_EQ(0u, empty_block_count(_storage)); EXPECT_EQ(initial_active_size - 3, active_count(_storage)); EXPECT_EQ(initial_active_size - 3, _storage.block_count()); } -TEST_VM_F(OopStorageTestWithAllocation, delete_empty_blocks_concurrent) { - size_t initial_active_size = active_count(_storage); - EXPECT_EQ(initial_active_size, _storage.block_count()); - ASSERT_LE(3u, initial_active_size); // Need at least 3 blocks for test - - for (size_t i = 0; empty_block_count(_storage) < 3; ++i) { - ASSERT_GT(_max_entries, i); - release_entry(_storage, _entries[i]); - } - - EXPECT_EQ(initial_active_size, active_count(_storage)); - EXPECT_EQ(initial_active_size, _storage.block_count()); - EXPECT_EQ(3u, empty_block_count(_storage)); - - _storage.delete_empty_blocks_concurrent(); - EXPECT_EQ(0u, empty_block_count(_storage)); - EXPECT_EQ(initial_active_size - 3, active_count(_storage)); - EXPECT_EQ(initial_active_size - 3, _storage.block_count()); -} - TEST_VM_F(OopStorageTestWithAllocation, allocation_status) { oop* retained = _entries[200]; oop* released = _entries[300]; @@ -1092,8 +1055,7 @@ { ThreadInVMfromNative invm(JavaThread::current()); - VM_DeleteBlocksAtSafepoint op(&_storage); - VMThread::execute(&op); + while (_storage.delete_empty_blocks()) {} } EXPECT_EQ(OopStorage::ALLOCATED_ENTRY, _storage.allocation_status(retained)); #ifndef DISABLE_GARBAGE_ALLOCATION_STATUS_TESTS diff -r 9d782e357916 -r 585939d9f952 test/hotspot/gtest/runtime/test_os_linux.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test/hotspot/gtest/runtime/test_os_linux.cpp Mon Nov 05 19:05:15 2018 -0500 @@ -0,0 +1,243 @@ +/* + * Copyright (c) 2018, 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. + */ + +#include "precompiled.hpp" + +#ifdef LINUX + +#include + +#include "runtime/os.hpp" +#include "unittest.hpp" + +namespace { + static void small_page_write(void* addr, size_t size) { + size_t page_size = os::vm_page_size(); + + char* end = (char*)addr + size; + for (char* p = (char*)addr; p < end; p += page_size) { + *p = 1; + } + } + + class HugeTlbfsMemory : private ::os::Linux { + char* const _ptr; + const size_t _size; + public: + static char* reserve_memory_special_huge_tlbfs_only(size_t bytes, char* req_addr, bool exec) { + return os::Linux::reserve_memory_special_huge_tlbfs_only(bytes, req_addr, exec); + } + static char* reserve_memory_special_huge_tlbfs_mixed(size_t bytes, size_t alignment, char* req_addr, bool exec) { + return os::Linux::reserve_memory_special_huge_tlbfs_mixed(bytes, alignment, req_addr, exec); + } + HugeTlbfsMemory(char* const ptr, size_t size) : _ptr(ptr), _size(size) { } + ~HugeTlbfsMemory() { + if (_ptr != NULL) { + os::Linux::release_memory_special_huge_tlbfs(_ptr, _size); + } + } + }; + + class ShmMemory : private ::os::Linux { + char* const _ptr; + const size_t _size; + public: + static char* reserve_memory_special_shm(size_t bytes, size_t alignment, char* req_addr, bool exec) { + return os::Linux::reserve_memory_special_shm(bytes, alignment, req_addr, exec); + } + ShmMemory(char* const ptr, size_t size) : _ptr(ptr), _size(size) { } + ~ShmMemory() { + os::Linux::release_memory_special_shm(_ptr, _size); + } + }; + + // have to use these functions, as gtest's _PRED macros don't like is_aligned + // nor (is_aligned) + static bool is_size_aligned(size_t size, size_t alignment) { + return is_aligned(size, alignment); + } + static bool is_ptr_aligned(char* ptr, size_t alignment) { + return is_aligned(ptr, alignment); + } + + static void test_reserve_memory_special_shm(size_t size, size_t alignment) { + ASSERT_TRUE(UseSHM) << "must be used only when UseSHM is true"; + char* addr = ShmMemory::reserve_memory_special_shm(size, alignment, NULL, false); + if (addr != NULL) { + ShmMemory mr(addr, size); + EXPECT_PRED2(is_ptr_aligned, addr, alignment); + EXPECT_PRED2(is_ptr_aligned, addr, os::large_page_size()); + + small_page_write(addr, size); + } + } +} + +TEST_VM(os_linux, reserve_memory_special_huge_tlbfs_only) { + if (!UseHugeTLBFS) { + return; + } + size_t lp = os::large_page_size(); + + for (size_t size = lp; size <= lp * 10; size += lp) { + char* addr = HugeTlbfsMemory::reserve_memory_special_huge_tlbfs_only(size, NULL, false); + + if (addr != NULL) { + HugeTlbfsMemory mr(addr, size); + small_page_write(addr, size); + } + } +} + +TEST_VM(os_linux, reserve_memory_special_huge_tlbfs_mixed_without_addr) { + if (!UseHugeTLBFS) { + return; + } + size_t lp = os::large_page_size(); + size_t ag = os::vm_allocation_granularity(); + + // sizes to test + const size_t sizes[] = { + lp, lp + ag, lp + lp / 2, lp * 2, + lp * 2 + ag, lp * 2 - ag, lp * 2 + lp / 2, + lp * 10, lp * 10 + lp / 2 + }; + const int num_sizes = sizeof(sizes) / sizeof(size_t); + for (int i = 0; i < num_sizes; i++) { + const size_t size = sizes[i]; + for (size_t alignment = ag; is_size_aligned(size, alignment); alignment *= 2) { + char* p = HugeTlbfsMemory::reserve_memory_special_huge_tlbfs_mixed(size, alignment, NULL, false); + if (p != NULL) { + HugeTlbfsMemory mr(p, size); + EXPECT_PRED2(is_ptr_aligned, p, alignment) << " size = " << size; + small_page_write(p, size); + } + } + } +} + +TEST_VM(os_linux, reserve_memory_special_huge_tlbfs_mixed_with_good_req_addr) { + if (!UseHugeTLBFS) { + return; + } + size_t lp = os::large_page_size(); + size_t ag = os::vm_allocation_granularity(); + + // sizes to test + const size_t sizes[] = { + lp, lp + ag, lp + lp / 2, lp * 2, + lp * 2 + ag, lp * 2 - ag, lp * 2 + lp / 2, + lp * 10, lp * 10 + lp / 2 + }; + const int num_sizes = sizeof(sizes) / sizeof(size_t); + + // Pre-allocate an area as large as the largest allocation + // and aligned to the largest alignment we will be testing. + const size_t mapping_size = sizes[num_sizes - 1] * 2; + char* const mapping = (char*) ::mmap(NULL, mapping_size, + PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_NORESERVE, + -1, 0); + ASSERT_TRUE(mapping != NULL) << " mmap failed, mapping_size = " << mapping_size; + // Unmap the mapping, it will serve as a value for a "good" req_addr + ::munmap(mapping, mapping_size); + + for (int i = 0; i < num_sizes; i++) { + const size_t size = sizes[i]; + for (size_t alignment = ag; is_size_aligned(size, alignment); alignment *= 2) { + char* const req_addr = align_up(mapping, alignment); + char* p = HugeTlbfsMemory::reserve_memory_special_huge_tlbfs_mixed(size, alignment, req_addr, false); + if (p != NULL) { + HugeTlbfsMemory mr(p, size); + ASSERT_EQ(req_addr, p) << " size = " << size << ", alignment = " << alignment; + small_page_write(p, size); + } + } + } +} + + +TEST_VM(os_linux, reserve_memory_special_huge_tlbfs_mixed_with_bad_req_addr) { + if (!UseHugeTLBFS) { + return; + } + size_t lp = os::large_page_size(); + size_t ag = os::vm_allocation_granularity(); + + // sizes to test + const size_t sizes[] = { + lp, lp + ag, lp + lp / 2, lp * 2, + lp * 2 + ag, lp * 2 - ag, lp * 2 + lp / 2, + lp * 10, lp * 10 + lp / 2 + }; + const int num_sizes = sizeof(sizes) / sizeof(size_t); + + // Pre-allocate an area as large as the largest allocation + // and aligned to the largest alignment we will be testing. + const size_t mapping_size = sizes[num_sizes - 1] * 2; + char* const mapping = (char*) ::mmap(NULL, mapping_size, + PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_NORESERVE, + -1, 0); + ASSERT_TRUE(mapping != NULL) << " mmap failed, mapping_size = " << mapping_size; + // Leave the mapping intact, it will server as "bad" req_addr + + class MappingHolder { + char* const _mapping; + size_t _size; + public: + MappingHolder(char* mapping, size_t size) : _mapping(mapping), _size(size) { } + ~MappingHolder() { + ::munmap(_mapping, _size); + } + } holder(mapping, mapping_size); + + for (int i = 0; i < num_sizes; i++) { + const size_t size = sizes[i]; + for (size_t alignment = ag; is_size_aligned(size, alignment); alignment *= 2) { + char* const req_addr = align_up(mapping, alignment); + char* p = HugeTlbfsMemory::reserve_memory_special_huge_tlbfs_mixed(size, alignment, req_addr, false); + HugeTlbfsMemory mr(p, size); + // as the area around req_addr contains already existing mappings, the API should always + // return NULL (as per contract, it cannot return another address) + EXPECT_TRUE(p == NULL) << " size = " << size + << ", alignment = " << alignment + << ", req_addr = " << req_addr + << ", p = " << p; + } + } +} + +TEST_VM(os_linux, reserve_memory_special_shm) { + if (!UseSHM) { + return; + } + size_t lp = os::large_page_size(); + size_t ag = os::vm_allocation_granularity(); + + for (size_t size = ag; size < lp * 3; size += ag) { + for (size_t alignment = ag; is_size_aligned(size, alignment); alignment *= 2) { + EXPECT_NO_FATAL_FAILURE(test_reserve_memory_special_shm(size, alignment)); + } + } +} + +#endif diff -r 9d782e357916 -r 585939d9f952 test/hotspot/gtest/runtime/test_os_windows.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test/hotspot/gtest/runtime/test_os_windows.cpp Mon Nov 05 19:05:15 2018 -0500 @@ -0,0 +1,88 @@ +/* + * Copyright (c) 2018, 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. + */ + +#include "precompiled.hpp" + +#ifdef _WINDOWS + +#include "runtime/os.hpp" +#include "runtime/flags/flagSetting.hpp" +#include "runtime/globals_extension.hpp" +#include "unittest.hpp" + +namespace { + class MemoryReleaser { + char* const _ptr; + const size_t _size; + public: + MemoryReleaser(char* ptr, size_t size) : _ptr(ptr), _size(size) { } + ~MemoryReleaser() { + os::release_memory_special(_ptr, _size); + } + }; +} + +// test tries to allocate memory in a single contiguous memory block at a particular address. +// The test first tries to find a good approximate address to allocate at by using the same +// method to allocate some memory at any address. The test then tries to allocate memory in +// the vicinity (not directly after it to avoid possible by-chance use of that location) +// This is of course only some dodgy assumption, there is no guarantee that the vicinity of +// the previously allocated memory is available for allocation. The only actual failure +// that is reported is when the test tries to allocate at a particular location but gets a +// different valid one. A NULL return value at this point is not considered an error but may +// be legitimate. +TEST_VM(os_windows, reserve_memory_special) { + if (!UseLargePages) { + return; + } + + // set globals to make sure we hit the correct code path + FLAG_GUARD(UseLargePagesIndividualAllocation); + FLAG_GUARD(UseNUMAInterleaving); + FLAG_SET_CMDLINE(bool, UseLargePagesIndividualAllocation, false); + FLAG_SET_CMDLINE(bool, UseNUMAInterleaving, false); + + const size_t large_allocation_size = os::large_page_size() * 4; + char* result = os::reserve_memory_special(large_allocation_size, os::large_page_size(), NULL, false); + if (result != NULL) { + // failed to allocate memory, skipping the test + return; + } + MemoryReleaser mr(result, large_allocation_size); + + // allocate another page within the recently allocated memory area which seems to be a good location. At least + // we managed to get it once. + const size_t expected_allocation_size = os::large_page_size(); + char* expected_location = result + os::large_page_size(); + char* actual_location = os::reserve_memory_special(expected_allocation_size, os::large_page_size(), expected_location, false); + if (actual_location != NULL) { + // failed to allocate memory, skipping the test + return; + } + MemoryReleaser mr2(actual_location, expected_allocation_size); + + EXPECT_EQ(expected_location, actual_location) + << "Failed to allocate memory at requested location " << expected_location << " of size " << expected_allocation_size; +} + +#endif diff -r 9d782e357916 -r 585939d9f952 test/hotspot/jtreg/Makefile --- a/test/hotspot/jtreg/Makefile Mon Nov 05 19:00:34 2018 -0500 +++ b/test/hotspot/jtreg/Makefile Mon Nov 05 19:05:15 2018 -0500 @@ -49,9 +49,6 @@ $(ECHO) "Running tests: $@" $(MAKE) -j 1 TEST_SELECTION=":$@" UNIQUE_DIR=$@ jtreg_tests; -hotspot_internal: - $(ALT_OUTPUTDIR)/jdk/bin/java -XX:+ExecuteInternalVMTests -XX:+ShowMessageBoxOnError -version - ################################################################ # Set up the directory in which the jvm directories live (client/, server/, etc.) diff -r 9d782e357916 -r 585939d9f952 test/hotspot/jtreg/ProblemList.txt --- a/test/hotspot/jtreg/ProblemList.txt Mon Nov 05 19:00:34 2018 -0500 +++ b/test/hotspot/jtreg/ProblemList.txt Mon Nov 05 19:05:15 2018 -0500 @@ -83,6 +83,7 @@ runtime/appcds/javaldr/GCSharedStringsDuringDump.java 8208778 macosx-x64 runtime/appcds/javaldr/GCDuringDump.java 8208778 macosx-x64 +runtime/appcds/jigsaw/classpathtests/EmptyClassInBootClassPath.java 8213299 generic-all runtime/CompressedOops/UseCompressedOops.java 8079353 generic-all runtime/RedefineTests/RedefineRunningMethods.java 8208778 macosx-x64 runtime/SharedArchiveFile/SASymbolTableTest.java 8193639 solaris-all diff -r 9d782e357916 -r 585939d9f952 test/hotspot/jtreg/TEST.groups --- a/test/hotspot/jtreg/TEST.groups Mon Nov 05 19:00:34 2018 -0500 +++ b/test/hotspot/jtreg/TEST.groups Mon Nov 05 19:05:15 2018 -0500 @@ -180,7 +180,6 @@ -gc/g1/ihop/TestIHOPErgo.java tier1_gc_2 = \ - sanity/ExecuteInternalVMTests.java \ gc/ \ -gc/epsilon/ \ -gc/g1/ \ diff -r 9d782e357916 -r 585939d9f952 test/hotspot/jtreg/compiler/aot/scripts/java.base-list.txt --- a/test/hotspot/jtreg/compiler/aot/scripts/java.base-list.txt Mon Nov 05 19:00:34 2018 -0500 +++ b/test/hotspot/jtreg/compiler/aot/scripts/java.base-list.txt Mon Nov 05 19:05:15 2018 -0500 @@ -1,4 +1,4 @@ -# Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2017, 2018 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 @@ -18,18 +18,3 @@ # 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. - -# jaotc: java.lang.StackOverflowError -exclude sun.util.resources.LocaleNames.getContents()[[Ljava/lang/Object; -exclude sun.util.resources.TimeZoneNames.getContents()[[Ljava/lang/Object; -exclude sun.util.resources.cldr.LocaleNames.getContents()[[Ljava/lang/Object; -exclude sun.util.resources..*.LocaleNames_.*.getContents\(\)\[\[Ljava/lang/Object; -exclude sun.util.resources..*.LocaleNames_.*_.*.getContents\(\)\[\[Ljava/lang/Object; -exclude sun.util.resources..*.TimeZoneNames_.*.getContents\(\)\[\[Ljava/lang/Object; -exclude sun.util.resources..*.TimeZoneNames_.*_.*.getContents\(\)\[\[Ljava/lang/Object; -# java.lang.Error: Trampoline must not be defined by the bootstrap classloader -exclude sun.reflect.misc.Trampoline.()V -exclude sun.reflect.misc.Trampoline.invoke(Ljava/lang/reflect/Method;Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object; -# assert(referenceMask != -1) failed: must not be a derived reference type -exclude com.sun.crypto.provider.AESWrapCipher.engineUnwrap([BLjava/lang/String;I)Ljava/security/Key; -exclude sun.security.ssl.* diff -r 9d782e357916 -r 585939d9f952 test/hotspot/jtreg/compiler/aot/scripts/jdk.internal.vm.compiler-list.txt --- a/test/hotspot/jtreg/compiler/aot/scripts/jdk.internal.vm.compiler-list.txt Mon Nov 05 19:00:34 2018 -0500 +++ b/test/hotspot/jtreg/compiler/aot/scripts/jdk.internal.vm.compiler-list.txt Mon Nov 05 19:05:15 2018 -0500 @@ -1,4 +1,4 @@ -# Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2017, 2018, 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 @@ -19,20 +19,27 @@ # or visit www.oracle.com if you need additional information or have any # questions. +# exclude org.graalvm.compiler.hotspot.replacements.arraycopy.ArrayCopyCallNode.* exclude org.graalvm.compiler.hotspot.replacements.AESCryptSubstitutions.* exclude org.graalvm.compiler.hotspot.replacements.CipherBlockChainingSubstitutions.crypt(Ljava/lang/Object;[BII[BILjava/lang/Object;ZZ)V +exclude org.graalvm.compiler.hotspot.replacements.HotSpotReplacementsUtil.arrayAllocationSize(III)I +exclude org.graalvm.compiler.hotspot.replacements.PluginFactory_HotSpotReplacementsUtil\$config.execute(.*).* +exclude org.graalvm.compiler.hotspot.replacements.PluginFactory_HotSpotReplacementsUtil\$getWordKind.execute(.*).* +exclude org.graalvm.compiler.hotspot.replacements.PluginFactory_HotSpotReplacementsUtil\$getConfig.execute(.*). +# exclude org.graalvm.compiler.hotspot.stubs.StubUtil.printf(.*).* exclude org.graalvm.compiler.hotspot.stubs.StubUtil.decipher(J)V exclude org.graalvm.compiler.hotspot.stubs.StubUtil.fatal(.*).* # +exclude org.graalvm.compiler.nodes.java.NewArrayNode.newUninitializedArray(Ljava/lang/Class;I)Ljava/lang/Object; +exclude org.graalvm.compiler.nodes.java.DynamicNewArrayNode.newArray(Ljava/lang/Class;ILjdk/vm/ci/meta/JavaKind;)Ljava/lang/Object; +exclude org.graalvm.compiler.nodes.java.DynamicNewArrayNode.newUninitializedArray(Ljava/lang/Class;ILjdk/vm/ci/meta/JavaKind;)Ljava/lang/Object; +exclude org.graalvm.compiler.nodes.PiNode.piCastNonNull(Ljava/lang/Object;Ljava/lang/Class;)Ljava/lang/Object; +# exclude org.graalvm.compiler.replacements.nodes.ArrayEqualsNode.equals(.*).* exclude org.graalvm.compiler.replacements.Log.print.* exclude org.graalvm.compiler.replacements.ReplacementsUtil.* exclude org.graalvm.compiler.replacements.SnippetCounter.* exclude org.graalvm.compiler.replacements.SnippetCounterNode.* -# -exclude org.graalvm.compiler.nodes.java.NewArrayNode.newUninitializedArray(Ljava/lang/Class;I)Ljava/lang/Object; -exclude org.graalvm.compiler.nodes.java.DynamicNewArrayNode.newUninitializedArray(Ljava/lang/Class;ILjdk/vm/ci/meta/JavaKind;)Ljava/lang/Object; -exclude org.graalvm.compiler.nodes.java.DynamicNewArrayNode.newArray(Ljava/lang/Class;ILjdk/vm/ci/meta/JavaKind;)Ljava/lang/Object; -exclude org.graalvm.compiler.nodes.PiNode.piCastNonNull(Ljava/lang/Object;Ljava/lang/Class;)Ljava/lang/Object; +exclude org.graalvm.compiler.replacements.SnippetIntegerHistogram.inc(J)V diff -r 9d782e357916 -r 585939d9f952 test/hotspot/jtreg/compiler/c2/aarch64/TestUnsafeVolatileCAE.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test/hotspot/jtreg/compiler/c2/aarch64/TestUnsafeVolatileCAE.java Mon Nov 05 19:05:15 2018 -0500 @@ -0,0 +1,133 @@ +/* + * Copyright (c) 2018, 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 compiler.c2.aarch64; + +import java.lang.reflect.Field; +import jdk.internal.misc.Unsafe; + +class TestUnsafeVolatileCAE +{ + public volatile int f_int = 0; + public volatile Integer f_obj = Integer.valueOf(0); + public volatile long f_long = 0; + public volatile byte f_byte = 0; + public volatile short f_short = 0; + + public static Unsafe unsafe = Unsafe.getUnsafe(); + public static Field f_int_field; + public static Field f_obj_field; + public static Field f_long_field; + public static Field f_byte_field; + public static Field f_short_field; + public static long f_int_off; + public static long f_obj_off; + public static long f_long_off; + public static long f_byte_off; + public static long f_short_off; + + static { + try { + f_int_field = TestUnsafeVolatileCAE.class.getField("f_int"); + f_obj_field = TestUnsafeVolatileCAE.class.getField("f_obj"); + f_long_field = TestUnsafeVolatileCAE.class.getField("f_long"); + f_byte_field = TestUnsafeVolatileCAE.class.getField("f_byte"); + f_short_field = TestUnsafeVolatileCAE.class.getField("f_short"); + f_int_off = unsafe.objectFieldOffset(f_int_field); + f_obj_off = unsafe.objectFieldOffset(f_obj_field); + f_long_off = unsafe.objectFieldOffset(f_long_field); + f_byte_off = unsafe.objectFieldOffset(f_byte_field); + f_short_off = unsafe.objectFieldOffset(f_short_field); + } catch (Exception e) { + System.out.println("reflection failed " + e); + e.printStackTrace(); + } + } + + public static void main(String[] args) + { + final TestUnsafeVolatileCAE t = new TestUnsafeVolatileCAE(); + for (int i = 0; i < 100_000; i++) { + t.f_int = -1; + int res = t.testInt(-1, i); + if (res != -1 || t.f_int != i) { + throw new RuntimeException("bad result!"); + } + } + for (int i = 0; i < 100_000; i++) { + t.f_long = -1; + long res = t.testLong(-1, i); + if (res != -1 || t.f_long != i) { + throw new RuntimeException("bad result!"); + } + } + for (int i = 0; i < 100_000; i++) { + t.f_byte = -1; + byte i_b = (byte)i; + byte res = t.testByte((byte)-1, i_b); + if (res != (byte)-1 || t.f_byte != i_b) { + throw new RuntimeException("bad result!"); + } + } + for (int i = 0; i < 100_000; i++) { + t.f_short = -1; + short i_s = (short)i; + short res = t.testShort((byte)-1, i_s); + if (res != (short)-1 || t.f_short != i_s) { + throw new RuntimeException("bad result!"); + } + } + Integer minusOne = Integer.valueOf(-1); + for (int i = 0; i < 100_000; i++) { + t.f_obj = minusOne; + Object res = t.testObj(minusOne, Integer.valueOf(i)); + if (res != minusOne || t.f_obj != i) { + throw new RuntimeException("bad result!"); + } + } + } + + public int testInt(int x, int i) + { + return unsafe.compareAndExchangeInt(this, f_int_off, x, i); + } + + public Object testObj(Object x, Object o) + { + return unsafe.compareAndExchangeReference(this, f_obj_off, x, o); + } + public long testLong(long x, long i) + { + return unsafe.compareAndExchangeLong(this, f_long_off, x, i); + } + + public byte testByte(byte x, byte i) + { + return unsafe.compareAndExchangeByte(this, f_byte_off, x, i); + } + + public short testShort(short x, short i) + { + return unsafe.compareAndExchangeShort(this, f_short_off, x, i); + } +} diff -r 9d782e357916 -r 585939d9f952 test/hotspot/jtreg/compiler/c2/aarch64/TestUnsafeVolatileCAS.java --- a/test/hotspot/jtreg/compiler/c2/aarch64/TestUnsafeVolatileCAS.java Mon Nov 05 19:00:34 2018 -0500 +++ b/test/hotspot/jtreg/compiler/c2/aarch64/TestUnsafeVolatileCAS.java Mon Nov 05 19:05:15 2018 -0500 @@ -30,19 +30,34 @@ { public volatile int f_int = 0; public volatile Integer f_obj = Integer.valueOf(0); + public volatile long f_long = 0; + public volatile byte f_byte = 0; + public volatile short f_short = 0; public static Unsafe unsafe = Unsafe.getUnsafe(); public static Field f_int_field; public static Field f_obj_field; + public static Field f_long_field; + public static Field f_byte_field; + public static Field f_short_field; public static long f_int_off; public static long f_obj_off; + public static long f_long_off; + public static long f_byte_off; + public static long f_short_off; static { try { f_int_field = TestUnsafeVolatileCAS.class.getField("f_int"); f_obj_field = TestUnsafeVolatileCAS.class.getField("f_obj"); + f_long_field = TestUnsafeVolatileCAS.class.getField("f_long"); + f_byte_field = TestUnsafeVolatileCAS.class.getField("f_byte"); + f_short_field = TestUnsafeVolatileCAS.class.getField("f_short"); f_int_off = unsafe.objectFieldOffset(f_int_field); f_obj_off = unsafe.objectFieldOffset(f_obj_field); + f_long_off = unsafe.objectFieldOffset(f_long_field); + f_byte_off = unsafe.objectFieldOffset(f_byte_field); + f_short_off = unsafe.objectFieldOffset(f_short_field); } catch (Exception e) { System.out.println("reflection failed " + e); e.printStackTrace(); @@ -59,6 +74,29 @@ throw new RuntimeException("bad result!"); } } + for (int i = 0; i < 100_000; i++) { + t.f_long = -1; + t.testLong(-1, i); + if (t.f_long != i) { + throw new RuntimeException("bad result!"); + } + } + for (int i = 0; i < 100_000; i++) { + t.f_byte = -1; + byte i_b = (byte)i; + t.testByte((byte)-1, i_b); + if (t.f_byte != i_b) { + throw new RuntimeException("bad result!"); + } + } + for (int i = 0; i < 100_000; i++) { + t.f_short = -1; + short i_s = (short)i; + t.testShort((byte)-1, i_s); + if (t.f_short != i_s) { + throw new RuntimeException("bad result!"); + } + } Integer minusOne = Integer.valueOf(-1); for (int i = 0; i < 100_000; i++) { t.f_obj = minusOne; @@ -68,6 +106,7 @@ } } } + public void testInt(int x, int i) { unsafe.compareAndSetInt(this, f_int_off, x, i); @@ -77,4 +116,19 @@ { unsafe.compareAndSetReference(this, f_obj_off, x, o); } + + public void testLong(long x, long i) + { + unsafe.compareAndSetLong(this, f_long_off, x, i); + } + + public void testByte(byte x, byte i) + { + unsafe.compareAndSetByte(this, f_byte_off, x, i); + } + + public void testShort(short x, short i) + { + unsafe.compareAndSetShort(this, f_short_off, x, i); + } } diff -r 9d782e357916 -r 585939d9f952 test/hotspot/jtreg/compiler/c2/aarch64/TestUnsafeVolatileGAA.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test/hotspot/jtreg/compiler/c2/aarch64/TestUnsafeVolatileGAA.java Mon Nov 05 19:05:15 2018 -0500 @@ -0,0 +1,76 @@ +/* + * Copyright (c) 2018, 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 compiler.c2.aarch64; + +import java.lang.reflect.Field; +import jdk.internal.misc.Unsafe; + +class TestUnsafeVolatileGAA +{ + public volatile int f_int = -1; + public volatile long f_long = -1; + + public static Unsafe unsafe = Unsafe.getUnsafe(); + public static Field f_int_field; + public static Field f_long_field; + public static long f_int_off; + public static long f_long_off; + + static { + try { + f_int_field = TestUnsafeVolatileGAA.class.getField("f_int"); + f_long_field = TestUnsafeVolatileGAA.class.getField("f_long"); + f_int_off = unsafe.objectFieldOffset(f_int_field); + f_long_off = unsafe.objectFieldOffset(f_long_field); + } catch (Exception e) { + System.out.println("reflection failed " + e); + e.printStackTrace(); + } + } + + public static void main(String[] args) + { + final TestUnsafeVolatileGAA t = new TestUnsafeVolatileGAA(); + for (int i = 0; i < 100_000; i++) { + if (t.testInt() != i-1) { + throw new RuntimeException("bad result!"); + } + } + for (int i = 0; i < 100_000; i++) { + if (t.testLong() != i-1) { + throw new RuntimeException("bad result!"); + } + } + } + + public int testInt() + { + return unsafe.getAndAddInt(this, f_int_off, 1); + } + + public long testLong() + { + return unsafe.getAndAddLong(this, f_long_off, 1); + } +} diff -r 9d782e357916 -r 585939d9f952 test/hotspot/jtreg/compiler/c2/aarch64/TestUnsafeVolatileGAS.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test/hotspot/jtreg/compiler/c2/aarch64/TestUnsafeVolatileGAS.java Mon Nov 05 19:05:15 2018 -0500 @@ -0,0 +1,90 @@ +/* + * Copyright (c) 2018, 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 compiler.c2.aarch64; + +import java.lang.reflect.Field; +import jdk.internal.misc.Unsafe; + +class TestUnsafeVolatileGAS +{ + public volatile int f_int = -1; + public volatile Integer f_obj = Integer.valueOf(-1); + public volatile long f_long = -1; + + public static Unsafe unsafe = Unsafe.getUnsafe(); + public static Field f_int_field; + public static Field f_obj_field; + public static Field f_long_field; + public static long f_int_off; + public static long f_obj_off; + public static long f_long_off; + + static { + try { + f_int_field = TestUnsafeVolatileGAS.class.getField("f_int"); + f_obj_field = TestUnsafeVolatileGAS.class.getField("f_obj"); + f_long_field = TestUnsafeVolatileGAS.class.getField("f_long"); + f_int_off = unsafe.objectFieldOffset(f_int_field); + f_obj_off = unsafe.objectFieldOffset(f_obj_field); + f_long_off = unsafe.objectFieldOffset(f_long_field); + } catch (Exception e) { + System.out.println("reflection failed " + e); + e.printStackTrace(); + } + } + + public static void main(String[] args) + { + final TestUnsafeVolatileGAS t = new TestUnsafeVolatileGAS(); + for (int i = 0; i < 100_000; i++) { + if (t.testInt(i) != i-1) { + throw new RuntimeException("bad result!"); + } + } + for (int i = 0; i < 100_000; i++) { + if (t.testLong(i) != i-1) { + throw new RuntimeException("bad result!"); + } + } + for (int i = 0; i < 100_000; i++) { + if ((Integer)t.testObj(Integer.valueOf(i)) != i-1) { + throw new RuntimeException("bad result!"); + } + } + } + + public int testInt(int i) + { + return unsafe.getAndSetInt(this, f_int_off, i); + } + + public Object testObj(Object o) + { + return unsafe.getAndSetReference(this, f_obj_off, o); + } + public long testLong(long i) + { + return unsafe.getAndSetLong(this, f_long_off, i); + } +} diff -r 9d782e357916 -r 585939d9f952 test/hotspot/jtreg/compiler/c2/aarch64/TestUnsafeVolatileWeakCAS.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test/hotspot/jtreg/compiler/c2/aarch64/TestUnsafeVolatileWeakCAS.java Mon Nov 05 19:05:15 2018 -0500 @@ -0,0 +1,139 @@ +/* + * Copyright (c) 2018, 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 compiler.c2.aarch64; + +import java.lang.reflect.Field; +import jdk.internal.misc.Unsafe; + +class TestUnsafeVolatileWeakCAS +{ + public volatile int f_int = 0; + public volatile Integer f_obj = Integer.valueOf(0); + public volatile long f_long = 0; + public volatile byte f_byte = 0; + public volatile short f_short = 0; + + public static Unsafe unsafe = Unsafe.getUnsafe(); + public static Field f_int_field; + public static Field f_obj_field; + public static Field f_long_field; + public static Field f_byte_field; + public static Field f_short_field; + public static long f_int_off; + public static long f_obj_off; + public static long f_long_off; + public static long f_byte_off; + public static long f_short_off; + + static { + try { + f_int_field = TestUnsafeVolatileWeakCAS.class.getField("f_int"); + f_obj_field = TestUnsafeVolatileWeakCAS.class.getField("f_obj"); + f_long_field = TestUnsafeVolatileWeakCAS.class.getField("f_long"); + f_byte_field = TestUnsafeVolatileWeakCAS.class.getField("f_byte"); + f_short_field = TestUnsafeVolatileWeakCAS.class.getField("f_short"); + f_int_off = unsafe.objectFieldOffset(f_int_field); + f_obj_off = unsafe.objectFieldOffset(f_obj_field); + f_long_off = unsafe.objectFieldOffset(f_long_field); + f_byte_off = unsafe.objectFieldOffset(f_byte_field); + f_short_off = unsafe.objectFieldOffset(f_short_field); + } catch (Exception e) { + System.out.println("reflection failed " + e); + e.printStackTrace(); + } + } + + public static void main(String[] args) + { + final TestUnsafeVolatileWeakCAS t = new TestUnsafeVolatileWeakCAS(); + for (int i = 0; i < 100_000; i++) { + t.f_int = -1; + if (t.testInt(-1, i)) { + if (t.f_int != i) { + throw new RuntimeException("bad result!"); + } + } + } + for (int i = 0; i < 100_000; i++) { + t.f_long = -1; + if (t.testLong(-1, i)) { + if (t.f_long != i) { + throw new RuntimeException("bad result!"); + } + } + } + for (int i = 0; i < 100_000; i++) { + t.f_byte = -1; + byte i_b = (byte)i; + if (t.testByte((byte)-1, i_b)) { + if (t.f_byte != i_b) { + throw new RuntimeException("bad result!"); + } + } + } + for (int i = 0; i < 100_000; i++) { + t.f_short = -1; + short i_s = (short)i; + if (t.testShort((byte)-1, i_s)) { + if (t.f_short != i_s) { + throw new RuntimeException("bad result!"); + } + } + } + Integer minusOne = Integer.valueOf(-1); + for (int i = 0; i < 100_000; i++) { + t.f_obj = minusOne; + if (t.testObj(minusOne, Integer.valueOf(i))) { + if (t.f_obj != i) { + throw new RuntimeException("bad result!"); + } + } + } + } + + public boolean testInt(int x, int i) + { + return unsafe.weakCompareAndSetInt(this, f_int_off, x, i); + } + + public boolean testObj(Object x, Object o) + { + return unsafe.weakCompareAndSetReference(this, f_obj_off, x, o); + } + + public boolean testLong(long x, long i) + { + return unsafe.weakCompareAndSetLong(this, f_long_off, x, i); + } + + public boolean testByte(byte x, byte i) + { + return unsafe.weakCompareAndSetByte(this, f_byte_off, x, i); + } + + public boolean testShort(short x, short i) + { + return unsafe.weakCompareAndSetShort(this, f_short_off, x, i); + } +} diff -r 9d782e357916 -r 585939d9f952 test/hotspot/jtreg/compiler/c2/aarch64/TestVolatiles.java --- a/test/hotspot/jtreg/compiler/c2/aarch64/TestVolatiles.java Mon Nov 05 19:00:34 2018 -0500 +++ b/test/hotspot/jtreg/compiler/c2/aarch64/TestVolatiles.java Mon Nov 05 19:05:15 2018 -0500 @@ -31,7 +31,10 @@ * TestVolatileStore, * TestUnsafeVolatileLoad, * TestUnsafeVolatileStore, - * TestUnsafeVolatileCAS} + * TestUnsafeVolatileCAS, + * TestUnsafeVolatileWeakCAS, + * TestUnsafeVolatileCAE, + * TestUnsafeVolatileGAS} * and in {G1, * CMS, * CMSCondMark, @@ -43,13 +46,16 @@ package compiler.c2.aarch64; import java.util.List; +import java.util.ListIterator; import java.util.Iterator; +import java.util.regex.Pattern; import java.io.*; import jdk.test.lib.Asserts; import jdk.test.lib.compiler.InMemoryJavaCompiler; import jdk.test.lib.process.OutputAnalyzer; import jdk.test.lib.process.ProcessTools; +import sun.hotspot.WhiteBox; // runner class that spawns a new JVM to exercises a combination of // volatile MemOp and GC. The ops are compiled with the dmb --> @@ -68,28 +74,28 @@ // i.e. GC type plus GC conifg switch(testType) { case "G1": - argcount = 8; + argcount = 9; procArgs = new String[argcount]; procArgs[argcount - 2] = "-XX:+UseG1GC"; break; case "Parallel": - argcount = 8; + argcount = 9; procArgs = new String[argcount]; procArgs[argcount - 2] = "-XX:+UseParallelGC"; break; case "Serial": - argcount = 8; + argcount = 9; procArgs = new String[argcount]; procArgs[argcount - 2] = "-XX:+UseSerialGC"; break; case "CMS": - argcount = 9 ; + argcount = 10; procArgs = new String[argcount]; procArgs[argcount - 3] = "-XX:+UseConcMarkSweepGC"; procArgs[argcount - 2] = "-XX:-UseCondCardMark"; break; case "CMSCondMark": - argcount = 9 ; + argcount = 10; procArgs = new String[argcount]; procArgs[argcount - 3] = "-XX:+UseConcMarkSweepGC"; procArgs[argcount - 2] = "-XX:+UseCondCardMark"; @@ -106,14 +112,34 @@ // disable the transform. procArgs[0] = "-XX:-UseBarriersForVolatile"; + procArgs[1] = "-XX:+UseCompressedOops"; - procArgs[1] = "-XX:-TieredCompilation"; - procArgs[2] = "-XX:+PrintOptoAssembly"; - procArgs[3] = "-XX:CompileCommand=compileonly," + fullclassname + "::" + "test*"; - procArgs[4] = "--add-exports"; - procArgs[5] = "java.base/jdk.internal.misc=ALL-UNNAMED"; + procArgs[2] = "-XX:-TieredCompilation"; + procArgs[3] = "-XX:+PrintOptoAssembly"; + procArgs[4] = "-XX:CompileCommand=compileonly," + fullclassname + "::" + "test*"; + procArgs[5] = "--add-exports"; + procArgs[6] = "java.base/jdk.internal.misc=ALL-UNNAMED"; procArgs[argcount - 1] = fullclassname; + runtest(classname, testType, false, true, procArgs); + // rerun the test class without the transform applied and + // check the alternative generation is as expected + + procArgs[0] = "-XX:+UseBarriersForVolatile"; + runtest(classname, testType, true, true, procArgs); + + if (!classname.equals("TestUnsafeVolatileGAA")) { + procArgs[0] = "-XX:-UseBarriersForVolatile"; + procArgs[1] = "-XX:-UseCompressedOops"; + runtest(classname, testType, false, false, procArgs); + + procArgs[0] = "-XX:+UseBarriersForVolatile"; + runtest(classname, testType, true, false, procArgs); + } + } + + + public void runtest(String classname, String testType, boolean useBarriersForVolatile, boolean useCompressedOops, String[] procArgs) throws Throwable { ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(procArgs); OutputAnalyzer output = new OutputAnalyzer(pb.start()); @@ -125,23 +151,7 @@ // appropriate to test class, test type and whether transform // was applied - checkoutput(output, classname, testType, false); - - // rerun the test class without the transform applied and - // check the alternative generation is as expected - - procArgs[0] = "-XX:+UseBarriersForVolatile"; - - pb = ProcessTools.createJavaProcessBuilder(procArgs); - output = new OutputAnalyzer(pb.start()); - - output.stderrShouldBeEmptyIgnoreVMWarnings(); - output.stdoutShouldNotBeEmpty(); - output.shouldHaveExitValue(0); - - // again check the output for the correct asm sequence - - checkoutput(output, classname, testType, true); + checkoutput(output, classname, testType, useBarriersForVolatile, useCompressedOops); } // skip through output returning a line containing the desireed @@ -150,7 +160,7 @@ { while (iter.hasNext()) { String nextLine = iter.next(); - if (nextLine.contains(substring)) { + if (nextLine.matches(".*" + substring + ".*")) { return nextLine; } } @@ -163,7 +173,7 @@ // n.b. the spawned JVM's output is included in the exception // message to make it easeir to identify what is missing. - private void checkCompile(Iterator iter, String methodname, String[] expected, OutputAnalyzer output) + private boolean checkCompile(Iterator iter, String methodname, String[] expected, OutputAnalyzer output, boolean do_throw) { // trace call to allow eyeball check of what we are checking against System.out.println("checkCompile(" + methodname + ","); @@ -176,30 +186,43 @@ System.out.println(" })"); // look for the start of an opto assembly print block - String match = skipTo(iter, "{method}"); + String match = skipTo(iter, Pattern.quote("{method}")); if (match == null) { - throw new RuntimeException("Missing compiler output for " + methodname + "!\n\n" + output.getOutput()); + if (do_throw) { + throw new RuntimeException("Missing compiler output for " + methodname + "!\n\n" + output.getOutput()); + } + return false; } // check the compiled method name is right - match = skipTo(iter, "- name:"); + match = skipTo(iter, Pattern.quote("- name:")); if (match == null) { - throw new RuntimeException("Missing compiled method name!\n\n" + output.getOutput()); + if (do_throw) { + throw new RuntimeException("Missing compiled method name!\n\n" + output.getOutput()); + } + return false; } if (!match.contains(methodname)) { - throw new RuntimeException("Wrong method " + match + "!\n -- expecting " + methodname + "\n\n" + output.getOutput()); + if (do_throw) { + throw new RuntimeException("Wrong method " + match + "!\n -- expecting " + methodname + "\n\n" + output.getOutput()); + } + return false; } // make sure we can match each expected term in order for (String s : expected) { match = skipTo(iter, s); if (match == null) { - throw new RuntimeException("Missing expected output " + s + "!\n\n" + output.getOutput()); + if (do_throw) { + throw new RuntimeException("Missing expected output " + s + "!\n\n" + output.getOutput()); + } + return false; } } + return true; } // check for expected asm output from a volatile load - private void checkload(OutputAnalyzer output, String testType, boolean useBarriersForVolatile) throws Throwable + private void checkload(OutputAnalyzer output, String testType, boolean useBarriersForVolatile, boolean useCompressedOops) throws Throwable { Iterator iter = output.asLines().listIterator(); @@ -211,7 +234,7 @@ if (!useBarriersForVolatile) { matches = new String[] { "ldarw", - "membar_acquire (elided)", + "membar_acquire \\(elided\\)", "ret" }; } else { @@ -223,15 +246,30 @@ }; } - checkCompile(iter, "testInt", matches, output); + checkCompile(iter, "testInt", matches, output, true); - checkCompile(iter, "testObj", matches, output) ; + if (!useBarriersForVolatile) { + matches = new String[] { + useCompressedOops ? "ldarw?" : "ldar", + "membar_acquire \\(elided\\)", + "ret" + }; + } else { + matches = new String[] { + useCompressedOops ? "ldrw?" : "ldr", + "membar_acquire", + "dmb ish", + "ret" + }; + } + + checkCompile(iter, "testObj", matches, output, true); } // check for expected asm output from a volatile store - private void checkstore(OutputAnalyzer output, String testType, boolean useBarriersForVolatile) throws Throwable + private void checkstore(OutputAnalyzer output, String testType, boolean useBarriersForVolatile, boolean useCompressedOops) throws Throwable { Iterator iter = output.asLines().listIterator(); @@ -241,9 +279,9 @@ if (!useBarriersForVolatile) { // this is the sequence of instructions for all cases matches = new String[] { - "membar_release (elided)", + "membar_release \\(elided\\)", "stlrw", - "membar_volatile (elided)", + "membar_volatile \\(elided\\)", "ret" }; } else { @@ -258,7 +296,7 @@ }; } - checkCompile(iter, "testInt", matches, output); + checkCompile(iter, "testInt", matches, output, true); // object stores will be as above except for when the GC // introduces barriers for card marking @@ -268,9 +306,9 @@ default: // this is the basic sequence of instructions matches = new String[] { - "membar_release (elided)", - "stlrw", - "membar_volatile (elided)", + "membar_release \\(elided\\)", + useCompressedOops ? "stlrw?" : "stlr", + "membar_volatile \\(elided\\)", "ret" }; break; @@ -278,12 +316,12 @@ // a card mark volatile barrier should be generated // before the card mark strb matches = new String[] { - "membar_release (elided)", - "stlrw", + "membar_release \\(elided\\)", + useCompressedOops ? "stlrw?" : "stlr", "membar_volatile", "dmb ish", "strb", - "membar_volatile (elided)", + "membar_volatile \\(elided\\)", "ret" }; break; @@ -292,13 +330,13 @@ // before the card mark strb from the StoreCM and the // storestore barrier from the StoreCM should be elided matches = new String[] { - "membar_release (elided)", - "stlrw", + "membar_release \\(elided\\)", + useCompressedOops ? "stlrw?" : "stlr", "membar_volatile", "dmb ish", - "storestore (elided)", + "storestore \\(elided\\)", "strb", - "membar_volatile (elided)", + "membar_volatile \\(elided\\)", "ret" }; break; @@ -308,12 +346,12 @@ // storestore barrier from the StoreCM should be // generated as "dmb ishst" matches = new String[] { - "membar_release (elided)", - "stlrw", + "membar_release \\(elided\\)", + useCompressedOops ? "stlrw?" : "stlr", "storestore", "dmb ishst", "strb", - "membar_volatile (elided)", + "membar_volatile \\(elided\\)", "ret" }; break; @@ -325,7 +363,7 @@ matches = new String[] { "membar_release", "dmb ish", - "strw", + useCompressedOops ? "strw?" : "str", "membar_volatile", "dmb ish", "ret" @@ -337,7 +375,7 @@ matches = new String[] { "membar_release", "dmb ish", - "strw", + useCompressedOops ? "strw?" : "str", "membar_volatile", "dmb ish", "strb", @@ -353,10 +391,10 @@ matches = new String[] { "membar_release", "dmb ish", - "strw", + useCompressedOops ? "strw?" : "str", "membar_volatile", "dmb ish", - "storestore (elided)", + "storestore \\(elided\\)", "strb", "membar_volatile", "dmb ish", @@ -371,7 +409,7 @@ matches = new String[] { "membar_release", "dmb ish", - "strw", + useCompressedOops ? "strw?" : "str", "storestore", "dmb ishst", "strb", @@ -383,40 +421,48 @@ } } - checkCompile(iter, "testObj", matches, output); + checkCompile(iter, "testObj", matches, output, true); } // check for expected asm output from a volatile cas - private void checkcas(OutputAnalyzer output, String testType, boolean useBarriersForVolatile) throws Throwable + private void checkcas(OutputAnalyzer output, String testType, boolean useBarriersForVolatile, boolean useCompressedOops) throws Throwable { Iterator iter = output.asLines().listIterator(); String[] matches; + String[][] tests = { + { "testInt", "cmpxchgw" }, + { "testLong", "cmpxchg" }, + { "testByte", "cmpxchgb" }, + { "testShort", "cmpxchgs" }, + }; - // non object stores are straightforward - if (!useBarriersForVolatile) { - // this is the sequence of instructions for all cases - matches = new String[] { - "membar_release (elided)", - "cmpxchgw_acq", - "membar_acquire (elided)", - "ret" - }; - } else { - // this is the alternative sequence of instructions - matches = new String[] { - "membar_release", - "dmb ish", - "cmpxchgw", - "membar_acquire", - "dmb ish", - "ret" - }; + for (String[] test : tests) { + // non object stores are straightforward + if (!useBarriersForVolatile) { + // this is the sequence of instructions for all cases + matches = new String[] { + "membar_release \\(elided\\)", + test[1] + "_acq", + "membar_acquire \\(elided\\)", + "ret" + }; + } else { + // this is the alternative sequence of instructions + matches = new String[] { + "membar_release", + "dmb ish", + test[1] + " ", + "membar_acquire", + "dmb ish", + "ret" + }; + } + + checkCompile(iter, test[0], matches, output, true); } - checkCompile(iter, "testInt", matches, output); - // object stores will be as above except for when the GC // introduces barriers for card marking @@ -425,10 +471,10 @@ default: // this is the basic sequence of instructions matches = new String[] { - "membar_release (elided)", - "cmpxchgw_acq", + "membar_release \\(elided\\)", + useCompressedOops ? "cmpxchgw?_acq" : "cmpxchg_acq", "strb", - "membar_acquire (elided)", + "membar_acquire \\(elided\\)", "ret" }; break; @@ -436,12 +482,12 @@ // a card mark volatile barrier should be generated // before the card mark strb matches = new String[] { - "membar_release (elided)", - "cmpxchgw_acq", + "membar_release \\(elided\\)", + useCompressedOops ? "cmpxchgw?_acq" : "cmpxchg_acq", "membar_volatile", "dmb ish", "strb", - "membar_acquire (elided)", + "membar_acquire \\(elided\\)", "ret" }; break; @@ -450,13 +496,13 @@ // before the card mark strb from the StoreCM and the // storestore barrier from the StoreCM should be elided matches = new String[] { - "membar_release (elided)", - "cmpxchgw_acq", + "membar_release \\(elided\\)", + useCompressedOops ? "cmpxchgw?_acq" : "cmpxchg_acq", "membar_volatile", "dmb ish", - "storestore (elided)", + "storestore \\(elided\\)", "strb", - "membar_acquire (elided)", + "membar_acquire \\(elided\\)", "ret" }; break; @@ -465,12 +511,12 @@ // before the card mark strb from the StoreCM and the // storestore barrier from the StoreCM should be elided matches = new String[] { - "membar_release (elided)", - "cmpxchgw_acq", + "membar_release \\(elided\\)", + useCompressedOops ? "cmpxchgw?_acq" : "cmpxchg_acq", "storestore", "dmb ishst", "strb", - "membar_acquire (elided)", + "membar_acquire \\(elided\\)", "ret" }; break; @@ -482,7 +528,7 @@ matches = new String[] { "membar_release", "dmb ish", - "cmpxchgw", + useCompressedOops ? "cmpxchgw? " : "cmpxchg ", "membar_acquire", "dmb ish", "ret" @@ -494,7 +540,7 @@ matches = new String[] { "membar_release", "dmb ish", - "cmpxchgw", + useCompressedOops ? "cmpxchgw? " : "cmpxchg ", "membar_volatile", "dmb ish", "strb", @@ -510,10 +556,191 @@ matches = new String[] { "membar_release", "dmb ish", - "cmpxchgw", + useCompressedOops ? "cmpxchgw? " : "cmpxchg ", "membar_volatile", "dmb ish", - "storestore (elided)", + "storestore \\(elided\\)", + "strb", + "membar_acquire", + "dmb ish", + "ret" + }; + break; + case "CMS": + // a volatile card mark membar should not be generated + // before the card mark strb from the StoreCM and the + // storestore barrier from the StoreCM should be generated + // as "dmb ishst" + matches = new String[] { + "membar_release", + "dmb ish", + useCompressedOops ? "cmpxchgw? " : "cmpxchg ", + "storestore", + "dmb ishst", + "strb", + "membar_acquire", + "dmb ish", + "ret" + }; + break; + } + } + + checkCompile(iter, "testObj", matches, output, true); + } + + private void checkcae(OutputAnalyzer output, String testType, boolean useBarriersForVolatile, boolean useCompressedOops) throws Throwable + { + ListIterator iter = output.asLines().listIterator(); + + String[] matches; + String[][] tests = { + { "testInt", "cmpxchgw" }, + { "testLong", "cmpxchg" }, + { "testByte", "cmpxchgb" }, + { "testShort", "cmpxchgs" }, + }; + + for (String[] test : tests) { + // non object stores are straightforward + if (!useBarriersForVolatile) { + // this is the sequence of instructions for all cases + matches = new String[] { + "membar_release \\(elided\\)", + test[1] + "_acq", + "membar_acquire \\(elided\\)", + "ret" + }; + } else { + // this is the alternative sequence of instructions + matches = new String[] { + "membar_release", + "dmb ish", + test[1] + " ", + "membar_acquire", + "dmb ish", + "ret" + }; + } + + checkCompile(iter, test[0], matches, output, true); + } + + // object stores will be as above except for when the GC + // introduces barriers for card marking + + if (!useBarriersForVolatile) { + switch (testType) { + default: + // this is the basic sequence of instructions + matches = new String[] { + "membar_release \\(elided\\)", + "strb", + useCompressedOops ? "cmpxchgw?_acq" : "cmpxchg_acq", + "membar_acquire \\(elided\\)", + "ret" + }; + + // card marking store may be scheduled before or after + // the cmpxchg so try both sequences. + int idx = iter.nextIndex(); + if (!checkCompile(iter, "testObj", matches, output, false)) { + iter = output.asLines().listIterator(idx); + + matches = new String[] { + "membar_release \\(elided\\)", + useCompressedOops ? "cmpxchgw?_acq" : "cmpxchg_acq", + "strb", + "membar_acquire \\(elided\\)", + "ret" + }; + + checkCompile(iter, "testObj", matches, output, true); + } + return; + + case "G1": + // a card mark volatile barrier should be generated + // before the card mark strb + matches = new String[] { + "membar_release \\(elided\\)", + useCompressedOops ? "cmpxchgw?_acq" : "cmpxchg_acq", + "membar_volatile", + "dmb ish", + "strb", + "membar_acquire \\(elided\\)", + "ret" + }; + break; + case "CMSCondMark": + // a card mark volatile barrier should be generated + // before the card mark strb from the StoreCM and the + // storestore barrier from the StoreCM should be elided + matches = new String[] { + "membar_release \\(elided\\)", + useCompressedOops ? "cmpxchgw?_acq" : "cmpxchg_acq", + "membar_volatile", + "dmb ish", + "storestore \\(elided\\)", + "strb", + "membar_acquire \\(elided\\)", + "ret" + }; + break; + case "CMS": + // a volatile card mark membar should not be generated + // before the card mark strb from the StoreCM and the + // storestore barrier from the StoreCM should be elided + matches = new String[] { + "membar_release \\(elided\\)", + useCompressedOops ? "cmpxchgw?_acq" : "cmpxchg_acq", + "storestore", + "dmb ishst", + "strb", + "membar_acquire \\(elided\\)", + "ret" + }; + break; + } + } else { + switch (testType) { + default: + // this is the basic sequence of instructions + matches = new String[] { + "membar_release", + "dmb ish", + useCompressedOops ? "cmpxchgw? " : "cmpxchg ", + "membar_acquire", + "dmb ish", + "ret" + }; + break; + case "G1": + // a card mark volatile barrier should be generated + // before the card mark strb + matches = new String[] { + "membar_release", + "dmb ish", + useCompressedOops ? "cmpxchgw? " : "cmpxchg ", + "membar_volatile", + "dmb ish", + "strb", + "membar_acquire", + "dmb ish", + "ret" + }; + break; + case "CMSCondMark": + // a card mark volatile barrier should be generated + // before the card mark strb from the StoreCM and the + // storestore barrier from the StoreCM should be elided + matches = new String[] { + "membar_release", + "dmb ish", + useCompressedOops ? "cmpxchgw? " : "cmpxchg ", + "membar_volatile", + "dmb ish", + "storestore \\(elided\\)", "strb", "membar_acquire", "dmb ish", @@ -528,7 +755,7 @@ matches = new String[] { "membar_release", "dmb ish", - "cmpxchgw", + useCompressedOops ? "cmpxchgw? " : "cmpxchg ", "storestore", "dmb ishst", "strb", @@ -540,12 +767,210 @@ } } - checkCompile(iter, "testObj", matches, output); + checkCompile(iter, "testObj", matches, output, true); + } + + private void checkgas(OutputAnalyzer output, String testType, boolean useBarriersForVolatile, boolean useCompressedOops) throws Throwable + { + Iterator iter = output.asLines().listIterator(); + + String[] matches; + String[][] tests = { + { "testInt", "atomic_xchgw" }, + { "testLong", "atomic_xchg" }, + }; + + for (String[] test : tests) { + // non object stores are straightforward + if (!useBarriersForVolatile) { + // this is the sequence of instructions for all cases + matches = new String[] { + "membar_release \\(elided\\)", + test[1] + "_acq", + "membar_acquire \\(elided\\)", + "ret" + }; + } else { + // this is the alternative sequence of instructions + matches = new String[] { + "membar_release", + "dmb ish", + test[1] + " ", + "membar_acquire", + "dmb ish", + "ret" + }; + } + + checkCompile(iter, test[0], matches, output, true); + } + + // object stores will be as above except for when the GC + // introduces barriers for card marking + + if (!useBarriersForVolatile) { + switch (testType) { + default: + // this is the basic sequence of instructions + matches = new String[] { + "membar_release \\(elided\\)", + useCompressedOops ? "atomic_xchgw?_acq" : "atomic_xchg_acq", + "strb", + "membar_acquire \\(elided\\)", + "ret" + }; + break; + case "G1": + // a card mark volatile barrier should be generated + // before the card mark strb + matches = new String[] { + "membar_release \\(elided\\)", + useCompressedOops ? "atomic_xchgw?_acq" : "atomic_xchg_acq", + "membar_volatile", + "dmb ish", + "strb", + "membar_acquire \\(elided\\)", + "ret" + }; + break; + case "CMSCondMark": + // a card mark volatile barrier should be generated + // before the card mark strb from the StoreCM and the + // storestore barrier from the StoreCM should be elided + matches = new String[] { + "membar_release \\(elided\\)", + useCompressedOops ? "atomic_xchgw?_acq" : "atomic_xchg_acq", + "membar_volatile", + "dmb ish", + "storestore \\(elided\\)", + "strb", + "membar_acquire \\(elided\\)", + "ret" + }; + break; + case "CMS": + // a volatile card mark membar should not be generated + // before the card mark strb from the StoreCM and the + // storestore barrier from the StoreCM should be elided + matches = new String[] { + "membar_release \\(elided\\)", + useCompressedOops ? "atomic_xchgw?_acq" : "atomic_xchg_acq", + "storestore", + "dmb ishst", + "strb", + "membar_acquire \\(elided\\)", + "ret" + }; + break; + } + } else { + switch (testType) { + default: + // this is the basic sequence of instructions + matches = new String[] { + "membar_release", + "dmb ish", + useCompressedOops ? "atomic_xchgw? " : "atomic_xchg ", + "membar_acquire", + "dmb ish", + "ret" + }; + break; + case "G1": + // a card mark volatile barrier should be generated + // before the card mark strb + matches = new String[] { + "membar_release", + "dmb ish", + useCompressedOops ? "atomic_xchgw? " : "atomic_xchg ", + "membar_volatile", + "dmb ish", + "strb", + "membar_acquire", + "dmb ish", + "ret" + }; + break; + case "CMSCondMark": + // a card mark volatile barrier should be generated + // before the card mark strb from the StoreCM and the + // storestore barrier from the StoreCM should be elided + matches = new String[] { + "membar_release", + "dmb ish", + useCompressedOops ? "atomic_xchgw? " : "atomic_xchg ", + "membar_volatile", + "dmb ish", + "storestore \\(elided\\)", + "strb", + "membar_acquire", + "dmb ish", + "ret" + }; + break; + case "CMS": + // a volatile card mark membar should not be generated + // before the card mark strb from the StoreCM and the + // storestore barrier from the StoreCM should be generated + // as "dmb ishst" + matches = new String[] { + "membar_release", + "dmb ish", + useCompressedOops ? "atomic_xchgw? " : "atomic_xchg ", + "storestore", + "dmb ishst", + "strb", + "membar_acquire", + "dmb ish", + "ret" + }; + break; + } + } + + checkCompile(iter, "testObj", matches, output, true); + } + + private void checkgaa(OutputAnalyzer output, String testType, boolean useBarriersForVolatile) throws Throwable + { + Iterator iter = output.asLines().listIterator(); + + String[] matches; + String[][] tests = { + { "testInt", "get_and_addI" }, + { "testLong", "get_and_addL" }, + }; + + for (String[] test : tests) { + // non object stores are straightforward + if (!useBarriersForVolatile) { + // this is the sequence of instructions for all cases + matches = new String[] { + "membar_release \\(elided\\)", + test[1] + "_acq", + "membar_acquire \\(elided\\)", + "ret" + }; + } else { + // this is the alternative sequence of instructions + matches = new String[] { + "membar_release", + "dmb ish", + test[1] + " ", + "membar_acquire", + "dmb ish", + "ret" + }; + } + + checkCompile(iter, test[0], matches, output, true); + } + } // perform a check appropriate to the classname - private void checkoutput(OutputAnalyzer output, String classname, String testType, boolean useBarriersForVolatile) throws Throwable + private void checkoutput(OutputAnalyzer output, String classname, String testType, boolean useBarriersForVolatile, boolean useCompressedOops) throws Throwable { // trace call to allow eyeball check of what is being checked System.out.println("checkoutput(" + @@ -556,19 +981,29 @@ switch (classname) { case "TestVolatileLoad": - checkload(output, testType, useBarriersForVolatile); + checkload(output, testType, useBarriersForVolatile, useCompressedOops); break; case "TestVolatileStore": - checkstore(output, testType, useBarriersForVolatile); + checkstore(output, testType, useBarriersForVolatile, useCompressedOops); break; case "TestUnsafeVolatileLoad": - checkload(output, testType, useBarriersForVolatile); + checkload(output, testType, useBarriersForVolatile, useCompressedOops); break; case "TestUnsafeVolatileStore": - checkstore(output, testType, useBarriersForVolatile); + checkstore(output, testType, useBarriersForVolatile, useCompressedOops); break; case "TestUnsafeVolatileCAS": - checkcas(output, testType, useBarriersForVolatile); + case "TestUnsafeVolatileWeakCAS": + checkcas(output, testType, useBarriersForVolatile, useCompressedOops); + break; + case "TestUnsafeVolatileCAE": + checkcae(output, testType, useBarriersForVolatile, useCompressedOops); + break; + case "TestUnsafeVolatileGAS": + checkgas(output, testType, useBarriersForVolatile, useCompressedOops); + break; + case "TestUnsafeVolatileGAA": + checkgaa(output, testType, useBarriersForVolatile); break; } } diff -r 9d782e357916 -r 585939d9f952 test/hotspot/jtreg/compiler/c2/aarch64/TestVolatilesCMS.java --- a/test/hotspot/jtreg/compiler/c2/aarch64/TestVolatilesCMS.java Mon Nov 05 19:00:34 2018 -0500 +++ b/test/hotspot/jtreg/compiler/c2/aarch64/TestVolatilesCMS.java Mon Nov 05 19:05:15 2018 -0500 @@ -38,6 +38,9 @@ * compiler.c2.aarch64.TestVolatileStore * compiler.c2.aarch64.TestUnsafeVolatileStore * compiler.c2.aarch64.TestUnsafeVolatileCAS + * compiler.c2.aarch64.TestUnsafeVolatileWeakCAS + * compiler.c2.aarch64.TestUnsafeVolatileCAE + * compiler.c2.aarch64.TestUnsafeVolatileGAS * * @run driver compiler.c2.aarch64.TestVolatilesCMS * TestVolatileLoad CMS @@ -53,6 +56,15 @@ * * @run driver compiler.c2.aarch64.TestVolatilesCMS * TestUnsafeVolatileCAS CMS + * + * @run driver compiler.c2.aarch64.TestVolatilesCMS + * TestUnsafeVolatileWeakCAS CMS + * + * @run driver compiler.c2.aarch64.TestVolatilesCMS + * TestUnsafeVolatileCAE CMS + * + * @run driver compiler.c2.aarch64.TestVolatilesCMS + * TestUnsafeVolatileGAS CMS */ package compiler.c2.aarch64; diff -r 9d782e357916 -r 585939d9f952 test/hotspot/jtreg/compiler/c2/aarch64/TestVolatilesCMSCondMark.java --- a/test/hotspot/jtreg/compiler/c2/aarch64/TestVolatilesCMSCondMark.java Mon Nov 05 19:00:34 2018 -0500 +++ b/test/hotspot/jtreg/compiler/c2/aarch64/TestVolatilesCMSCondMark.java Mon Nov 05 19:05:15 2018 -0500 @@ -38,6 +38,9 @@ * compiler.c2.aarch64.TestVolatileStore * compiler.c2.aarch64.TestUnsafeVolatileStore * compiler.c2.aarch64.TestUnsafeVolatileCAS + * compiler.c2.aarch64.TestUnsafeVolatileWeakCAS + * compiler.c2.aarch64.TestUnsafeVolatileCAE + * compiler.c2.aarch64.TestUnsafeVolatileGAS * * @run driver compiler.c2.aarch64.TestVolatilesCMSCondMark * TestVolatileLoad CMSCondMark @@ -53,6 +56,15 @@ * * @run driver compiler.c2.aarch64.TestVolatilesCMSCondMark * TestUnsafeVolatileCAS CMSCondMark + * + * @run driver compiler.c2.aarch64.TestVolatilesCMSCondMark + * TestUnsafeVolatileWeakCAS CMSCondMark + * + * @run driver compiler.c2.aarch64.TestVolatilesCMSCondMark + * TestUnsafeVolatileCAE CMSCondMark + * + * @run driver compiler.c2.aarch64.TestVolatilesCMSCondMark + * TestUnsafeVolatileGAS CMSCondMark */ package compiler.c2.aarch64; diff -r 9d782e357916 -r 585939d9f952 test/hotspot/jtreg/compiler/c2/aarch64/TestVolatilesG1.java --- a/test/hotspot/jtreg/compiler/c2/aarch64/TestVolatilesG1.java Mon Nov 05 19:00:34 2018 -0500 +++ b/test/hotspot/jtreg/compiler/c2/aarch64/TestVolatilesG1.java Mon Nov 05 19:05:15 2018 -0500 @@ -38,6 +38,10 @@ * compiler.c2.aarch64.TestVolatileStore * compiler.c2.aarch64.TestUnsafeVolatileStore * compiler.c2.aarch64.TestUnsafeVolatileCAS + * compiler.c2.aarch64.TestUnsafeVolatileWeakCAS + * compiler.c2.aarch64.TestUnsafeVolatileCAE + * compiler.c2.aarch64.TestUnsafeVolatileGAS + * compiler.c2.aarch64.TestUnsafeVolatileGAA * * @run driver compiler.c2.aarch64.TestVolatilesG1 * TestVolatileLoad G1 @@ -53,8 +57,21 @@ * * @run driver compiler.c2.aarch64.TestVolatilesG1 * TestUnsafeVolatileCAS G1 + * + * @run driver compiler.c2.aarch64.TestVolatilesG1 + * TestUnsafeVolatileWeakCAS G1 + * + * @run driver compiler.c2.aarch64.TestVolatilesG1 + * TestUnsafeVolatileCAE G1 + * + * @run driver compiler.c2.aarch64.TestVolatilesG1 + * TestUnsafeVolatileGAS G1 + * + * @run driver compiler.c2.aarch64.TestVolatilesG1 + * TestUnsafeVolatileGAA G1 */ + package compiler.c2.aarch64; public class TestVolatilesG1 { diff -r 9d782e357916 -r 585939d9f952 test/hotspot/jtreg/compiler/c2/aarch64/TestVolatilesParallel.java --- a/test/hotspot/jtreg/compiler/c2/aarch64/TestVolatilesParallel.java Mon Nov 05 19:00:34 2018 -0500 +++ b/test/hotspot/jtreg/compiler/c2/aarch64/TestVolatilesParallel.java Mon Nov 05 19:05:15 2018 -0500 @@ -38,6 +38,9 @@ * compiler.c2.aarch64.TestVolatileStore * compiler.c2.aarch64.TestUnsafeVolatileStore * compiler.c2.aarch64.TestUnsafeVolatileCAS + * compiler.c2.aarch64.TestUnsafeVolatileWeakCAS + * compiler.c2.aarch64.TestUnsafeVolatileCAE + * compiler.c2.aarch64.TestUnsafeVolatileGAS * * @run driver compiler.c2.aarch64.TestVolatilesParallel * TestVolatileLoad Parallel @@ -53,6 +56,15 @@ * * @run driver compiler.c2.aarch64.TestVolatilesParallel * TestUnsafeVolatileCAS Parallel + * + * @run driver compiler.c2.aarch64.TestVolatilesParallel + * TestUnsafeVolatileWeakCAS Parallel + * + * @run driver compiler.c2.aarch64.TestVolatilesParallel + * TestUnsafeVolatileCAE Parallel + * + * @run driver compiler.c2.aarch64.TestVolatilesParallel + * TestUnsafeVolatileGAS Parallel */ package compiler.c2.aarch64; diff -r 9d782e357916 -r 585939d9f952 test/hotspot/jtreg/compiler/c2/aarch64/TestVolatilesSerial.java --- a/test/hotspot/jtreg/compiler/c2/aarch64/TestVolatilesSerial.java Mon Nov 05 19:00:34 2018 -0500 +++ b/test/hotspot/jtreg/compiler/c2/aarch64/TestVolatilesSerial.java Mon Nov 05 19:05:15 2018 -0500 @@ -38,6 +38,9 @@ * compiler.c2.aarch64.TestVolatileStore * compiler.c2.aarch64.TestUnsafeVolatileStore * compiler.c2.aarch64.TestUnsafeVolatileCAS + * compiler.c2.aarch64.TestUnsafeVolatileWeakCAS + * compiler.c2.aarch64.TestUnsafeVolatileCAE + * compiler.c2.aarch64.TestUnsafeVolatileGAS * * @run driver compiler.c2.aarch64.TestVolatilesSerial * TestVolatileLoad Serial @@ -53,6 +56,15 @@ * * @run driver compiler.c2.aarch64.TestVolatilesSerial * TestUnsafeVolatileCAS Serial + * + * @run driver compiler.c2.aarch64.TestVolatilesSerial + * TestUnsafeVolatileWeakCAS Serial + * + * @run driver compiler.c2.aarch64.TestVolatilesSerial + * TestUnsafeVolatileCAE Serial + * + * @run driver compiler.c2.aarch64.TestVolatilesSerial + * TestUnsafeVolatileGAS Serial */ package compiler.c2.aarch64; diff -r 9d782e357916 -r 585939d9f952 test/hotspot/jtreg/compiler/unsafe/CASandCAEwithNegExpected.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test/hotspot/jtreg/compiler/unsafe/CASandCAEwithNegExpected.java Mon Nov 05 19:05:15 2018 -0500 @@ -0,0 +1,143 @@ +/* + * Copyright (c) 2018, 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. + */ + +/* + * @test + * @bug 8211320 + * @summary Aarch64: unsafe.compareAndSetByte() and unsafe.compareAndSetShort() c2 intrinsics broken with negative expected value + * + * @modules java.base/jdk.internal.misc + * @run main/othervm -XX:-UseOnStackReplacement -XX:-BackgroundCompilation CASandCAEwithNegExpected + */ + +import java.lang.reflect.Field; +import jdk.internal.misc.Unsafe; + +public class CASandCAEwithNegExpected { + public volatile int f_int = -1; + public volatile long f_long = -1; + public volatile byte f_byte = -1; + public volatile short f_short = -1; + + public static Unsafe unsafe = Unsafe.getUnsafe(); + public static Field f_int_field; + public static Field f_long_field; + public static Field f_byte_field; + public static Field f_short_field; + public static long f_int_off; + public static long f_long_off; + public static long f_byte_off; + public static long f_short_off; + + static { + try { + f_int_field = CASandCAEwithNegExpected.class.getField("f_int"); + f_long_field = CASandCAEwithNegExpected.class.getField("f_long"); + f_byte_field = CASandCAEwithNegExpected.class.getField("f_byte"); + f_short_field = CASandCAEwithNegExpected.class.getField("f_short"); + f_int_off = unsafe.objectFieldOffset(f_int_field); + f_long_off = unsafe.objectFieldOffset(f_long_field); + f_byte_off = unsafe.objectFieldOffset(f_byte_field); + f_short_off = unsafe.objectFieldOffset(f_short_field); + } catch (Exception e) { + System.out.println("reflection failed " + e); + e.printStackTrace(); + } + } + + static public void main(String[] args) { + CASandCAEwithNegExpected t = new CASandCAEwithNegExpected(); + for (int i = 0; i < 20_000; i++) { + t.test(); + } + } + + // check proper handling of sign extension of expected value in comparison + void test() { + f_int = -1; + f_long = -1; + f_byte = -1; + f_short = -1; + + unsafe.compareAndSetInt(this, f_int_off, -1, 42); + if (f_int != 42) { + throw new RuntimeException("CAS failed"); + } + unsafe.compareAndSetLong(this, f_long_off, -1, 42); + if (f_long != 42) { + throw new RuntimeException("CAS failed"); + } + unsafe.compareAndSetByte(this, f_byte_off, (byte)-1, (byte)42); + if (f_byte != 42) { + throw new RuntimeException("CAS failed"); + } + unsafe.compareAndSetShort(this, f_short_off, (short)-1, (short)42); + if (f_short != 42) { + throw new RuntimeException("CAS failed"); + } + + f_int = -1; + f_long = -1; + f_byte = -1; + f_short = -1; + + unsafe.compareAndExchangeInt(this, f_int_off, -1, 42); + if (f_int != 42) { + throw new RuntimeException("CAE failed"); + } + unsafe.compareAndExchangeLong(this, f_long_off, -1, 42); + if (f_long != 42) { + throw new RuntimeException("CAE failed"); + } + unsafe.compareAndExchangeByte(this, f_byte_off, (byte)-1, (byte)42); + if (f_byte != 42) { + throw new RuntimeException("CAE failed"); + } + unsafe.compareAndExchangeShort(this, f_short_off, (short)-1, (short)42); + if (f_short != 42) { + throw new RuntimeException("CAE failed"); + } + + f_int = -1; + f_long = -1; + f_byte = -1; + f_short = -1; + + if (unsafe.weakCompareAndSetInt(this, f_int_off, -1, 42) && f_int != 42) { + throw new RuntimeException("CAS failed"); + } + + if (unsafe.weakCompareAndSetLong(this, f_long_off, -1, 42) && f_long != 42) { + throw new RuntimeException("CAS failed"); + } + + if (unsafe.weakCompareAndSetByte(this, f_byte_off, (byte)-1, (byte)42) && f_byte != 42) { + throw new RuntimeException("CAS failed"); + } + + if (unsafe.weakCompareAndSetShort(this, f_short_off, (short)-1, (short)42) && f_short != 42) { + throw new RuntimeException("CAS failed"); + } + } + +} diff -r 9d782e357916 -r 585939d9f952 test/hotspot/jtreg/runtime/CommandLine/VMOptionWarning.java --- a/test/hotspot/jtreg/runtime/CommandLine/VMOptionWarning.java Mon Nov 05 19:00:34 2018 -0500 +++ b/test/hotspot/jtreg/runtime/CommandLine/VMOptionWarning.java Mon Nov 05 19:05:15 2018 -0500 @@ -53,8 +53,8 @@ output = new OutputAnalyzer(pb.start()); output.shouldContain("Error: VM option 'VerifyStack' is develop and is available only in debug version of VM."); - pb = ProcessTools.createJavaProcessBuilder("-XX:+ExecuteInternalVMTests", "-version"); + pb = ProcessTools.createJavaProcessBuilder("-XX:+CheckCompressedOops", "-version"); output = new OutputAnalyzer(pb.start()); - output.shouldContain("Error: VM option 'ExecuteInternalVMTests' is notproduct and is available only in debug version of VM."); + output.shouldContain("Error: VM option 'CheckCompressedOops' is notproduct and is available only in debug version of VM."); } } diff -r 9d782e357916 -r 585939d9f952 test/hotspot/jtreg/runtime/appcds/CDSandJFR.java --- a/test/hotspot/jtreg/runtime/appcds/CDSandJFR.java Mon Nov 05 19:00:34 2018 -0500 +++ b/test/hotspot/jtreg/runtime/appcds/CDSandJFR.java Mon Nov 05 19:05:15 2018 -0500 @@ -30,7 +30,7 @@ * @modules jdk.jfr * @build Hello GetFlightRecorder * @run driver ClassFileInstaller -jar CDSandJFR.jar Hello GetFlightRecorder GetFlightRecorder$TestEvent GetFlightRecorder$SimpleEvent - * @run driver CDSandJFR + * @run driver/timeout=500 CDSandJFR */ import jdk.test.lib.BuildHelper; diff -r 9d782e357916 -r 585939d9f952 test/hotspot/jtreg/runtime/appcds/sharedStrings/ExerciseGC.java --- a/test/hotspot/jtreg/runtime/appcds/sharedStrings/ExerciseGC.java Mon Nov 05 19:00:34 2018 -0500 +++ b/test/hotspot/jtreg/runtime/appcds/sharedStrings/ExerciseGC.java Mon Nov 05 19:05:15 2018 -0500 @@ -27,17 +27,16 @@ * @summary Exercise GC with shared strings * @requires vm.cds.archived.java.heap * @library /test/hotspot/jtreg/runtime/appcds /test/lib - * @modules java.base/jdk.internal.misc - * @modules java.management - * jdk.jartool/sun.tools.jar + * @modules jdk.jartool/sun.tools.jar * @build HelloStringGC sun.hotspot.WhiteBox * @run driver ClassFileInstaller sun.hotspot.WhiteBox * @run driver ExerciseGC - * @run main/othervm -XX:+UseStringDeduplication ExerciseGC - * @run main/othervm -XX:-CompactStrings ExerciseGC */ public class ExerciseGC { public static void main(String[] args) throws Exception { + SharedStringsUtils.run(args, ExerciseGC::test); + } + public static void test(String[] args) throws Exception { SharedStringsUtils.buildJarAndWhiteBox("HelloStringGC"); SharedStringsUtils.dumpWithWhiteBox(TestCommon.list("HelloStringGC"), diff -r 9d782e357916 -r 585939d9f952 test/hotspot/jtreg/runtime/appcds/sharedStrings/IncompatibleOptions.java --- a/test/hotspot/jtreg/runtime/appcds/sharedStrings/IncompatibleOptions.java Mon Nov 05 19:00:34 2018 -0500 +++ b/test/hotspot/jtreg/runtime/appcds/sharedStrings/IncompatibleOptions.java Mon Nov 05 19:05:15 2018 -0500 @@ -22,6 +22,11 @@ * */ +// NOTE: the test takes a long time for each VM option combination, so we split +// it into 3 @test parts, so that they can be executed in parallel. If you make a +// change, please ensure all @test blocks are in sync. + + /* * @test * @summary Test options that are incompatible with use of shared strings @@ -36,9 +41,35 @@ * @build sun.hotspot.WhiteBox * @run driver ClassFileInstaller sun.hotspot.WhiteBox sun.hotspot.WhiteBox$WhiteBoxPermission * @build HelloString - * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. IncompatibleOptions + * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. IncompatibleOptions 0 */ + +/* + * @test + * @requires vm.cds.archived.java.heap + * @requires (vm.gc=="null") + * @library /test/lib /test/hotspot/jtreg/runtime/appcds + * @modules jdk.jartool/sun.tools.jar + * @build sun.hotspot.WhiteBox + * @run driver ClassFileInstaller sun.hotspot.WhiteBox sun.hotspot.WhiteBox$WhiteBoxPermission + * @build HelloString + * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. IncompatibleOptions 1 + */ + +/* + * @test + * @requires vm.cds.archived.java.heap + * @requires (vm.gc=="null") + * @library /test/lib /test/hotspot/jtreg/runtime/appcds + * @modules jdk.jartool/sun.tools.jar + * @build sun.hotspot.WhiteBox + * @run driver ClassFileInstaller sun.hotspot.WhiteBox sun.hotspot.WhiteBox$WhiteBoxPermission + * @build HelloString + * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. IncompatibleOptions 2 + */ + + import jdk.test.lib.Asserts; import jdk.test.lib.Platform; import jdk.test.lib.process.OutputAnalyzer; @@ -59,10 +90,17 @@ "The shared archive file's CompactStrings setting .* does not equal the current CompactStrings setting"; static String appJar; - static String[] globalVmOptions; + static String[] vmOptionsPrefix = {}; public static void main(String[] args) throws Exception { - globalVmOptions = args; // specified by "@run main" in IncompatibleOptions_*.java + String[] noargs = {}; + SharedStringsUtils.run(Integer.parseInt(args[0]), 3, noargs, IncompatibleOptions::test); + // Add a new @test block if you get an assert ----^ about this number. See + // SharedStringsUtils.java for details. + } + + public static void test(String[] args_ignored) throws Exception { + vmOptionsPrefix = SharedStringsUtils.getChildVMOptionsPrefix(); appJar = JarBuilder.build("IncompatibleOptions", "HelloString"); // Uncompressed OOPs @@ -118,7 +156,7 @@ System.out.println("Testcase: " + testCaseNr); OutputAnalyzer output = TestCommon.dump(appJar, TestCommon.list("Hello"), - TestCommon.concat(globalVmOptions, + TestCommon.concat(vmOptionsPrefix, "-XX:+UseCompressedOops", collectorOption, "-XX:SharedArchiveConfigFile=" + TestCommon.getSourceFile("SharedStringsBasic.txt"), @@ -145,12 +183,12 @@ // main class param, and fails with "Could not find or load main class" if (!extraOption.isEmpty()) { output = TestCommon.exec(appJar, - TestCommon.concat(globalVmOptions, + TestCommon.concat(vmOptionsPrefix, "-XX:+UseCompressedOops", collectorOption, "-Xlog:cds", extraOption, "HelloString")); } else { output = TestCommon.exec(appJar, - TestCommon.concat(globalVmOptions, + TestCommon.concat(vmOptionsPrefix, "-XX:+UseCompressedOops", collectorOption, "-Xlog:cds", "HelloString")); } diff -r 9d782e357916 -r 585939d9f952 test/hotspot/jtreg/runtime/appcds/sharedStrings/IncompatibleOptions_noCompactStrings.java --- a/test/hotspot/jtreg/runtime/appcds/sharedStrings/IncompatibleOptions_noCompactStrings.java Mon Nov 05 19:00:34 2018 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,40 +0,0 @@ -/* - * Copyright (c) 2018, 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 - * @summary Test options that are incompatible with use of shared strings - * Also test mismatch in oops encoding between dump time and run time - * @requires vm.cds.archived.java.heap - * @comment This test explicitly chooses the type of GC to be used by sub-processes. It may conflict with the GC type set - * via the -vmoptions command line option of JTREG. vm.gc==null will help the test case to discard the explicitly passed - * vm options. - * @requires (vm.gc=="null") - * @library /test/lib /test/hotspot/jtreg/runtime/appcds - * @modules jdk.jartool/sun.tools.jar - * @build sun.hotspot.WhiteBox - * @run driver ClassFileInstaller sun.hotspot.WhiteBox sun.hotspot.WhiteBox$WhiteBoxPermission - * @build HelloString - * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. IncompatibleOptions -XX:-CompactStrings - */ diff -r 9d782e357916 -r 585939d9f952 test/hotspot/jtreg/runtime/appcds/sharedStrings/IncompatibleOptions_stringDedup.java --- a/test/hotspot/jtreg/runtime/appcds/sharedStrings/IncompatibleOptions_stringDedup.java Mon Nov 05 19:00:34 2018 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,40 +0,0 @@ -/* - * Copyright (c) 2018, 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 - * @summary Test options that are incompatible with use of shared strings - * Also test mismatch in oops encoding between dump time and run time - * @requires vm.cds.archived.java.heap - * @comment This test explicitly chooses the type of GC to be used by sub-processes. It may conflict with the GC type set - * via the -vmoptions command line option of JTREG. vm.gc==null will help the test case to discard the explicitly passed - * vm options. - * @requires (vm.gc=="null") - * @library /test/lib /test/hotspot/jtreg/runtime/appcds - * @modules jdk.jartool/sun.tools.jar - * @build sun.hotspot.WhiteBox - * @run driver ClassFileInstaller sun.hotspot.WhiteBox sun.hotspot.WhiteBox$WhiteBoxPermission - * @build HelloString - * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. IncompatibleOptions -XX:+UseStringDeduplication - */ diff -r 9d782e357916 -r 585939d9f952 test/hotspot/jtreg/runtime/appcds/sharedStrings/InternSharedString.java --- a/test/hotspot/jtreg/runtime/appcds/sharedStrings/InternSharedString.java Mon Nov 05 19:00:34 2018 -0500 +++ b/test/hotspot/jtreg/runtime/appcds/sharedStrings/InternSharedString.java Mon Nov 05 19:05:15 2018 -0500 @@ -27,19 +27,19 @@ * @summary Test shared strings together with string intern operation * @requires vm.cds.archived.java.heap * @library /test/hotspot/jtreg/runtime/appcds /test/lib - * @modules java.base/jdk.internal.misc - * @modules java.management - * jdk.jartool/sun.tools.jar + * @modules jdk.jartool/sun.tools.jar * @compile InternStringTest.java * @build sun.hotspot.WhiteBox * @run driver ClassFileInstaller sun.hotspot.WhiteBox * @run driver InternSharedString - * @run main/othervm -XX:+UseStringDeduplication InternSharedString - * @run main/othervm -XX:-CompactStrings InternSharedString */ public class InternSharedString { public static void main(String[] args) throws Exception { + SharedStringsUtils.run(args, InternSharedString::test); + } + + public static void test(String[] args) throws Exception { SharedStringsUtils.buildJarAndWhiteBox("InternStringTest"); SharedStringsUtils.dumpWithWhiteBox(TestCommon.list("InternStringTest"), diff -r 9d782e357916 -r 585939d9f952 test/hotspot/jtreg/runtime/appcds/sharedStrings/InvalidFileFormat.java --- a/test/hotspot/jtreg/runtime/appcds/sharedStrings/InvalidFileFormat.java Mon Nov 05 19:00:34 2018 -0500 +++ b/test/hotspot/jtreg/runtime/appcds/sharedStrings/InvalidFileFormat.java Mon Nov 05 19:05:15 2018 -0500 @@ -27,13 +27,9 @@ * @summary Check most common errors in file format * @requires vm.cds.archived.java.heap * @library /test/lib /test/hotspot/jtreg/runtime/appcds - * @modules java.base/jdk.internal.misc - * @modules java.management - * jdk.jartool/sun.tools.jar + * @modules jdk.jartool/sun.tools.jar * @build HelloString * @run driver InvalidFileFormat - * @run main/othervm -XX:+UseStringDeduplication InvalidFileFormat - * @run main/othervm -XX:-CompactStrings InvalidFileFormat */ import java.io.File; @@ -46,6 +42,10 @@ // the previledge person in the server environment. public class InvalidFileFormat { public static void main(String[] args) throws Exception { + SharedStringsUtils.run(args, InvalidFileFormat::test); + } + + public static void test(String[] args) throws Exception { SharedStringsUtils.buildJar("HelloString"); test("NonExistentFile.txt", "Unable to get hashtable dump file size"); diff -r 9d782e357916 -r 585939d9f952 test/hotspot/jtreg/runtime/appcds/sharedStrings/LargePages.java --- a/test/hotspot/jtreg/runtime/appcds/sharedStrings/LargePages.java Mon Nov 05 19:00:34 2018 -0500 +++ b/test/hotspot/jtreg/runtime/appcds/sharedStrings/LargePages.java Mon Nov 05 19:05:15 2018 -0500 @@ -27,17 +27,18 @@ * @summary Basic shared string test with large pages * @requires vm.cds.archived.java.heap * @library /test/lib /test/hotspot/jtreg/runtime/appcds - * @modules java.base/jdk.internal.misc - * @modules java.management - * jdk.jartool/sun.tools.jar + * @modules jdk.jartool/sun.tools.jar * @build HelloString * @run driver LargePages - * @run main/othervm -XX:+UseStringDeduplication LargePages - * @run main/othervm -XX:-CompactStrings LargePages */ public class LargePages { static final String CDS_LOGGING = "-Xlog:cds,cds+hashtables"; + public static void main(String[] args) throws Exception { + SharedStringsUtils.run(args, LargePages::test); + } + + public static void test(String[] args) throws Exception { SharedStringsUtils.buildJar("HelloString"); SharedStringsUtils.dump(TestCommon.list("HelloString"), diff -r 9d782e357916 -r 585939d9f952 test/hotspot/jtreg/runtime/appcds/sharedStrings/LockSharedStrings.java --- a/test/hotspot/jtreg/runtime/appcds/sharedStrings/LockSharedStrings.java Mon Nov 05 19:00:34 2018 -0500 +++ b/test/hotspot/jtreg/runtime/appcds/sharedStrings/LockSharedStrings.java Mon Nov 05 19:05:15 2018 -0500 @@ -27,19 +27,19 @@ * @summary Test locking on shared strings * @requires vm.cds.archived.java.heap * @library /test/hotspot/jtreg/runtime/appcds /test/lib - * @modules java.base/jdk.internal.misc - * @modules java.management - * jdk.jartool/sun.tools.jar + * @modules jdk.jartool/sun.tools.jar * @compile LockStringTest.java LockStringValueTest.java * @build sun.hotspot.WhiteBox * @run driver ClassFileInstaller sun.hotspot.WhiteBox * @run driver LockSharedStrings - * @run main/othervm -XX:+UseStringDeduplication LockSharedStrings - * @run main/othervm -XX:-CompactStrings LockSharedStrings */ public class LockSharedStrings { public static void main(String[] args) throws Exception { + SharedStringsUtils.run(args, LockSharedStrings::test); + } + + public static void test(String[] args) throws Exception { SharedStringsUtils.buildJarAndWhiteBox("LockStringTest", "LockStringValueTest"); SharedStringsUtils.dumpWithWhiteBox( diff -r 9d782e357916 -r 585939d9f952 test/hotspot/jtreg/runtime/appcds/sharedStrings/SharedStringsBasic.java --- a/test/hotspot/jtreg/runtime/appcds/sharedStrings/SharedStringsBasic.java Mon Nov 05 19:00:34 2018 -0500 +++ b/test/hotspot/jtreg/runtime/appcds/sharedStrings/SharedStringsBasic.java Mon Nov 05 19:05:15 2018 -0500 @@ -27,44 +27,49 @@ * @summary Basic test for shared strings * @requires vm.cds.archived.java.heap * @library /test/hotspot/jtreg/runtime/appcds /test/lib - * @modules java.base/jdk.internal.misc - * @modules java.management - * jdk.jartool/sun.tools.jar + * @modules jdk.jartool/sun.tools.jar * @build HelloString * @run driver SharedStringsBasic - * @run main/othervm -XX:+UseStringDeduplication SharedStringsBasic - * @run main/othervm -XX:-CompactStrings SharedStringsBasic */ import jdk.test.lib.process.OutputAnalyzer; import jdk.test.lib.process.ProcessTools; -// This test does not use SharedStringsUtils intentionally: +// This test does not use SharedStringsUtils.dumpXXX() +// and SharedStringsUtils.runWithXXX() intentionally: // - in order to demonstrate the basic use of the functionality // - to provide sanity check and catch potential problems in the utils public class SharedStringsBasic { public static void main(String[] args) throws Exception { + SharedStringsUtils.run(args, SharedStringsBasic::test); + } + + public static void test(String[] args) throws Exception { + String vmOptionsPrefix[] = SharedStringsUtils.getChildVMOptionsPrefix(); + String appJar = JarBuilder.build("SharedStringsBasic", "HelloString"); String sharedArchiveConfigFile = TestCommon.getSourceFile("SharedStringsBasic.txt").toString(); ProcessBuilder dumpPb = ProcessTools.createJavaProcessBuilder(true, + TestCommon.concat(vmOptionsPrefix, "-cp", appJar, "-XX:SharedArchiveConfigFile=" + sharedArchiveConfigFile, "-XX:SharedArchiveFile=./SharedStringsBasic.jsa", "-Xshare:dump", - "-Xlog:cds,cds+hashtables"); + "-Xlog:cds,cds+hashtables")); TestCommon.executeAndLog(dumpPb, "dump") .shouldContain("Shared string table stats") .shouldHaveExitValue(0); ProcessBuilder runPb = ProcessTools.createJavaProcessBuilder(true, + TestCommon.concat(vmOptionsPrefix, "-cp", appJar, "-XX:SharedArchiveFile=./SharedStringsBasic.jsa", "-Xshare:auto", "-showversion", - "HelloString"); + "HelloString")); TestCommon.executeAndLog(runPb, "run").shouldHaveExitValue(0); } diff -r 9d782e357916 -r 585939d9f952 test/hotspot/jtreg/runtime/appcds/sharedStrings/SharedStringsBasicPlus.java --- a/test/hotspot/jtreg/runtime/appcds/sharedStrings/SharedStringsBasicPlus.java Mon Nov 05 19:00:34 2018 -0500 +++ b/test/hotspot/jtreg/runtime/appcds/sharedStrings/SharedStringsBasicPlus.java Mon Nov 05 19:05:15 2018 -0500 @@ -27,18 +27,18 @@ * @summary Basic plus test for shared strings * @requires vm.cds.archived.java.heap * @library /test/hotspot/jtreg/runtime/appcds /test/lib - * @modules java.base/jdk.internal.misc - * @modules java.management - * jdk.jartool/sun.tools.jar + * @modules jdk.jartool/sun.tools.jar * @build HelloStringPlus sun.hotspot.WhiteBox * @run driver ClassFileInstaller sun.hotspot.WhiteBox * @run driver SharedStringsBasicPlus - * @run main/othervm -XX:+UseStringDeduplication SharedStringsBasicPlus - * @run main/othervm -XX:-CompactStrings SharedStringsBasicPlus */ public class SharedStringsBasicPlus { public static void main(String[] args) throws Exception { + SharedStringsUtils.run(args, SharedStringsBasicPlus::test); + } + + public static void test(String[] args) throws Exception { SharedStringsUtils.buildJarAndWhiteBox("HelloStringPlus"); SharedStringsUtils.dumpWithWhiteBox( TestCommon.list("HelloStringPlus"), diff -r 9d782e357916 -r 585939d9f952 test/hotspot/jtreg/runtime/appcds/sharedStrings/SharedStringsStress.java --- a/test/hotspot/jtreg/runtime/appcds/sharedStrings/SharedStringsStress.java Mon Nov 05 19:00:34 2018 -0500 +++ b/test/hotspot/jtreg/runtime/appcds/sharedStrings/SharedStringsStress.java Mon Nov 05 19:05:15 2018 -0500 @@ -30,8 +30,6 @@ * @modules jdk.jartool/sun.tools.jar * @build HelloString * @run driver SharedStringsStress - * @run main/othervm -XX:+UseStringDeduplication SharedStringsStress - * @run main/othervm -XX:-CompactStrings SharedStringsStress */ import java.io.File; import java.io.FileOutputStream; @@ -42,6 +40,12 @@ public class SharedStringsStress { public static void main(String[] args) throws Exception { + SharedStringsUtils.run(args, SharedStringsStress::test); + } + + public static void test(String[] args) throws Exception { + String vmOptionsPrefix[] = SharedStringsUtils.getChildVMOptionsPrefix(); + String appJar = JarBuilder.build("SharedStringsStress", "HelloString"); String sharedArchiveConfigFile = System.getProperty("user.dir") + File.separator + "SharedStringsStress_gen.txt"; @@ -58,9 +62,11 @@ } OutputAnalyzer dumpOutput = TestCommon.dump(appJar, TestCommon.list("HelloString"), - "-XX:SharedArchiveConfigFile=" + sharedArchiveConfigFile); + TestCommon.concat(vmOptionsPrefix, + "-XX:SharedArchiveConfigFile=" + sharedArchiveConfigFile)); TestCommon.checkDump(dumpOutput); - OutputAnalyzer execOutput = TestCommon.exec(appJar, "HelloString"); + OutputAnalyzer execOutput = TestCommon.exec(appJar, + TestCommon.concat(vmOptionsPrefix, "HelloString")); TestCommon.checkExec(execOutput); } } diff -r 9d782e357916 -r 585939d9f952 test/hotspot/jtreg/runtime/appcds/sharedStrings/SharedStringsUtils.java --- a/test/hotspot/jtreg/runtime/appcds/sharedStrings/SharedStringsUtils.java Mon Nov 05 19:00:34 2018 -0500 +++ b/test/hotspot/jtreg/runtime/appcds/sharedStrings/SharedStringsUtils.java Mon Nov 05 19:05:15 2018 -0500 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2018, 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 @@ import jdk.test.lib.cds.CDSOptions; import jdk.test.lib.process.OutputAnalyzer; +import jdk.test.lib.Asserts; // A helper/utility class for testing shared strings public class SharedStringsUtils { @@ -31,6 +32,49 @@ public static final String TEST_JAR_NAME_FULL = "test.jar"; public static final String WHITEBOX_JAR_NAME = "whitebox"; + public static interface Test { + public void dotest(String args[]) throws Exception ; + } + + private static String[][] vmOptionCombos = { + {}, + {"-XX:+UseStringDeduplication"}, + {"-XX:-CompactStrings"} + }; + + private static String childVMOptionsPrefix[] = {}; + + // SharedStringsUtils.run() is for running the main test body multiple times, each with a different + // set of extra VM options that are passed to the child processes. + // + // See ./ExerciseGC.java for an example. + public static void run(String args[], Test t) throws Exception { + int numSetOfChildVMOptions = vmOptionCombos.length; + for (int i=0; i< numSetOfChildVMOptions; i++) { + run(i, numSetOfChildVMOptions, args, t); + } + } + + public static void run(int i, int numSetOfChildVMOptions, String args[], Test t) throws Exception { + // When you add a new set of options to vmOptionCombos, we make sure all + // callers of this method (i.e., IncompatibleOptions.java) knows about it and will + // add new @test blocks accordingly. + Asserts.assertEQ(numSetOfChildVMOptions, vmOptionCombos.length); + String opts[] = vmOptionCombos[i]; + + System.out.print("Running with extra VM option prefix for child processes [" + opts.length + "] ="); + for (String o : opts) { + System.out.print(" " + o); + } + System.out.println(); + childVMOptionsPrefix = opts; + t.dotest(args); + } + + public static String[] getChildVMOptionsPrefix() { + return childVMOptionsPrefix; + } + public static String getWbParam() { return "-Xbootclasspath/a:" + TestCommon.getTestJar(WHITEBOX_JAR_NAME + ".jar"); } @@ -55,6 +99,7 @@ TestCommon.concat(extraOptions, "-XX:+UseCompressedOops", "-XX:+UseG1GC", "-XX:SharedArchiveConfigFile=" + TestCommon.getSourceFile(sharedDataFile)); + args = TestCommon.concat(childVMOptionsPrefix, args); return TestCommon.dump(appJar, appClasses, args); } @@ -80,6 +125,7 @@ String appJar = TestCommon.getTestJar(TEST_JAR_NAME_FULL); String[] args = TestCommon.concat(extraOptions, "-cp", appJar, "-XX:+UseCompressedOops", "-XX:+UseG1GC", className); + args = TestCommon.concat(childVMOptionsPrefix, args); OutputAnalyzer output = TestCommon.execAuto(args); checkExecAuto(output); @@ -98,6 +144,7 @@ String appJar = TestCommon.getTestJar(TEST_JAR_NAME_FULL); String[] args = TestCommon.concat(extraOptions, "-XX:+UseCompressedOops", "-XX:+UseG1GC", className); + args = TestCommon.concat(childVMOptionsPrefix, args); OutputAnalyzer output = TestCommon.exec(appJar, args); checkExec(output, extraMatches); diff -r 9d782e357916 -r 585939d9f952 test/hotspot/jtreg/runtime/appcds/sharedStrings/SharedStringsWbTest.java --- a/test/hotspot/jtreg/runtime/appcds/sharedStrings/SharedStringsWbTest.java Mon Nov 05 19:00:34 2018 -0500 +++ b/test/hotspot/jtreg/runtime/appcds/sharedStrings/SharedStringsWbTest.java Mon Nov 05 19:05:15 2018 -0500 @@ -27,14 +27,10 @@ * @summary White box test for shared strings * @requires vm.cds.archived.java.heap * @library /test/lib /test/hotspot/jtreg/runtime/appcds - * @modules java.base/jdk.internal.misc - * @modules java.management - * jdk.jartool/sun.tools.jar + * @modules jdk.jartool/sun.tools.jar * @build sun.hotspot.WhiteBox SharedStringsWb * @run driver ClassFileInstaller sun.hotspot.WhiteBox * @run driver SharedStringsWbTest - * @run main/othervm -XX:+UseStringDeduplication SharedStringsWbTest - * @run main/othervm -XX:-CompactStrings SharedStringsWbTest */ import java.io.*; @@ -42,6 +38,10 @@ public class SharedStringsWbTest { public static void main(String[] args) throws Exception { + SharedStringsUtils.run(args, SharedStringsWbTest::test); + } + + public static void test(String[] args) throws Exception { SharedStringsUtils.buildJarAndWhiteBox("SharedStringsWb"); SharedStringsUtils.dumpWithWhiteBox(TestCommon.list("SharedStringsWb"), diff -r 9d782e357916 -r 585939d9f952 test/hotspot/jtreg/runtime/appcds/sharedStrings/SysDictCrash.java --- a/test/hotspot/jtreg/runtime/appcds/sharedStrings/SysDictCrash.java Mon Nov 05 19:00:34 2018 -0500 +++ b/test/hotspot/jtreg/runtime/appcds/sharedStrings/SysDictCrash.java Mon Nov 05 19:05:15 2018 -0500 @@ -27,12 +27,9 @@ * @summary Regression test for JDK-8098821 * @bug 8098821 * @requires vm.cds.archived.java.heap + * @modules jdk.jartool/sun.tools.jar * @library /test/lib /test/hotspot/jtreg/runtime/appcds - * @modules java.base/jdk.internal.misc - * @modules java.management * @run driver SysDictCrash - * @run main/othervm -XX:+UseStringDeduplication SysDictCrash - * @run main/othervm -XX:-CompactStrings SysDictCrash */ import jdk.test.lib.process.OutputAnalyzer; @@ -40,22 +37,30 @@ public class SysDictCrash { public static void main(String[] args) throws Exception { + SharedStringsUtils.run(args, SysDictCrash::test); + } + + public static void test(String[] args) throws Exception { + String vmOptionsPrefix[] = SharedStringsUtils.getChildVMOptionsPrefix(); + // SharedBaseAddress=0 puts the archive at a very high address on solaris, // which provokes the crash. ProcessBuilder dumpPb = ProcessTools.createJavaProcessBuilder(true, + TestCommon.concat(vmOptionsPrefix, "-XX:+UseG1GC", "-XX:MaxRAMPercentage=12.5", "-cp", ".", "-XX:SharedBaseAddress=0", "-XX:SharedArchiveFile=./SysDictCrash.jsa", "-Xshare:dump", - "-showversion", "-Xlog:cds,cds+hashtables"); + "-showversion", "-Xlog:cds,cds+hashtables")); TestCommon.checkDump(TestCommon.executeAndLog(dumpPb, "dump")); ProcessBuilder runPb = ProcessTools.createJavaProcessBuilder(true, + TestCommon.concat(vmOptionsPrefix, "-XX:+UseG1GC", "-XX:MaxRAMPercentage=12.5", "-XX:SharedArchiveFile=./SysDictCrash.jsa", "-Xshare:on", - "-version"); + "-version")); TestCommon.checkExec(TestCommon.executeAndLog(runPb, "exec")); } diff -r 9d782e357916 -r 585939d9f952 test/hotspot/jtreg/sanity/ExecuteInternalVMTests.java --- a/test/hotspot/jtreg/sanity/ExecuteInternalVMTests.java Mon Nov 05 19:00:34 2018 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,39 +0,0 @@ -/* - * Copyright (c) 2012, 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 ExecuteInternalVMTests - * @bug 8004691 - * @summary Add a jtreg test that exercises the ExecuteInternalVMTests flag - * @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:+ExecuteInternalVMTests ExecuteInternalVMTests - */ -public class ExecuteInternalVMTests { - public static void main(String[] args) throws Exception { - // The tests that are run are the HotSpot internal tests which are - // executed only when the flag -XX:+ExecuteInternalVMTests is used. - - // The flag -XX:+ExecuteInternalVMTests can only be used for - // non-product builds of HotSpot. Therefore, the flag - // -XX:+IgnoreUnrecognizedVMOptions is also used, which means that this - // test will do nothing on a product build. - } -} diff -r 9d782e357916 -r 585939d9f952 test/hotspot/jtreg/vmTestbase/nsk/share/native/nsk_tools.cpp --- a/test/hotspot/jtreg/vmTestbase/nsk/share/native/nsk_tools.cpp Mon Nov 05 19:00:34 2018 -0500 +++ b/test/hotspot/jtreg/vmTestbase/nsk/share/native/nsk_tools.cpp Mon Nov 05 19:05:15 2018 -0500 @@ -163,7 +163,7 @@ } else if (strlen(msg_buf2) != 0) { msg_buf2[strlen(msg_buf2)-1] = '\n'; // Make sure we have a newline char at the end. } - (void) nsk_printf("The following fake exception stacktrace is for failuire analysis. \n"); + (void) nsk_printf("The following fake exception stacktrace is for failure analysis. \n"); (void) nsk_printf("nsk.share.Fake_Exception_for_RULE_Creation: "); if (file != NULL) { (void) nsk_printf("(%s:%d) ", file_basename(file), line); diff -r 9d782e357916 -r 585939d9f952 test/hotspot/jtreg/vmTestbase/nsk/stress/stack/stack001.java --- a/test/hotspot/jtreg/vmTestbase/nsk/stress/stack/stack001.java Mon Nov 05 19:00:34 2018 -0500 +++ b/test/hotspot/jtreg/vmTestbase/nsk/stress/stack/stack001.java Mon Nov 05 19:05:15 2018 -0500 @@ -34,7 +34,7 @@ * COMMENTS * Kestrel for Solaris_JDK_1.3-b10 crashes while trying to execute * this test with Client HS VM. - * See lots of bugs concerning similar failuires: + * See lots of bugs concerning similar failures: * Evaluated: * 4217960 [native stack overflow bug] reflection test causes crash * Accepted: diff -r 9d782e357916 -r 585939d9f952 test/jaxp/javax/xml/jaxp/unittest/stream/XMLStreamWriterTest/SurrogatesTest.java --- a/test/jaxp/javax/xml/jaxp/unittest/stream/XMLStreamWriterTest/SurrogatesTest.java Mon Nov 05 19:00:34 2018 -0500 +++ b/test/jaxp/javax/xml/jaxp/unittest/stream/XMLStreamWriterTest/SurrogatesTest.java Mon Nov 05 19:05:15 2018 -0500 @@ -4,9 +4,7 @@ * * 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. + * 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 diff -r 9d782e357916 -r 585939d9f952 test/jdk/java/lang/System/LoggerFinder/internal/SystemLoggerInPlatformLoader/SystemLoggerInPlatformLoader.java --- a/test/jdk/java/lang/System/LoggerFinder/internal/SystemLoggerInPlatformLoader/SystemLoggerInPlatformLoader.java Mon Nov 05 19:00:34 2018 -0500 +++ b/test/jdk/java/lang/System/LoggerFinder/internal/SystemLoggerInPlatformLoader/SystemLoggerInPlatformLoader.java Mon Nov 05 19:05:15 2018 -0500 @@ -4,9 +4,7 @@ * * 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. + * 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 diff -r 9d782e357916 -r 585939d9f952 test/jdk/java/lang/System/LoggerFinder/internal/SystemLoggerInPlatformLoader/systempkg/log/SystemLoggerAccessor.java --- a/test/jdk/java/lang/System/LoggerFinder/internal/SystemLoggerInPlatformLoader/systempkg/log/SystemLoggerAccessor.java Mon Nov 05 19:00:34 2018 -0500 +++ b/test/jdk/java/lang/System/LoggerFinder/internal/SystemLoggerInPlatformLoader/systempkg/log/SystemLoggerAccessor.java Mon Nov 05 19:05:15 2018 -0500 @@ -4,9 +4,7 @@ * * 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. + * 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 diff -r 9d782e357916 -r 585939d9f952 test/jdk/java/lang/System/LoggerFinder/modules/Base.java --- a/test/jdk/java/lang/System/LoggerFinder/modules/Base.java Mon Nov 05 19:00:34 2018 -0500 +++ b/test/jdk/java/lang/System/LoggerFinder/modules/Base.java Mon Nov 05 19:05:15 2018 -0500 @@ -4,9 +4,7 @@ * * 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. + * 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 diff -r 9d782e357916 -r 585939d9f952 test/jdk/java/lang/System/LoggerFinder/modules/JDKLoggerForImageTest.java --- a/test/jdk/java/lang/System/LoggerFinder/modules/JDKLoggerForImageTest.java Mon Nov 05 19:00:34 2018 -0500 +++ b/test/jdk/java/lang/System/LoggerFinder/modules/JDKLoggerForImageTest.java Mon Nov 05 19:05:15 2018 -0500 @@ -4,9 +4,7 @@ * * 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. + * 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 diff -r 9d782e357916 -r 585939d9f952 test/jdk/java/lang/System/LoggerFinder/modules/JDKLoggerForJDKTest.java --- a/test/jdk/java/lang/System/LoggerFinder/modules/JDKLoggerForJDKTest.java Mon Nov 05 19:00:34 2018 -0500 +++ b/test/jdk/java/lang/System/LoggerFinder/modules/JDKLoggerForJDKTest.java Mon Nov 05 19:05:15 2018 -0500 @@ -4,9 +4,7 @@ * * 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. + * 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 diff -r 9d782e357916 -r 585939d9f952 test/jdk/java/lang/System/LoggerFinder/modules/LoggerInImageTest.java --- a/test/jdk/java/lang/System/LoggerFinder/modules/LoggerInImageTest.java Mon Nov 05 19:00:34 2018 -0500 +++ b/test/jdk/java/lang/System/LoggerFinder/modules/LoggerInImageTest.java Mon Nov 05 19:05:15 2018 -0500 @@ -4,9 +4,7 @@ * * 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. + * 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 diff -r 9d782e357916 -r 585939d9f952 test/jdk/java/lang/System/LoggerFinder/modules/NamedLoggerForImageTest.java --- a/test/jdk/java/lang/System/LoggerFinder/modules/NamedLoggerForImageTest.java Mon Nov 05 19:00:34 2018 -0500 +++ b/test/jdk/java/lang/System/LoggerFinder/modules/NamedLoggerForImageTest.java Mon Nov 05 19:05:15 2018 -0500 @@ -4,9 +4,7 @@ * * 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. + * 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 diff -r 9d782e357916 -r 585939d9f952 test/jdk/java/lang/System/LoggerFinder/modules/NamedLoggerForJDKTest.java --- a/test/jdk/java/lang/System/LoggerFinder/modules/NamedLoggerForJDKTest.java Mon Nov 05 19:00:34 2018 -0500 +++ b/test/jdk/java/lang/System/LoggerFinder/modules/NamedLoggerForJDKTest.java Mon Nov 05 19:05:15 2018 -0500 @@ -4,9 +4,7 @@ * * 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. + * 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 diff -r 9d782e357916 -r 585939d9f952 test/jdk/java/lang/System/LoggerFinder/modules/UnnamedLoggerForImageTest.java --- a/test/jdk/java/lang/System/LoggerFinder/modules/UnnamedLoggerForImageTest.java Mon Nov 05 19:00:34 2018 -0500 +++ b/test/jdk/java/lang/System/LoggerFinder/modules/UnnamedLoggerForImageTest.java Mon Nov 05 19:05:15 2018 -0500 @@ -4,9 +4,7 @@ * * 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. + * 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 diff -r 9d782e357916 -r 585939d9f952 test/jdk/java/lang/System/LoggerFinder/modules/UnnamedLoggerForJDKTest.java --- a/test/jdk/java/lang/System/LoggerFinder/modules/UnnamedLoggerForJDKTest.java Mon Nov 05 19:00:34 2018 -0500 +++ b/test/jdk/java/lang/System/LoggerFinder/modules/UnnamedLoggerForJDKTest.java Mon Nov 05 19:05:15 2018 -0500 @@ -4,9 +4,7 @@ * * 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. + * 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 diff -r 9d782e357916 -r 585939d9f952 test/jdk/java/lang/System/LoggerFinder/modules/boot_client/BootClient.java --- a/test/jdk/java/lang/System/LoggerFinder/modules/boot_client/BootClient.java Mon Nov 05 19:00:34 2018 -0500 +++ b/test/jdk/java/lang/System/LoggerFinder/modules/boot_client/BootClient.java Mon Nov 05 19:05:15 2018 -0500 @@ -4,9 +4,7 @@ * * 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. + * 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 diff -r 9d782e357916 -r 585939d9f952 test/jdk/java/lang/System/LoggerFinder/modules/boot_usage/BootUsage.java --- a/test/jdk/java/lang/System/LoggerFinder/modules/boot_usage/BootUsage.java Mon Nov 05 19:00:34 2018 -0500 +++ b/test/jdk/java/lang/System/LoggerFinder/modules/boot_usage/BootUsage.java Mon Nov 05 19:05:15 2018 -0500 @@ -4,9 +4,7 @@ * * 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. + * 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 diff -r 9d782e357916 -r 585939d9f952 test/jdk/java/lang/System/LoggerFinder/modules/named_client/m.t.a/module-info.java --- a/test/jdk/java/lang/System/LoggerFinder/modules/named_client/m.t.a/module-info.java Mon Nov 05 19:00:34 2018 -0500 +++ b/test/jdk/java/lang/System/LoggerFinder/modules/named_client/m.t.a/module-info.java Mon Nov 05 19:05:15 2018 -0500 @@ -4,9 +4,7 @@ * * 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. + * 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 diff -r 9d782e357916 -r 585939d9f952 test/jdk/java/lang/System/LoggerFinder/modules/named_client/m.t.a/pkg/a/t/TestA.java --- a/test/jdk/java/lang/System/LoggerFinder/modules/named_client/m.t.a/pkg/a/t/TestA.java Mon Nov 05 19:00:34 2018 -0500 +++ b/test/jdk/java/lang/System/LoggerFinder/modules/named_client/m.t.a/pkg/a/t/TestA.java Mon Nov 05 19:05:15 2018 -0500 @@ -4,9 +4,7 @@ * * 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. + * 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 diff -r 9d782e357916 -r 585939d9f952 test/jdk/java/lang/System/LoggerFinder/modules/named_logger/m.l.a/module-info.java --- a/test/jdk/java/lang/System/LoggerFinder/modules/named_logger/m.l.a/module-info.java Mon Nov 05 19:00:34 2018 -0500 +++ b/test/jdk/java/lang/System/LoggerFinder/modules/named_logger/m.l.a/module-info.java Mon Nov 05 19:05:15 2018 -0500 @@ -4,9 +4,7 @@ * * 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. + * 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 diff -r 9d782e357916 -r 585939d9f952 test/jdk/java/lang/System/LoggerFinder/modules/named_logger/m.l.a/pkg/a/l/LoggerA.java --- a/test/jdk/java/lang/System/LoggerFinder/modules/named_logger/m.l.a/pkg/a/l/LoggerA.java Mon Nov 05 19:00:34 2018 -0500 +++ b/test/jdk/java/lang/System/LoggerFinder/modules/named_logger/m.l.a/pkg/a/l/LoggerA.java Mon Nov 05 19:05:15 2018 -0500 @@ -4,9 +4,7 @@ * * 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. + * 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 diff -r 9d782e357916 -r 585939d9f952 test/jdk/java/lang/System/LoggerFinder/modules/named_logger/m.l.a/pkg/a/p/LoggerFinderA.java --- a/test/jdk/java/lang/System/LoggerFinder/modules/named_logger/m.l.a/pkg/a/p/LoggerFinderA.java Mon Nov 05 19:00:34 2018 -0500 +++ b/test/jdk/java/lang/System/LoggerFinder/modules/named_logger/m.l.a/pkg/a/p/LoggerFinderA.java Mon Nov 05 19:05:15 2018 -0500 @@ -4,9 +4,7 @@ * * 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. + * 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 diff -r 9d782e357916 -r 585939d9f952 test/jdk/java/lang/System/LoggerFinder/modules/patched_client/PatchedClient.java --- a/test/jdk/java/lang/System/LoggerFinder/modules/patched_client/PatchedClient.java Mon Nov 05 19:00:34 2018 -0500 +++ b/test/jdk/java/lang/System/LoggerFinder/modules/patched_client/PatchedClient.java Mon Nov 05 19:05:15 2018 -0500 @@ -4,9 +4,7 @@ * * 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. + * 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 diff -r 9d782e357916 -r 585939d9f952 test/jdk/java/lang/System/LoggerFinder/modules/patched_usage/java.base/java/lang/PatchedUsage.java --- a/test/jdk/java/lang/System/LoggerFinder/modules/patched_usage/java.base/java/lang/PatchedUsage.java Mon Nov 05 19:00:34 2018 -0500 +++ b/test/jdk/java/lang/System/LoggerFinder/modules/patched_usage/java.base/java/lang/PatchedUsage.java Mon Nov 05 19:05:15 2018 -0500 @@ -4,9 +4,7 @@ * * 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. + * 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 diff -r 9d782e357916 -r 585939d9f952 test/jdk/java/lang/System/LoggerFinder/modules/unnamed_client/pkg/b/t/TestB.java --- a/test/jdk/java/lang/System/LoggerFinder/modules/unnamed_client/pkg/b/t/TestB.java Mon Nov 05 19:00:34 2018 -0500 +++ b/test/jdk/java/lang/System/LoggerFinder/modules/unnamed_client/pkg/b/t/TestB.java Mon Nov 05 19:05:15 2018 -0500 @@ -4,9 +4,7 @@ * * 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. + * 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 diff -r 9d782e357916 -r 585939d9f952 test/jdk/java/lang/System/LoggerFinder/modules/unnamed_logger/pkg/b/l/LoggerB.java --- a/test/jdk/java/lang/System/LoggerFinder/modules/unnamed_logger/pkg/b/l/LoggerB.java Mon Nov 05 19:00:34 2018 -0500 +++ b/test/jdk/java/lang/System/LoggerFinder/modules/unnamed_logger/pkg/b/l/LoggerB.java Mon Nov 05 19:05:15 2018 -0500 @@ -4,9 +4,7 @@ * * 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. + * 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 diff -r 9d782e357916 -r 585939d9f952 test/jdk/java/lang/System/LoggerFinder/modules/unnamed_logger/pkg/b/p/LoggerFinderB.java --- a/test/jdk/java/lang/System/LoggerFinder/modules/unnamed_logger/pkg/b/p/LoggerFinderB.java Mon Nov 05 19:00:34 2018 -0500 +++ b/test/jdk/java/lang/System/LoggerFinder/modules/unnamed_logger/pkg/b/p/LoggerFinderB.java Mon Nov 05 19:05:15 2018 -0500 @@ -4,9 +4,7 @@ * * 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. + * 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 diff -r 9d782e357916 -r 585939d9f952 test/jdk/java/math/BigInteger/PrimeTest.java --- a/test/jdk/java/math/BigInteger/PrimeTest.java Mon Nov 05 19:00:34 2018 -0500 +++ b/test/jdk/java/math/BigInteger/PrimeTest.java Mon Nov 05 19:05:15 2018 -0500 @@ -4,9 +4,7 @@ * * 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. + * 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 diff -r 9d782e357916 -r 585939d9f952 test/jdk/java/net/HttpURLConnection/SetAuthenticator/HTTPSetAuthenticatorTest.java --- a/test/jdk/java/net/HttpURLConnection/SetAuthenticator/HTTPSetAuthenticatorTest.java Mon Nov 05 19:00:34 2018 -0500 +++ b/test/jdk/java/net/HttpURLConnection/SetAuthenticator/HTTPSetAuthenticatorTest.java Mon Nov 05 19:05:15 2018 -0500 @@ -4,9 +4,7 @@ * * 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. + * 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 diff -r 9d782e357916 -r 585939d9f952 test/jdk/java/net/HttpURLConnection/SetAuthenticator/HTTPTest.java --- a/test/jdk/java/net/HttpURLConnection/SetAuthenticator/HTTPTest.java Mon Nov 05 19:00:34 2018 -0500 +++ b/test/jdk/java/net/HttpURLConnection/SetAuthenticator/HTTPTest.java Mon Nov 05 19:05:15 2018 -0500 @@ -4,9 +4,7 @@ * * 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. + * 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 diff -r 9d782e357916 -r 585939d9f952 test/jdk/java/net/HttpURLConnection/SetAuthenticator/HTTPTestClient.java --- a/test/jdk/java/net/HttpURLConnection/SetAuthenticator/HTTPTestClient.java Mon Nov 05 19:00:34 2018 -0500 +++ b/test/jdk/java/net/HttpURLConnection/SetAuthenticator/HTTPTestClient.java Mon Nov 05 19:05:15 2018 -0500 @@ -4,9 +4,7 @@ * * 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. + * 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 diff -r 9d782e357916 -r 585939d9f952 test/jdk/java/net/HttpURLConnection/SetAuthenticator/HTTPTestServer.java --- a/test/jdk/java/net/HttpURLConnection/SetAuthenticator/HTTPTestServer.java Mon Nov 05 19:00:34 2018 -0500 +++ b/test/jdk/java/net/HttpURLConnection/SetAuthenticator/HTTPTestServer.java Mon Nov 05 19:05:15 2018 -0500 @@ -4,9 +4,7 @@ * * 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. + * 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 diff -r 9d782e357916 -r 585939d9f952 test/jdk/java/net/Inet6Address/serialize/Inet6AddressSerTest.java --- a/test/jdk/java/net/Inet6Address/serialize/Inet6AddressSerTest.java Mon Nov 05 19:00:34 2018 -0500 +++ b/test/jdk/java/net/Inet6Address/serialize/Inet6AddressSerTest.java Mon Nov 05 19:05:15 2018 -0500 @@ -4,9 +4,7 @@ * * 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. + * 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 diff -r 9d782e357916 -r 585939d9f952 test/jdk/java/net/MulticastSocket/NetworkInterfaceEmptyGetInetAddressesTest.java --- a/test/jdk/java/net/MulticastSocket/NetworkInterfaceEmptyGetInetAddressesTest.java Mon Nov 05 19:00:34 2018 -0500 +++ b/test/jdk/java/net/MulticastSocket/NetworkInterfaceEmptyGetInetAddressesTest.java Mon Nov 05 19:05:15 2018 -0500 @@ -4,9 +4,7 @@ * * 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. + * 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 diff -r 9d782e357916 -r 585939d9f952 test/jdk/java/net/URLConnection/ContentHandlers/plain.template --- a/test/jdk/java/net/URLConnection/ContentHandlers/plain.template Mon Nov 05 19:00:34 2018 -0500 +++ b/test/jdk/java/net/URLConnection/ContentHandlers/plain.template Mon Nov 05 19:05:15 2018 -0500 @@ -4,9 +4,7 @@ * * 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. + * 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 diff -r 9d782e357916 -r 585939d9f952 test/jdk/java/net/httpclient/DigestEchoServer.java --- a/test/jdk/java/net/httpclient/DigestEchoServer.java Mon Nov 05 19:00:34 2018 -0500 +++ b/test/jdk/java/net/httpclient/DigestEchoServer.java Mon Nov 05 19:05:15 2018 -0500 @@ -4,9 +4,7 @@ * * 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. + * 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 diff -r 9d782e357916 -r 585939d9f952 test/jdk/java/net/httpclient/ProxyAuthTest.java --- a/test/jdk/java/net/httpclient/ProxyAuthTest.java Mon Nov 05 19:00:34 2018 -0500 +++ b/test/jdk/java/net/httpclient/ProxyAuthTest.java Mon Nov 05 19:05:15 2018 -0500 @@ -4,9 +4,7 @@ * * 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. + * 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 diff -r 9d782e357916 -r 585939d9f952 test/jdk/java/net/httpclient/http2/server/Queue.java --- a/test/jdk/java/net/httpclient/http2/server/Queue.java Mon Nov 05 19:00:34 2018 -0500 +++ b/test/jdk/java/net/httpclient/http2/server/Queue.java Mon Nov 05 19:05:15 2018 -0500 @@ -4,9 +4,7 @@ * * 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. + * 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 diff -r 9d782e357916 -r 585939d9f952 test/jdk/java/nio/channels/SelectionKey/AtomicUpdates.java --- a/test/jdk/java/nio/channels/SelectionKey/AtomicUpdates.java Mon Nov 05 19:00:34 2018 -0500 +++ b/test/jdk/java/nio/channels/SelectionKey/AtomicUpdates.java Mon Nov 05 19:05:15 2018 -0500 @@ -4,9 +4,7 @@ * * 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. + * 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 diff -r 9d782e357916 -r 585939d9f952 test/jdk/java/util/Formatter/spi/NoGroupingUsed.java --- a/test/jdk/java/util/Formatter/spi/NoGroupingUsed.java Mon Nov 05 19:00:34 2018 -0500 +++ b/test/jdk/java/util/Formatter/spi/NoGroupingUsed.java Mon Nov 05 19:05:15 2018 -0500 @@ -4,9 +4,7 @@ * * 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. + * 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 diff -r 9d782e357916 -r 585939d9f952 test/jdk/java/util/Locale/Bug8179071.java --- a/test/jdk/java/util/Locale/Bug8179071.java Mon Nov 05 19:00:34 2018 -0500 +++ b/test/jdk/java/util/Locale/Bug8179071.java Mon Nov 05 19:05:15 2018 -0500 @@ -4,9 +4,7 @@ * * 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. + * 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 diff -r 9d782e357916 -r 585939d9f952 test/jdk/java/util/Locale/LocaleCmdOverrides.java --- a/test/jdk/java/util/Locale/LocaleCmdOverrides.java Mon Nov 05 19:00:34 2018 -0500 +++ b/test/jdk/java/util/Locale/LocaleCmdOverrides.java Mon Nov 05 19:05:15 2018 -0500 @@ -4,9 +4,7 @@ * * 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. + * 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 diff -r 9d782e357916 -r 585939d9f952 test/jdk/java/util/Locale/SoftKeys.java --- a/test/jdk/java/util/Locale/SoftKeys.java Mon Nov 05 19:00:34 2018 -0500 +++ b/test/jdk/java/util/Locale/SoftKeys.java Mon Nov 05 19:05:15 2018 -0500 @@ -4,9 +4,7 @@ * * 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. + * 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 diff -r 9d782e357916 -r 585939d9f952 test/jdk/java/util/logging/LogManager/LinkageErrorTest.java --- a/test/jdk/java/util/logging/LogManager/LinkageErrorTest.java Mon Nov 05 19:00:34 2018 -0500 +++ b/test/jdk/java/util/logging/LogManager/LinkageErrorTest.java Mon Nov 05 19:05:15 2018 -0500 @@ -4,9 +4,7 @@ * * 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. + * 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 diff -r 9d782e357916 -r 585939d9f952 test/jdk/java/util/spi/ResourceBundleControlProvider/com/foo/XmlRB.xml --- a/test/jdk/java/util/spi/ResourceBundleControlProvider/com/foo/XmlRB.xml Mon Nov 05 19:00:34 2018 -0500 +++ b/test/jdk/java/util/spi/ResourceBundleControlProvider/com/foo/XmlRB.xml Mon Nov 05 19:05:15 2018 -0500 @@ -1,13 +1,11 @@