--- old/make/Main.gmk 2018-10-30 13:52:10.000000000 -0700 +++ new/make/Main.gmk 2018-10-30 13:52:10.000000000 -0700 @@ -572,9 +572,6 @@ test-hotspot-jtreg-native: $(call RunTests, "hotspot_native_sanity", $(JDK_IMAGE_DIR)) -test-hotspot-internal: - $(call RunTests, "hotspot_internal", $(JDK_OUTPUTDIR)) - test-hotspot-gtest: $(call RunTests, "hotspot_gtest", $(JDK_OUTPUTDIR)) @@ -588,7 +585,7 @@ ($(CD) $(TOPDIR)/test/make && $(MAKE) $(MAKE_ARGS) -f TestMake.gmk test-compile-commands) ALL_TARGETS += test test-hotspot-jtreg test-hotspot-jtreg-native \ - test-hotspot-internal test-hotspot-gtest test-jdk-jtreg-native test-make \ + test-hotspot-gtest test-jdk-jtreg-native test-make \ test-compile-commands ################################################################################ @@ -917,8 +914,6 @@ test-image-hotspot-gtest: hotspot - test-hotspot-internal: exploded-image - test-hotspot-jtreg: jdk-image test-image test-hotspot-gtest: exploded-image test-image-hotspot-gtest --- old/make/RunTests.gmk 2018-10-30 13:52:12.000000000 -0700 +++ new/make/RunTests.gmk 2018-10-30 13:52:12.000000000 -0700 @@ -658,11 +658,7 @@ $1_TEST_ARGS := endif - ifeq ($$($1_TEST_NAME), hotspot-internal) - $1_TEST_COMMAND_LINE := \ - $$(JDK_IMAGE_DIR)/bin/java -XX:+ExecuteInternalVMTests \ - -XX:+ShowMessageBoxOnError -version - else ifeq ($$($1_TEST_NAME), failure-handler) + ifeq ($$($1_TEST_NAME), failure-handler) $1_TEST_COMMAND_LINE := \ ($(CD) $(TOPDIR)/make/test && $(MAKE) $(MAKE_ARGS) -f \ BuildFailureHandler.gmk test) --- old/src/hotspot/os/linux/os_linux.cpp 2018-10-30 13:52:14.000000000 -0700 +++ new/src/hotspot/os/linux/os_linux.cpp 2018-10-30 13:52:14.000000000 -0700 @@ -5958,10 +5958,6 @@ #define test_log(...) \ do { \ - if (VerboseInternalVMTests) { \ - tty->print_cr(__VA_ARGS__); \ - tty->flush(); \ - } \ } while (false) class TestReserveMemorySpecial : AllStatic { --- old/src/hotspot/os/windows/os_windows.cpp 2018-10-30 13:52:16.000000000 -0700 +++ new/src/hotspot/os/windows/os_windows.cpp 2018-10-30 13:52:16.000000000 -0700 @@ -5557,12 +5557,8 @@ // 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. -// If -XX:+VerboseInternalVMTests is enabled, print some explanatory messages. void TestReserveMemorySpecial_test() { if (!UseLargePages) { - if (VerboseInternalVMTests) { - tty->print("Skipping test because large pages are disabled"); - } return; } // save current value of globals @@ -5576,10 +5572,6 @@ 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) { - if (VerboseInternalVMTests) { - tty->print("Failed to allocate control block with size " SIZE_FORMAT ". Skipping remainder of test.", - large_allocation_size); - } } else { os::release_memory_special(result, large_allocation_size); @@ -5589,10 +5581,6 @@ 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) { - if (VerboseInternalVMTests) { - tty->print("Failed to allocate any memory at " PTR_FORMAT " size " SIZE_FORMAT ". Skipping remainder of test.", - expected_location, large_allocation_size); - } } else { // release memory os::release_memory_special(actual_location, expected_allocation_size); --- old/src/hotspot/share/gc/shared/gc_globals.hpp 2018-10-30 13:52:18.000000000 -0700 +++ new/src/hotspot/share/gc/shared/gc_globals.hpp 2018-10-30 13:52:18.000000000 -0700 @@ -372,12 +372,6 @@ develop(uintx, MetadataAllocationFailALotInterval, 1000, \ "Metadata allocation failure a lot interval") \ \ - notproduct(bool, ExecuteInternalVMTests, false, \ - "Enable execution of internal VM tests") \ - \ - notproduct(bool, VerboseInternalVMTests, false, \ - "Turn on logging for internal VM tests.") \ - \ product(bool, ExecutingUnitTests, false, \ "Whether the JVM is running unit tests or not") \ \ --- old/src/hotspot/share/memory/virtualspace.cpp 2018-10-30 13:52:20.000000000 -0700 +++ new/src/hotspot/share/memory/virtualspace.cpp 2018-10-30 13:52:20.000000000 -0700 @@ -1061,10 +1061,6 @@ #define test_log(...) \ do {\ - if (VerboseInternalVMTests) { \ - tty->print_cr(__VA_ARGS__); \ - tty->flush(); \ - }\ } while (false) class TestReservedSpace : AllStatic { --- old/src/hotspot/share/prims/jni.cpp 2018-10-30 13:52:22.000000000 -0700 +++ new/src/hotspot/share/prims/jni.cpp 2018-10-30 13:52:22.000000000 -0700 @@ -86,7 +86,6 @@ #include "utilities/dtrace.hpp" #include "utilities/events.hpp" #include "utilities/histogram.hpp" -#include "utilities/internalVMTests.hpp" #include "utilities/macros.hpp" #include "utilities/vmError.hpp" #if INCLUDE_JVMCI @@ -3977,9 +3976,6 @@ // Some platforms (like Win*) need a wrapper around these test // functions in order to properly handle error conditions. VMError::test_error_handler(); - if (ExecuteInternalVMTests) { - InternalVMTests::run(); - } #endif // Since this is not a JVM_ENTRY we have to set the thread state manually before leaving. --- old/test/hotspot/jtreg/Makefile 2018-10-30 13:52:25.000000000 -0700 +++ new/test/hotspot/jtreg/Makefile 2018-10-30 13:52:24.000000000 -0700 @@ -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.) --- old/test/hotspot/jtreg/TEST.groups 2018-10-30 13:52:27.000000000 -0700 +++ new/test/hotspot/jtreg/TEST.groups 2018-10-30 13:52:26.000000000 -0700 @@ -180,7 +180,6 @@ -gc/g1/ihop/TestIHOPErgo.java tier1_gc_2 = \ - sanity/ExecuteInternalVMTests.java \ gc/ \ -gc/epsilon/ \ -gc/g1/ \ --- old/test/hotspot/jtreg/runtime/CommandLine/VMOptionWarning.java 2018-10-30 13:52:29.000000000 -0700 +++ new/test/hotspot/jtreg/runtime/CommandLine/VMOptionWarning.java 2018-10-30 13:52:29.000000000 -0700 @@ -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."); } } --- old/src/hotspot/share/utilities/internalVMTests.cpp 2018-10-30 13:52:31.000000000 -0700 +++ /dev/null 2018-10-30 13:52:31.000000000 -0700 @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2016, 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" - -#ifndef PRODUCT -#include - -#include "utilities/internalVMTests.hpp" -#include "utilities/macros.hpp" -#include "utilities/ostream.hpp" - -#define run_unit_test(unit_test_function_call) \ - void unit_test_function_call(); \ - run_test(#unit_test_function_call, unit_test_function_call); - -void InternalVMTests::run_test(const char* name, void (*test)()) { - tty->print_cr("Running test: %s", name); - test(); -} - -void InternalVMTests::run() { - tty->print_cr("Running internal VM tests"); - tty->print_cr("All internal VM tests passed"); -} - -#endif --- old/src/hotspot/share/utilities/internalVMTests.hpp 2018-10-30 13:52:33.000000000 -0700 +++ /dev/null 2018-10-30 13:52:33.000000000 -0700 @@ -1,40 +0,0 @@ -/* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - * - */ - -#ifndef SHARE_VM_UTILITIES_INTERNALVMTESTS_HPP -#define SHARE_VM_UTILITIES_INTERNALVMTESTS_HPP - -#ifndef PRODUCT - -#include "memory/allocation.hpp" - -class InternalVMTests : public AllStatic { - static void run_test(const char* name, void (*test)()); - public: - static void run(); -}; - -#endif - -#endif // SHARE_VM_UTILITIES_INTERNALVMTESTS_HPP --- old/test/hotspot/jtreg/sanity/ExecuteInternalVMTests.java 2018-10-30 13:52:34.000000000 -0700 +++ /dev/null 2018-10-30 13:52:34.000000000 -0700 @@ -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. - } -}