1 /*
2 * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
3 * Copyright (c) 2012 Red Hat, Inc.
4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 *
6 * This code is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License version 2 only, as
8 * published by the Free Software Foundation.
9 *
10 * This code is distributed in the hope that it will be useful, but WITHOUT
11 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
13 * version 2 for more details (a copy is included in the LICENSE file that
14 * accompanied this code).
15 *
16 * You should have received a copy of the GNU General Public License version
17 * 2 along with this work; if not, write to the Free Software Foundation,
18 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
19 *
20 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
21 * or visit www.oracle.com if you need additional information or have any
22 * questions.
5076 #if INCLUDE_ALL_GCS
5077 #include "gc_implementation/g1/heapRegionRemSet.hpp"
5078 #endif
5079 #include "memory/guardedMemory.hpp"
5080 #include "utilities/quickSort.hpp"
5081 #include "utilities/ostream.hpp"
5082 #if INCLUDE_VM_STRUCTS
5083 #include "runtime/vmStructs.hpp"
5084 #endif
5085
5086 #define run_unit_test(unit_test_function_call) \
5087 tty->print_cr("Running test: " #unit_test_function_call); \
5088 unit_test_function_call
5089
5090 // Forward declaration
5091 void TestOS_test();
5092 void TestReservedSpace_test();
5093 void TestReserveMemorySpecial_test();
5094 void TestVirtualSpace_test();
5095 void TestMetaspaceAux_test();
5096 void TestMetachunk_test();
5097 void TestVirtualSpaceNode_test();
5098 void TestNewSize_test();
5099 void TestKlass_test();
5100 void Test_linked_list();
5101 void TestChunkedList_test();
5102 #if INCLUDE_ALL_GCS
5103 void TestOldFreeSpaceCalculation_test();
5104 void TestG1BiasedArray_test();
5105 void TestBufferingOopClosure_test();
5106 void TestCodeCacheRemSet_test();
5107 void FreeRegionList_test();
5108 #endif
5109
5110 void execute_internal_vm_tests() {
5111 if (ExecuteInternalVMTests) {
5112 tty->print_cr("Running internal VM tests");
5113 run_unit_test(TestOS_test());
5114 run_unit_test(TestReservedSpace_test());
5115 run_unit_test(TestReserveMemorySpecial_test());
5120 run_unit_test(GlobalDefinitions::test_globals());
5121 run_unit_test(GCTimerAllTest::all());
5122 run_unit_test(arrayOopDesc::test_max_array_length());
5123 run_unit_test(CollectedHeap::test_is_in());
5124 run_unit_test(QuickSort::test_quick_sort());
5125 run_unit_test(GuardedMemory::test_guarded_memory());
5126 run_unit_test(AltHashing::test_alt_hash());
5127 run_unit_test(test_loggc_filename());
5128 run_unit_test(TestNewSize_test());
5129 run_unit_test(TestKlass_test());
5130 run_unit_test(Test_linked_list());
5131 run_unit_test(TestChunkedList_test());
5132 run_unit_test(ObjectMonitor::sanity_checks());
5133 #if INCLUDE_VM_STRUCTS
5134 run_unit_test(VMStructs::test());
5135 #endif
5136 #if INCLUDE_ALL_GCS
5137 run_unit_test(TestOldFreeSpaceCalculation_test());
5138 run_unit_test(TestG1BiasedArray_test());
5139 run_unit_test(HeapRegionRemSet::test_prt());
5140 run_unit_test(TestBufferingOopClosure_test());
5141 run_unit_test(TestCodeCacheRemSet_test());
5142 if (UseG1GC) {
5143 run_unit_test(FreeRegionList_test());
5144 }
5145 #endif
5146 tty->print_cr("All internal VM tests passed");
5147 }
5148 }
5149
5150 #undef run_unit_test
5151
5152 #endif
5153
5154 #ifndef USDT2
5155 HS_DTRACE_PROBE_DECL3(hotspot_jni, CreateJavaVM__entry, vm, penv, args);
5156 DT_RETURN_MARK_DECL(CreateJavaVM, jint);
5157 #else /* USDT2 */
5158 DT_RETURN_MARK_DECL(CreateJavaVM, jint
5159 , HOTSPOT_JNI_CREATEJAVAVM_RETURN(_ret_ref));
|
1 /*
2 * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
3 * Copyright (c) 2012 Red Hat, Inc.
4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 *
6 * This code is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License version 2 only, as
8 * published by the Free Software Foundation.
9 *
10 * This code is distributed in the hope that it will be useful, but WITHOUT
11 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
13 * version 2 for more details (a copy is included in the LICENSE file that
14 * accompanied this code).
15 *
16 * You should have received a copy of the GNU General Public License version
17 * 2 along with this work; if not, write to the Free Software Foundation,
18 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
19 *
20 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
21 * or visit www.oracle.com if you need additional information or have any
22 * questions.
5076 #if INCLUDE_ALL_GCS
5077 #include "gc_implementation/g1/heapRegionRemSet.hpp"
5078 #endif
5079 #include "memory/guardedMemory.hpp"
5080 #include "utilities/quickSort.hpp"
5081 #include "utilities/ostream.hpp"
5082 #if INCLUDE_VM_STRUCTS
5083 #include "runtime/vmStructs.hpp"
5084 #endif
5085
5086 #define run_unit_test(unit_test_function_call) \
5087 tty->print_cr("Running test: " #unit_test_function_call); \
5088 unit_test_function_call
5089
5090 // Forward declaration
5091 void TestOS_test();
5092 void TestReservedSpace_test();
5093 void TestReserveMemorySpecial_test();
5094 void TestVirtualSpace_test();
5095 void TestMetaspaceAux_test();
5096 void SpaceManager_test_adjust_initial_chunk_size();
5097 void TestMetachunk_test();
5098 void TestVirtualSpaceNode_test();
5099 void TestNewSize_test();
5100 void TestKlass_test();
5101 void Test_linked_list();
5102 void TestChunkedList_test();
5103 #if INCLUDE_ALL_GCS
5104 void TestOldFreeSpaceCalculation_test();
5105 void TestG1BiasedArray_test();
5106 void TestBufferingOopClosure_test();
5107 void TestCodeCacheRemSet_test();
5108 void FreeRegionList_test();
5109 #endif
5110
5111 void execute_internal_vm_tests() {
5112 if (ExecuteInternalVMTests) {
5113 tty->print_cr("Running internal VM tests");
5114 run_unit_test(TestOS_test());
5115 run_unit_test(TestReservedSpace_test());
5116 run_unit_test(TestReserveMemorySpecial_test());
5121 run_unit_test(GlobalDefinitions::test_globals());
5122 run_unit_test(GCTimerAllTest::all());
5123 run_unit_test(arrayOopDesc::test_max_array_length());
5124 run_unit_test(CollectedHeap::test_is_in());
5125 run_unit_test(QuickSort::test_quick_sort());
5126 run_unit_test(GuardedMemory::test_guarded_memory());
5127 run_unit_test(AltHashing::test_alt_hash());
5128 run_unit_test(test_loggc_filename());
5129 run_unit_test(TestNewSize_test());
5130 run_unit_test(TestKlass_test());
5131 run_unit_test(Test_linked_list());
5132 run_unit_test(TestChunkedList_test());
5133 run_unit_test(ObjectMonitor::sanity_checks());
5134 #if INCLUDE_VM_STRUCTS
5135 run_unit_test(VMStructs::test());
5136 #endif
5137 #if INCLUDE_ALL_GCS
5138 run_unit_test(TestOldFreeSpaceCalculation_test());
5139 run_unit_test(TestG1BiasedArray_test());
5140 run_unit_test(HeapRegionRemSet::test_prt());
5141 run_unit_test(SpaceManager_test_adjust_initial_chunk_size());
5142 run_unit_test(TestBufferingOopClosure_test());
5143 run_unit_test(TestCodeCacheRemSet_test());
5144 if (UseG1GC) {
5145 run_unit_test(FreeRegionList_test());
5146 }
5147 #endif
5148 tty->print_cr("All internal VM tests passed");
5149 }
5150 }
5151
5152 #undef run_unit_test
5153
5154 #endif
5155
5156 #ifndef USDT2
5157 HS_DTRACE_PROBE_DECL3(hotspot_jni, CreateJavaVM__entry, vm, penv, args);
5158 DT_RETURN_MARK_DECL(CreateJavaVM, jint);
5159 #else /* USDT2 */
5160 DT_RETURN_MARK_DECL(CreateJavaVM, jint
5161 , HOTSPOT_JNI_CREATEJAVAVM_RETURN(_ret_ref));
|