8199370: [TESTBUG] Open source vm testbase GC tests
authoriignatyev
Thu, 17 May 2018 14:52:47 -0700
changeset 50168 2f59dc95847d
parent 50167 cc705c956798
child 50169 dd501973095c
8199370: [TESTBUG] Open source vm testbase GC tests Reviewed-by: erikj, ihse, ehelin
make/test/JtregNativeHotspot.gmk
test/hotspot/jtreg/ProblemList.txt
test/hotspot/jtreg/TEST.groups
test/hotspot/jtreg/vmTestbase/gc/ArrayJuggle/Juggle01/Juggle01.java
test/hotspot/jtreg/vmTestbase/gc/ArrayJuggle/Juggle01/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/ArrayJuggle/Juggle02/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/ArrayJuggle/Juggle02/TestDescription.java
test/hotspot/jtreg/vmTestbase/gc/ArrayJuggle/Juggle03/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/ArrayJuggle/Juggle03/TestDescription.java
test/hotspot/jtreg/vmTestbase/gc/ArrayJuggle/Juggle04/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/ArrayJuggle/Juggle04/TestDescription.java
test/hotspot/jtreg/vmTestbase/gc/ArrayJuggle/Juggle05/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/ArrayJuggle/Juggle05/TestDescription.java
test/hotspot/jtreg/vmTestbase/gc/ArrayJuggle/Juggle06/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/ArrayJuggle/Juggle06/TestDescription.java
test/hotspot/jtreg/vmTestbase/gc/ArrayJuggle/Juggle07/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/ArrayJuggle/Juggle07/TestDescription.java
test/hotspot/jtreg/vmTestbase/gc/ArrayJuggle/Juggle08/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/ArrayJuggle/Juggle08/TestDescription.java
test/hotspot/jtreg/vmTestbase/gc/ArrayJuggle/Juggle09/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/ArrayJuggle/Juggle09/TestDescription.java
test/hotspot/jtreg/vmTestbase/gc/ArrayJuggle/Juggle10/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/ArrayJuggle/Juggle10/TestDescription.java
test/hotspot/jtreg/vmTestbase/gc/ArrayJuggle/Juggle11/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/ArrayJuggle/Juggle11/TestDescription.java
test/hotspot/jtreg/vmTestbase/gc/ArrayJuggle/Juggle12/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/ArrayJuggle/Juggle12/TestDescription.java
test/hotspot/jtreg/vmTestbase/gc/ArrayJuggle/Juggle13/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/ArrayJuggle/Juggle13/TestDescription.java
test/hotspot/jtreg/vmTestbase/gc/ArrayJuggle/Juggle14/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/ArrayJuggle/Juggle14/TestDescription.java
test/hotspot/jtreg/vmTestbase/gc/ArrayJuggle/Juggle15/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/ArrayJuggle/Juggle15/TestDescription.java
test/hotspot/jtreg/vmTestbase/gc/ArrayJuggle/Juggle16/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/ArrayJuggle/Juggle16/TestDescription.java
test/hotspot/jtreg/vmTestbase/gc/ArrayJuggle/Juggle17/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/ArrayJuggle/Juggle17/TestDescription.java
test/hotspot/jtreg/vmTestbase/gc/ArrayJuggle/Juggle18/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/ArrayJuggle/Juggle18/TestDescription.java
test/hotspot/jtreg/vmTestbase/gc/ArrayJuggle/Juggle19/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/ArrayJuggle/Juggle19/TestDescription.java
test/hotspot/jtreg/vmTestbase/gc/ArrayJuggle/Juggle20/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/ArrayJuggle/Juggle20/TestDescription.java
test/hotspot/jtreg/vmTestbase/gc/ArrayJuggle/Juggle21/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/ArrayJuggle/Juggle21/TestDescription.java
test/hotspot/jtreg/vmTestbase/gc/ArrayJuggle/Juggle22/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/ArrayJuggle/Juggle22/TestDescription.java
test/hotspot/jtreg/vmTestbase/gc/ArrayJuggle/Juggle23/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/ArrayJuggle/Juggle23/TestDescription.java
test/hotspot/jtreg/vmTestbase/gc/ArrayJuggle/Juggle24/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/ArrayJuggle/Juggle24/TestDescription.java
test/hotspot/jtreg/vmTestbase/gc/ArrayJuggle/Juggle25/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/ArrayJuggle/Juggle25/TestDescription.java
test/hotspot/jtreg/vmTestbase/gc/ArrayJuggle/Juggle26/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/ArrayJuggle/Juggle26/TestDescription.java
test/hotspot/jtreg/vmTestbase/gc/ArrayJuggle/Juggle27/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/ArrayJuggle/Juggle27/TestDescription.java
test/hotspot/jtreg/vmTestbase/gc/ArrayJuggle/Juggle28/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/ArrayJuggle/Juggle28/TestDescription.java
test/hotspot/jtreg/vmTestbase/gc/ArrayJuggle/Juggle29/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/ArrayJuggle/Juggle29/TestDescription.java
test/hotspot/jtreg/vmTestbase/gc/ArrayJuggle/Juggle30/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/ArrayJuggle/Juggle30/TestDescription.java
test/hotspot/jtreg/vmTestbase/gc/ArrayJuggle/Juggle31/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/ArrayJuggle/Juggle31/TestDescription.java
test/hotspot/jtreg/vmTestbase/gc/ArrayJuggle/Juggle32/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/ArrayJuggle/Juggle32/TestDescription.java
test/hotspot/jtreg/vmTestbase/gc/ArrayJuggle/Juggle33/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/ArrayJuggle/Juggle33/TestDescription.java
test/hotspot/jtreg/vmTestbase/gc/ArrayJuggle/Juggle34/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/ArrayJuggle/Juggle34/TestDescription.java
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/ClassNNN.java.template
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/ExecutionTask.java
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/GenClassPoolJar.java
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/GenClassesBuilder.java
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/README
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/UnloadingTest.java
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/bytecode/Bytecode.java
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/bytecode/BytecodeFactory.java
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/bytecode/BytecodeGeneratorFactory.java
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/bytecode/BytecodeMutatorFactory.java
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/bytecode/BytecodePatcher.java
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/bytecode/DefaultTemplateClass.java
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/bytecode/GenClassesBuilder.java
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/bytecode/HumongousTemplateClassGen.java
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/bytecode/SourceGenerator.java
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/bytecode/TemplateClassWithStaticField.java
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/bytecode/ThreadTemplateClass.java
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/check/Assertion.java
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/check/AssertionContainer.java
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/check/ClassAssertion.java
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/check/FinalizedAssertion.java
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/check/PhantomizationServiceThread.java
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/check/PhantomizedAssertion.java
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/check/cleanup/CleanupAction.java
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/check/cleanup/UnusedThreadKiller.java
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/classloaders/DoItYourselfClassLoader.java
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/classloaders/FinalizableClassloader.java
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/classloaders/JNIClassloader.java
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/classloaders/ReflectionClassloader.java
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/configuration/ClassloadingMethod.java
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/configuration/KeepRefMode.java
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/configuration/ReleaseRefMode.java
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/configuration/TestConfiguration.java
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/configuration/WhatToKeep.java
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/keepref/InStackLocalHolder.java
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/keepref/InStaticFieldHolder.java
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/keepref/InThreadFieldHolder.java
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/keepref/JNIGlobalRefHolder.java
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/keepref/JNILocalRefHolder.java
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/keepref/NullClassloaderHolder.java
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/keepref/RefHolder.java
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/libdefine.c
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/loading/ClassLoadingHelper.java
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/loading/LibLoader.java
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_anonclassloader_inMemoryCompilation_keep_class/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_anonclassloader_inMemoryCompilation_keep_class/TestDescription.java
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_anonclassloader_inMemoryCompilation_keep_obj/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_anonclassloader_inMemoryCompilation_keep_obj/TestDescription.java
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_anonclassloader_keep_class/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_anonclassloader_keep_class/TestDescription.java
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_anonclassloader_keep_obj/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_anonclassloader_keep_obj/TestDescription.java
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_compilation_level1_inMemoryCompilation_keep_cl/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_compilation_level1_inMemoryCompilation_keep_cl/TestDescription.java
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_compilation_level1_inMemoryCompilation_keep_class/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_compilation_level1_inMemoryCompilation_keep_class/TestDescription.java
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_compilation_level1_inMemoryCompilation_keep_obj/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_compilation_level1_inMemoryCompilation_keep_obj/TestDescription.java
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_compilation_level1_keep_cl/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_compilation_level1_keep_cl/TestDescription.java
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_compilation_level1_keep_class/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_compilation_level1_keep_class/TestDescription.java
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_compilation_level1_keep_obj/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_compilation_level1_keep_obj/TestDescription.java
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_compilation_level2_inMemoryCompilation_keep_cl/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_compilation_level2_inMemoryCompilation_keep_cl/TestDescription.java
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_compilation_level2_inMemoryCompilation_keep_class/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_compilation_level2_inMemoryCompilation_keep_class/TestDescription.java
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_compilation_level2_inMemoryCompilation_keep_obj/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_compilation_level2_inMemoryCompilation_keep_obj/TestDescription.java
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_compilation_level2_keep_cl/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_compilation_level2_keep_cl/TestDescription.java
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_compilation_level2_keep_class/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_compilation_level2_keep_class/TestDescription.java
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_compilation_level2_keep_obj/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_compilation_level2_keep_obj/TestDescription.java
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_compilation_level3_inMemoryCompilation_keep_cl/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_compilation_level3_inMemoryCompilation_keep_cl/TestDescription.java
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_compilation_level3_inMemoryCompilation_keep_class/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_compilation_level3_inMemoryCompilation_keep_class/TestDescription.java
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_compilation_level3_inMemoryCompilation_keep_obj/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_compilation_level3_inMemoryCompilation_keep_obj/TestDescription.java
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_compilation_level3_keep_cl/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_compilation_level3_keep_cl/TestDescription.java
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_compilation_level3_keep_class/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_compilation_level3_keep_class/TestDescription.java
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_compilation_level3_keep_obj/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_compilation_level3_keep_obj/TestDescription.java
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_compilation_level4_inMemoryCompilation_keep_cl/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_compilation_level4_inMemoryCompilation_keep_cl/TestDescription.java
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_compilation_level4_inMemoryCompilation_keep_class/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_compilation_level4_inMemoryCompilation_keep_class/TestDescription.java
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_compilation_level4_inMemoryCompilation_keep_obj/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_compilation_level4_inMemoryCompilation_keep_obj/TestDescription.java
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_compilation_level4_keep_cl/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_compilation_level4_keep_cl/TestDescription.java
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_compilation_level4_keep_class/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_compilation_level4_keep_class/TestDescription.java
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_compilation_level4_keep_obj/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_compilation_level4_keep_obj/TestDescription.java
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_humongous_class_inMemoryCompilation_keep_cl/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_humongous_class_inMemoryCompilation_keep_cl/TestDescription.java
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_humongous_class_inMemoryCompilation_keep_class/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_humongous_class_inMemoryCompilation_keep_class/TestDescription.java
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_humongous_class_inMemoryCompilation_keep_obj/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_humongous_class_inMemoryCompilation_keep_obj/TestDescription.java
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_humongous_class_keep_cl/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_humongous_class_keep_cl/TestDescription.java
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_humongous_class_keep_class/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_humongous_class_keep_class/TestDescription.java
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_humongous_class_keep_obj/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_humongous_class_keep_obj/TestDescription.java
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_jni_classloading_inMemoryCompilation_keep_cl/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_jni_classloading_inMemoryCompilation_keep_cl/TestDescription.java
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_jni_classloading_inMemoryCompilation_keep_class/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_jni_classloading_inMemoryCompilation_keep_class/TestDescription.java
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_jni_classloading_inMemoryCompilation_keep_obj/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_jni_classloading_inMemoryCompilation_keep_obj/TestDescription.java
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_jni_classloading_keep_cl/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_jni_classloading_keep_cl/TestDescription.java
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_jni_classloading_keep_class/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_jni_classloading_keep_class/TestDescription.java
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_jni_classloading_keep_obj/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_jni_classloading_keep_obj/TestDescription.java
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_keepRef_jni_global_ref_inMemoryCompilation_keep_cl/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_keepRef_jni_global_ref_inMemoryCompilation_keep_cl/TestDescription.java
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_keepRef_jni_global_ref_inMemoryCompilation_keep_class/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_keepRef_jni_global_ref_inMemoryCompilation_keep_class/TestDescription.java
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_keepRef_jni_global_ref_inMemoryCompilation_keep_obj/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_keepRef_jni_global_ref_inMemoryCompilation_keep_obj/TestDescription.java
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_keepRef_jni_global_ref_keep_cl/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_keepRef_jni_global_ref_keep_cl/TestDescription.java
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_keepRef_jni_global_ref_keep_class/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_keepRef_jni_global_ref_keep_class/TestDescription.java
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_keepRef_jni_global_ref_keep_obj/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_keepRef_jni_global_ref_keep_obj/TestDescription.java
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_keepRef_jni_local_ref_inMemoryCompilation_keep_cl/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_keepRef_jni_local_ref_inMemoryCompilation_keep_cl/TestDescription.java
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_keepRef_jni_local_ref_inMemoryCompilation_keep_class/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_keepRef_jni_local_ref_inMemoryCompilation_keep_class/TestDescription.java
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_keepRef_jni_local_ref_inMemoryCompilation_keep_obj/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_keepRef_jni_local_ref_inMemoryCompilation_keep_obj/TestDescription.java
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_keepRef_jni_local_ref_keep_cl/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_keepRef_jni_local_ref_keep_cl/TestDescription.java
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_keepRef_jni_local_ref_keep_class/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_keepRef_jni_local_ref_keep_class/TestDescription.java
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_keepRef_jni_local_ref_keep_obj/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_keepRef_jni_local_ref_keep_obj/TestDescription.java
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_keepRef_rootClass_inMemoryCompilation_keep_cl/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_keepRef_rootClass_inMemoryCompilation_keep_cl/TestDescription.java
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_keepRef_rootClass_inMemoryCompilation_keep_class/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_keepRef_rootClass_inMemoryCompilation_keep_class/TestDescription.java
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_keepRef_rootClass_inMemoryCompilation_keep_obj/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_keepRef_rootClass_inMemoryCompilation_keep_obj/TestDescription.java
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_keepRef_rootClass_keep_cl/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_keepRef_rootClass_keep_cl/TestDescription.java
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_keepRef_rootClass_keep_class/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_keepRef_rootClass_keep_class/TestDescription.java
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_keepRef_rootClass_keep_obj/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_keepRef_rootClass_keep_obj/TestDescription.java
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_keepRef_stackLocal_inMemoryCompilation_keep_cl/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_keepRef_stackLocal_inMemoryCompilation_keep_cl/TestDescription.java
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_keepRef_stackLocal_inMemoryCompilation_keep_class/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_keepRef_stackLocal_inMemoryCompilation_keep_class/TestDescription.java
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_keepRef_stackLocal_inMemoryCompilation_keep_obj/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_keepRef_stackLocal_inMemoryCompilation_keep_obj/TestDescription.java
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_keepRef_stackLocal_keep_cl/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_keepRef_stackLocal_keep_cl/TestDescription.java
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_keepRef_stackLocal_keep_class/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_keepRef_stackLocal_keep_class/TestDescription.java
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_keepRef_stackLocal_keep_obj/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_keepRef_stackLocal_keep_obj/TestDescription.java
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_keepRef_staticField_inMemoryCompilation_keep_cl/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_keepRef_staticField_inMemoryCompilation_keep_cl/TestDescription.java
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_keepRef_staticField_inMemoryCompilation_keep_class/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_keepRef_staticField_inMemoryCompilation_keep_class/TestDescription.java
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_keepRef_staticField_inMemoryCompilation_keep_obj/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_keepRef_staticField_inMemoryCompilation_keep_obj/TestDescription.java
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_keepRef_staticField_keep_cl/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_keepRef_staticField_keep_cl/TestDescription.java
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_keepRef_staticField_keep_class/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_keepRef_staticField_keep_class/TestDescription.java
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_keepRef_staticField_keep_obj/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_keepRef_staticField_keep_obj/TestDescription.java
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_keepRef_strongRef_inMemoryCompilation_keep_cl/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_keepRef_strongRef_inMemoryCompilation_keep_cl/TestDescription.java
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_keepRef_strongRef_inMemoryCompilation_keep_class/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_keepRef_strongRef_inMemoryCompilation_keep_class/TestDescription.java
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_keepRef_strongRef_inMemoryCompilation_keep_obj/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_keepRef_strongRef_inMemoryCompilation_keep_obj/TestDescription.java
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_keepRef_strongRef_keep_cl/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_keepRef_strongRef_keep_cl/TestDescription.java
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_keepRef_strongRef_keep_class/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_keepRef_strongRef_keep_class/TestDescription.java
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_keepRef_strongRef_keep_obj/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_keepRef_strongRef_keep_obj/TestDescription.java
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_keepRef_threadItself_inMemoryCompilation_keep_cl/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_keepRef_threadItself_inMemoryCompilation_keep_cl/TestDescription.java
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_keepRef_threadItself_inMemoryCompilation_keep_class/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_keepRef_threadItself_inMemoryCompilation_keep_class/TestDescription.java
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_keepRef_threadItself_inMemoryCompilation_keep_obj/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_keepRef_threadItself_inMemoryCompilation_keep_obj/TestDescription.java
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_keepRef_threadItself_keep_cl/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_keepRef_threadItself_keep_cl/TestDescription.java
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_keepRef_threadItself_keep_class/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_keepRef_threadItself_keep_class/TestDescription.java
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_keepRef_threadItself_keep_obj/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_keepRef_threadItself_keep_obj/TestDescription.java
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_phantom_ref_inMemoryCompilation_keep_cl/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_phantom_ref_inMemoryCompilation_keep_cl/TestDescription.java
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_phantom_ref_inMemoryCompilation_keep_class/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_phantom_ref_inMemoryCompilation_keep_class/TestDescription.java
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_phantom_ref_inMemoryCompilation_keep_obj/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_phantom_ref_inMemoryCompilation_keep_obj/TestDescription.java
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_phantom_ref_keep_cl/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_phantom_ref_keep_cl/TestDescription.java
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_phantom_ref_keep_class/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_phantom_ref_keep_class/TestDescription.java
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_phantom_ref_keep_obj/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_phantom_ref_keep_obj/TestDescription.java
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_prot_domains_inMemoryCompilation_keep_cl/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_prot_domains_inMemoryCompilation_keep_cl/TestDescription.java
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_prot_domains_inMemoryCompilation_keep_class/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_prot_domains_inMemoryCompilation_keep_class/TestDescription.java
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_prot_domains_inMemoryCompilation_keep_obj/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_prot_domains_inMemoryCompilation_keep_obj/TestDescription.java
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_prot_domains_keep_cl/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_prot_domains_keep_cl/TestDescription.java
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_prot_domains_keep_class/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_prot_domains_keep_class/TestDescription.java
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_prot_domains_keep_obj/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_prot_domains_keep_obj/TestDescription.java
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_redefinition_inMemoryCompilation_keep_cl/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_redefinition_inMemoryCompilation_keep_cl/TestDescription.java
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_redefinition_inMemoryCompilation_keep_class/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_redefinition_inMemoryCompilation_keep_class/TestDescription.java
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_redefinition_inMemoryCompilation_keep_obj/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_redefinition_inMemoryCompilation_keep_obj/TestDescription.java
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_redefinition_keep_cl/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_redefinition_keep_cl/TestDescription.java
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_redefinition_keep_class/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_redefinition_keep_class/TestDescription.java
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_redefinition_keep_obj/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_redefinition_keep_obj/TestDescription.java
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_reflection_classloading_inMemoryCompilation_keep_cl/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_reflection_classloading_inMemoryCompilation_keep_cl/TestDescription.java
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_reflection_classloading_inMemoryCompilation_keep_class/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_reflection_classloading_inMemoryCompilation_keep_class/TestDescription.java
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_reflection_classloading_inMemoryCompilation_keep_obj/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_reflection_classloading_inMemoryCompilation_keep_obj/TestDescription.java
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_reflection_classloading_keep_cl/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_reflection_classloading_keep_cl/TestDescription.java
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_reflection_classloading_keep_class/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_reflection_classloading_keep_class/TestDescription.java
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_reflection_classloading_keep_obj/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_reflection_classloading_keep_obj/TestDescription.java
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_weak_ref_inMemoryCompilation_keep_cl/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_weak_ref_inMemoryCompilation_keep_cl/TestDescription.java
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_weak_ref_inMemoryCompilation_keep_class/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_weak_ref_inMemoryCompilation_keep_class/TestDescription.java
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_weak_ref_inMemoryCompilation_keep_obj/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_weak_ref_inMemoryCompilation_keep_obj/TestDescription.java
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_weak_ref_keep_cl/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_weak_ref_keep_cl/TestDescription.java
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_weak_ref_keep_class/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_weak_ref_keep_class/TestDescription.java
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_weak_ref_keep_obj/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_weak_ref_keep_obj/TestDescription.java
test/hotspot/jtreg/vmTestbase/gc/gctests/AllocateWithoutOomTest/AllocateWithoutOomTest.java
test/hotspot/jtreg/vmTestbase/gc/gctests/AllocateWithoutOomTest/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/gctests/BigChains/BigChains.java
test/hotspot/jtreg/vmTestbase/gc/gctests/BigChains/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/gctests/CallGC/CallGC01/CallGC01.java
test/hotspot/jtreg/vmTestbase/gc/gctests/CallGC/CallGC01/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/gctests/CallGC/CallGC02/CallGC02.java
test/hotspot/jtreg/vmTestbase/gc/gctests/CallGC/CallGC02/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/gctests/ClassDeallocGC/ClassDeallocGC.java
test/hotspot/jtreg/vmTestbase/gc/gctests/FinalizeTest01/FinalizeTest01.java
test/hotspot/jtreg/vmTestbase/gc/gctests/FinalizeTest01/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/gctests/FinalizeTest02/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/gctests/FinalizeTest02/TestDescription.java
test/hotspot/jtreg/vmTestbase/gc/gctests/FinalizeTest04/FinalizeTest04.java
test/hotspot/jtreg/vmTestbase/gc/gctests/FinalizeTest04/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/gctests/FinalizeTest05/FinalizeTest05.java
test/hotspot/jtreg/vmTestbase/gc/gctests/FinalizeTest05/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/gctests/FinalizerGC01/FinalizerGC01.java
test/hotspot/jtreg/vmTestbase/gc/gctests/FinalizerGC02/FinalizerGC02.java
test/hotspot/jtreg/vmTestbase/gc/gctests/GcPointerCheckTest/GcPointerCheckTest.java
test/hotspot/jtreg/vmTestbase/gc/gctests/GcPointerCheckTest/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/gctests/HeapUsageTest/HeapUsageTest.java
test/hotspot/jtreg/vmTestbase/gc/gctests/HeapUsageTest/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/gctests/InterruptGC/InterruptGC.java
test/hotspot/jtreg/vmTestbase/gc/gctests/InterruptGC/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/gctests/JumbleGC/JumbleGC.java
test/hotspot/jtreg/vmTestbase/gc/gctests/JumbleGC/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/gctests/JumbleGC/Tree.java
test/hotspot/jtreg/vmTestbase/gc/gctests/JumbleGC002/JumbleGC002.java
test/hotspot/jtreg/vmTestbase/gc/gctests/JumbleGC002/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/gctests/LargeObjects/large001/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/gctests/LargeObjects/large001/large001.java
test/hotspot/jtreg/vmTestbase/gc/gctests/LargeObjects/large002/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/gctests/LargeObjects/large002/TestDescription.java
test/hotspot/jtreg/vmTestbase/gc/gctests/LargeObjects/large003/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/gctests/LargeObjects/large003/TestDescription.java
test/hotspot/jtreg/vmTestbase/gc/gctests/LargeObjects/large004/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/gctests/LargeObjects/large004/TestDescription.java
test/hotspot/jtreg/vmTestbase/gc/gctests/LargeObjects/large005/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/gctests/LargeObjects/large005/TestDescription.java
test/hotspot/jtreg/vmTestbase/gc/gctests/LoadUnloadGC/LoadUnloadGC.java
test/hotspot/jtreg/vmTestbase/gc/gctests/LoadUnloadGC/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/gctests/LoadUnloadGC2/LoadUnloadGC2.java
test/hotspot/jtreg/vmTestbase/gc/gctests/LoadUnloadGC2/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/gctests/MTLinkedListGC/MTLinkedListGC.java
test/hotspot/jtreg/vmTestbase/gc/gctests/MTLinkedListGC/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/gctests/MTLinkedListGC/node.java
test/hotspot/jtreg/vmTestbase/gc/gctests/MTasyncGC/MTasyncGC.java
test/hotspot/jtreg/vmTestbase/gc/gctests/MTsyncGC/MTsyncGC.java
test/hotspot/jtreg/vmTestbase/gc/gctests/MatrixJuggleGC/MatrixJuggleGC.java
test/hotspot/jtreg/vmTestbase/gc/gctests/MatrixJuggleGC/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/gctests/MemoryEater/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/gctests/MemoryEater/TestDescription.java
test/hotspot/jtreg/vmTestbase/gc/gctests/MemoryEaterMT/MemoryEaterMT.java
test/hotspot/jtreg/vmTestbase/gc/gctests/MemoryEaterMT/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/gctests/ObjectMonitorCleanup/MonitorThread.java
test/hotspot/jtreg/vmTestbase/gc/gctests/ObjectMonitorCleanup/ObjectMonitorCleanup.java
test/hotspot/jtreg/vmTestbase/gc/gctests/ObjectMonitorCleanup/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/gctests/OneeFinalizerTest/OneeFinalizerTest.java
test/hotspot/jtreg/vmTestbase/gc/gctests/OneeFinalizerTest/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/gctests/PhantomReference/PRHelper.java
test/hotspot/jtreg/vmTestbase/gc/gctests/PhantomReference/PhantomHelper.java
test/hotspot/jtreg/vmTestbase/gc/gctests/PhantomReference/PhantomReferenceEvilTest/PhantomReferenceEvilTest.java
test/hotspot/jtreg/vmTestbase/gc/gctests/PhantomReference/PhantomReferenceEvilTest/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/gctests/PhantomReference/PhantomReferenceTest/PhantomReferenceTest.java
test/hotspot/jtreg/vmTestbase/gc/gctests/PhantomReference/PhantomReferenceTest/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/gctests/PhantomReference/phantom001/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/gctests/PhantomReference/phantom001/phantom001.java
test/hotspot/jtreg/vmTestbase/gc/gctests/PhantomReference/phantom002/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/gctests/PhantomReference/phantom002/TestDescription.java
test/hotspot/jtreg/vmTestbase/gc/gctests/ReferencesGC/CircularLinkedList.java
test/hotspot/jtreg/vmTestbase/gc/gctests/ReferencesGC/ReferencesGC.java
test/hotspot/jtreg/vmTestbase/gc/gctests/ReferencesGC/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/gctests/RememberedSet/RememberedSet.java
test/hotspot/jtreg/vmTestbase/gc/gctests/RememberedSet/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/gctests/SoftReference/SoftReferenceTest/SoftReferenceTest.java
test/hotspot/jtreg/vmTestbase/gc/gctests/SoftReference/SoftReferenceTest/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/gctests/SoftReference/soft001/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/gctests/SoftReference/soft001/soft001.java
test/hotspot/jtreg/vmTestbase/gc/gctests/SoftReference/soft002/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/gctests/SoftReference/soft002/TestDescription.java
test/hotspot/jtreg/vmTestbase/gc/gctests/SoftReference/soft003/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/gctests/SoftReference/soft003/soft003.java
test/hotspot/jtreg/vmTestbase/gc/gctests/SoftReference/soft004/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/gctests/SoftReference/soft004/soft004.java
test/hotspot/jtreg/vmTestbase/gc/gctests/SoftReference/soft005/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/gctests/SoftReference/soft005/soft005.java
test/hotspot/jtreg/vmTestbase/gc/gctests/Steal/steal001/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/gctests/Steal/steal001/steal001.java
test/hotspot/jtreg/vmTestbase/gc/gctests/Steal/steal002/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/gctests/Steal/steal002/steal002.java
test/hotspot/jtreg/vmTestbase/gc/gctests/StringGC/StringGC.java
test/hotspot/jtreg/vmTestbase/gc/gctests/StringGC/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/gctests/StringIntern/StringIntern.java
test/hotspot/jtreg/vmTestbase/gc/gctests/StringIntern/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/gctests/StringInternGC/StringInternGC.java
test/hotspot/jtreg/vmTestbase/gc/gctests/StringInternGC/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/gctests/StringInternSync/StringInternSync.java
test/hotspot/jtreg/vmTestbase/gc/gctests/StringInternSync/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/gctests/StringInternSync2/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/gctests/StringInternSync2/TestDescription.java
test/hotspot/jtreg/vmTestbase/gc/gctests/StringInternSyncWithGC/StringGenerator.java
test/hotspot/jtreg/vmTestbase/gc/gctests/StringInternSyncWithGC/StringInternSyncWithGC.java
test/hotspot/jtreg/vmTestbase/gc/gctests/StringInternSyncWithGC/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/gctests/StringInternSyncWithGC2/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/gctests/StringInternSyncWithGC2/TestDescription.java
test/hotspot/jtreg/vmTestbase/gc/gctests/StringInternSyncWithGC3/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/gctests/StringInternSyncWithGC3/TestDescription.java
test/hotspot/jtreg/vmTestbase/gc/gctests/StringInternSyncWithGC4/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/gctests/StringInternSyncWithGC4/TestDescription.java
test/hotspot/jtreg/vmTestbase/gc/gctests/ThreadGC/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/gctests/ThreadGC/ThreadGC.java
test/hotspot/jtreg/vmTestbase/gc/gctests/WeakReference/WeakReferenceEvilTest/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/gctests/WeakReference/WeakReferenceEvilTest/TestDescription.java
test/hotspot/jtreg/vmTestbase/gc/gctests/WeakReference/WeakReferenceEvilTest/WeakReferenceEvilTest.java
test/hotspot/jtreg/vmTestbase/gc/gctests/WeakReference/WeakReferenceTest/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/gctests/WeakReference/WeakReferenceTest/TestDescription.java
test/hotspot/jtreg/vmTestbase/gc/gctests/WeakReference/WeakReferenceTest/WeakReferenceTest.java
test/hotspot/jtreg/vmTestbase/gc/gctests/WeakReference/weak001/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/gctests/WeakReference/weak001/weak001.java
test/hotspot/jtreg/vmTestbase/gc/gctests/WeakReference/weak002/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/gctests/WeakReference/weak002/TestDescription.java
test/hotspot/jtreg/vmTestbase/gc/gctests/WeakReference/weak003/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/gctests/WeakReference/weak003/weak003.java
test/hotspot/jtreg/vmTestbase/gc/gctests/WeakReference/weak004/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/gctests/WeakReference/weak004/weak004.java
test/hotspot/jtreg/vmTestbase/gc/gctests/WeakReference/weak005/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/gctests/WeakReference/weak005/weak005.java
test/hotspot/jtreg/vmTestbase/gc/gctests/WeakReference/weak006/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/gctests/WeakReference/weak006/weak006.java
test/hotspot/jtreg/vmTestbase/gc/gctests/WeakReference/weak007/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/gctests/WeakReference/weak007/weak007.java
test/hotspot/jtreg/vmTestbase/gc/gctests/WeakReferenceGC/CircularLinkedList.java
test/hotspot/jtreg/vmTestbase/gc/gctests/WeakReferenceGC/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/gctests/WeakReferenceGC/WeakReferenceGC.java
test/hotspot/jtreg/vmTestbase/gc/gctests/fileTest/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/gctests/fileTest/fileTest.java
test/hotspot/jtreg/vmTestbase/gc/gctests/gctest01/gctest01.java
test/hotspot/jtreg/vmTestbase/gc/gctests/gctest02/gctest02.java
test/hotspot/jtreg/vmTestbase/gc/gctests/gctest03/Tree.java
test/hotspot/jtreg/vmTestbase/gc/gctests/gctest03/appthread.java
test/hotspot/jtreg/vmTestbase/gc/gctests/gctest03/gctest03.java
test/hotspot/jtreg/vmTestbase/gc/gctests/gctest04/gctest04.java
test/hotspot/jtreg/vmTestbase/gc/gctests/gctest04/reqgen.java
test/hotspot/jtreg/vmTestbase/gc/gctests/mallocWithGC1/libmallocWithGC1.c
test/hotspot/jtreg/vmTestbase/gc/gctests/mallocWithGC1/mallocWithGC1.java
test/hotspot/jtreg/vmTestbase/gc/gctests/mallocWithGC2/libmallocWithGC2.c
test/hotspot/jtreg/vmTestbase/gc/gctests/mallocWithGC2/mallocWithGC2.java
test/hotspot/jtreg/vmTestbase/gc/gctests/mallocWithGC3/libmallocWithGC3.c
test/hotspot/jtreg/vmTestbase/gc/gctests/mallocWithGC3/mallocWithGC3.java
test/hotspot/jtreg/vmTestbase/gc/gctests/nativeGC01/libnativeGC01.c
test/hotspot/jtreg/vmTestbase/gc/gctests/nativeGC01/nativeGC01.java
test/hotspot/jtreg/vmTestbase/gc/gctests/nativeGC02/libnativeGC02.c
test/hotspot/jtreg/vmTestbase/gc/gctests/nativeGC02/nativeGC02.java
test/hotspot/jtreg/vmTestbase/gc/gctests/nativeGC03/libnativeGC03.c
test/hotspot/jtreg/vmTestbase/gc/gctests/nativeGC03/nativeGC03.java
test/hotspot/jtreg/vmTestbase/gc/gctests/nativeGC05/libnativeGC05.c
test/hotspot/jtreg/vmTestbase/gc/gctests/nativeGC05/nativeGC05.java
test/hotspot/jtreg/vmTestbase/gc/hashcode/ExternalHashingTest/ExternalHashingTest.java
test/hotspot/jtreg/vmTestbase/gc/hashcode/ExternalHashingTest/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/hashcode/HCHelper.java
test/hotspot/jtreg/vmTestbase/gc/hashcode/HashCodeSimpleTest/HashCodeSimpleTest.java
test/hotspot/jtreg/vmTestbase/gc/hashcode/HashCodeSimpleTest/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/hashcode/HashCodeTestC/HashCodeTestC.java
test/hotspot/jtreg/vmTestbase/gc/hashcode/HashCodeTestC/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/hashcode/HashCodeTestCC/HashCodeTestCC.java
test/hotspot/jtreg/vmTestbase/gc/hashcode/HashCodeTestCC/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/hashcode/HashCodeTestP/HashCodeTestP.java
test/hotspot/jtreg/vmTestbase/gc/hashcode/HashCodeTestP/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/hashcode/HashCodeTestPC/HashCodeTestPC.java
test/hotspot/jtreg/vmTestbase/gc/hashcode/HashCodeTestPC/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/huge/quicklook/largeheap/Access/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/huge/quicklook/largeheap/Access/access.java
test/hotspot/jtreg/vmTestbase/gc/huge/quicklook/largeheap/MemOptions/MemOptions.sh
test/hotspot/jtreg/vmTestbase/gc/huge/quicklook/largeheap/MemOptions/MemStat.java
test/hotspot/jtreg/vmTestbase/gc/huge/quicklook/largeheap/MemOptions/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/huge/quicklook/largeheap/MemOptions/TestDescription.java
test/hotspot/jtreg/vmTestbase/gc/lock/LockerTest.java
test/hotspot/jtreg/vmTestbase/gc/lock/README
test/hotspot/jtreg/vmTestbase/gc/lock/jni/jnilock001/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/lock/jni/jnilock001/TestDescription.java
test/hotspot/jtreg/vmTestbase/gc/lock/jni/jnilock002/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/lock/jni/jnilock002/TestDescription.java
test/hotspot/jtreg/vmTestbase/gc/lock/jni/jnilock003/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/lock/jni/jnilock003/TestDescription.java
test/hotspot/jtreg/vmTestbase/gc/lock/jniref/jniglobalreflock01/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/lock/jniref/jniglobalreflock01/TestDescription.java
test/hotspot/jtreg/vmTestbase/gc/lock/jniref/jniglobalreflock02/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/lock/jniref/jniglobalreflock02/TestDescription.java
test/hotspot/jtreg/vmTestbase/gc/lock/jniref/jniglobalreflock03/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/lock/jniref/jniglobalreflock03/TestDescription.java
test/hotspot/jtreg/vmTestbase/gc/lock/jniref/jniglobalreflock04/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/lock/jniref/jniglobalreflock04/TestDescription.java
test/hotspot/jtreg/vmTestbase/gc/lock/jniref/jnilocalreflock01/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/lock/jniref/jnilocalreflock01/TestDescription.java
test/hotspot/jtreg/vmTestbase/gc/lock/jniref/jnilocalreflock02/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/lock/jniref/jnilocalreflock02/TestDescription.java
test/hotspot/jtreg/vmTestbase/gc/lock/jniref/jnilocalreflock03/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/lock/jniref/jnilocalreflock03/TestDescription.java
test/hotspot/jtreg/vmTestbase/gc/lock/jniref/jnilocalreflock04/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/lock/jniref/jnilocalreflock04/TestDescription.java
test/hotspot/jtreg/vmTestbase/gc/lock/jniref/jnireflock01/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/lock/jniref/jnireflock01/TestDescription.java
test/hotspot/jtreg/vmTestbase/gc/lock/jniref/jnireflock02/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/lock/jniref/jnireflock02/TestDescription.java
test/hotspot/jtreg/vmTestbase/gc/lock/jniref/jnireflock03/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/lock/jniref/jnireflock03/TestDescription.java
test/hotspot/jtreg/vmTestbase/gc/lock/jniref/jnireflock04/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/lock/jniref/jnireflock04/TestDescription.java
test/hotspot/jtreg/vmTestbase/gc/lock/jniref/jniweakglobalreflock01/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/lock/jniref/jniweakglobalreflock01/TestDescription.java
test/hotspot/jtreg/vmTestbase/gc/lock/jniref/jniweakglobalreflock02/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/lock/jniref/jniweakglobalreflock02/TestDescription.java
test/hotspot/jtreg/vmTestbase/gc/lock/jniref/jniweakglobalreflock03/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/lock/jniref/jniweakglobalreflock03/TestDescription.java
test/hotspot/jtreg/vmTestbase/gc/lock/jniref/jniweakglobalreflock04/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/lock/jniref/jniweakglobalreflock04/TestDescription.java
test/hotspot/jtreg/vmTestbase/gc/lock/jvmti/alloc/jvmtialloclock01/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/lock/jvmti/alloc/jvmtialloclock01/TestDescription.java
test/hotspot/jtreg/vmTestbase/gc/lock/jvmti/alloc/jvmtialloclock02/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/lock/jvmti/alloc/jvmtialloclock02/TestDescription.java
test/hotspot/jtreg/vmTestbase/gc/lock/jvmti/alloc/jvmtialloclock03/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/lock/jvmti/alloc/jvmtialloclock03/TestDescription.java
test/hotspot/jtreg/vmTestbase/gc/lock/jvmti/alloc/jvmtialloclock04/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/lock/jvmti/alloc/jvmtialloclock04/TestDescription.java
test/hotspot/jtreg/vmTestbase/gc/lock/malloc/malloclock01/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/lock/malloc/malloclock01/TestDescription.java
test/hotspot/jtreg/vmTestbase/gc/lock/malloc/malloclock02/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/lock/malloc/malloclock02/TestDescription.java
test/hotspot/jtreg/vmTestbase/gc/lock/malloc/malloclock03/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/lock/malloc/malloclock03/TestDescription.java
test/hotspot/jtreg/vmTestbase/gc/lock/malloc/malloclock04/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/lock/malloc/malloclock04/TestDescription.java
test/hotspot/jtreg/vmTestbase/gc/memory/Array/ArrayJuggle/ArrayJuggle.README
test/hotspot/jtreg/vmTestbase/gc/memory/Array/ArrayJuggle/Juggle1/Juggle1.java
test/hotspot/jtreg/vmTestbase/gc/memory/Array/ArrayJuggle/Juggle1/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/memory/Array/ArrayJuggle/Juggle1_gc/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/memory/Array/ArrayJuggle/Juggle1_gc/TestDescription.java
test/hotspot/jtreg/vmTestbase/gc/memory/Array/ArrayJuggle/Juggle2/Juggle2.java
test/hotspot/jtreg/vmTestbase/gc/memory/Array/ArrayJuggle/Juggle2/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/memory/Array/ArrayJuggle/Juggle2_gc/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/memory/Array/ArrayJuggle/Juggle2_gc/TestDescription.java
test/hotspot/jtreg/vmTestbase/gc/memory/Array/SampleMe/SampleClass.java
test/hotspot/jtreg/vmTestbase/gc/memory/Array/SampleMe/SampleMe.java
test/hotspot/jtreg/vmTestbase/gc/memory/Churn/Churn.README
test/hotspot/jtreg/vmTestbase/gc/memory/Churn/Churn1/Churn1.java
test/hotspot/jtreg/vmTestbase/gc/memory/Churn/Churn1/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/memory/Churn/Churn2/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/memory/Churn/Churn2/TestDescription.java
test/hotspot/jtreg/vmTestbase/gc/memory/Churn/Churn3/Churn3.java
test/hotspot/jtreg/vmTestbase/gc/memory/Churn/Churn3/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/memory/Churn/Churn3a/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/memory/Churn/Churn3a/TestDescription.java
test/hotspot/jtreg/vmTestbase/gc/memory/Churn/Churn4/Churn4.java
test/hotspot/jtreg/vmTestbase/gc/memory/Churn/Churn4/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/memory/FillingStation/FillingStation.java
test/hotspot/jtreg/vmTestbase/gc/memory/FillingStation/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/memory/LargePagesTest/LargePagesTest.java
test/hotspot/jtreg/vmTestbase/gc/memory/Nio/Nio.java
test/hotspot/jtreg/vmTestbase/gc/memory/UniThread/Circular.README
test/hotspot/jtreg/vmTestbase/gc/memory/UniThread/Circular1/Circular1.java
test/hotspot/jtreg/vmTestbase/gc/memory/UniThread/Circular1/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/memory/UniThread/Circular2/Circular2.java
test/hotspot/jtreg/vmTestbase/gc/memory/UniThread/Circular2/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/memory/UniThread/Circular3/Circular3.java
test/hotspot/jtreg/vmTestbase/gc/memory/UniThread/Circular3/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/memory/UniThread/Circular4/Circular4.java
test/hotspot/jtreg/vmTestbase/gc/memory/UniThread/Circular4/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/memory/UniThread/Linear.README
test/hotspot/jtreg/vmTestbase/gc/memory/UniThread/Linear1/Linear1.java
test/hotspot/jtreg/vmTestbase/gc/memory/UniThread/Linear1/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/memory/UniThread/Linear2/Linear2.java
test/hotspot/jtreg/vmTestbase/gc/memory/UniThread/Linear2/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/memory/UniThread/Linear3/Linear3.java
test/hotspot/jtreg/vmTestbase/gc/memory/UniThread/Linear3/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/memory/UniThread/Linear4/Linear4.java
test/hotspot/jtreg/vmTestbase/gc/memory/UniThread/Linear4/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/vector/CircularListHigh/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/vector/CircularListHigh/TestDescription.java
test/hotspot/jtreg/vmTestbase/gc/vector/CircularListLow/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/vector/CircularListLow/TestDescription.java
test/hotspot/jtreg/vmTestbase/gc/vector/DoubleArrayHigh/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/vector/DoubleArrayHigh/TestDescription.java
test/hotspot/jtreg/vmTestbase/gc/vector/DoubleArrayLow/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/vector/DoubleArrayLow/TestDescription.java
test/hotspot/jtreg/vmTestbase/gc/vector/FloatArrayHigh/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/vector/FloatArrayHigh/TestDescription.java
test/hotspot/jtreg/vmTestbase/gc/vector/FloatArrayLow/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/vector/FloatArrayLow/TestDescription.java
test/hotspot/jtreg/vmTestbase/gc/vector/LinearListHigh/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/vector/LinearListHigh/TestDescription.java
test/hotspot/jtreg/vmTestbase/gc/vector/LinearListLow/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/vector/LinearListLow/TestDescription.java
test/hotspot/jtreg/vmTestbase/gc/vector/NonbranchyTreeHigh/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/vector/NonbranchyTreeHigh/TestDescription.java
test/hotspot/jtreg/vmTestbase/gc/vector/NonbranchyTreeLow/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/vector/NonbranchyTreeLow/TestDescription.java
test/hotspot/jtreg/vmTestbase/gc/vector/ObjectArrayHigh/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/vector/ObjectArrayHigh/TestDescription.java
test/hotspot/jtreg/vmTestbase/gc/vector/ObjectArrayLow/TEST.properties
test/hotspot/jtreg/vmTestbase/gc/vector/ObjectArrayLow/TestDescription.java
test/hotspot/jtreg/vmTestbase/gc/vector/Simple.README
test/hotspot/jtreg/vmTestbase/gc/vector/SimpleGC/SimpleGC.java
test/hotspot/jtreg/vmTestbase/gc/vector/SimpleGC/TEST.properties
test/hotspot/jtreg/vmTestbase/nsk/share/gc/GenClassesBuilder.java
test/hotspot/jtreg/vmTestbase/nsk/share/gc/Generator.java
test/hotspot/jtreg/vmTestbase/nsk/share/gc/lock/jni/libBooleanArrayCriticalLocker.c
test/hotspot/jtreg/vmTestbase/nsk/share/gc/lock/jni/libByteArrayCriticalLocker.c
test/hotspot/jtreg/vmTestbase/nsk/share/gc/lock/jni/libCharArrayCriticalLocker.c
test/hotspot/jtreg/vmTestbase/nsk/share/gc/lock/jni/libDoubleArrayCriticalLocker.c
test/hotspot/jtreg/vmTestbase/nsk/share/gc/lock/jni/libFloatArrayCriticalLocker.c
test/hotspot/jtreg/vmTestbase/nsk/share/gc/lock/jni/libIntArrayCriticalLocker.c
test/hotspot/jtreg/vmTestbase/nsk/share/gc/lock/jni/libLongArrayCriticalLocker.c
test/hotspot/jtreg/vmTestbase/nsk/share/gc/lock/jni/libShortArrayCriticalLocker.c
test/hotspot/jtreg/vmTestbase/nsk/share/gc/lock/jni/libStringCriticalLocker.c
test/hotspot/jtreg/vmTestbase/nsk/share/gc/lock/jniref/libJNIGlobalRefLocker.c
test/hotspot/jtreg/vmTestbase/nsk/share/gc/lock/jniref/libJNILocalRefLocker.c
test/hotspot/jtreg/vmTestbase/nsk/share/gc/lock/jniref/libJNIRefLocker.c
test/hotspot/jtreg/vmTestbase/nsk/share/gc/lock/jniref/libJNIWeakGlobalRefLocker.c
test/hotspot/jtreg/vmTestbase/nsk/share/gc/lock/jvmti/libJVMTIAllocLocker.c
test/hotspot/jtreg/vmTestbase/nsk/share/gc/lock/malloc/libMallocLocker.c
test/hotspot/jtreg/vmTestbase/vm/gc/compact/Compact.java
test/hotspot/jtreg/vmTestbase/vm/gc/compact/Compact_Arrays/TEST.properties
test/hotspot/jtreg/vmTestbase/vm/gc/compact/Compact_Arrays/TestDescription.java
test/hotspot/jtreg/vmTestbase/vm/gc/compact/Compact_Arrays1/TEST.properties
test/hotspot/jtreg/vmTestbase/vm/gc/compact/Compact_Arrays1/TestDescription.java
test/hotspot/jtreg/vmTestbase/vm/gc/compact/Compact_Arrays_ArrayOf/TEST.properties
test/hotspot/jtreg/vmTestbase/vm/gc/compact/Compact_Arrays_ArrayOf/TestDescription.java
test/hotspot/jtreg/vmTestbase/vm/gc/compact/Compact_Arrays_ArrayOf1/TEST.properties
test/hotspot/jtreg/vmTestbase/vm/gc/compact/Compact_Arrays_ArrayOf1/TestDescription.java
test/hotspot/jtreg/vmTestbase/vm/gc/compact/Compact_Arrays_TwoFields/TEST.properties
test/hotspot/jtreg/vmTestbase/vm/gc/compact/Compact_Arrays_TwoFields/TestDescription.java
test/hotspot/jtreg/vmTestbase/vm/gc/compact/Compact_Arrays_TwoFields1/TEST.properties
test/hotspot/jtreg/vmTestbase/vm/gc/compact/Compact_Arrays_TwoFields1/TestDescription.java
test/hotspot/jtreg/vmTestbase/vm/gc/compact/Compact_InternedStrings/TEST.properties
test/hotspot/jtreg/vmTestbase/vm/gc/compact/Compact_InternedStrings/TestDescription.java
test/hotspot/jtreg/vmTestbase/vm/gc/compact/Compact_InternedStrings1/TEST.properties
test/hotspot/jtreg/vmTestbase/vm/gc/compact/Compact_InternedStrings1/TestDescription.java
test/hotspot/jtreg/vmTestbase/vm/gc/compact/Compact_InternedStrings_NonbranchyTree/TEST.properties
test/hotspot/jtreg/vmTestbase/vm/gc/compact/Compact_InternedStrings_NonbranchyTree/TestDescription.java
test/hotspot/jtreg/vmTestbase/vm/gc/compact/Compact_InternedStrings_Strings/TEST.properties
test/hotspot/jtreg/vmTestbase/vm/gc/compact/Compact_InternedStrings_Strings/TestDescription.java
test/hotspot/jtreg/vmTestbase/vm/gc/compact/Compact_NonbranchyTree/TEST.properties
test/hotspot/jtreg/vmTestbase/vm/gc/compact/Compact_NonbranchyTree/TestDescription.java
test/hotspot/jtreg/vmTestbase/vm/gc/compact/Compact_NonbranchyTree1/TEST.properties
test/hotspot/jtreg/vmTestbase/vm/gc/compact/Compact_NonbranchyTree1/TestDescription.java
test/hotspot/jtreg/vmTestbase/vm/gc/compact/Compact_NonbranchyTree_ArrayOf/TEST.properties
test/hotspot/jtreg/vmTestbase/vm/gc/compact/Compact_NonbranchyTree_ArrayOf/TestDescription.java
test/hotspot/jtreg/vmTestbase/vm/gc/compact/Compact_NonbranchyTree_ArrayOf1/TEST.properties
test/hotspot/jtreg/vmTestbase/vm/gc/compact/Compact_NonbranchyTree_ArrayOf1/TestDescription.java
test/hotspot/jtreg/vmTestbase/vm/gc/compact/Compact_NonbranchyTree_TwoFields/TEST.properties
test/hotspot/jtreg/vmTestbase/vm/gc/compact/Compact_NonbranchyTree_TwoFields/TestDescription.java
test/hotspot/jtreg/vmTestbase/vm/gc/compact/Compact_NonbranchyTree_TwoFields1/TEST.properties
test/hotspot/jtreg/vmTestbase/vm/gc/compact/Compact_NonbranchyTree_TwoFields1/TestDescription.java
test/hotspot/jtreg/vmTestbase/vm/gc/compact/Compact_Strings/TEST.properties
test/hotspot/jtreg/vmTestbase/vm/gc/compact/Compact_Strings/TestDescription.java
test/hotspot/jtreg/vmTestbase/vm/gc/compact/Compact_Strings1/TEST.properties
test/hotspot/jtreg/vmTestbase/vm/gc/compact/Compact_Strings1/TestDescription.java
test/hotspot/jtreg/vmTestbase/vm/gc/compact/Compact_Strings_ArrayOf/TEST.properties
test/hotspot/jtreg/vmTestbase/vm/gc/compact/Compact_Strings_ArrayOf/TestDescription.java
test/hotspot/jtreg/vmTestbase/vm/gc/compact/Compact_Strings_ArrayOf1/TEST.properties
test/hotspot/jtreg/vmTestbase/vm/gc/compact/Compact_Strings_ArrayOf1/TestDescription.java
test/hotspot/jtreg/vmTestbase/vm/gc/compact/Compact_Strings_InternedStrings/TEST.properties
test/hotspot/jtreg/vmTestbase/vm/gc/compact/Compact_Strings_InternedStrings/TestDescription.java
test/hotspot/jtreg/vmTestbase/vm/gc/compact/Compact_Strings_TwoFields/TEST.properties
test/hotspot/jtreg/vmTestbase/vm/gc/compact/Compact_Strings_TwoFields/TestDescription.java
test/hotspot/jtreg/vmTestbase/vm/gc/compact/Compact_Strings_TwoFields1/TEST.properties
test/hotspot/jtreg/vmTestbase/vm/gc/compact/Compact_Strings_TwoFields1/TestDescription.java
test/hotspot/jtreg/vmTestbase/vm/gc/compact/Compact_TwoFields_InternedStrings/TEST.properties
test/hotspot/jtreg/vmTestbase/vm/gc/compact/Compact_TwoFields_InternedStrings/TestDescription.java
test/hotspot/jtreg/vmTestbase/vm/gc/compact/Humongous_Arrays/TEST.properties
test/hotspot/jtreg/vmTestbase/vm/gc/compact/Humongous_Arrays/TestDescription.java
test/hotspot/jtreg/vmTestbase/vm/gc/compact/Humongous_Arrays1/TEST.properties
test/hotspot/jtreg/vmTestbase/vm/gc/compact/Humongous_Arrays1/TestDescription.java
test/hotspot/jtreg/vmTestbase/vm/gc/compact/Humongous_Arrays5M/TEST.properties
test/hotspot/jtreg/vmTestbase/vm/gc/compact/Humongous_Arrays5M/TestDescription.java
test/hotspot/jtreg/vmTestbase/vm/gc/compact/Humongous_InternedStrings/TEST.properties
test/hotspot/jtreg/vmTestbase/vm/gc/compact/Humongous_InternedStrings/TestDescription.java
test/hotspot/jtreg/vmTestbase/vm/gc/compact/Humongous_InternedStrings1/TEST.properties
test/hotspot/jtreg/vmTestbase/vm/gc/compact/Humongous_InternedStrings1/TestDescription.java
test/hotspot/jtreg/vmTestbase/vm/gc/compact/Humongous_NonbranchyTree/TEST.properties
test/hotspot/jtreg/vmTestbase/vm/gc/compact/Humongous_NonbranchyTree/TestDescription.java
test/hotspot/jtreg/vmTestbase/vm/gc/compact/Humongous_NonbranchyTree1/TEST.properties
test/hotspot/jtreg/vmTestbase/vm/gc/compact/Humongous_NonbranchyTree1/TestDescription.java
test/hotspot/jtreg/vmTestbase/vm/gc/compact/Humongous_NonbranchyTree5M/TEST.properties
test/hotspot/jtreg/vmTestbase/vm/gc/compact/Humongous_NonbranchyTree5M/TestDescription.java
test/hotspot/jtreg/vmTestbase/vm/gc/compact/Humongous_Strings/TEST.properties
test/hotspot/jtreg/vmTestbase/vm/gc/compact/Humongous_Strings/TestDescription.java
test/hotspot/jtreg/vmTestbase/vm/gc/compact/Humongous_Strings1/TEST.properties
test/hotspot/jtreg/vmTestbase/vm/gc/compact/Humongous_Strings1/TestDescription.java
test/hotspot/jtreg/vmTestbase/vm/gc/compact/README
test/hotspot/jtreg/vmTestbase/vm/gc/concurrent/Concurrent.java
test/hotspot/jtreg/vmTestbase/vm/gc/concurrent/lp30yp0rp0mr30st300/TEST.properties
test/hotspot/jtreg/vmTestbase/vm/gc/concurrent/lp30yp0rp0mr30st300/TestDescription.java
test/hotspot/jtreg/vmTestbase/vm/gc/concurrent/lp30yp0rp0mr70st300t1/TEST.properties
test/hotspot/jtreg/vmTestbase/vm/gc/concurrent/lp30yp0rp0mr70st300t1/TestDescription.java
test/hotspot/jtreg/vmTestbase/vm/gc/concurrent/lp30yp0rp30mr0st300/TEST.properties
test/hotspot/jtreg/vmTestbase/vm/gc/concurrent/lp30yp0rp30mr0st300/TestDescription.java
test/hotspot/jtreg/vmTestbase/vm/gc/concurrent/lp30yp0rp30mr30st0t1/TEST.properties
test/hotspot/jtreg/vmTestbase/vm/gc/concurrent/lp30yp0rp30mr30st0t1/TestDescription.java
test/hotspot/jtreg/vmTestbase/vm/gc/concurrent/lp30yp0rp30mr70st0/TEST.properties
test/hotspot/jtreg/vmTestbase/vm/gc/concurrent/lp30yp0rp30mr70st0/TestDescription.java
test/hotspot/jtreg/vmTestbase/vm/gc/concurrent/lp30yp0rp30mr70st300t1/TEST.properties
test/hotspot/jtreg/vmTestbase/vm/gc/concurrent/lp30yp0rp30mr70st300t1/TestDescription.java
test/hotspot/jtreg/vmTestbase/vm/gc/concurrent/lp30yp0rp70mr30st0/TEST.properties
test/hotspot/jtreg/vmTestbase/vm/gc/concurrent/lp30yp0rp70mr30st0/TestDescription.java
test/hotspot/jtreg/vmTestbase/vm/gc/concurrent/lp30yp0rp70mr30st300t1/TEST.properties
test/hotspot/jtreg/vmTestbase/vm/gc/concurrent/lp30yp0rp70mr30st300t1/TestDescription.java
test/hotspot/jtreg/vmTestbase/vm/gc/concurrent/lp30yp10rp0mr30st300/TEST.properties
test/hotspot/jtreg/vmTestbase/vm/gc/concurrent/lp30yp10rp0mr30st300/TestDescription.java
test/hotspot/jtreg/vmTestbase/vm/gc/concurrent/lp30yp10rp0mr70st300t1/TEST.properties
test/hotspot/jtreg/vmTestbase/vm/gc/concurrent/lp30yp10rp0mr70st300t1/TestDescription.java
test/hotspot/jtreg/vmTestbase/vm/gc/concurrent/lp30yp10rp30mr0st300/TEST.properties
test/hotspot/jtreg/vmTestbase/vm/gc/concurrent/lp30yp10rp30mr0st300/TestDescription.java
test/hotspot/jtreg/vmTestbase/vm/gc/concurrent/lp30yp10rp30mr30st0t1/TEST.properties
test/hotspot/jtreg/vmTestbase/vm/gc/concurrent/lp30yp10rp30mr30st0t1/TestDescription.java
test/hotspot/jtreg/vmTestbase/vm/gc/concurrent/lp30yp10rp30mr70st0/TEST.properties
test/hotspot/jtreg/vmTestbase/vm/gc/concurrent/lp30yp10rp30mr70st0/TestDescription.java
test/hotspot/jtreg/vmTestbase/vm/gc/concurrent/lp30yp10rp30mr70st300t1/TEST.properties
test/hotspot/jtreg/vmTestbase/vm/gc/concurrent/lp30yp10rp30mr70st300t1/TestDescription.java
test/hotspot/jtreg/vmTestbase/vm/gc/concurrent/lp30yp10rp70mr30st0/TEST.properties
test/hotspot/jtreg/vmTestbase/vm/gc/concurrent/lp30yp10rp70mr30st0/TestDescription.java
test/hotspot/jtreg/vmTestbase/vm/gc/concurrent/lp30yp10rp70mr30st300t1/TEST.properties
test/hotspot/jtreg/vmTestbase/vm/gc/concurrent/lp30yp10rp70mr30st300t1/TestDescription.java
test/hotspot/jtreg/vmTestbase/vm/gc/concurrent/lp30yp25rp0mr30st300/TEST.properties
test/hotspot/jtreg/vmTestbase/vm/gc/concurrent/lp30yp25rp0mr30st300/TestDescription.java
test/hotspot/jtreg/vmTestbase/vm/gc/concurrent/lp30yp25rp0mr70st300t1/TEST.properties
test/hotspot/jtreg/vmTestbase/vm/gc/concurrent/lp30yp25rp0mr70st300t1/TestDescription.java
test/hotspot/jtreg/vmTestbase/vm/gc/concurrent/lp30yp25rp30mr0st300/TEST.properties
test/hotspot/jtreg/vmTestbase/vm/gc/concurrent/lp30yp25rp30mr0st300/TestDescription.java
test/hotspot/jtreg/vmTestbase/vm/gc/concurrent/lp30yp25rp30mr30st0t1/TEST.properties
test/hotspot/jtreg/vmTestbase/vm/gc/concurrent/lp30yp25rp30mr30st0t1/TestDescription.java
test/hotspot/jtreg/vmTestbase/vm/gc/concurrent/lp30yp25rp30mr70st0/TEST.properties
test/hotspot/jtreg/vmTestbase/vm/gc/concurrent/lp30yp25rp30mr70st0/TestDescription.java
test/hotspot/jtreg/vmTestbase/vm/gc/concurrent/lp30yp25rp30mr70st300t1/TEST.properties
test/hotspot/jtreg/vmTestbase/vm/gc/concurrent/lp30yp25rp30mr70st300t1/TestDescription.java
test/hotspot/jtreg/vmTestbase/vm/gc/concurrent/lp30yp25rp70mr30st0/TEST.properties
test/hotspot/jtreg/vmTestbase/vm/gc/concurrent/lp30yp25rp70mr30st0/TestDescription.java
test/hotspot/jtreg/vmTestbase/vm/gc/concurrent/lp30yp25rp70mr30st300t1/TEST.properties
test/hotspot/jtreg/vmTestbase/vm/gc/concurrent/lp30yp25rp70mr30st300t1/TestDescription.java
test/hotspot/jtreg/vmTestbase/vm/gc/concurrent/lp50yp0rp0mr30st300/TEST.properties
test/hotspot/jtreg/vmTestbase/vm/gc/concurrent/lp50yp0rp0mr30st300/TestDescription.java
test/hotspot/jtreg/vmTestbase/vm/gc/concurrent/lp50yp0rp0mr70st300t1/TEST.properties
test/hotspot/jtreg/vmTestbase/vm/gc/concurrent/lp50yp0rp0mr70st300t1/TestDescription.java
test/hotspot/jtreg/vmTestbase/vm/gc/concurrent/lp50yp0rp30mr0st300/TEST.properties
test/hotspot/jtreg/vmTestbase/vm/gc/concurrent/lp50yp0rp30mr0st300/TestDescription.java
test/hotspot/jtreg/vmTestbase/vm/gc/concurrent/lp50yp0rp30mr30st0t1/TEST.properties
test/hotspot/jtreg/vmTestbase/vm/gc/concurrent/lp50yp0rp30mr30st0t1/TestDescription.java
test/hotspot/jtreg/vmTestbase/vm/gc/concurrent/lp50yp0rp30mr70st0/TEST.properties
test/hotspot/jtreg/vmTestbase/vm/gc/concurrent/lp50yp0rp30mr70st0/TestDescription.java
test/hotspot/jtreg/vmTestbase/vm/gc/concurrent/lp50yp0rp30mr70st300t1/TEST.properties
test/hotspot/jtreg/vmTestbase/vm/gc/concurrent/lp50yp0rp30mr70st300t1/TestDescription.java
test/hotspot/jtreg/vmTestbase/vm/gc/concurrent/lp50yp0rp70mr30st0/TEST.properties
test/hotspot/jtreg/vmTestbase/vm/gc/concurrent/lp50yp0rp70mr30st0/TestDescription.java
test/hotspot/jtreg/vmTestbase/vm/gc/concurrent/lp50yp0rp70mr30st300t1/TEST.properties
test/hotspot/jtreg/vmTestbase/vm/gc/concurrent/lp50yp0rp70mr30st300t1/TestDescription.java
test/hotspot/jtreg/vmTestbase/vm/gc/concurrent/lp50yp10rp0mr30st300/TEST.properties
test/hotspot/jtreg/vmTestbase/vm/gc/concurrent/lp50yp10rp0mr30st300/TestDescription.java
test/hotspot/jtreg/vmTestbase/vm/gc/concurrent/lp50yp10rp0mr70st300t1/TEST.properties
test/hotspot/jtreg/vmTestbase/vm/gc/concurrent/lp50yp10rp0mr70st300t1/TestDescription.java
test/hotspot/jtreg/vmTestbase/vm/gc/concurrent/lp50yp10rp30mr0st300/TEST.properties
test/hotspot/jtreg/vmTestbase/vm/gc/concurrent/lp50yp10rp30mr0st300/TestDescription.java
test/hotspot/jtreg/vmTestbase/vm/gc/concurrent/lp50yp10rp30mr30st0t1/TEST.properties
test/hotspot/jtreg/vmTestbase/vm/gc/concurrent/lp50yp10rp30mr30st0t1/TestDescription.java
test/hotspot/jtreg/vmTestbase/vm/gc/concurrent/lp50yp10rp30mr70st0/TEST.properties
test/hotspot/jtreg/vmTestbase/vm/gc/concurrent/lp50yp10rp30mr70st0/TestDescription.java
test/hotspot/jtreg/vmTestbase/vm/gc/concurrent/lp50yp10rp30mr70st300t1/TEST.properties
test/hotspot/jtreg/vmTestbase/vm/gc/concurrent/lp50yp10rp30mr70st300t1/TestDescription.java
test/hotspot/jtreg/vmTestbase/vm/gc/concurrent/lp50yp10rp70mr30st0/TEST.properties
test/hotspot/jtreg/vmTestbase/vm/gc/concurrent/lp50yp10rp70mr30st0/TestDescription.java
test/hotspot/jtreg/vmTestbase/vm/gc/concurrent/lp50yp10rp70mr30st300t1/TEST.properties
test/hotspot/jtreg/vmTestbase/vm/gc/concurrent/lp50yp10rp70mr30st300t1/TestDescription.java
test/hotspot/jtreg/vmTestbase/vm/gc/concurrent/lp60yp0rp30mr0st300/TEST.properties
test/hotspot/jtreg/vmTestbase/vm/gc/concurrent/lp60yp0rp30mr0st300/TestDescription.java
test/hotspot/jtreg/vmTestbase/vm/gc/containers/CollectionContainer.java
test/hotspot/jtreg/vmTestbase/vm/gc/containers/Combination01/TEST.properties
test/hotspot/jtreg/vmTestbase/vm/gc/containers/Combination01/TestDescription.java
test/hotspot/jtreg/vmTestbase/vm/gc/containers/Combination02/TEST.properties
test/hotspot/jtreg/vmTestbase/vm/gc/containers/Combination02/TestDescription.java
test/hotspot/jtreg/vmTestbase/vm/gc/containers/Combination03/TEST.properties
test/hotspot/jtreg/vmTestbase/vm/gc/containers/Combination03/TestDescription.java
test/hotspot/jtreg/vmTestbase/vm/gc/containers/Combination04/TEST.properties
test/hotspot/jtreg/vmTestbase/vm/gc/containers/Combination04/TestDescription.java
test/hotspot/jtreg/vmTestbase/vm/gc/containers/Combination05/TEST.properties
test/hotspot/jtreg/vmTestbase/vm/gc/containers/Combination05/TestDescription.java
test/hotspot/jtreg/vmTestbase/vm/gc/containers/ConcurrentHashMap_Arrays/TEST.properties
test/hotspot/jtreg/vmTestbase/vm/gc/containers/ConcurrentHashMap_Arrays/TestDescription.java
test/hotspot/jtreg/vmTestbase/vm/gc/containers/Container.java
test/hotspot/jtreg/vmTestbase/vm/gc/containers/ContainerDescription.java
test/hotspot/jtreg/vmTestbase/vm/gc/containers/ContainersTest.java
test/hotspot/jtreg/vmTestbase/vm/gc/containers/DequeueContainer.java
test/hotspot/jtreg/vmTestbase/vm/gc/containers/HashMap_Arrays/TEST.properties
test/hotspot/jtreg/vmTestbase/vm/gc/containers/HashMap_Arrays/TestDescription.java
test/hotspot/jtreg/vmTestbase/vm/gc/containers/LinkedBlockingDeque_Arrays/TEST.properties
test/hotspot/jtreg/vmTestbase/vm/gc/containers/LinkedBlockingDeque_Arrays/TestDescription.java
test/hotspot/jtreg/vmTestbase/vm/gc/containers/LinkedHashMap_Arrays/TEST.properties
test/hotspot/jtreg/vmTestbase/vm/gc/containers/LinkedHashMap_Arrays/TestDescription.java
test/hotspot/jtreg/vmTestbase/vm/gc/containers/LinkedList_Arrays/TEST.properties
test/hotspot/jtreg/vmTestbase/vm/gc/containers/LinkedList_Arrays/TestDescription.java
test/hotspot/jtreg/vmTestbase/vm/gc/containers/MapContainer.java
test/hotspot/jtreg/vmTestbase/vm/gc/containers/Speed.java
test/hotspot/jtreg/vmTestbase/vm/gc/containers/TreeMap_Arrays/TEST.properties
test/hotspot/jtreg/vmTestbase/vm/gc/containers/TreeMap_Arrays/TestDescription.java
test/hotspot/jtreg/vmTestbase/vm/gc/containers/TreeSet_String/TEST.properties
test/hotspot/jtreg/vmTestbase/vm/gc/containers/TreeSet_String/TestDescription.java
test/hotspot/jtreg/vmTestbase/vm/gc/containers/readme
test/hotspot/jtreg/vmTestbase/vm/gc/kind/parOld/TestDescription.java
test/hotspot/jtreg/vmTestbase/vm/gc/kind/parOld/test.sh
--- a/make/test/JtregNativeHotspot.gmk	Thu May 17 12:59:53 2018 -0700
+++ b/make/test/JtregNativeHotspot.gmk	Thu May 17 14:52:47 2018 -0700
@@ -89,6 +89,26 @@
     -I$(VM_TESTBASE_DIR)/nsk/share/native \
     -I$(VM_TESTBASE_DIR)/nsk/share/jni
 
+NSK_GC_LOCK_JVMTI_INCLUDES := \
+    -I$(VM_TESTBASE_DIR)/nsk/share/gc/lock/jvmti \
+    -I$(VM_TESTBASE_DIR)/nsk/share/native \
+    -I$(VM_TESTBASE_DIR)/nsk/share/jni
+
+NSK_GC_LOCK_MALLOC_INCLUDES := \
+    -I$(VM_TESTBASE_DIR)/nsk/share/gc/lock/malloc \
+    -I$(VM_TESTBASE_DIR)/nsk/share/native \
+    -I$(VM_TESTBASE_DIR)/nsk/share/jni
+
+NSK_GC_LOCK_JNI_INCLUDES := \
+    -I$(VM_TESTBASE_DIR)/nsk/share/gc/lock/jni \
+    -I$(VM_TESTBASE_DIR)/nsk/share/native \
+    -I$(VM_TESTBASE_DIR)/nsk/share/jni
+
+NSK_GC_LOCK_REF_INCLUDES := \
+    -I$(VM_TESTBASE_DIR)/nsk/share/gc/lock/jniref \
+    -I$(VM_TESTBASE_DIR)/nsk/share/native \
+    -I$(VM_TESTBASE_DIR)/nsk/share/jni
+
 BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libProcessUtils := $(VM_SHARE_INCLUDES)
 
 BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libThreadController := $(NSK_MONITORING_INCLUDES)
@@ -111,6 +131,25 @@
 
 BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libnativeAndMH := $(MLVM_STRESS_INCLUDES)
 
+BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libJVMTIAllocLocker := $(NSK_GC_LOCK_JVMTI_INCLUDES)
+
+BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libMallocLocker := $(NSK_GC_LOCK_MALLOC_INCLUDES)
+
+BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libBooleanArrayCriticalLocker := $(NSK_GC_LOCK_JNI_INCLUDES)
+BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libByteArrayCriticalLocker := $(NSK_GC_LOCK_JNI_INCLUDES)
+BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libCharArrayCriticalLocker := $(NSK_GC_LOCK_JNI_INCLUDES)
+BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libDoubleArrayCriticalLocker := $(NSK_GC_LOCK_JNI_INCLUDES)
+BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libFloatArrayCriticalLocker := $(NSK_GC_LOCK_JNI_INCLUDES)
+BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libIntArrayCriticalLocker := $(NSK_GC_LOCK_JNI_INCLUDES)
+BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libLongArrayCriticalLocker := $(NSK_GC_LOCK_JNI_INCLUDES)
+BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libShortArrayCriticalLocker := $(NSK_GC_LOCK_JNI_INCLUDES)
+BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libStringCriticalLocker := $(NSK_GC_LOCK_JNI_INCLUDES)
+
+BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libJNIGlobalRefLocker := $(NSK_GC_LOCK_REF_INCLUDES)
+BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libJNILocalRefLocker := $(NSK_GC_LOCK_REF_INCLUDES)
+BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libJNIRefLocker := $(NSK_GC_LOCK_REF_INCLUDES)
+BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libJNIWeakGlobalRefLocker := $(NSK_GC_LOCK_REF_INCLUDES)
+
 ################################################################################
 
 # Platform specific setup
--- a/test/hotspot/jtreg/ProblemList.txt	Thu May 17 12:59:53 2018 -0700
+++ b/test/hotspot/jtreg/ProblemList.txt	Thu May 17 14:52:47 2018 -0700
@@ -123,6 +123,8 @@
 vmTestbase/nsk/jdi/EventQueue/remove_l/remove_l005/TestDescription.java 8068225 generic-all
 vmTestbase/nsk/jdi/stress/ClassPrepareEvents/ClassPrepareEvents001/ClassPrepareEvents001.java 6426321 generic-all
 
+vmTestbase/gc/lock/jni/jnilock002/TestDescription.java 8191869,8192647 generic-all
+
 vmTestbase/vm/mlvm/indy/func/jdi/breakpointOtherStratum/Test.java 8199578 generic-all
 vmTestbase/vm/mlvm/indy/func/jdi/breakpoint/Test.java 8199578 generic-all
 vmTestbase/vm/mlvm/indy/func/jvmti/redefineClassInBootstrap/TestDescription.java 8013267 generic-all
--- a/test/hotspot/jtreg/TEST.groups	Thu May 17 12:59:53 2018 -0700
+++ b/test/hotspot/jtreg/TEST.groups	Thu May 17 14:52:47 2018 -0700
@@ -1157,6 +1157,100 @@
   vmTestbase/nsk/jdi/StackFrame/getArgumentValues/getArgumentValues002/getArgumentValues002.java \
   vmTestbase/nsk/jdi/StackFrame/getArgumentValues/getArgumentValues003/getArgumentValues003.java
 
+vmTestbase_vm_g1classunloading = \
+  vmTestbase/gc/g1/unloading/tests
+
+# Garbage collector tests
+vmTestbase_vm_gc = \
+  :vmTestbase_vm_gc_concurrent \
+  :vmTestbase_vm_gc_container \
+  :vmTestbase_vm_gc_compact \
+  :vmTestbase_vm_gc_juggle \
+  :vmTestbase_vm_gc_locker \
+  :vmTestbase_vm_gc_misc \
+  :vmTestbase_vm_gc_ref
+
+# vmTestbase_vm_gc w/ 'quick' k/w
+vmTestbase_vm_gc_quick = \
+  vmTestbase/vm/gc/compact/Compact_Arrays \
+  vmTestbase/vm/gc/compact/Compact_Strings_TwoFields \
+  vmTestbase/vm/gc/compact/Compact_InternedStrings_Strings \
+  vmTestbase/vm/gc/compact/Humongous_Arrays5M \
+  vmTestbase/vm/gc/compact/Humongous_NonbranchyTree \
+  vmTestbase/vm/gc/containers/LinkedBlockingDeque_Arrays/TestDescription.java \
+  vmTestbase/vm/gc/containers/LinkedHashMap_Arrays/TestDescription.java \
+  vmTestbase/vm/gc/containers/Combination05/TestDescription.java \
+  vmTestbase/gc/ArrayJuggle/Juggle01 \
+  vmTestbase/gc/ArrayJuggle/Juggle14 \
+  vmTestbase/gc/ArrayJuggle/Juggle22 \
+  vmTestbase/gc/ArrayJuggle/Juggle29 \
+  vmTestbase/gc/ArrayJuggle/Juggle34 \
+  vmTestbase/gc/gctests/LargeObjects/large001/large001.java \
+  vmTestbase/gc/gctests/LoadUnloadGC2/LoadUnloadGC2.java \
+  vmTestbase/gc/gctests/StringGC/StringGC.java \
+  vmTestbase/gc/gctests/StringInternGC/StringInternGC.java \
+  vmTestbase/gc/gctests/ReferencesGC/ReferencesGC.java \
+  vmTestbase/vm/gc/kind/parOld/TestDescription.java \
+  vmTestbase/gc/lock/jni/jnilock001/TestDescription.java \
+  vmTestbase/gc/lock/jniref/jnireflock04/TestDescription.java \
+  vmTestbase/gc/lock/jvmti/alloc/jvmtialloclock02/TestDescription.java \
+  vmTestbase/gc/lock/malloc/malloclock03/TestDescription.java
+
+# In a loop: fill out the heap until OOME and then partly clear it. Variate object type and size
+vmTestbase_vm_gc_compact = \
+  vmTestbase/vm/gc/compact
+
+# GC and mutlithreads
+vmTestbase_vm_gc_concurrent = \
+  vmTestbase/vm/gc/concurrent
+
+# Various data structures
+vmTestbase_vm_gc_container = \
+  vmTestbase/vm/gc/containers \
+  vmTestbase/gc/vector
+
+# Playing with object arrays and various strategies of garbage producing
+vmTestbase_vm_gc_juggle = \
+  vmTestbase/gc/ArrayJuggle/ \
+  vmTestbase/gc/memory/Array/ArrayJuggle
+
+# GC Locker
+vmTestbase_vm_gc_locker = \
+  vmTestbase/gc/lock \
+  vmTestbase/gc/gctests/mallocWithGC1/mallocWithGC1.java \
+  vmTestbase/gc/gctests/mallocWithGC2/mallocWithGC2.java \
+  vmTestbase/gc/gctests/mallocWithGC3/mallocWithGC3.java \
+  vmTestbase/gc/gctests/nativeGC01/nativeGC01.java \
+  vmTestbase/gc/gctests/nativeGC02/nativeGC02.java \
+  vmTestbase/gc/gctests/nativeGC03/nativeGC03.java \
+  vmTestbase/gc/gctests/nativeGC05/nativeGC05.java
+
+# GC and references
+vmTestbase_vm_gc_ref = \
+  vmTestbase/gc/gctests/SoftReference \
+  vmTestbase/gc/gctests/WeakReference \
+  vmTestbase/gc/gctests/WeakReferenceGC \
+  vmTestbase/gc/gctests/PhantomReference \
+  vmTestbase/gc/gctests/ReferencesGC
+
+# miscellaneous gc tests
+vmTestbase_vm_gc_misc = \
+  vmTestbase/gc \
+  vmTestbase/vm/gc \
+  -:vmTestbase_vm_g1classunloading \
+  -:vmTestbase_vm_gc_compact \
+  -:vmTestbase_vm_gc_concurrent \
+  -:vmTestbase_vm_gc_container \
+  -:vmTestbase_vm_gc_juggle \
+  -:vmTestbase_vm_gc_locker \
+  -:vmTestbase_vm_gc_ref
+
+vmTestbase_largepages = \
+  vmTestbase/gc/gctests/LoadUnloadGC \
+  vmTestbase/gc/gctests/LoadUnloadGC2 \
+  vmTestbase/gc/memory/LargePagesTest \
+  vmTestbase/gc/memory/Nio
+
 # JSR292 tests (invokedynamic AKA Multi-Language VM AKA Da Vinci Machine)
 vmTestbase_vm_mlvm = \
   vmTestbase/vm/mlvm
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/ArrayJuggle/Juggle01/Juggle01.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,90 @@
+/*
+ * Copyright (c) 2007, 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/ArrayJuggle/Juggle01.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent, quick]
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm -Xlog:gc=debug:gc.log gc.ArrayJuggle.Juggle01.Juggle01 -gp byteArr -ms low
+ */
+
+package gc.ArrayJuggle.Juggle01;
+
+import nsk.share.test.*;
+import nsk.share.gc.*;
+import nsk.share.gc.gp.*;
+
+/**
+ * This test randomly replaces elements of an array with new
+ * objects using given garbage producer and memory strategy.
+ */
+public class Juggle01 extends ThreadedGCTest implements GarbageProducerAware, MemoryStrategyAware {
+        private GarbageProducer garbageProducer;
+        private MemoryStrategy memoryStrategy;
+        private Object[] array;
+        long objectSize;
+
+        private class Juggler implements Runnable {
+                public void run() {
+                        synchronized (this) {
+                                int index = LocalRandom.nextInt(array.length);
+                                array[index] = garbageProducer.create(objectSize);
+                        }
+                }
+        }
+
+        protected Runnable createRunnable(int i) {
+                return new Juggler();
+        }
+
+        public void run() {
+                log.debug("Garbage producer: " + garbageProducer);
+                log.debug("Memory strategy: " + memoryStrategy);
+                long memory = runParams.getTestMemory();
+                int objectCount = memoryStrategy.getCount(memory);
+                objectSize = memoryStrategy.getSize(memory);
+                log.debug("Object count: " + objectCount);
+                log.debug("Object size: " + objectSize);
+                array = new Object[objectCount - 1];
+                super.run();
+        }
+
+        public void setGarbageProducer(GarbageProducer garbageProducer) {
+                this.garbageProducer = garbageProducer;
+        }
+
+        public void setMemoryStrategy(MemoryStrategy memoryStrategy) {
+                this.memoryStrategy = memoryStrategy;
+        }
+
+        public static void main(String[] args) {
+                GC.runTest(new Juggle01(), args);
+        }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/ArrayJuggle/Juggle01/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/ArrayJuggle/Juggle02/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/ArrayJuggle/Juggle02/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,37 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/ArrayJuggle/Juggle02.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent]
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm -Xlog:gc=debug:gc.log gc.ArrayJuggle.Juggle01.Juggle01 -gp byteArr -ms medium
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/ArrayJuggle/Juggle03/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/ArrayJuggle/Juggle03/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,37 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/ArrayJuggle/Juggle03.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent]
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm -Xlog:gc=debug:gc.log gc.ArrayJuggle.Juggle01.Juggle01 -gp byteArr -ms high
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/ArrayJuggle/Juggle04/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/ArrayJuggle/Juggle04/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,37 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/ArrayJuggle/Juggle04.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent]
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm -Xlog:gc=debug:gc.log gc.ArrayJuggle.Juggle01.Juggle01 -gp byteArr -ms low
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/ArrayJuggle/Juggle05/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/ArrayJuggle/Juggle05/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,41 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/ArrayJuggle/Juggle05.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent]
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm
+ *      -Xlog:gc=debug:gc.log
+ *      gc.ArrayJuggle.Juggle01.Juggle01
+ *      -gp booleanArr
+ *      -ms medium
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/ArrayJuggle/Juggle06/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/ArrayJuggle/Juggle06/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,37 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/ArrayJuggle/Juggle06.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent]
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm -Xlog:gc=debug:gc.log gc.ArrayJuggle.Juggle01.Juggle01 -gp booleanArr -ms high
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/ArrayJuggle/Juggle07/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/ArrayJuggle/Juggle07/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,37 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/ArrayJuggle/Juggle07.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent]
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm -Xlog:gc=debug:gc.log gc.ArrayJuggle.Juggle01.Juggle01 -gp shortArr -ms low
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/ArrayJuggle/Juggle08/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/ArrayJuggle/Juggle08/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,37 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/ArrayJuggle/Juggle08.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent]
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm -Xlog:gc=debug:gc.log gc.ArrayJuggle.Juggle01.Juggle01 -gp shortArr -ms medium
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/ArrayJuggle/Juggle09/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/ArrayJuggle/Juggle09/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,37 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/ArrayJuggle/Juggle09.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent]
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm -Xlog:gc=debug:gc.log gc.ArrayJuggle.Juggle01.Juggle01 -gp shortArr -ms high
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/ArrayJuggle/Juggle10/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/ArrayJuggle/Juggle10/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,37 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/ArrayJuggle/Juggle10.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent]
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm -Xlog:gc=debug:gc.log gc.ArrayJuggle.Juggle01.Juggle01 -gp charArr -ms low
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/ArrayJuggle/Juggle11/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/ArrayJuggle/Juggle11/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,37 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/ArrayJuggle/Juggle11.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent]
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm -Xlog:gc=debug:gc.log gc.ArrayJuggle.Juggle01.Juggle01 -gp charArr -ms medium
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/ArrayJuggle/Juggle12/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/ArrayJuggle/Juggle12/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,37 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/ArrayJuggle/Juggle12.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent]
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm -Xlog:gc=debug:gc.log gc.ArrayJuggle.Juggle01.Juggle01 -gp charArr -ms high
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/ArrayJuggle/Juggle13/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/ArrayJuggle/Juggle13/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,37 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/ArrayJuggle/Juggle13.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent]
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm -Xlog:gc=debug:gc.log gc.ArrayJuggle.Juggle01.Juggle01 -gp intArr -ms low
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/ArrayJuggle/Juggle14/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/ArrayJuggle/Juggle14/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,37 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/ArrayJuggle/Juggle14.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent, quick]
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm -Xlog:gc=debug:gc.log gc.ArrayJuggle.Juggle01.Juggle01 -gp intArr -ms medium
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/ArrayJuggle/Juggle15/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/ArrayJuggle/Juggle15/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,37 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/ArrayJuggle/Juggle15.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent]
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm -Xlog:gc=debug:gc.log gc.ArrayJuggle.Juggle01.Juggle01 -gp intArr -ms high
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/ArrayJuggle/Juggle16/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/ArrayJuggle/Juggle16/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,37 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/ArrayJuggle/Juggle16.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent]
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm -Xlog:gc=debug:gc.log gc.ArrayJuggle.Juggle01.Juggle01 -gp longArr -ms low
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/ArrayJuggle/Juggle17/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/ArrayJuggle/Juggle17/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,37 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/ArrayJuggle/Juggle17.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent]
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm -Xlog:gc=debug:gc.log gc.ArrayJuggle.Juggle01.Juggle01 -gp longArr -ms medium
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/ArrayJuggle/Juggle18/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/ArrayJuggle/Juggle18/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,37 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/ArrayJuggle/Juggle18.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent]
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm -Xlog:gc=debug:gc.log gc.ArrayJuggle.Juggle01.Juggle01 -gp longArr -ms high
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/ArrayJuggle/Juggle19/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/ArrayJuggle/Juggle19/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,37 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/ArrayJuggle/Juggle19.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent]
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm -Xlog:gc=debug:gc.log gc.ArrayJuggle.Juggle01.Juggle01 -gp floatArr -ms low
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/ArrayJuggle/Juggle20/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/ArrayJuggle/Juggle20/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,37 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/ArrayJuggle/Juggle20.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent]
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm -Xlog:gc=debug:gc.log gc.ArrayJuggle.Juggle01.Juggle01 -gp floatArr -ms medium
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/ArrayJuggle/Juggle21/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/ArrayJuggle/Juggle21/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,37 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/ArrayJuggle/Juggle21.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent]
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm -Xlog:gc=debug:gc.log gc.ArrayJuggle.Juggle01.Juggle01 -gp floatArr -ms high
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/ArrayJuggle/Juggle22/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/ArrayJuggle/Juggle22/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,37 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/ArrayJuggle/Juggle22.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent, quick]
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm -Xlog:gc=debug:gc.log gc.ArrayJuggle.Juggle01.Juggle01 -gp doubleArr -ms low
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/ArrayJuggle/Juggle23/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/ArrayJuggle/Juggle23/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,37 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/ArrayJuggle/Juggle23.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent]
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm -Xlog:gc=debug:gc.log gc.ArrayJuggle.Juggle01.Juggle01 -gp doubleArr -ms medium
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/ArrayJuggle/Juggle24/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/ArrayJuggle/Juggle24/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,37 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/ArrayJuggle/Juggle24.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent]
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm -Xlog:gc=debug:gc.log gc.ArrayJuggle.Juggle01.Juggle01 -gp doubleArr -ms high
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/ArrayJuggle/Juggle25/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/ArrayJuggle/Juggle25/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,37 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/ArrayJuggle/Juggle25.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent]
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm -Xlog:gc=debug:gc.log gc.ArrayJuggle.Juggle01.Juggle01 -gp objectArr -ms low
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/ArrayJuggle/Juggle26/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/ArrayJuggle/Juggle26/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,37 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/ArrayJuggle/Juggle26.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent]
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm -Xlog:gc=debug:gc.log gc.ArrayJuggle.Juggle01.Juggle01 -gp objectArr -ms medium
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/ArrayJuggle/Juggle27/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/ArrayJuggle/Juggle27/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,37 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/ArrayJuggle/Juggle27.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent]
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm -Xlog:gc=debug:gc.log gc.ArrayJuggle.Juggle01.Juggle01 -gp objectArr -ms high
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/ArrayJuggle/Juggle28/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/ArrayJuggle/Juggle28/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,41 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/ArrayJuggle/Juggle28.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent]
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm
+ *      -Xlog:gc=debug:gc.log
+ *      gc.ArrayJuggle.Juggle01.Juggle01
+ *      -gp hashed(doubleArr)
+ *      -ms low
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/ArrayJuggle/Juggle29/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/ArrayJuggle/Juggle29/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,41 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/ArrayJuggle/Juggle29.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent, quick]
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm
+ *      -Xlog:gc=debug:gc.log
+ *      gc.ArrayJuggle.Juggle01.Juggle01
+ *      -gp hashed(doubleArr)
+ *      -ms medium
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/ArrayJuggle/Juggle30/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/ArrayJuggle/Juggle30/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,41 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/ArrayJuggle/Juggle30.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent]
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm
+ *      -Xlog:gc=debug:gc.log
+ *      gc.ArrayJuggle.Juggle01.Juggle01
+ *      -gp hashed(doubleArr)
+ *      -ms high
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/ArrayJuggle/Juggle31/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/ArrayJuggle/Juggle31/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,41 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/ArrayJuggle/Juggle31.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent]
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm
+ *      -Xlog:gc=debug:gc.log
+ *      gc.ArrayJuggle.Juggle01.Juggle01
+ *      -gp hashed(objectArr)
+ *      -ms low
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/ArrayJuggle/Juggle32/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/ArrayJuggle/Juggle32/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,41 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/ArrayJuggle/Juggle32.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent]
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm
+ *      -Xlog:gc=debug:gc.log
+ *      gc.ArrayJuggle.Juggle01.Juggle01
+ *      -gp hashed(objectArr)
+ *      -ms medium
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/ArrayJuggle/Juggle33/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/ArrayJuggle/Juggle33/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,41 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/ArrayJuggle/Juggle33.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent]
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm
+ *      -Xlog:gc=debug:gc.log
+ *      gc.ArrayJuggle.Juggle01.Juggle01
+ *      -gp hashed(objectArr)
+ *      -ms high
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/ArrayJuggle/Juggle34/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/ArrayJuggle/Juggle34/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,41 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/ArrayJuggle/Juggle34.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent, quick]
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm
+ *      -Xlog:gc=debug:gc.log
+ *      gc.ArrayJuggle.Juggle01.Juggle01
+ *      -gp random(arrays)
+ *      -ms high
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/ClassNNN.java.template	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,1030 @@
+#
+# Copyright (c) 2014, 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.
+#
+# Template to produce a ton of similar classes
+#
+package gc.g1.unloading.rootSetHelper.classesPool;
+
+public class Class_NNN_ {
+  public static java.lang.Object staticField;
+  public static java.lang.Object staticField1;
+  public static java.lang.Object staticField2;
+  public static java.lang.Object staticField3;
+  public static java.lang.Object staticField4;
+  public static java.lang.Object staticField5;
+  public static java.lang.Object staticField6;
+  public static java.lang.Object staticField7;
+  public static java.lang.Object staticField8;
+  public static java.lang.Object staticField9;
+  public static java.lang.Object staticField10;
+  public static java.lang.Object staticField11;
+  public static java.lang.Object staticField12;
+  public static java.lang.Object staticField13;
+  public static java.lang.Object staticField14;
+  public static java.lang.Object staticField15;
+  public static java.lang.Object staticField16;
+  public static java.lang.Object staticField17;
+  public static java.lang.Object staticField18;
+  public static java.lang.Object staticField19;
+  public static java.lang.Object staticField20;
+  public static java.lang.Object staticField21;
+  public static java.lang.Object staticField22;
+  public static java.lang.Object staticField23;
+  public static java.lang.Object staticField24;
+  public static java.lang.Object staticField25;
+  public static java.lang.Object staticField26;
+  public static java.lang.Object staticField27;
+  public static java.lang.Object staticField28;
+  public static java.lang.Object staticField29;
+  public static java.lang.Object staticField30;
+  public static java.lang.Object staticField31;
+  public static java.lang.Object staticField32;
+  public static java.lang.Object staticField33;
+  public static java.lang.Object staticField34;
+  public static java.lang.Object staticField35;
+  public static java.lang.Object staticField36;
+  public static java.lang.Object staticField37;
+  public static java.lang.Object staticField38;
+  public static java.lang.Object staticField39;
+  public static java.lang.Object staticField40;
+  public static java.lang.Object staticField41;
+  public static java.lang.Object staticField42;
+  public static java.lang.Object staticField43;
+  public static java.lang.Object staticField44;
+  public static java.lang.Object staticField45;
+  public static java.lang.Object staticField46;
+  public static java.lang.Object staticField47;
+  public static java.lang.Object staticField48;
+  public static java.lang.Object staticField49;
+  public static java.lang.Object staticField50;
+  public static java.lang.Object staticField51;
+  public static java.lang.Object staticField52;
+  public static java.lang.Object staticField53;
+  public static java.lang.Object staticField54;
+  public static java.lang.Object staticField55;
+  public static java.lang.Object staticField56;
+  public static java.lang.Object staticField57;
+  public static java.lang.Object staticField58;
+  public static java.lang.Object staticField59;
+  public static java.lang.Object staticField60;
+  public static java.lang.Object staticField61;
+  public static java.lang.Object staticField62;
+  public static java.lang.Object staticField63;
+  public static java.lang.Object staticField64;
+  public static java.lang.Object staticField65;
+  public static java.lang.Object staticField66;
+  public static java.lang.Object staticField67;
+  public static java.lang.Object staticField68;
+  public static java.lang.Object staticField69;
+  public static java.lang.Object staticField70;
+  public static java.lang.Object staticField71;
+  public static java.lang.Object staticField72;
+  public static java.lang.Object staticField73;
+  public static java.lang.Object staticField74;
+  public static java.lang.Object staticField75;
+  public static java.lang.Object staticField76;
+  public static java.lang.Object staticField77;
+  public static java.lang.Object staticField78;
+  public static java.lang.Object staticField79;
+  public static java.lang.Object staticField80;
+  public static java.lang.Object staticField81;
+  public static java.lang.Object staticField82;
+  public static java.lang.Object staticField83;
+  public static java.lang.Object staticField84;
+  public static java.lang.Object staticField85;
+  public static java.lang.Object staticField86;
+  public static java.lang.Object staticField87;
+  public static java.lang.Object staticField88;
+  public static java.lang.Object staticField89;
+  public static java.lang.Object staticField90;
+  public static java.lang.Object staticField91;
+  public static java.lang.Object staticField92;
+  public static java.lang.Object staticField93;
+  public static java.lang.Object staticField94;
+  public static java.lang.Object staticField95;
+  public static java.lang.Object staticField96;
+  public static java.lang.Object staticField97;
+  public static java.lang.Object staticField98;
+  public static java.lang.Object staticField99;
+  public static java.lang.Object staticField100;
+  public static java.lang.Object staticField101;
+  public static java.lang.Object staticField102;
+  public static java.lang.Object staticField103;
+  public static java.lang.Object staticField104;
+  public static java.lang.Object staticField105;
+  public static java.lang.Object staticField106;
+  public static java.lang.Object staticField107;
+  public static java.lang.Object staticField108;
+  public static java.lang.Object staticField109;
+  public static java.lang.Object staticField110;
+  public static java.lang.Object staticField111;
+  public static java.lang.Object staticField112;
+  public static java.lang.Object staticField113;
+  public static java.lang.Object staticField114;
+  public static java.lang.Object staticField115;
+  public static java.lang.Object staticField116;
+  public static java.lang.Object staticField117;
+  public static java.lang.Object staticField118;
+  public static java.lang.Object staticField119;
+  public static java.lang.Object staticField120;
+  public static java.lang.Object staticField121;
+  public static java.lang.Object staticField122;
+  public static java.lang.Object staticField123;
+  public static java.lang.Object staticField124;
+  public static java.lang.Object staticField125;
+  public static java.lang.Object staticField126;
+  public static java.lang.Object staticField127;
+  public static java.lang.Object staticField128;
+  public static java.lang.Object staticField129;
+  public static java.lang.Object staticField130;
+  public static java.lang.Object staticField131;
+  public static java.lang.Object staticField132;
+  public static java.lang.Object staticField133;
+  public static java.lang.Object staticField134;
+  public static java.lang.Object staticField135;
+  public static java.lang.Object staticField136;
+  public static java.lang.Object staticField137;
+  public static java.lang.Object staticField138;
+  public static java.lang.Object staticField139;
+  public static java.lang.Object staticField140;
+  public static java.lang.Object staticField141;
+  public static java.lang.Object staticField142;
+  public static java.lang.Object staticField143;
+  public static java.lang.Object staticField144;
+  public static java.lang.Object staticField145;
+  public static java.lang.Object staticField146;
+  public static java.lang.Object staticField147;
+  public static java.lang.Object staticField148;
+  public static java.lang.Object staticField149;
+  public static java.lang.Object staticField150;
+  public static java.lang.Object staticField151;
+  public static java.lang.Object staticField152;
+  public static java.lang.Object staticField153;
+  public static java.lang.Object staticField154;
+  public static java.lang.Object staticField155;
+  public static java.lang.Object staticField156;
+  public static java.lang.Object staticField157;
+  public static java.lang.Object staticField158;
+  public static java.lang.Object staticField159;
+  public static java.lang.Object staticField160;
+  public static java.lang.Object staticField161;
+  public static java.lang.Object staticField162;
+  public static java.lang.Object staticField163;
+  public static java.lang.Object staticField164;
+  public static java.lang.Object staticField165;
+  public static java.lang.Object staticField166;
+  public static java.lang.Object staticField167;
+  public static java.lang.Object staticField168;
+  public static java.lang.Object staticField169;
+  public static java.lang.Object staticField170;
+  public static java.lang.Object staticField171;
+  public static java.lang.Object staticField172;
+  public static java.lang.Object staticField173;
+  public static java.lang.Object staticField174;
+  public static java.lang.Object staticField175;
+  public static java.lang.Object staticField176;
+  public static java.lang.Object staticField177;
+  public static java.lang.Object staticField178;
+  public static java.lang.Object staticField179;
+  public static java.lang.Object staticField180;
+  public static java.lang.Object staticField181;
+  public static java.lang.Object staticField182;
+  public static java.lang.Object staticField183;
+  public static java.lang.Object staticField184;
+  public static java.lang.Object staticField185;
+  public static java.lang.Object staticField186;
+  public static java.lang.Object staticField187;
+  public static java.lang.Object staticField188;
+  public static java.lang.Object staticField189;
+  public static java.lang.Object staticField190;
+  public static java.lang.Object staticField191;
+  public static java.lang.Object staticField192;
+  public static java.lang.Object staticField193;
+  public static java.lang.Object staticField194;
+  public static java.lang.Object staticField195;
+  public static java.lang.Object staticField196;
+  public static java.lang.Object staticField197;
+  public static java.lang.Object staticField198;
+  public static java.lang.Object staticField199;
+  public static java.lang.Object staticField200;
+  public static java.lang.Object staticField201;
+  public static java.lang.Object staticField202;
+  public static java.lang.Object staticField203;
+  public static java.lang.Object staticField204;
+  public static java.lang.Object staticField205;
+  public static java.lang.Object staticField206;
+  public static java.lang.Object staticField207;
+  public static java.lang.Object staticField208;
+  public static java.lang.Object staticField209;
+  public static java.lang.Object staticField210;
+  public static java.lang.Object staticField211;
+  public static java.lang.Object staticField212;
+  public static java.lang.Object staticField213;
+  public static java.lang.Object staticField214;
+  public static java.lang.Object staticField215;
+  public static java.lang.Object staticField216;
+  public static java.lang.Object staticField217;
+  public static java.lang.Object staticField218;
+  public static java.lang.Object staticField219;
+  public static java.lang.Object staticField220;
+  public static java.lang.Object staticField221;
+  public static java.lang.Object staticField222;
+  public static java.lang.Object staticField223;
+  public static java.lang.Object staticField224;
+  public static java.lang.Object staticField225;
+  public static java.lang.Object staticField226;
+  public static java.lang.Object staticField227;
+  public static java.lang.Object staticField228;
+  public static java.lang.Object staticField229;
+  public static java.lang.Object staticField230;
+  public static java.lang.Object staticField231;
+  public static java.lang.Object staticField232;
+  public static java.lang.Object staticField233;
+  public static java.lang.Object staticField234;
+  public static java.lang.Object staticField235;
+  public static java.lang.Object staticField236;
+  public static java.lang.Object staticField237;
+  public static java.lang.Object staticField238;
+  public static java.lang.Object staticField239;
+  public static java.lang.Object staticField240;
+  public static java.lang.Object staticField241;
+  public static java.lang.Object staticField242;
+  public static java.lang.Object staticField243;
+  public static java.lang.Object staticField244;
+  public static java.lang.Object staticField245;
+  public static java.lang.Object staticField246;
+  public static java.lang.Object staticField247;
+  public static java.lang.Object staticField248;
+  public static java.lang.Object staticField249;
+  public static java.lang.Object staticField250;
+  public static java.lang.Object staticField251;
+  public static java.lang.Object staticField252;
+  public static java.lang.Object staticField253;
+  public static java.lang.Object staticField254;
+  public static java.lang.Object staticField255;
+  public static java.lang.Object staticField256;
+  public static java.lang.Object staticField257;
+  public static java.lang.Object staticField258;
+  public static java.lang.Object staticField259;
+  public static java.lang.Object staticField260;
+  public static java.lang.Object staticField261;
+  public static java.lang.Object staticField262;
+  public static java.lang.Object staticField263;
+  public static java.lang.Object staticField264;
+  public static java.lang.Object staticField265;
+  public static java.lang.Object staticField266;
+  public static java.lang.Object staticField267;
+  public static java.lang.Object staticField268;
+  public static java.lang.Object staticField269;
+  public static java.lang.Object staticField270;
+  public static java.lang.Object staticField271;
+  public static java.lang.Object staticField272;
+  public static java.lang.Object staticField273;
+  public static java.lang.Object staticField274;
+  public static java.lang.Object staticField275;
+  public static java.lang.Object staticField276;
+  public static java.lang.Object staticField277;
+  public static java.lang.Object staticField278;
+  public static java.lang.Object staticField279;
+  public static java.lang.Object staticField280;
+  public static java.lang.Object staticField281;
+  public static java.lang.Object staticField282;
+  public static java.lang.Object staticField283;
+  public static java.lang.Object staticField284;
+  public static java.lang.Object staticField285;
+  public static java.lang.Object staticField286;
+  public static java.lang.Object staticField287;
+  public static java.lang.Object staticField288;
+  public static java.lang.Object staticField289;
+  public static java.lang.Object staticField290;
+  public static java.lang.Object staticField291;
+  public static java.lang.Object staticField292;
+  public static java.lang.Object staticField293;
+  public static java.lang.Object staticField294;
+  public static java.lang.Object staticField295;
+  public static java.lang.Object staticField296;
+  public static java.lang.Object staticField297;
+  public static java.lang.Object staticField298;
+  public static java.lang.Object staticField299;
+  public static java.lang.Object staticField300;
+  public static java.lang.Object staticField301;
+  public static java.lang.Object staticField302;
+  public static java.lang.Object staticField303;
+  public static java.lang.Object staticField304;
+  public static java.lang.Object staticField305;
+  public static java.lang.Object staticField306;
+  public static java.lang.Object staticField307;
+  public static java.lang.Object staticField308;
+  public static java.lang.Object staticField309;
+  public static java.lang.Object staticField310;
+  public static java.lang.Object staticField311;
+  public static java.lang.Object staticField312;
+  public static java.lang.Object staticField313;
+  public static java.lang.Object staticField314;
+  public static java.lang.Object staticField315;
+  public static java.lang.Object staticField316;
+  public static java.lang.Object staticField317;
+  public static java.lang.Object staticField318;
+  public static java.lang.Object staticField319;
+  public static java.lang.Object staticField320;
+  public static java.lang.Object staticField321;
+  public static java.lang.Object staticField322;
+  public static java.lang.Object staticField323;
+  public static java.lang.Object staticField324;
+  public static java.lang.Object staticField325;
+  public static java.lang.Object staticField326;
+  public static java.lang.Object staticField327;
+  public static java.lang.Object staticField328;
+  public static java.lang.Object staticField329;
+  public static java.lang.Object staticField330;
+  public static java.lang.Object staticField331;
+  public static java.lang.Object staticField332;
+  public static java.lang.Object staticField333;
+  public static java.lang.Object staticField334;
+  public static java.lang.Object staticField335;
+  public static java.lang.Object staticField336;
+  public static java.lang.Object staticField337;
+  public static java.lang.Object staticField338;
+  public static java.lang.Object staticField339;
+  public static java.lang.Object staticField340;
+  public static java.lang.Object staticField341;
+  public static java.lang.Object staticField342;
+  public static java.lang.Object staticField343;
+  public static java.lang.Object staticField344;
+  public static java.lang.Object staticField345;
+  public static java.lang.Object staticField346;
+  public static java.lang.Object staticField347;
+  public static java.lang.Object staticField348;
+  public static java.lang.Object staticField349;
+  public static java.lang.Object staticField350;
+  public static java.lang.Object staticField351;
+  public static java.lang.Object staticField352;
+  public static java.lang.Object staticField353;
+  public static java.lang.Object staticField354;
+  public static java.lang.Object staticField355;
+  public static java.lang.Object staticField356;
+  public static java.lang.Object staticField357;
+  public static java.lang.Object staticField358;
+  public static java.lang.Object staticField359;
+  public static java.lang.Object staticField360;
+  public static java.lang.Object staticField361;
+  public static java.lang.Object staticField362;
+  public static java.lang.Object staticField363;
+  public static java.lang.Object staticField364;
+  public static java.lang.Object staticField365;
+  public static java.lang.Object staticField366;
+  public static java.lang.Object staticField367;
+  public static java.lang.Object staticField368;
+  public static java.lang.Object staticField369;
+  public static java.lang.Object staticField370;
+  public static java.lang.Object staticField371;
+  public static java.lang.Object staticField372;
+  public static java.lang.Object staticField373;
+  public static java.lang.Object staticField374;
+  public static java.lang.Object staticField375;
+  public static java.lang.Object staticField376;
+  public static java.lang.Object staticField377;
+  public static java.lang.Object staticField378;
+  public static java.lang.Object staticField379;
+  public static java.lang.Object staticField380;
+  public static java.lang.Object staticField381;
+  public static java.lang.Object staticField382;
+  public static java.lang.Object staticField383;
+  public static java.lang.Object staticField384;
+  public static java.lang.Object staticField385;
+  public static java.lang.Object staticField386;
+  public static java.lang.Object staticField387;
+  public static java.lang.Object staticField388;
+  public static java.lang.Object staticField389;
+  public static java.lang.Object staticField390;
+  public static java.lang.Object staticField391;
+  public static java.lang.Object staticField392;
+  public static java.lang.Object staticField393;
+  public static java.lang.Object staticField394;
+  public static java.lang.Object staticField395;
+  public static java.lang.Object staticField396;
+  public static java.lang.Object staticField397;
+  public static java.lang.Object staticField398;
+  public static java.lang.Object staticField399;
+  public static java.lang.Object staticField400;
+  public static java.lang.Object staticField401;
+  public static java.lang.Object staticField402;
+  public static java.lang.Object staticField403;
+  public static java.lang.Object staticField404;
+  public static java.lang.Object staticField405;
+  public static java.lang.Object staticField406;
+  public static java.lang.Object staticField407;
+  public static java.lang.Object staticField408;
+  public static java.lang.Object staticField409;
+  public static java.lang.Object staticField410;
+  public static java.lang.Object staticField411;
+  public static java.lang.Object staticField412;
+  public static java.lang.Object staticField413;
+  public static java.lang.Object staticField414;
+  public static java.lang.Object staticField415;
+  public static java.lang.Object staticField416;
+  public static java.lang.Object staticField417;
+  public static java.lang.Object staticField418;
+  public static java.lang.Object staticField419;
+  public static java.lang.Object staticField420;
+  public static java.lang.Object staticField421;
+  public static java.lang.Object staticField422;
+  public static java.lang.Object staticField423;
+  public static java.lang.Object staticField424;
+  public static java.lang.Object staticField425;
+  public static java.lang.Object staticField426;
+  public static java.lang.Object staticField427;
+  public static java.lang.Object staticField428;
+  public static java.lang.Object staticField429;
+  public static java.lang.Object staticField430;
+  public static java.lang.Object staticField431;
+  public static java.lang.Object staticField432;
+  public static java.lang.Object staticField433;
+  public static java.lang.Object staticField434;
+  public static java.lang.Object staticField435;
+  public static java.lang.Object staticField436;
+  public static java.lang.Object staticField437;
+  public static java.lang.Object staticField438;
+  public static java.lang.Object staticField439;
+  public static java.lang.Object staticField440;
+  public static java.lang.Object staticField441;
+  public static java.lang.Object staticField442;
+  public static java.lang.Object staticField443;
+  public static java.lang.Object staticField444;
+  public static java.lang.Object staticField445;
+  public static java.lang.Object staticField446;
+  public static java.lang.Object staticField447;
+  public static java.lang.Object staticField448;
+  public static java.lang.Object staticField449;
+  public static java.lang.Object staticField450;
+  public static java.lang.Object staticField451;
+  public static java.lang.Object staticField452;
+  public static java.lang.Object staticField453;
+  public static java.lang.Object staticField454;
+  public static java.lang.Object staticField455;
+  public static java.lang.Object staticField456;
+  public static java.lang.Object staticField457;
+  public static java.lang.Object staticField458;
+  public static java.lang.Object staticField459;
+  public static java.lang.Object staticField460;
+  public static java.lang.Object staticField461;
+  public static java.lang.Object staticField462;
+  public static java.lang.Object staticField463;
+  public static java.lang.Object staticField464;
+  public static java.lang.Object staticField465;
+  public static java.lang.Object staticField466;
+  public static java.lang.Object staticField467;
+  public static java.lang.Object staticField468;
+  public static java.lang.Object staticField469;
+  public static java.lang.Object staticField470;
+  public static java.lang.Object staticField471;
+  public static java.lang.Object staticField472;
+  public static java.lang.Object staticField473;
+  public static java.lang.Object staticField474;
+  public static java.lang.Object staticField475;
+  public static java.lang.Object staticField476;
+  public static java.lang.Object staticField477;
+  public static java.lang.Object staticField478;
+  public static java.lang.Object staticField479;
+  public static java.lang.Object staticField480;
+  public static java.lang.Object staticField481;
+  public static java.lang.Object staticField482;
+  public static java.lang.Object staticField483;
+  public static java.lang.Object staticField484;
+  public static java.lang.Object staticField485;
+  public static java.lang.Object staticField486;
+  public static java.lang.Object staticField487;
+  public static java.lang.Object staticField488;
+  public static java.lang.Object staticField489;
+  public static java.lang.Object staticField490;
+  public static java.lang.Object staticField491;
+  public static java.lang.Object staticField492;
+  public static java.lang.Object staticField493;
+  public static java.lang.Object staticField494;
+  public static java.lang.Object staticField495;
+  public static java.lang.Object staticField496;
+  public static java.lang.Object staticField497;
+  public static java.lang.Object staticField498;
+  public static java.lang.Object staticField499;
+  public static java.lang.Object staticField500;
+  public static java.lang.Object staticField501;
+  public static java.lang.Object staticField502;
+  public static java.lang.Object staticField503;
+  public static java.lang.Object staticField504;
+  public static java.lang.Object staticField505;
+  public static java.lang.Object staticField506;
+  public static java.lang.Object staticField507;
+  public static java.lang.Object staticField508;
+  public static java.lang.Object staticField509;
+  public static java.lang.Object staticField510;
+  public static java.lang.Object staticField511;
+  public static java.lang.Object staticField512;
+  public static java.lang.Object staticField513;
+  public static java.lang.Object staticField514;
+  public static java.lang.Object staticField515;
+  public static java.lang.Object staticField516;
+  public static java.lang.Object staticField517;
+  public static java.lang.Object staticField518;
+  public static java.lang.Object staticField519;
+  public static java.lang.Object staticField520;
+  public static java.lang.Object staticField521;
+  public static java.lang.Object staticField522;
+  public static java.lang.Object staticField523;
+  public static java.lang.Object staticField524;
+  public static java.lang.Object staticField525;
+  public static java.lang.Object staticField526;
+  public static java.lang.Object staticField527;
+  public static java.lang.Object staticField528;
+  public static java.lang.Object staticField529;
+  public static java.lang.Object staticField530;
+  public static java.lang.Object staticField531;
+  public static java.lang.Object staticField532;
+  public static java.lang.Object staticField533;
+  public static java.lang.Object staticField534;
+  public static java.lang.Object staticField535;
+  public static java.lang.Object staticField536;
+  public static java.lang.Object staticField537;
+  public static java.lang.Object staticField538;
+  public static java.lang.Object staticField539;
+  public static java.lang.Object staticField540;
+  public static java.lang.Object staticField541;
+  public static java.lang.Object staticField542;
+  public static java.lang.Object staticField543;
+  public static java.lang.Object staticField544;
+  public static java.lang.Object staticField545;
+  public static java.lang.Object staticField546;
+  public static java.lang.Object staticField547;
+  public static java.lang.Object staticField548;
+  public static java.lang.Object staticField549;
+  public static java.lang.Object staticField550;
+  public static java.lang.Object staticField551;
+  public static java.lang.Object staticField552;
+  public static java.lang.Object staticField553;
+  public static java.lang.Object staticField554;
+  public static java.lang.Object staticField555;
+  public static java.lang.Object staticField556;
+  public static java.lang.Object staticField557;
+  public static java.lang.Object staticField558;
+  public static java.lang.Object staticField559;
+  public static java.lang.Object staticField560;
+  public static java.lang.Object staticField561;
+  public static java.lang.Object staticField562;
+  public static java.lang.Object staticField563;
+  public static java.lang.Object staticField564;
+  public static java.lang.Object staticField565;
+  public static java.lang.Object staticField566;
+  public static java.lang.Object staticField567;
+  public static java.lang.Object staticField568;
+  public static java.lang.Object staticField569;
+  public static java.lang.Object staticField570;
+  public static java.lang.Object staticField571;
+  public static java.lang.Object staticField572;
+  public static java.lang.Object staticField573;
+  public static java.lang.Object staticField574;
+  public static java.lang.Object staticField575;
+  public static java.lang.Object staticField576;
+  public static java.lang.Object staticField577;
+  public static java.lang.Object staticField578;
+  public static java.lang.Object staticField579;
+  public static java.lang.Object staticField580;
+  public static java.lang.Object staticField581;
+  public static java.lang.Object staticField582;
+  public static java.lang.Object staticField583;
+  public static java.lang.Object staticField584;
+  public static java.lang.Object staticField585;
+  public static java.lang.Object staticField586;
+  public static java.lang.Object staticField587;
+  public static java.lang.Object staticField588;
+  public static java.lang.Object staticField589;
+  public static java.lang.Object staticField590;
+  public static java.lang.Object staticField591;
+  public static java.lang.Object staticField592;
+  public static java.lang.Object staticField593;
+  public static java.lang.Object staticField594;
+  public static java.lang.Object staticField595;
+  public static java.lang.Object staticField596;
+  public static java.lang.Object staticField597;
+  public static java.lang.Object staticField598;
+  public static java.lang.Object staticField599;
+  public static java.lang.Object staticField600;
+  public static java.lang.Object staticField601;
+  public static java.lang.Object staticField602;
+  public static java.lang.Object staticField603;
+  public static java.lang.Object staticField604;
+  public static java.lang.Object staticField605;
+  public static java.lang.Object staticField606;
+  public static java.lang.Object staticField607;
+  public static java.lang.Object staticField608;
+  public static java.lang.Object staticField609;
+  public static java.lang.Object staticField610;
+  public static java.lang.Object staticField611;
+  public static java.lang.Object staticField612;
+  public static java.lang.Object staticField613;
+  public static java.lang.Object staticField614;
+  public static java.lang.Object staticField615;
+  public static java.lang.Object staticField616;
+  public static java.lang.Object staticField617;
+  public static java.lang.Object staticField618;
+  public static java.lang.Object staticField619;
+  public static java.lang.Object staticField620;
+  public static java.lang.Object staticField621;
+  public static java.lang.Object staticField622;
+  public static java.lang.Object staticField623;
+  public static java.lang.Object staticField624;
+  public static java.lang.Object staticField625;
+  public static java.lang.Object staticField626;
+  public static java.lang.Object staticField627;
+  public static java.lang.Object staticField628;
+  public static java.lang.Object staticField629;
+  public static java.lang.Object staticField630;
+  public static java.lang.Object staticField631;
+  public static java.lang.Object staticField632;
+  public static java.lang.Object staticField633;
+  public static java.lang.Object staticField634;
+  public static java.lang.Object staticField635;
+  public static java.lang.Object staticField636;
+  public static java.lang.Object staticField637;
+  public static java.lang.Object staticField638;
+  public static java.lang.Object staticField639;
+  public static java.lang.Object staticField640;
+  public static java.lang.Object staticField641;
+  public static java.lang.Object staticField642;
+  public static java.lang.Object staticField643;
+  public static java.lang.Object staticField644;
+  public static java.lang.Object staticField645;
+  public static java.lang.Object staticField646;
+  public static java.lang.Object staticField647;
+  public static java.lang.Object staticField648;
+  public static java.lang.Object staticField649;
+  public static java.lang.Object staticField650;
+  public static java.lang.Object staticField651;
+  public static java.lang.Object staticField652;
+  public static java.lang.Object staticField653;
+  public static java.lang.Object staticField654;
+  public static java.lang.Object staticField655;
+  public static java.lang.Object staticField656;
+  public static java.lang.Object staticField657;
+  public static java.lang.Object staticField658;
+  public static java.lang.Object staticField659;
+  public static java.lang.Object staticField660;
+  public static java.lang.Object staticField661;
+  public static java.lang.Object staticField662;
+  public static java.lang.Object staticField663;
+  public static java.lang.Object staticField664;
+  public static java.lang.Object staticField665;
+  public static java.lang.Object staticField666;
+  public static java.lang.Object staticField667;
+  public static java.lang.Object staticField668;
+  public static java.lang.Object staticField669;
+  public static java.lang.Object staticField670;
+  public static java.lang.Object staticField671;
+  public static java.lang.Object staticField672;
+  public static java.lang.Object staticField673;
+  public static java.lang.Object staticField674;
+  public static java.lang.Object staticField675;
+  public static java.lang.Object staticField676;
+  public static java.lang.Object staticField677;
+  public static java.lang.Object staticField678;
+  public static java.lang.Object staticField679;
+  public static java.lang.Object staticField680;
+  public static java.lang.Object staticField681;
+  public static java.lang.Object staticField682;
+  public static java.lang.Object staticField683;
+  public static java.lang.Object staticField684;
+  public static java.lang.Object staticField685;
+  public static java.lang.Object staticField686;
+  public static java.lang.Object staticField687;
+  public static java.lang.Object staticField688;
+  public static java.lang.Object staticField689;
+  public static java.lang.Object staticField690;
+  public static java.lang.Object staticField691;
+  public static java.lang.Object staticField692;
+  public static java.lang.Object staticField693;
+  public static java.lang.Object staticField694;
+  public static java.lang.Object staticField695;
+  public static java.lang.Object staticField696;
+  public static java.lang.Object staticField697;
+  public static java.lang.Object staticField698;
+  public static java.lang.Object staticField699;
+  public static java.lang.Object staticField700;
+  public static java.lang.Object staticField701;
+  public static java.lang.Object staticField702;
+  public static java.lang.Object staticField703;
+  public static java.lang.Object staticField704;
+  public static java.lang.Object staticField705;
+  public static java.lang.Object staticField706;
+  public static java.lang.Object staticField707;
+  public static java.lang.Object staticField708;
+  public static java.lang.Object staticField709;
+  public static java.lang.Object staticField710;
+  public static java.lang.Object staticField711;
+  public static java.lang.Object staticField712;
+  public static java.lang.Object staticField713;
+  public static java.lang.Object staticField714;
+  public static java.lang.Object staticField715;
+  public static java.lang.Object staticField716;
+  public static java.lang.Object staticField717;
+  public static java.lang.Object staticField718;
+  public static java.lang.Object staticField719;
+  public static java.lang.Object staticField720;
+  public static java.lang.Object staticField721;
+  public static java.lang.Object staticField722;
+  public static java.lang.Object staticField723;
+  public static java.lang.Object staticField724;
+  public static java.lang.Object staticField725;
+  public static java.lang.Object staticField726;
+  public static java.lang.Object staticField727;
+  public static java.lang.Object staticField728;
+  public static java.lang.Object staticField729;
+  public static java.lang.Object staticField730;
+  public static java.lang.Object staticField731;
+  public static java.lang.Object staticField732;
+  public static java.lang.Object staticField733;
+  public static java.lang.Object staticField734;
+  public static java.lang.Object staticField735;
+  public static java.lang.Object staticField736;
+  public static java.lang.Object staticField737;
+  public static java.lang.Object staticField738;
+  public static java.lang.Object staticField739;
+  public static java.lang.Object staticField740;
+  public static java.lang.Object staticField741;
+  public static java.lang.Object staticField742;
+  public static java.lang.Object staticField743;
+  public static java.lang.Object staticField744;
+  public static java.lang.Object staticField745;
+  public static java.lang.Object staticField746;
+  public static java.lang.Object staticField747;
+  public static java.lang.Object staticField748;
+  public static java.lang.Object staticField749;
+  public static java.lang.Object staticField750;
+  public static java.lang.Object staticField751;
+  public static java.lang.Object staticField752;
+  public static java.lang.Object staticField753;
+  public static java.lang.Object staticField754;
+  public static java.lang.Object staticField755;
+  public static java.lang.Object staticField756;
+  public static java.lang.Object staticField757;
+  public static java.lang.Object staticField758;
+  public static java.lang.Object staticField759;
+  public static java.lang.Object staticField760;
+  public static java.lang.Object staticField761;
+  public static java.lang.Object staticField762;
+  public static java.lang.Object staticField763;
+  public static java.lang.Object staticField764;
+  public static java.lang.Object staticField765;
+  public static java.lang.Object staticField766;
+  public static java.lang.Object staticField767;
+  public static java.lang.Object staticField768;
+  public static java.lang.Object staticField769;
+  public static java.lang.Object staticField770;
+  public static java.lang.Object staticField771;
+  public static java.lang.Object staticField772;
+  public static java.lang.Object staticField773;
+  public static java.lang.Object staticField774;
+  public static java.lang.Object staticField775;
+  public static java.lang.Object staticField776;
+  public static java.lang.Object staticField777;
+  public static java.lang.Object staticField778;
+  public static java.lang.Object staticField779;
+  public static java.lang.Object staticField780;
+  public static java.lang.Object staticField781;
+  public static java.lang.Object staticField782;
+  public static java.lang.Object staticField783;
+  public static java.lang.Object staticField784;
+  public static java.lang.Object staticField785;
+  public static java.lang.Object staticField786;
+  public static java.lang.Object staticField787;
+  public static java.lang.Object staticField788;
+  public static java.lang.Object staticField789;
+  public static java.lang.Object staticField790;
+  public static java.lang.Object staticField791;
+  public static java.lang.Object staticField792;
+  public static java.lang.Object staticField793;
+  public static java.lang.Object staticField794;
+  public static java.lang.Object staticField795;
+  public static java.lang.Object staticField796;
+  public static java.lang.Object staticField797;
+  public static java.lang.Object staticField798;
+  public static java.lang.Object staticField799;
+  public static java.lang.Object staticField800;
+  public static java.lang.Object staticField801;
+  public static java.lang.Object staticField802;
+  public static java.lang.Object staticField803;
+  public static java.lang.Object staticField804;
+  public static java.lang.Object staticField805;
+  public static java.lang.Object staticField806;
+  public static java.lang.Object staticField807;
+  public static java.lang.Object staticField808;
+  public static java.lang.Object staticField809;
+  public static java.lang.Object staticField810;
+  public static java.lang.Object staticField811;
+  public static java.lang.Object staticField812;
+  public static java.lang.Object staticField813;
+  public static java.lang.Object staticField814;
+  public static java.lang.Object staticField815;
+  public static java.lang.Object staticField816;
+  public static java.lang.Object staticField817;
+  public static java.lang.Object staticField818;
+  public static java.lang.Object staticField819;
+  public static java.lang.Object staticField820;
+  public static java.lang.Object staticField821;
+  public static java.lang.Object staticField822;
+  public static java.lang.Object staticField823;
+  public static java.lang.Object staticField824;
+  public static java.lang.Object staticField825;
+  public static java.lang.Object staticField826;
+  public static java.lang.Object staticField827;
+  public static java.lang.Object staticField828;
+  public static java.lang.Object staticField829;
+  public static java.lang.Object staticField830;
+  public static java.lang.Object staticField831;
+  public static java.lang.Object staticField832;
+  public static java.lang.Object staticField833;
+  public static java.lang.Object staticField834;
+  public static java.lang.Object staticField835;
+  public static java.lang.Object staticField836;
+  public static java.lang.Object staticField837;
+  public static java.lang.Object staticField838;
+  public static java.lang.Object staticField839;
+  public static java.lang.Object staticField840;
+  public static java.lang.Object staticField841;
+  public static java.lang.Object staticField842;
+  public static java.lang.Object staticField843;
+  public static java.lang.Object staticField844;
+  public static java.lang.Object staticField845;
+  public static java.lang.Object staticField846;
+  public static java.lang.Object staticField847;
+  public static java.lang.Object staticField848;
+  public static java.lang.Object staticField849;
+  public static java.lang.Object staticField850;
+  public static java.lang.Object staticField851;
+  public static java.lang.Object staticField852;
+  public static java.lang.Object staticField853;
+  public static java.lang.Object staticField854;
+  public static java.lang.Object staticField855;
+  public static java.lang.Object staticField856;
+  public static java.lang.Object staticField857;
+  public static java.lang.Object staticField858;
+  public static java.lang.Object staticField859;
+  public static java.lang.Object staticField860;
+  public static java.lang.Object staticField861;
+  public static java.lang.Object staticField862;
+  public static java.lang.Object staticField863;
+  public static java.lang.Object staticField864;
+  public static java.lang.Object staticField865;
+  public static java.lang.Object staticField866;
+  public static java.lang.Object staticField867;
+  public static java.lang.Object staticField868;
+  public static java.lang.Object staticField869;
+  public static java.lang.Object staticField870;
+  public static java.lang.Object staticField871;
+  public static java.lang.Object staticField872;
+  public static java.lang.Object staticField873;
+  public static java.lang.Object staticField874;
+  public static java.lang.Object staticField875;
+  public static java.lang.Object staticField876;
+  public static java.lang.Object staticField877;
+  public static java.lang.Object staticField878;
+  public static java.lang.Object staticField879;
+  public static java.lang.Object staticField880;
+  public static java.lang.Object staticField881;
+  public static java.lang.Object staticField882;
+  public static java.lang.Object staticField883;
+  public static java.lang.Object staticField884;
+  public static java.lang.Object staticField885;
+  public static java.lang.Object staticField886;
+  public static java.lang.Object staticField887;
+  public static java.lang.Object staticField888;
+  public static java.lang.Object staticField889;
+  public static java.lang.Object staticField890;
+  public static java.lang.Object staticField891;
+  public static java.lang.Object staticField892;
+  public static java.lang.Object staticField893;
+  public static java.lang.Object staticField894;
+  public static java.lang.Object staticField895;
+  public static java.lang.Object staticField896;
+  public static java.lang.Object staticField897;
+  public static java.lang.Object staticField898;
+  public static java.lang.Object staticField899;
+  public static java.lang.Object staticField900;
+  public static java.lang.Object staticField901;
+  public static java.lang.Object staticField902;
+  public static java.lang.Object staticField903;
+  public static java.lang.Object staticField904;
+  public static java.lang.Object staticField905;
+  public static java.lang.Object staticField906;
+  public static java.lang.Object staticField907;
+  public static java.lang.Object staticField908;
+  public static java.lang.Object staticField909;
+  public static java.lang.Object staticField910;
+  public static java.lang.Object staticField911;
+  public static java.lang.Object staticField912;
+  public static java.lang.Object staticField913;
+  public static java.lang.Object staticField914;
+  public static java.lang.Object staticField915;
+  public static java.lang.Object staticField916;
+  public static java.lang.Object staticField917;
+  public static java.lang.Object staticField918;
+  public static java.lang.Object staticField919;
+  public static java.lang.Object staticField920;
+  public static java.lang.Object staticField921;
+  public static java.lang.Object staticField922;
+  public static java.lang.Object staticField923;
+  public static java.lang.Object staticField924;
+  public static java.lang.Object staticField925;
+  public static java.lang.Object staticField926;
+  public static java.lang.Object staticField927;
+  public static java.lang.Object staticField928;
+  public static java.lang.Object staticField929;
+  public static java.lang.Object staticField930;
+  public static java.lang.Object staticField931;
+  public static java.lang.Object staticField932;
+  public static java.lang.Object staticField933;
+  public static java.lang.Object staticField934;
+  public static java.lang.Object staticField935;
+  public static java.lang.Object staticField936;
+  public static java.lang.Object staticField937;
+  public static java.lang.Object staticField938;
+  public static java.lang.Object staticField939;
+  public static java.lang.Object staticField940;
+  public static java.lang.Object staticField941;
+  public static java.lang.Object staticField942;
+  public static java.lang.Object staticField943;
+  public static java.lang.Object staticField944;
+  public static java.lang.Object staticField945;
+  public static java.lang.Object staticField946;
+  public static java.lang.Object staticField947;
+  public static java.lang.Object staticField948;
+  public static java.lang.Object staticField949;
+  public static java.lang.Object staticField950;
+  public static java.lang.Object staticField951;
+  public static java.lang.Object staticField952;
+  public static java.lang.Object staticField953;
+  public static java.lang.Object staticField954;
+  public static java.lang.Object staticField955;
+  public static java.lang.Object staticField956;
+  public static java.lang.Object staticField957;
+  public static java.lang.Object staticField958;
+  public static java.lang.Object staticField959;
+  public static java.lang.Object staticField960;
+  public static java.lang.Object staticField961;
+  public static java.lang.Object staticField962;
+  public static java.lang.Object staticField963;
+  public static java.lang.Object staticField964;
+  public static java.lang.Object staticField965;
+  public static java.lang.Object staticField966;
+  public static java.lang.Object staticField967;
+  public static java.lang.Object staticField968;
+  public static java.lang.Object staticField969;
+  public static java.lang.Object staticField970;
+  public static java.lang.Object staticField971;
+  public static java.lang.Object staticField972;
+  public static java.lang.Object staticField973;
+  public static java.lang.Object staticField974;
+  public static java.lang.Object staticField975;
+  public static java.lang.Object staticField976;
+  public static java.lang.Object staticField977;
+  public static java.lang.Object staticField978;
+  public static java.lang.Object staticField979;
+  public static java.lang.Object staticField980;
+  public static java.lang.Object staticField981;
+  public static java.lang.Object staticField982;
+  public static java.lang.Object staticField983;
+  public static java.lang.Object staticField984;
+  public static java.lang.Object staticField985;
+  public static java.lang.Object staticField986;
+  public static java.lang.Object staticField987;
+  public static java.lang.Object staticField988;
+  public static java.lang.Object staticField989;
+  public static java.lang.Object staticField990;
+  public static java.lang.Object staticField991;
+  public static java.lang.Object staticField992;
+  public static java.lang.Object staticField993;
+  public static java.lang.Object staticField994;
+  public static java.lang.Object staticField995;
+  public static java.lang.Object staticField996;
+  public static java.lang.Object staticField997;
+  public static java.lang.Object staticField998;
+  public static java.lang.Object staticField999;
+  public static java.lang.Object staticField1000;
+  public Class_NNN_() {System.out.println("In constructor of Class_NNN_"); };
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/ExecutionTask.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,51 @@
+/*
+ * Copyright (c) 2014, 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.
+ */
+package gc.g1.unloading;
+
+import nsk.share.test.ExecutionController;
+
+/**
+ * Utility superclass for threads that employ ExecutionController.
+ *
+ */
+public abstract class ExecutionTask implements Runnable {
+
+    protected ExecutionController executionController;
+
+    public ExecutionTask(ExecutionController executionController) {
+        this.executionController = executionController;
+    }
+
+    abstract protected void task() throws Exception;
+
+    @Override
+    public void run() {
+        try {
+            while (executionController.continueExecution()) {
+                task();
+            }
+        } catch (Exception e) {
+            throw new RuntimeException("Something went wrong in PhantomizationServiceThread");
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/GenClassPoolJar.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,286 @@
+/*
+ * Copyright (c) 2014, 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.
+ */
+
+package gc.g1.unloading;
+
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.nio.file.FileVisitResult;
+import java.nio.file.FileVisitor;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+import java.nio.file.attribute.BasicFileAttributes;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+import java.util.jar.JarEntry;
+import java.util.jar.JarOutputStream;
+import java.util.jar.Manifest;
+import javax.tools.JavaCompiler;
+import javax.tools.JavaFileObject;
+import javax.tools.StandardJavaFileManager;
+import javax.tools.ToolProvider;
+import jdk.internal.org.objectweb.asm.ClassReader;
+import jdk.internal.org.objectweb.asm.ClassVisitor;
+import jdk.internal.org.objectweb.asm.ClassWriter;
+import jdk.internal.org.objectweb.asm.Opcodes;
+
+/**
+ * Class that imitates shell script to produce jar file with many similar
+ * classes inside.
+ *
+ * The class generates sources, compiles the first one, applies magic of ASM
+ * to multiply classes and packs into classPool.jar
+ *
+ * Generation template is supposed to be ClassNNN.java.template
+ */
+public class GenClassPoolJar {
+
+    private final String templateFile;
+    private final String destDir;
+    private final int count;
+
+    private final File tmpArea;
+    private final File pkgDir;
+
+    private static final String JAR_NAME = "classPool.jar";
+    private static final String PKG_DIR_NAME = "gc/g1/unloading/rootSetHelper/classesPool";
+
+    public static void main(String args[]) {
+       new GenClassPoolJar(args).script();
+    }
+
+    /**
+     * Creates generator and parses command line args.
+     * @param args command line args
+     */
+    public GenClassPoolJar(String args[]) {
+        if (args.length != 3) {
+            System.err.println("Usage:");
+            System.err.println("java " + GenClassPoolJar.class.getCanonicalName() +
+                    " <template-file> <ouput-dir> <count>" );
+            throw new Error("Illegal number of parameters");
+        }
+        templateFile = args[0];
+        destDir = args[1];
+        count = Integer.parseInt(args[2]);
+
+        tmpArea = new File(destDir, "tmp-area");
+        pkgDir = new File(tmpArea, PKG_DIR_NAME);
+
+    }
+    /**
+     * Does everything.
+     */
+    public void script() {
+        long startTime = System.currentTimeMillis();
+        System.out.println("Trying to produce: " + destDir + "/" + JAR_NAME);
+        try {
+
+            if (!pkgDir.exists() && !pkgDir.mkdirs()) {
+                throw new Error("Failed to create " + pkgDir);
+            }
+
+
+            String javaTemplate = readTemplate(templateFile);
+            File java0 = new File(pkgDir, "Class0.java");
+            File class0 = new File(pkgDir, "Class0.class");
+            writeSource(java0, generateSource(javaTemplate, 0));
+
+            /*
+             * Generating and compiling all the sources is not our way -
+             * too easy and too slow.
+             * We compile just first class and use ASM to obtain others
+             * via instrumenting.
+             */
+            File[] toCompile = {java0};
+            compile(toCompile, tmpArea.getAbsolutePath());
+            byte[] classTemplate = readFile(class0); // the first compiled class
+            createJar(new File(destDir, JAR_NAME), javaTemplate, classTemplate, count);
+
+
+            deleteFolder(tmpArea);
+            long endTime = System.currentTimeMillis();
+            System.out.println("Success in " + ((endTime - startTime)/1000) + " seconds");
+        } catch (Throwable whatever) {
+            throw new Error(whatever);
+        }
+    }
+
+    /**
+     * Generates source number num.
+     * @param template template to generate from
+     * @param num number
+     * @return content of java file
+     */
+    String generateSource(String template, int num) {
+        return template.replaceAll("_NNN_", "" + num);
+    }
+
+    /**
+     * Reads content of the given file.
+     * @param file name of file to read
+     * @return file content
+     * @throws IOException if something bad has happened
+     */
+    String readTemplate(String file) throws IOException {
+        if (!new File(file).exists()) {
+            throw new Error("Template " + file + " doesn't exist");
+        }
+        List<String> lines = Files.readAllLines(Paths.get(file));
+        StringBuilder sb = new StringBuilder();
+        for (String line: lines) {
+            if (line.trim().startsWith("#")) {
+                continue;
+            }
+            sb.append(line).append(System.lineSeparator());
+        }
+        return sb.toString();
+    }
+
+    /**
+     * Writes given content to the given file.
+     *
+     * @param file to create
+     * @param content java source
+     * @throws IOException if something bad has happened
+     */
+    void writeSource(File file, String content) throws IOException {
+        List<String> list = Arrays.asList(content.split(System.lineSeparator()));
+        Files.write(Paths.get(file.getAbsolutePath()), list);
+    }
+
+
+    /**
+     * Compiles given files into given folder.
+     *
+     * @param files to compile
+     * @param destDir where to compile
+     * @throws IOException
+     */
+    void compile(File[] files, String destDir) throws IOException {
+        JavaCompiler compiler = ToolProvider.getSystemJavaCompiler();
+        List<String> optionList = new ArrayList<>();
+        optionList.addAll(Arrays.asList("-d", destDir));
+        StandardJavaFileManager sjfm = compiler.getStandardFileManager(null, null, null);
+        Iterable<? extends JavaFileObject> fileObjects = sjfm.getJavaFileObjects(files);
+        JavaCompiler.CompilationTask task = compiler.getTask(null, null, null, optionList, null, fileObjects);
+        task.call();
+        sjfm.close();
+    }
+
+    /**
+     * Puts a number of classes and java sources in the given jar.
+     *
+     * @param jarFile        name of jar file
+     * @param javaTemplate   content of java source template
+     * @param classTemplate  content of compiled java class
+     * @param count          number of classes to generate
+     * @throws IOException
+     */
+    void createJar(File jarFile, String javaTemplate, byte[] classTemplate, int count) throws IOException {
+        try (JarOutputStream jar = new JarOutputStream(new FileOutputStream(jarFile), new Manifest())) {
+            for (int i = 1; i <= count; i++) {
+                String name = PKG_DIR_NAME + "/Class" + i;
+                jar.putNextEntry(new JarEntry(name + ".java"));
+                byte[] content = generateSource(javaTemplate, 0).getBytes();
+                jar.write(content, 0, content.length);
+
+                jar.putNextEntry(new JarEntry(name + ".class"));
+                content = morphClass(classTemplate, name);
+                jar.write(content, 0, content.length);
+            }
+        }
+    }
+
+   byte[] readFile(File f) throws IOException {
+       return Files.readAllBytes(Paths.get(f.getAbsolutePath()));
+   }
+
+   void writeFile(File f, byte[] content) throws IOException {
+        Files.write(Paths.get(f.getAbsolutePath()), content);
+   }
+
+   void deleteFolder(File dir) throws IOException {
+       Files.walkFileTree(Paths.get(dir.getAbsolutePath()), new FileVisitor<Path>() {
+
+           @Override
+           public FileVisitResult preVisitDirectory(Path dir, BasicFileAttributes attrs) throws IOException {
+               return FileVisitResult.CONTINUE;
+           }
+
+           @Override
+           public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws IOException {
+               Files.delete(file);
+               return FileVisitResult.CONTINUE;
+           }
+
+           @Override
+           public FileVisitResult visitFileFailed(Path file, IOException exc) throws IOException {
+               return FileVisitResult.CONTINUE;
+           }
+
+           @Override
+           public FileVisitResult postVisitDirectory(Path dir, IOException exc) throws IOException {
+               Files.delete(dir);
+               return FileVisitResult.CONTINUE;
+           }
+
+       });
+   }
+
+   /**
+    * Puts new name on the given class.
+    *
+    * @param classToMorph  class file content
+    * @param newName       new name
+    * @return              new class file to write into class
+    */
+   byte[] morphClass(byte[] classToMorph, String newName) {
+       ClassReader cr = new ClassReader(classToMorph);
+       ClassWriter cw = new ClassWriter(cr, ClassWriter.COMPUTE_MAXS);
+       ClassVisitor cv = new ClassRenamer(cw, newName);
+       cr.accept(cv, 0);
+       return cw.toByteArray();
+   }
+
+    /**
+     * Visitor to rename class.
+     */
+    static class ClassRenamer extends ClassVisitor implements Opcodes {
+        private final String newName;
+
+        public ClassRenamer(ClassVisitor cv, String newName) {
+            super(ASM4, cv);
+            this.newName = newName;
+        }
+
+        @Override
+        public void visit(int version, int access, String name, String signature, String superName, String[] interfaces) {
+            cv.visit(version, access, newName, signature, superName, interfaces);
+        }
+
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/GenClassesBuilder.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,65 @@
+/*
+ * 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
+ * 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 gc.g1.unloading;
+
+import jdk.test.lib.Utils;
+
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+
+/**
+ * Uses {@link gc.g1.unloading.GenClassPoolJar} to build {@code classPool.jar}
+ * in current directory.
+ */
+public class GenClassesBuilder {
+    public static void main(String[] args) {
+        Path template = testRoot().resolve("vmTestbase")
+                                  .resolve("gc")
+                                  .resolve("g1")
+                                  .resolve("unloading")
+                                  .resolve("ClassNNN.java.template")
+                                  .toAbsolutePath();
+        Path dir = Paths.get(".").toAbsolutePath();
+        String count = "1000";
+        if (Files.notExists(template)) {
+            throw new Error("can't find template file: " + template);
+        }
+        try {
+            GenClassPoolJar.main(new String[]{template.toString(), dir.toString(), count});
+        } catch (Exception e) {
+            throw new Error("can't generate classPool.jar", e);
+        }
+    }
+
+    private static Path testRoot() {
+        Path p = Paths.get(Utils.TEST_SRC);
+        while (!Files.exists(p.resolve("TEST.ROOT"))) {
+            p = p.getParent();
+        }
+        return p;
+    }
+}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/README	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,123 @@
+Copyright (c) 2014, 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.
+
+Here are tests that were developed for "G1 support for long running applications" feature. In effect,
+ here is only one test with a lot of configurations.
+
+Feature description:
+  G1 used to unload classes only during full collections. Goal of feature is to unload unused classes
+ without resorting to full gc.
+
+What does test checks:
+  - that unreferenced classloader will be collected without full gc. This is checked with WhiteBox.is
+ClassAlive method.
+  - that referenced classloader will live. This is checked with WhiteBox.isClassAlive method as well.
+ Also it is checked that classloader will be finalized and enqueued to queue of phantom references.
+
+In what aspects/circumstances checks performed:
+  - classloaders that we expect to be collected can be comlpetely unreferenced, referenced with phant
+om reference and with weak reference. Test can check that presence of phantom/weak reference doesn't
+keep classloader alive.
+      Test has flag "-referenceMode" that has valid options:
+          "phantom" for phantom reference,
+          "weak" for weak reference and
+          "none" for not keeping reference at all.
+  - to avoid class unloading we can keep reference to classloader itself, class or object.
+      This behavior can be adjusted with flag "-keep" that has valid options:
+          "classloader",
+          "class" and
+          "object".
+  - according to test plan several ways of classloading are covered.
+      This behavior is adjusted with "classloadingMethod" flag that has valid options
+          "plain",
+          "reflection",
+          "jni",
+          "anonymous_classloader".
+  - classloaders that we expect to live can be referenced in several ways.
+      This behavior can be adjusted with flag "-keepRefMode" that has valid options:
+	  "strong_reference" for starighforward keeping strong reference,
+	  "static_field" for keeping reference in static field of alive class,
+	  "stack_local" for keeping reference in local variable of running thread,
+	  "thread_field" for keeping reference in field of running thread's object,
+	  "thread_itself" if we want object to be a running thread itself,
+	  "static_field_of_root_class". In this case reference will be kept in static field of class that wa
+s loaded by null classloader.
+	  "jni_global_ref". In this case global reference will be kept in native library.
+	  "jni_local_ref", In this case local reference will be kept in JNI call in running thread.
+  - Another aspect is that class can be humongous.
+      Humongous classes can be enabled with "-humongousClass" command line option. Valid options are
+"true" and "false".
+  - Another aspect that is covered with tests is that class methods can be compiled by JIT compiler.
+      This behavior can be adjusted with "-compilationLevel" and "-compilationNumber" options. First
+one has self-explaining name, latter sets number of optimization/deoptimozation of each class.
+  - Next aspect is class redefinition.
+      You can enable classes redefinition with "-redefineClasses" flag.
+
+Test implementation details:
+  Test supposed to be ran with G1 gc and -XX:+ExplicitGCProvokesConcurrent option. In the end of exec
+ution test checks if full gc happened. If this is the case the test throws descriptive exception and
+fails.
+
+Test guts design:
+  Test in loop performs the following until time is over (timelimit is set up with "-stressTime" opti
+on):
+	- loads class that gonna live or gonna be unloaded. Decision depends upon Random.nextBoolean().
+	- previous action produces collection of Assertions (what assertion is is explained a little bit lat
+er). Assertions are saved into AssertionContainer.
+	- takes from AssertionContainer assertions that are already mature for check and performs checks. "M
+ature" means that required number of System.gc() calls happened since assertion was created.
+
+What "Assertion" is:
+ Assertion incapsulates check that concrete class will be alive or dead. Hazard is that we can't perf
+orm check just after we removed last reference to classloader. We have to wait some number of concurr
+ent-mark-cycles, i.e. System.gc() calls. For this reason we put each assertion in AssertionContainer
+and get back much later, when it's ready for check.
+ Classes of assertions form the following simple hierarchy:
+
+                              gc.g1.unloading.check.Assertion
+                              ||             ||            ||
+                              \/             ||            \/
+  gc.g1.unloading.check.FinalizedAssertion   ||           gc.g1.unloading.check.PhantomizedAssertion
+                                             \/
+                        gc.g1.unloading.check.ClassAssertion
+
+FinalizedAssertion checks that unreferenced classloader will be finalized.
+PhantomizedAssertion checks that phantom reference to classloader will be enqueued to ReferenceQueue.
+ClassAssertion checks that class will be dead or alive using WhiteBox.isClassAlive method.
+
+Other implemention notes:
+  There are some other auxiliary threads, but they are not crucial for understanding the logic.
+  There are a lot of configurations of the same test in testlist. All configurations use the same mai
+n method as entry point, but impose different test flags. Configurations are autogenerated with "gene
+rate.sh" script.
+
+Other test options:
+	-DFailTestIfNothingChecked=true. (vm flag) Set this if you want test to fail if nothing was checked
+and test appeared to be useless. It can happen, for example, in slow modes that force compilation.
+	-numberOfChecksLimit. (test flag) Set this number if you want test to pass after certain number of c
+hecks performed. (Not to waste time.) To some extent this turns stress test into functional test.
+	-numberOfGCsBeforeCheck. (test flag) This option sets number of System.gc() calls that have to be do
+ne before each assertion will be ready to perform checks.
+	-inMemoryCompilation. (test flag) This option defines the way of classes creation. If this is true t
+hen classes are compiled with javac API. If false - classes are produced by rewriting classname in "g
+olden" bytecode.
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/UnloadingTest.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,185 @@
+/*
+ * Copyright (c) 2014, 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.
+ */
+package gc.g1.unloading;
+
+import java.lang.Thread.UncaughtExceptionHandler;
+import java.lang.management.*;
+import java.util.Collection;
+import java.util.List;
+import java.util.Random;
+import java.util.concurrent.atomic.AtomicLong;
+
+import gc.g1.unloading.check.Assertion;
+import gc.g1.unloading.check.AssertionContainer;
+import gc.g1.unloading.check.ClassAssertion;
+import gc.g1.unloading.configuration.*;
+import nsk.share.gc.GCTestBase;
+import nsk.share.test.ExecutionController;
+import nsk.share.test.Stresser;
+import nsk.share.test.Tests;
+
+import gc.g1.unloading.loading.*;
+
+/**
+ * This class contains main method. It's entry point for all configurations.
+ *
+ */
+public class UnloadingTest extends GCTestBase {
+
+    private static String[] args;
+
+    private TestConfiguration configuration;
+
+    private AssertionContainer assertionContainer = new AssertionContainer();
+
+    private Random random;
+
+    private static final String classNamePrefix = "ClassAbc_";
+
+    private static final long DELAY = 300;
+
+    private static AtomicLong systemGcCallsCounter = new AtomicLong(0);
+
+    public static void main(String[] args) {
+        UnloadingTest.args = args;
+        Tests.runTest(new UnloadingTest(), args);
+    }
+
+    @Override
+    public void run() {
+        configuration = TestConfiguration.createTestConfiguration(args);
+
+        checkIfG1Used();
+        checkFlags();
+
+        ExecutionController stresser = new Stresser(args);
+        stresser.start(1);
+
+        Thread.setDefaultUncaughtExceptionHandler(new UncaughtExceptionHandler() {
+            @Override
+            public void uncaughtException(Thread t, Throwable e) {
+                System.out.println("Throwable \"" + e + "\" in thread " + t.getName() + ", id=" + t.getId());
+                e.printStackTrace();
+                try {
+                    checkGCCounters();
+                } catch (Throwable thr) {
+                    thr.printStackTrace();
+                }
+                System.exit(2);
+            }
+        });
+
+        random = new Random(runParams.getSeed());
+        ClassLoadingHelper classLoadingHelper = new ClassLoadingHelper(stresser, random.nextLong(), configuration);
+
+        int classesCounter = 0;
+        while (stresser.continueExecution()) {
+            Collection<Assertion> assertions = null;
+            String className = classNamePrefix + (classesCounter++);
+
+            try {
+                Thread.sleep(DELAY);
+            } catch (InterruptedException | IllegalArgumentException e) {
+                throw new RuntimeException("Something went wrong in ClassLoadingHelper", e);
+            }
+
+            if (random.nextBoolean()) {
+                assertions = classLoadingHelper.loadClassThatGonnaDie(className);
+            } else {
+                assertions = classLoadingHelper.loadClassThatGonnaLive(className);
+            }
+
+            System.gc();
+            long systemGCCalls = systemGcCallsCounter.incrementAndGet();
+
+            assertionContainer.enqueue(assertions, systemGCCalls);
+
+            check(assertionContainer.getElder(systemGCCalls - configuration.getNumberOfGCsBeforeCheck()));
+
+            if (configuration.getNumberOfChecksLimit() >= 0 &&
+                    ClassAssertion.getCounterOfCheckedAlive() >= configuration.getNumberOfChecksLimit() &&
+                    ClassAssertion.getCounterOfCheckedUnloaded() >= configuration.getNumberOfChecksLimit()) {
+                System.out.println("Exiting because numberOfChecksLimit exceeded.");
+                stresser.finish();
+                break;
+            }
+        }
+
+        System.out.println("ClassAssertion.getCounterOfCheckedAlive() = " + ClassAssertion.getCounterOfCheckedAlive());
+        System.out.println("ClassAssertion.getCounterOfCheckedUnloaded() = " + ClassAssertion.getCounterOfCheckedUnloaded());
+        checkGCCounters();
+        if (System.getProperty("FailTestIfNothingChecked") != null) {
+            if (ClassAssertion.getCounterOfCheckedAlive() == 0 || ClassAssertion.getCounterOfCheckedUnloaded() == 0) {
+                throw new RuntimeException("Test was useless. Smthng not checked: " + ClassAssertion.getCounterOfCheckedAlive() + " " +
+                        ClassAssertion.getCounterOfCheckedUnloaded());
+            }
+        }
+    }
+
+    private void check(Collection<Assertion> assertions) {
+        if (assertions.isEmpty()) {
+            return;
+        }
+        for (Assertion assertion : assertions) {
+            assertion.check();
+            assertion.cleanup();
+        }
+    }
+
+    private static void checkGCCounters() {
+//        System.out.println("WhiteBox.getWhiteBox().g1GetTotalCollections() = \t" + WhiteBox.getWhiteBox().g1GetTotalCollections());
+//        System.out.println("WhiteBox.getWhiteBox().g1GetTotalFullCollections() = \t" + WhiteBox.getWhiteBox().g1GetTotalFullCollections());
+        GarbageCollectorMXBean oldGenBean = null;
+        for (GarbageCollectorMXBean bean : ManagementFactory.getGarbageCollectorMXBeans()) {
+            System.out.println("bean.getName() = \t\"" + bean.getName() + "\", bean.getCollectionCount() = \t" + bean.getCollectionCount());
+            if (bean.getName().contains("Old")) {
+                oldGenBean = bean;
+            }
+        }
+//        if (WhiteBox.getWhiteBox().g1GetTotalFullCollections() != 0 || (oldGenBean != null && oldGenBean.getCollectionCount() != 0)) {
+        if (oldGenBean != null && oldGenBean.getCollectionCount() != 0) {
+            throw new RuntimeException("Full gc happened. Test was useless.");
+        }
+    }
+
+    private void checkIfG1Used() {
+        for (GarbageCollectorMXBean bean : ManagementFactory.getGarbageCollectorMXBeans()) {
+            if (!bean.getName().contains("G1")) {
+                System.err.println("This test was created to cover G1 class unloading feature. It should be ran with -XX:+UseG1GC. Skipping silently.");
+                System.exit(0);
+            }
+        }
+    }
+
+    private void checkFlags() {
+        RuntimeMXBean runtimeMxBean = ManagementFactory.getRuntimeMXBean();
+        List<String> arguments = runtimeMxBean.getInputArguments();
+        for (String argument : arguments) {
+            if (argument.contains("ExplicitGCInvokesConcurrent")) {
+                return;
+            }
+        }
+        throw new RuntimeException("This test supposed to be ran with -XX:+ExplicitGCInvokesConcurrent flag");
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/bytecode/Bytecode.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,56 @@
+/*
+ * Copyright (c) 2014, 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.
+ */
+package gc.g1.unloading.bytecode;
+
+/**
+ * This is container for class name and bytecode. Bytecode is what BytecodeFactory produces.
+ */
+public class Bytecode {
+
+    private String className;
+
+    private byte[] bytecode;
+
+    public String getClassName() {
+        return className;
+    }
+
+    public void setClassName(String className) {
+        this.className = className;
+    }
+
+    public byte[] getBytecode() {
+        return bytecode;
+    }
+
+    public void setBytecode(byte[] bytecode) {
+        this.bytecode = bytecode;
+    }
+
+    public Bytecode(String className, byte[] bytecode) {
+        super();
+        this.className = className;
+        this.bytecode = bytecode;
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/bytecode/BytecodeFactory.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,29 @@
+/*
+ * Copyright (c) 2014, 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.
+ */
+package gc.g1.unloading.bytecode;
+
+public interface BytecodeFactory {
+
+    Bytecode createBytecode(String className);
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/bytecode/BytecodeGeneratorFactory.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,56 @@
+/*
+ * Copyright (c) 2014, 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.
+ */
+package gc.g1.unloading.bytecode;
+
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Random;
+
+import vm.share.InMemoryJavaCompiler;
+
+/**
+ * BytecodeFactory that employs in memory compilation.
+ */
+public class BytecodeGeneratorFactory implements BytecodeFactory {
+
+    private Random random;
+
+    private SourceGenerator sourceGenerator;
+
+    public BytecodeGeneratorFactory(long seed) {
+        random = new Random(seed);
+        sourceGenerator = new SourceGenerator(random.nextLong());
+    }
+
+    @Override
+    public Bytecode createBytecode(String className) {
+        Map<String, CharSequence> sources = new HashMap<String, CharSequence>();
+        sources.put(className, sourceGenerator.generateSource(className,
+                "public static void main() { System.out.println(\"From main method in in-mem-compiled code " + random.nextGaussian() +
+                        " + str_bytesToReplace0 str_bytesToReplace1\"); }\n " +
+                        "public static int methodForCompilation(Object object) { int i = object.hashCode(); i = i * 2000 / 1994 + 153; return i; }\n"));
+        byte[] bytecode = InMemoryJavaCompiler.compile(sources).values().iterator().next();
+        return new Bytecode(className, bytecode);
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/bytecode/BytecodeMutatorFactory.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,125 @@
+/*
+ * Copyright (c) 2014, 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.
+ */
+package gc.g1.unloading.bytecode;
+
+import java.io.*;
+import java.nio.charset.*;
+import java.util.*;
+
+
+/**
+ * This BytecodeFactory produces bytecode that is golden bytecode with className substituted.
+ */
+public class BytecodeMutatorFactory implements BytecodeFactory {
+
+    private static final String FILLER_CHARACTER = "_";
+
+    /**
+     * Utility method in this class
+     */
+    public static String padName(String s, int length) {
+        int difference = length - s.length();
+        StringBuilder sb = new StringBuilder(s);
+        for (int i = 0; i < difference; i++) {
+            sb.append(FILLER_CHARACTER);
+        }
+        return sb.toString();
+    }
+
+    public String padName(String s) {
+        return padName(s, getNameLength());
+    }
+
+    private final Charset CHARACTER_SET = StandardCharsets.UTF_8;
+
+    private List<Integer> offsets = new LinkedList<>();
+
+    private byte[] templateBytecode;
+
+    private String templateClassName;
+
+    private byte[] templateClassNameAsBytes;
+
+    public BytecodeMutatorFactory() {
+        this(DefaultTemplateClass.class.getName());
+    }
+
+    public BytecodeMutatorFactory(String templateClassName) {
+        this.templateClassName = templateClassName;
+
+        // Read bytecode to array
+        InputStream is = ClassLoader.getSystemResourceAsStream(templateClassName.replace('.', '/').concat(".class"));
+        try {
+            templateBytecode = new byte[is.available()];
+            is.read(templateBytecode);
+            is.close();
+        } catch (IOException e) {
+            throw new RuntimeException(e);
+        }
+
+        // Save offsets
+        templateClassNameAsBytes = templateClassName.replace('.', '/').getBytes(CHARACTER_SET);
+        for (int i = 0; i < templateBytecode.length; i++) {
+            boolean match = true;
+            for (int j = 0; j < templateClassNameAsBytes.length; j++) {
+                if (i + j >= templateBytecode.length || templateClassNameAsBytes[j] != templateBytecode[i + j]) {
+                    match = false;
+                    break;
+                }
+            }
+            if (match) {
+                offsets.add(i);
+            }
+        }
+    }
+
+    public byte[] getBytecode(String className) {
+
+        // Check size of name constraint
+        byte[] newClassNameAsBytes = className.replace('.', '/').getBytes(CHARACTER_SET);
+        if (newClassNameAsBytes.length != templateClassNameAsBytes.length) {
+            throw new RuntimeException("Can't produce bytecode with \"" + className + "\" substituted as class name. " +
+                    "Length of this name differs from length of \"" + templateClassName + "\" which equals to " + templateClassName.length() +
+                    ". Length of \"" + className + "\" is " + className.length() + ".");
+        }
+
+        // Prepare bytecode
+        byte[] result = Arrays.copyOf(templateBytecode, templateBytecode.length);
+        for (int offset : offsets) {
+            System.arraycopy(newClassNameAsBytes, 0, result, offset, newClassNameAsBytes.length);
+        }
+        return result;
+    }
+
+    public int getNameLength() {
+        return templateClassName.length();
+    }
+
+    @Override
+    public Bytecode createBytecode(String className) {
+        String finalClassName = padName(className);
+        byte[] bytecode = getBytecode(finalClassName);
+        return new Bytecode(finalClassName, bytecode);
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/bytecode/BytecodePatcher.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,58 @@
+/*
+ * Copyright (c) 2014, 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.
+ */
+package gc.g1.unloading.bytecode;
+
+import java.util.*;
+
+
+/**
+ * This utility class replaces peaces of bytes in bytecode by another peaces according to dictionary. This is useful for class redefenition.
+ */
+public class BytecodePatcher {
+
+    static private Map<byte[], byte[]> dictionary = new HashMap<>();
+
+    static {
+        dictionary.put("bytesToReplace0".getBytes(), "bytesToReplace1".getBytes());
+        dictionary.put("bytesToReplace2".getBytes(), "bytesToReplace3".getBytes());
+    }
+
+    public static void patch(byte[] bytecode) {
+        for (Map.Entry<byte[], byte[]> entry : dictionary.entrySet()) {
+            for (int i = 0; i + entry.getKey().length < bytecode.length; i++) {
+                boolean match = true;
+                for (int j = 0; j < entry.getKey().length; j++) {
+                    if (bytecode[i + j] != entry.getKey()[j]) {
+                        match = false;
+                        break;
+                    }
+                }
+                if (match) {
+                    for (int j = 0; j < entry.getKey().length; j++)
+                        bytecode[i + j] = entry.getValue()[j];
+                }
+            }
+        }
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/bytecode/DefaultTemplateClass.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,45 @@
+/*
+ * Copyright (c) 2014, 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.
+ */
+package gc.g1.unloading.bytecode;
+
+import java.util.Random;
+
+/**
+ * This is template class. Loaded classes will derive from it.
+ */
+public class DefaultTemplateClass {
+
+    public static void main() {
+        System.out.println("In method of generated class. Random.nextDouble =  " + new Random().nextDouble());
+        System.out.println(" Printing bytesToReplace0 bytesToReplace2");
+    }
+
+    public static long field;
+
+    public static void methodForCompilation(Object object) {
+        int i = object.hashCode();
+        i = i * 2000 / 1994 + 153;
+        field = i;
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/bytecode/GenClassesBuilder.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,88 @@
+/*
+ * 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
+ * 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 gc.g1.unloading.bytecode;
+
+import jdk.test.lib.JDKToolLauncher;
+import jdk.test.lib.Utils;
+import jdk.test.lib.process.ProcessTools;
+
+import java.io.IOException;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+import java.util.Arrays;
+import java.util.stream.Stream;
+
+/**
+ * Uses {@link gc.g1.unloading.bytecode.HumongousTemplateClassGen} to generate
+ * source code of HumongousTemplateClass and compiles it to {@code test.classes}.
+ */
+public class GenClassesBuilder {
+    public static void main(String[] args) {
+        Path genSrc = Paths.get("genSrc").toAbsolutePath();
+        Path classesDir = Paths.get(Utils.TEST_CLASSES).toAbsolutePath();
+        generateSource(genSrc);
+        compileSource(genSrc, classesDir);
+    }
+
+    private static void compileSource(Path srcDst, Path classesDir) {
+        JDKToolLauncher javac = JDKToolLauncher.create("javac")
+                                               .addToolArg("-d")
+                                               .addToolArg(classesDir.toString())
+                                               .addToolArg("-cp")
+                                               .addToolArg(Utils.TEST_CLASS_PATH);
+        try (Stream<Path> stream = Files.walk(srcDst)) {
+            stream.map(Path::toAbsolutePath)
+                  .map(Path::toString)
+                  .filter(s -> s.endsWith(".java"))
+                  .forEach(javac::addToolArg);
+        } catch (IOException e) {
+            throw new Error("traverse source dir " + srcDst, e);
+        }
+        String[] command = javac.getCommand();
+        try {
+            ProcessTools.executeCommand(command)
+                        .shouldHaveExitValue(0);
+        } catch (Error | RuntimeException e) {
+            throw e;
+        } catch (Throwable e) {
+            throw new Error("execution of javac(" + Arrays.toString(command) + ") failed", e);
+        }
+    }
+
+    private static void generateSource(Path dir) {
+        try {
+            Files.createDirectories(dir);
+        } catch (IOException e) {
+            throw new Error("can't create dirs for" + dir, e);
+        }
+
+        try {
+            HumongousTemplateClassGen.main(new String[]{dir.toString()});
+        } catch (Exception e) {
+            throw new Error("can't generate classes", e);
+        }
+    }
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/bytecode/HumongousTemplateClassGen.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,123 @@
+/*
+ * 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
+ * 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 gc.g1.unloading.bytecode;
+
+import java.io.BufferedWriter;
+import java.io.File;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+
+/*
+ *  This class is compiled and invoke due the build to produce
+ *  HumongousTemplateClass.java. The size of generated file is
+ *  too large to store it in the repository.
+ */
+
+public class HumongousTemplateClassGen {
+
+private static final String CLASS_NAME = "HumongousTemplateClass";
+private static final String PKG_NAME = "gc.g1.unloading.bytecode";
+private static final String PKG_DIR_NAME = PKG_NAME.replace(".",
+        File.separator);
+private static final int ITERATIONS = 1075;
+private static final double MG = (Math.pow(1024, 2));
+private static final int RECORD_COUNT = 16 * ITERATIONS + 10;
+
+public static void addFileTop(List<String> records) {
+    records.add("package " + PKG_NAME + ";\n");
+    records.add("\n");
+    records.add("import java.util.*;\n");
+    records.add("\n");
+    records.add("public class " + CLASS_NAME + " {\n");
+    records.add("    public static void main() {\n");
+    records.add("        System.out.println(\"In humongous class \");\n");
+    records.add("    }");
+    records.add("\n");
+}
+
+public static void addIteration(int itNum, List<String> records) {
+    records.add("    public static Object public_static_object_" + itNum
+            + " = new Object();\n");
+    records.add("    protected static Object protected_static_object_" + itNum
+            + " = new Object();\n");
+    records.add("    private static Object private_static_Object_" + itNum
+            + " = new Object();\n");
+    records.add("\n");
+    records.add("    public static long public_static_long_" + itNum + ";\n");
+    records.add("    protected static long protected_static_long_" + itNum
+            + " = new Random().nextLong();\n");
+    records.add("    private static long private_static_long_" + itNum
+            + " = 42;\n");
+    records.add("\n");
+    records.add("    public Object public_object_" + itNum
+            + " = new Object();\n");
+    records.add("    protected Object protected_object_" + itNum
+            + " = new Object();\n");
+    records.add("    private Object private_Object_" + itNum
+            + " = new Object();\n");
+    records.add("\n");
+    records.add("    public long public_long_" + itNum + " = 43;\n");
+    records.add("    protected long protected_long_" + itNum + " = 44;\n");
+    records.add("    private long private_long_" + itNum
+            + " = new Random().nextLong();\n");
+}
+public static void main(String[] args) throws Exception {
+    if (args.length < 1) {
+        System.out.println("Usage: HumongousTemplateClassGen "
+                        + "<vm-testbase_src_folder>");
+        return;
+    }
+
+    List<String> records = new ArrayList<String>(RECORD_COUNT);
+    addFileTop(records);
+    for (int i = 1; i < ITERATIONS; i++) {
+        addIteration(i, records);
+    }
+    records.add("}");
+    writeBuffered(records, (int) (MG * 1), args[0]);
+}
+
+private static void writeBuffered(List<String> records, int bufSize,
+        String srcDir) throws IOException {
+    String path = srcDir + File.separator + PKG_DIR_NAME + File.separator
+            + CLASS_NAME + ".java";
+    System.out.println("Path="+path);
+    File file = new File (path);
+    file.getParentFile().mkdirs();
+    file.createNewFile();
+    long start = System.currentTimeMillis();
+    FileWriter writer = new FileWriter(file);
+    BufferedWriter bufferedWriter = new BufferedWriter(writer, bufSize);
+
+    for (String record: records) {
+       bufferedWriter.write(record);
+    }
+    bufferedWriter.flush();
+    bufferedWriter.close();
+    long end = System.currentTimeMillis();
+    System.out.println((end - start) / 1000f + " seconds");
+}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/bytecode/SourceGenerator.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,228 @@
+/*
+ * Copyright (c) 2014, 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.
+ */
+package gc.g1.unloading.bytecode;
+
+import java.util.Collections;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Random;
+import java.util.concurrent.atomic.AtomicLong;
+
+/**
+ * I hope I'll reuse this source code generator. That's why I extracted it to separate class.
+ *
+ */
+public class SourceGenerator {
+
+    private static final int METHODS_NUMBER_LIMIT = 100;
+
+    private static final int LOCALS_NUMBER_LIMIT = 50;
+
+    private static final int METHOD_ARGS_NUMBER_LIMIT = 15;
+
+    private static final int FIELDS_NUMBER_LIMIT = 200;
+
+    private Random rnd;
+
+    private static AtomicLong atomicLong = new AtomicLong();
+
+    public SourceGenerator(long seed) {
+        rnd = new Random(seed);
+    }
+
+    public CharSequence generateSource(String className) {
+        return generateSource(className, null);
+    }
+
+    public CharSequence generateSource(String className, CharSequence insert) {
+        StringBuilder sb = new StringBuilder("public class " + className + " { ");
+
+        List<CharSequence> hunks = new LinkedList<>();
+        int fieldsNumber = rnd.nextInt(FIELDS_NUMBER_LIMIT);
+        for (int i = 0; i < fieldsNumber; i++) {
+            hunks.add(createField(rnd));
+        }
+        int methodsNumber = rnd.nextInt(METHODS_NUMBER_LIMIT);
+        for (int i = 0; i < methodsNumber; i++) {
+            hunks.add(createMethod(rnd));
+        }
+
+        Collections.shuffle(hunks, rnd);
+        for (CharSequence cs : hunks) {
+            sb.append(cs);
+        }
+        if (insert != null) {
+            sb.append(insert);
+        }
+        sb.append(" } ");
+        return sb;
+    }
+
+    private CharSequence createField(Random rnd) {
+        StringBuilder sb = new StringBuilder();
+        if (rnd.nextBoolean())
+            sb.append(" static ");
+        boolean isFinal;
+        if (isFinal = rnd.nextBoolean())
+            sb.append(" final ");
+        if (rnd.nextBoolean() && !isFinal)
+            sb.append(" volatile ");
+        sb.append(AccessModifier.getRandomAccessModifier(rnd).toString());
+        Type type = Type.getRandomType(rnd);
+        sb.append(type.toString());
+        sb.append(" field_" + atomicLong.getAndIncrement());
+        if (rnd.nextBoolean() || isFinal)
+            sb.append(" = " + type.init(rnd));
+        sb.append(";\n");
+        return sb.toString();
+    }
+
+    private CharSequence createMethod(Random rnd) {
+        StringBuilder sb = new StringBuilder();
+        if (rnd.nextBoolean())
+            sb.append(" static ");
+        if (rnd.nextBoolean())
+            sb.append(" final ");
+        if (rnd.nextBoolean())
+            sb.append(" synchronized ");
+        sb.append(AccessModifier.getRandomAccessModifier(rnd).toString());
+        Type returnType = Type.getRandomType(rnd);
+        sb.append(returnType.toString());
+        sb.append(" method_" + atomicLong.getAndIncrement());
+        sb.append("(");
+        sb.append(generateMethodArgs(rnd));
+        sb.append(") {\n");
+        sb.append(generateMethodContent(rnd));
+        sb.append(" return " + returnType.init(rnd));
+        sb.append("; };\n");
+        return sb.toString();
+    }
+
+    private CharSequence generateMethodContent(Random rnd) {
+        StringBuilder sb = new StringBuilder();
+        int number = rnd.nextInt(LOCALS_NUMBER_LIMIT);
+        for (int i = 0; i < number; i++) {
+            Type type = Type.getRandomType(rnd);
+            sb.append(type + " ");
+            String localName = " local_" + i;
+            sb.append(localName);
+            boolean initialized;
+            if (initialized = rnd.nextBoolean()) {
+                sb.append(" = " + type.init(rnd));
+            }
+            sb.append(";\n");
+            if (initialized)
+                sb.append("System.out.println(\" \" + " + localName + ");");
+        }
+        return sb.toString();
+    }
+
+    private CharSequence generateMethodArgs(Random rnd) {
+        StringBuilder sb = new StringBuilder();
+        int number = rnd.nextInt(METHOD_ARGS_NUMBER_LIMIT);
+        for (int i = 0; i < number; i++) {
+            sb.append(Type.getRandomType(rnd));
+            sb.append(" arg_" + i);
+            if (i < number - 1) {
+                sb.append(" , ");
+            }
+        }
+        return sb.toString();
+    }
+
+}
+
+enum AccessModifier {
+    PRIVATE, PROTECTED, PACKAGE, PUBLIC;
+
+    public String toString() {
+        switch (this) {
+            case PRIVATE:
+                return " private ";
+            case PROTECTED:
+                return " protected ";
+            case PACKAGE:
+                return " ";
+            default:
+                return " public ";
+        }
+    };
+
+    public static AccessModifier getRandomAccessModifier(Random rnd) {
+        AccessModifier[] a = AccessModifier.class.getEnumConstants();
+        return a[rnd.nextInt(a.length)];
+    }
+}
+
+enum Type {
+    LONG, INT, BOOLEAN, OBJECT, STRING, DOUBLE, DATE;
+
+    public String toString() {
+        switch (this) {
+            case LONG:
+                return " long ";
+            case INT:
+                return " int ";
+            case BOOLEAN:
+                return " boolean ";
+            case OBJECT:
+                return " Object ";
+            case STRING:
+                return " String ";
+            case DOUBLE:
+                return " double ";
+            case DATE:
+                return " java.util.Date ";
+            default:
+                return null;
+        }
+    }
+
+    ;
+
+    public String init(Random rnd) {
+        switch (this) {
+            case LONG:
+                return " " + rnd.nextLong() + "L ";
+            case INT:
+                return rnd.nextBoolean() ? " " + rnd.nextInt() : " new Object().hashCode() ";
+            case BOOLEAN:
+                return " " + rnd.nextBoolean();
+            case OBJECT:
+                return " new Object() ";
+            case STRING:
+                return " \"str_bytesToReplace" + rnd.nextInt(4) + "\"";
+            case DOUBLE:
+                return " " + rnd.nextDouble();
+            case DATE:
+                return " new java.util.Date() ";
+            default:
+                return null;
+        }
+    }
+
+    public static Type getRandomType(Random rnd) {
+        Type[] a = Type.class.getEnumConstants();
+        return a[rnd.nextInt(a.length)];
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/bytecode/TemplateClassWithStaticField.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,42 @@
+/*
+ * Copyright (c) 2014, 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.
+ */
+package gc.g1.unloading.bytecode;
+
+public class TemplateClassWithStaticField {
+
+    private static Object field;
+
+    public static void setField(Object field) {
+        TemplateClassWithStaticField.field = field;
+    }
+
+    static int field2 = -1;
+
+    public static void methodForCompilation(Object object) {
+        int i = object.hashCode();
+        i = i * 2000 / 1994 + 153;
+        field2 = i;
+    }
+
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/bytecode/ThreadTemplateClass.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,53 @@
+/*
+ * Copyright (c) 2014, 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.
+ */
+package gc.g1.unloading.bytecode;
+
+/**
+ * This is another template class that extends Thread.
+ */
+public class ThreadTemplateClass extends Thread {
+
+    synchronized public void finishThread() {
+        notifyAll();
+    }
+
+    @Override
+    public synchronized void run() {
+        super.run();
+        try {
+            wait();
+        } catch (InterruptedException e) {
+            throw new RuntimeException("Unexpected InterruptedException ", e);
+        }
+    }
+
+    static int field2 = -1;
+
+    public static void methodForCompilation(Object object) {
+        int i = object.hashCode();
+        i = i * 2000 / 1994 + 153;
+        field2 = i;
+    }
+
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/check/Assertion.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,55 @@
+/*
+ * Copyright (c) 2014, 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.
+ */
+package gc.g1.unloading.check;
+
+import gc.g1.unloading.check.cleanup.CleanupAction;
+
+import java.util.LinkedList;
+import java.util.List;
+
+/**
+ * Superclass for assertion.
+ */
+public abstract class Assertion {
+
+    public abstract void check();
+
+    private List<Object> storage = new LinkedList<>();
+
+    public void keepLink(Object object) {
+        storage.add(object);
+    }
+
+    public void cleanup() {
+        try {
+            for (Object o : storage) {
+                if (o instanceof CleanupAction) {
+                    ((CleanupAction) o).cleanup();
+                }
+            }
+        } catch (Exception e) {
+            throw new RuntimeException("Something bad happened while cleaning after checked assertion", e);
+        }
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/check/AssertionContainer.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,66 @@
+/*
+ * Copyright (c) 2014, 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.
+ */
+package gc.g1.unloading.check;
+
+import java.util.*;
+
+/**
+ * This is the storage for assertions. Here assertions are stored until required number of garbage collections happen.
+ * This container isn't thread-safe.
+ */
+public class AssertionContainer {
+
+    private SortedMap<Long, List<Assertion>> sortedMap = new TreeMap<>();
+
+    /**
+     * Enqueue assertion to storage.
+     * @param assertions
+     * @param gcCounter - gc counter value as of assertion created
+     */
+    public void enqueue(Collection<Assertion> assertions, Long gcCounter) {
+        if (sortedMap.get(gcCounter) != null) {
+            sortedMap.get(gcCounter).addAll(assertions);
+        } else {
+            List<Assertion> newList = new LinkedList<>();
+            newList.addAll(assertions);
+            sortedMap.put(gcCounter, newList);
+        }
+    }
+
+    /**
+     * Get assertions that are ready for check. That means they where created when gc counter was less then
+     * specified value.
+     * @param bound - value of gc counter
+     * @return - collection of assertions. It can be empty if no assertions are mature yet.
+     */
+    public Collection<Assertion> getElder(Long bound) {
+        Collection<Assertion> returnValue = new LinkedList<>();
+        SortedMap<Long, List<Assertion>> filteredView = sortedMap.headMap(bound);
+        for (Long l : filteredView.keySet()) {
+            List<Assertion> list = filteredView.remove(l);
+            returnValue.addAll(list);
+        }
+        return returnValue;
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/check/ClassAssertion.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,81 @@
+/*
+ * Copyright (c) 2014, 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.
+ */
+package gc.g1.unloading.check;
+
+import sun.hotspot.WhiteBox;
+
+/**
+ * This assertion checks that class is alive using WhiteBox isClassAlive method.
+ */
+public class ClassAssertion extends Assertion {
+
+    private String className;
+
+    private boolean shouldBeAlive;
+
+    private static long counterOfCheckedUnloaded = 0;
+
+    private static long counterOfCheckedAlive = 0;
+
+    public static long getCounterOfCheckedUnloaded() {
+        return counterOfCheckedUnloaded;
+    }
+
+    public static long getCounterOfCheckedAlive() {
+        return counterOfCheckedAlive;
+    }
+
+    public ClassAssertion(String className, boolean shouldBeAlive) {
+        this.shouldBeAlive = shouldBeAlive;
+        this.className = className;
+    }
+
+    @Override
+    public void check() {
+        boolean isAlive = WhiteBox.getWhiteBox().isClassAlive(className);
+        if (isAlive != shouldBeAlive) {
+            if (isAlive) {
+                throw new RuntimeException("Class " + className + " was not unloaded! Failing test.");
+            } else {
+                throw new RuntimeException("Class " + className + " must live! Failing test.");
+            }
+        } else {
+            System.out.println(" Check OK, class " + className + ", isAlive = " + isAlive + ", shouldBeAlive = " + shouldBeAlive);
+            if (isAlive) {
+                counterOfCheckedAlive++;
+            } else {
+                counterOfCheckedUnloaded++;
+            }
+        }
+    }
+
+    private static long numberOfChecksLimit = -1;
+
+    static {
+        String s;
+        if ((s = System.getProperty("NumberOfChecksLimit")) != null) {
+            numberOfChecksLimit = Long.valueOf(s);
+        }
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/check/FinalizedAssertion.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,43 @@
+/*
+ * Copyright (c) 2014, 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.
+ */
+package gc.g1.unloading.check;
+
+/**
+ * This assertion checks that classloader will be finalized.
+ */
+public class FinalizedAssertion extends Assertion {
+
+    private boolean finalized = false;
+
+    public void setFinalized() {
+        finalized = true;
+    }
+
+    @Override
+    public void check() {
+        if (!finalized) {
+            throw new RuntimeException("Failing test! Object wasn't finalized.");
+        }
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/check/PhantomizationServiceThread.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,66 @@
+/*
+ * Copyright (c) 2014, 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.
+ */
+package gc.g1.unloading.check;
+
+
+import gc.g1.unloading.ExecutionTask;
+
+import java.lang.ref.Reference;
+import java.lang.ref.ReferenceQueue;
+import java.util.*;
+
+import nsk.share.test.ExecutionController;
+
+/**
+ * This thread listens to queue of phantomized classloaders and marks corresponding assertions as passed.
+ */
+public class PhantomizationServiceThread extends ExecutionTask {
+
+    private static final int TIMEOUT = 100;
+
+    private Map<Reference<?>, PhantomizedAssertion> map = new HashMap<>();
+
+    private ReferenceQueue queue = new ReferenceQueue();
+
+    public PhantomizationServiceThread(ExecutionController executionController) {
+        super(executionController);
+    }
+
+    public void add(Reference ref, PhantomizedAssertion assertion) {
+        map.put(ref, assertion);
+    }
+
+    public ReferenceQueue getQueue() {
+        return queue;
+    }
+
+    @Override
+    protected void task() throws Exception {
+        Reference ref = queue.remove(TIMEOUT);
+        PhantomizedAssertion assertion = map.remove(ref);
+            if (assertion != null) {
+                assertion.setPhantomized();
+            }
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/check/PhantomizedAssertion.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,43 @@
+/*
+ * Copyright (c) 2014, 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.
+ */
+package gc.g1.unloading.check;
+
+/**
+ * This assertions checks that classloader will be phantomized.
+ */
+public class PhantomizedAssertion extends Assertion {
+
+    private boolean phantomized = false;
+
+    public void setPhantomized() {
+        phantomized = true;
+    }
+
+    @Override
+    public void check() {
+        if (!phantomized) {
+            throw new RuntimeException("Failing test! Object wasn't phantomized!");
+        }
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/check/cleanup/CleanupAction.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,32 @@
+/*
+ * Copyright (c) 2014, 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.
+ */
+package gc.g1.unloading.check.cleanup;
+
+/**
+ * Some classes requires cleanup after check. This is cleanup action.
+ */
+public interface CleanupAction {
+
+    public void cleanup() throws Exception;
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/check/cleanup/UnusedThreadKiller.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,50 @@
+/*
+ * Copyright (c) 2014, 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.
+ */
+package gc.g1.unloading.check.cleanup;
+
+import java.lang.reflect.Method;
+
+/**
+ * This utility class helps to finish threads that are not required anymore.
+ */
+public class UnusedThreadKiller implements CleanupAction {
+
+    private long threadId;
+
+    public UnusedThreadKiller(long threadId) {
+        this.threadId = threadId;
+    }
+
+    @Override
+    public void cleanup() throws Exception {
+        for (Thread thread : Thread.getAllStackTraces().keySet()) {
+            if (thread.getId() == threadId) {
+                for (Method m : thread.getClass().getMethods()) {
+                    if ("finishThread".equals(m.getName())) {
+                        m.invoke(thread);
+                    }
+                }
+            }
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/classloaders/DoItYourselfClassLoader.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,52 @@
+/*
+ * Copyright (c) 2014, 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.
+ */
+package gc.g1.unloading.classloaders;
+
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.security.CodeSigner;
+import java.security.CodeSource;
+
+/**
+ *
+ * This is just a classloader that doesn't follow delegation pattern.
+ *
+ */
+public class DoItYourselfClassLoader extends FinalizableClassloader {
+
+    private static long counter = 0;
+
+    /**
+     * We force different classes to have different protection domains
+     */
+    public Class<?> defineClass(String name, byte[] bytes) {
+        URL url;
+        try {
+            url = new URL("http://random.url.com/" + (counter++));
+        } catch (MalformedURLException e) {
+            throw new RuntimeException("This is impossible, but there is mistake in simple call to URL constructor", e);
+        }
+        return defineClass(name, bytes, 0, bytes.length, new CodeSource(url, new CodeSigner[] {}));
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/classloaders/FinalizableClassloader.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,48 @@
+/*
+ * Copyright (c) 2014, 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.
+ */
+package gc.g1.unloading.classloaders;
+
+import java.security.SecureClassLoader;
+
+import gc.g1.unloading.check.FinalizedAssertion;
+
+/**
+ * Classloader that keeps reference to FinalizedAssertion and marks it as passed when finalized.
+ *
+ */
+public class FinalizableClassloader extends SecureClassLoader {
+
+    private FinalizedAssertion finalizedAssertion;
+
+    public void setFinalizedAssertion(FinalizedAssertion finalizedAssertion) {
+        this.finalizedAssertion = finalizedAssertion;
+    }
+
+    @Override
+    protected void finalize() throws Throwable {
+        if (finalizedAssertion != null) {
+            finalizedAssertion.setFinalized();
+        }
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/classloaders/JNIClassloader.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,40 @@
+/*
+ * Copyright (c) 2014, 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.
+ */
+package gc.g1.unloading.classloaders;
+
+import gc.g1.unloading.loading.LibLoader;
+
+/**
+ * We don't call loadClass or defineClass methods explicitly, we invoke loadThroughJNI.
+ */
+public class JNIClassloader extends FinalizableClassloader {
+
+    static { new LibLoader().hashCode(); /* Load library*/ }
+
+    private static native Class<?> loadThroughJNI0(String className, ClassLoader classloader, byte[] bytecode);
+
+    public static Class<?> loadThroughJNI(String className, byte[] bytecode) {
+        return loadThroughJNI0(className.replace('.', '/'), new JNIClassloader(), bytecode);
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/classloaders/ReflectionClassloader.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,49 @@
+/*
+ * Copyright (c) 2014, 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.
+ */
+package gc.g1.unloading.classloaders;
+
+/**
+ * Classloader that will be useful for Class.forName classloading way.
+ *
+ */
+public class ReflectionClassloader extends DoItYourselfClassLoader {
+
+    private byte[] savedBytes;
+
+    private String className;
+
+    public ReflectionClassloader(byte[] savedBytes, String className) {
+        this.savedBytes = savedBytes;
+        this.className = className;
+    }
+
+    @Override
+    public Class<?> loadClass(String name) throws ClassNotFoundException {
+        if (name.equals(className)) {
+            return defineClass(name, savedBytes);
+        } else {
+            return super.loadClass(name);
+        }
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/configuration/ClassloadingMethod.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,29 @@
+/*
+ * Copyright (c) 2014, 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.
+ */
+package gc.g1.unloading.configuration;
+
+public enum ClassloadingMethod {
+
+    PLAIN, REFLECTION, JNI, ANONYMOUS_CLASSLOADER
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/configuration/KeepRefMode.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,33 @@
+/*
+ * Copyright (c) 2014, 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.
+ */
+package gc.g1.unloading.configuration;
+
+
+/**
+ * In which way we are going to keep class from being garbage collected
+ *
+ */
+public enum KeepRefMode {
+    STRONG_REFERENCE, SOFT_REFERENCE, STATIC_FIELD, STACK_LOCAL, THREAD_FIELD, THREAD_ITSELF, STATIC_FIELD_OF_ROOT_CLASS, JNI_GLOBAL_REF, JNI_LOCAL_REF
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/configuration/ReleaseRefMode.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,33 @@
+/*
+ * Copyright (c) 2014, 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.
+ */
+package gc.g1.unloading.configuration;
+
+/**
+ *    What reference should we keep if we want class to be collected
+ *
+ */
+public enum ReleaseRefMode {
+
+    WEAK, PHANTOM, NONE
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/configuration/TestConfiguration.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,139 @@
+/*
+ * Copyright (c) 2014, 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.
+ */
+package gc.g1.unloading.configuration;
+
+/**
+ * Configuration object encapsulates test configuration.
+ */
+public class TestConfiguration {
+
+    private ReleaseRefMode releaseRefMode = ReleaseRefMode.NONE;
+
+    private WhatToKeep whatToKeep = WhatToKeep.CLASS;
+
+    private ClassloadingMethod classloadingMethod = ClassloadingMethod.REFLECTION;
+
+    private KeepRefMode keepRefMode = KeepRefMode.STRONG_REFERENCE;
+
+    private boolean humongousClass = false;
+
+    private int compilationLevel = 0;
+
+    private int compilationNumber = 2;
+
+    private boolean redefineClasses = false;
+
+    private boolean inMemoryCompilation = false;
+
+    public ReleaseRefMode getReleaseRefMode() {
+        return releaseRefMode;
+    }
+
+    public WhatToKeep getWhatToKeep() {
+        return whatToKeep;
+    }
+
+    public ClassloadingMethod getClassloadingMethod() {
+        return classloadingMethod;
+    }
+
+    public KeepRefMode getKeepRefMode() {
+        return keepRefMode;
+    }
+
+    public boolean isHumongousClass() {
+        return humongousClass;
+    }
+
+    public int getCompilationLevel() {
+        return compilationLevel;
+    }
+
+    public int getCompilationNumber() {
+        return compilationNumber;
+    }
+
+    public boolean isRedefineClasses() {
+        return redefineClasses;
+    }
+
+    public boolean isInMemoryCompilation() {
+        return inMemoryCompilation;
+    }
+
+    public int getNumberOfGCsBeforeCheck() {
+        return numberOfGCsBeforeCheck;
+    }
+
+    public int getNumberOfChecksLimit() {
+        return numberOfChecksLimit;
+    }
+
+    private int numberOfGCsBeforeCheck = 50;
+
+    private int numberOfChecksLimit = -1;
+
+    public static TestConfiguration createTestConfiguration(String[] args) {
+        TestConfiguration c = new TestConfiguration();
+        for (int i = 0; i < args.length; i++) {
+            if ("-referenceMode".equalsIgnoreCase(args[i])) {
+                c.releaseRefMode = ReleaseRefMode.valueOf(args[i + 1].toUpperCase());
+            } else if ("-numberOfGCsBeforeCheck".equalsIgnoreCase(args[i])) {
+                c.numberOfGCsBeforeCheck = Integer.valueOf(args[i + 1].toUpperCase());
+            } else if ("-keep".equalsIgnoreCase(args[i])) {
+                c.whatToKeep = WhatToKeep.valueOf(args[i + 1].toUpperCase());
+            } else if ("-classloadingMethod".equalsIgnoreCase(args[i])) {
+                c.classloadingMethod = ClassloadingMethod.valueOf(args[ i + 1].toUpperCase());
+            } else if ("-keepRefMode".equalsIgnoreCase(args[i])) {
+                c.keepRefMode = KeepRefMode.valueOf(args[i + 1]);
+            } else if ("-humongousClass".equalsIgnoreCase(args[i])) {
+                c.humongousClass = "true".equals(args[i + 1]);
+            } else if ("-compilationLevel".equalsIgnoreCase(args[i])) {
+                c.compilationLevel = Integer.valueOf(args[i + 1]);
+            } else if ("-compilationNumber".equalsIgnoreCase(args[i])) {
+                c.compilationNumber = Integer.valueOf(args[i + 1]);
+            } else if ("-redefineClasses".equalsIgnoreCase(args[i])) {
+                c.redefineClasses = "true".equals(args[i + 1]);
+            } else if ("-inMemoryCompilation".equalsIgnoreCase(args[i])) {
+                c.inMemoryCompilation = "true".equals(args[i + 1]);
+            } else if ("-numberOfChecksLimit".equalsIgnoreCase(args[i])) {
+                c.numberOfChecksLimit = Integer.parseInt(args[i + 1]);
+            } else if (args[i].startsWith("-") && ! "-stressTime".equals(args[i]) && ! args[i].toLowerCase().contains("seed")) {
+                System.out.println("\n\nWarning!! Unrecognized option " + args[i] + "\n\n");
+            }
+        }
+        System.out.println("releaseRefMode = " + c.releaseRefMode);
+        System.out.println("whatToKeep = " + c.whatToKeep);
+        System.out.println("classlodingMethod = " + c.classloadingMethod);
+        System.out.println("numberOfGCsBeforeCheck = " + c.numberOfGCsBeforeCheck);
+        System.out.println("keepRefMode = " + c.keepRefMode);
+        System.out.println("humongousClass = " + c.humongousClass);
+        System.out.println("compilationLevel = " + c.compilationLevel);
+        System.out.println("compilationNumber = " + c.compilationNumber);
+        System.out.println("redefineClasses = " + c.redefineClasses);
+        System.out.println("inMemoryCompilation = " + c.inMemoryCompilation);
+        System.out.println("numberOfChecksLimit = " + c.numberOfChecksLimit);
+        return c;
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/configuration/WhatToKeep.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,47 @@
+/*
+ * Copyright (c) 2014, 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.
+ */
+package gc.g1.unloading.configuration;
+
+/**
+ * What reference are we going to keep
+ *
+ */
+public enum WhatToKeep {
+
+    CLASSLOADER, CLASS, OBJECT;
+
+    public Object decideUponRefToKeep(Class<?> clazz, ClassLoader classloader, Object object) {
+        switch (this) {
+            case OBJECT:
+                return object;
+            case CLASS:
+                return clazz;
+            case CLASSLOADER:
+                return classloader != null ? classloader : object;
+            default:
+                return null;
+        }
+    }
+
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/keepref/InStackLocalHolder.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,95 @@
+/*
+ * Copyright (c) 2014, 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.
+ */
+package gc.g1.unloading.keepref;
+
+import gc.g1.unloading.check.cleanup.UnusedThreadKiller;
+
+/**
+ * This holder prevents class from being unloaded by keeping reference in stack local.
+ *
+ */
+public class InStackLocalHolder implements RefHolder {
+
+    public static class AuxiliaryThread extends Thread {
+        private static final int STACK_DEPTH = 300;
+
+        private ReferenceHolder referenceHolder;
+
+        public AuxiliaryThread(ReferenceHolder referenceHolder) {
+            this.referenceHolder = referenceHolder;
+        }
+
+        synchronized public void finishThread() {
+            notifyAll();
+        }
+
+        @Override
+        synchronized public void run() {
+            new A().call(referenceHolder, STACK_DEPTH);
+        }
+    }
+
+    private static class A {
+        public void call(ReferenceHolder holder, int stackDepth) {
+            if (stackDepth > 0) {
+                new A().call(holder, stackDepth - 1);
+            } else {
+                Object ref = holder.obtainAndClear();
+                synchronized (Thread.currentThread()) {
+                    try {
+                        Thread.currentThread().wait();
+                        if (ref.hashCode() == 42) {
+                            System.out.println("This clause is made to prevent compiler and javac optimizations from eliminating local reference \"ref\".");
+                        }
+                    } catch (InterruptedException e) {
+                        new RuntimeException("Unexpected InterruptedException");
+                    }
+                }
+            }
+        }
+    }
+
+    private static class ReferenceHolder {
+        private Object reference;
+
+        public ReferenceHolder(Object reference) {
+            this.reference = reference;
+        }
+
+        public Object obtainAndClear() {
+            Object returnValue = reference;
+            reference = new Object();
+            return returnValue;
+        }
+
+    }
+
+    @Override
+    public Object hold(Object object) {
+        Thread thread = new AuxiliaryThread(new ReferenceHolder(object));
+        thread.setDaemon(true);
+        thread.start();
+        return new UnusedThreadKiller(thread.getId());
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/keepref/InStaticFieldHolder.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,64 @@
+/*
+ * Copyright (c) 2014, 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.
+ */
+package gc.g1.unloading.keepref;
+
+import gc.g1.unloading.bytecode.BytecodeMutatorFactory;
+import gc.g1.unloading.bytecode.TemplateClassWithStaticField;
+import gc.g1.unloading.classloaders.DoItYourselfClassLoader;
+
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.util.concurrent.atomic.AtomicLong;
+
+/**
+ * This holder prevents class from being collected by keeping link in static field of another class.
+ *
+ */
+public class InStaticFieldHolder implements RefHolder {
+
+    private static BytecodeMutatorFactory bm = new BytecodeMutatorFactory(TemplateClassWithStaticField.class.getName());
+
+    private static final String CLASS_NAME_BASE = "StaticFieldHolder_";
+
+    private static AtomicLong counter = new AtomicLong(0);
+
+    @Override
+    public Object hold(Object object) {
+        try {
+            String className = bm.padName(CLASS_NAME_BASE + counter.getAndIncrement());
+            byte[] bytecode = bm.getBytecode(className);
+            DoItYourselfClassLoader loader = new DoItYourselfClassLoader();
+            Class<?> clazz = loader.defineClass(className, bytecode);
+            for (Method m : clazz.getMethods()) {
+                if ("setField".equals(m.getName())) {
+                    m.invoke(null, object);
+                }
+            }
+            Object instance = clazz.newInstance();
+            return instance;
+        } catch (InstantiationException | IllegalAccessException | IllegalArgumentException | InvocationTargetException e) {
+            throw new RuntimeException("Something went wrong in StaticFieldHolder ", e);
+        }
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/keepref/InThreadFieldHolder.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,62 @@
+/*
+ * Copyright (c) 2014, 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.
+ */
+package gc.g1.unloading.keepref;
+
+import gc.g1.unloading.check.cleanup.UnusedThreadKiller;
+
+/**
+ *     This holder prevents class from being collected by keeping link in static field of running thread.
+ *
+ */
+public class InThreadFieldHolder implements RefHolder {
+
+    public static class AuxiliaryThread2 extends Thread {
+        private Object ref;
+
+        public AuxiliaryThread2(Object ref) {
+            this.ref = ref;
+        }
+
+        synchronized public void finishThread() {
+            notifyAll();
+        }
+
+        @Override
+        synchronized public void run() {
+            try {
+                wait();
+            } catch (InterruptedException e) {
+                throw new RuntimeException("Unexpected InterruptedException ", e);
+            }
+        }
+    }
+
+    @Override
+    public Object hold(Object object) {
+        Thread thread = new AuxiliaryThread2(object);
+        thread.setDaemon(true);
+        thread.start();
+        return new UnusedThreadKiller(thread.getId());
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/keepref/JNIGlobalRefHolder.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,55 @@
+/*
+ * Copyright (c) 2014, 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.
+ */
+package gc.g1.unloading.keepref;
+
+import gc.g1.unloading.check.cleanup.CleanupAction;
+import gc.g1.unloading.loading.LibLoader;
+
+/**
+ * This holder keeps reference through JNI global reference.
+ */
+public class JNIGlobalRefHolder implements RefHolder {
+
+    static {
+        //Force loading library
+        new LibLoader().hashCode();
+    }
+
+    public static native int keepGlobalJNIReference(Object object);
+
+    public static native void deleteGlobalJNIReference(int index);
+
+    @Override
+    public Object hold(Object object) {
+        final Integer index = keepGlobalJNIReference(object);
+        return new CleanupAction() {
+        @Override
+            public void cleanup() throws Exception {
+                // Clenup global reference when it's not needed anymore
+                JNIGlobalRefHolder.deleteGlobalJNIReference(index);
+            }
+        };
+
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/keepref/JNILocalRefHolder.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,69 @@
+/*
+ * Copyright (c) 2014, 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.
+ */
+package gc.g1.unloading.keepref;
+
+import gc.g1.unloading.check.cleanup.CleanupAction;
+import gc.g1.unloading.loading.LibLoader;
+
+/**
+ * This holder keeps reference through JNI local reference.
+ */
+public class JNILocalRefHolder implements RefHolder {
+
+    static {
+        //Force loading library
+        new LibLoader().hashCode();
+    }
+
+    // We use this field to transfer object into native JNI call. Idea is to avoid transferring link through method
+    // arguments.
+    private Object objectToKeep;
+
+    private native void holdWithJNILocalReference(Object syncObject);
+
+    @Override
+    public Object hold(Object object) {
+        objectToKeep = object;
+        final Object syncObject = new Object();
+        Thread keepingThread = new Thread(new Runnable() {
+            @Override
+            public void run() {
+                synchronized (syncObject) {
+                    holdWithJNILocalReference(syncObject);
+                }
+            }
+        });
+        keepingThread.setDaemon(true);
+        keepingThread.start();
+        return new CleanupAction() {
+            @Override
+            public void cleanup() throws Exception {
+                synchronized (syncObject) {
+                    syncObject.notify();
+                }
+            }
+        };
+    }
+
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/keepref/NullClassloaderHolder.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,79 @@
+/*
+ * Copyright (c) 2014, 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.
+ */
+package gc.g1.unloading.keepref;
+
+import java.lang.reflect.*;
+import java.util.*;
+
+/**
+ * This holder keeps class from being collected by saving link in static field of class loaded by null classloader.
+ * It uses pool of classes that should reside in bootclasspath.
+ */
+public class NullClassloaderHolder implements RefHolder {
+
+    private static final int NUMBER_OF_CLASSES = 1000;
+    private static Set<Class<?>> classesPool = Collections.synchronizedSet(new HashSet<Class<?>>());
+
+    static {
+        for (int i = 1; i <= NUMBER_OF_CLASSES; i++) {
+            String className = "gc.g1.unloading.rootSetHelper.classesPool.Class" + i;
+            try {
+                Class<?> clazz = Class.forName(className);
+                if (clazz.getClassLoader() != null) {
+                    throw new RuntimeException("Test bug! Classes from pool implied to be loaded by bootclassloader.");
+                }
+                classesPool.add(clazz);
+            } catch (ClassNotFoundException e) {
+                throw new RuntimeException("Test bug", e);
+            }
+        }
+    }
+
+    @Override
+    public Object hold(Object object) {
+        if (classesPool.isEmpty()) {
+            return null;
+        } else {
+            Class<?> clazz = (Class<?>) classesPool.iterator().next();
+            classesPool.remove(clazz);
+            Field f = getRandomField(clazz);
+            try {
+                f.set(null, object);
+                return clazz.newInstance();
+            } catch (IllegalArgumentException | IllegalAccessException | InstantiationException e) {
+                throw new RuntimeException("Test bug", e);
+            }
+        }
+    }
+
+    private static Field getRandomField(Class<?> clazz) {
+        ArrayList<Field> fields = new ArrayList<>();
+        for (Field f : clazz.getFields()) {
+            if (f.getName().startsWith("staticField")) {
+                fields.add(f);
+            }
+        }
+        return fields.get(new Random().nextInt(fields.size()));
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/keepref/RefHolder.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,39 @@
+/*
+ * Copyright (c) 2014, 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.
+ */
+package gc.g1.unloading.keepref;
+
+/**
+ * Classes implementing this interface hold reference to object in different ways. This is done to prevent something of being garbage collected/unloaded.
+ *
+ */
+public interface RefHolder {
+
+    /**
+     * This method keeps reference to object in different ways.
+     *
+     * @param object
+     * @return object that should be kept reference to (if any)
+     */
+    Object hold(Object object);
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/libdefine.c	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,194 @@
+/*
+ * Copyright (c) 2014, 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 <jni.h>
+#include <stdio.h>
+
+#include <string.h>
+#include <jvmti.h>
+
+#define STATUS_FAILED 2
+#define STATUS_PASSED 0
+
+#define REFERENCES_ARRAY_SIZE 10000000
+
+#ifndef JNI_ENV_ARG
+
+#ifdef __cplusplus
+#define JNI_ENV_ARG(x, y) x
+#define JNI_ENV_PTR(x) x
+#else
+#define JNI_ENV_ARG(x, y) x , y
+#define JNI_ENV_PTR(x) (*x)
+#endif
+
+#endif
+
+#ifndef _Included_gc_g1_unloading_unloading_classloaders_JNIClassloader
+#define _Included_gc_g1_unloading_unloading_classloaders_JNIClassloader
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+ * Class:     gc_g1_unloading_unloading_classloaders_JNIClassloader
+ * Method:    loadThroughJNI0
+ * Signature: (Ljava/lang/String;Ljava/lang/ClassLoader;[B)Ljava/lang/Class;
+ */
+JNIEXPORT jclass JNICALL Java_gc_g1_unloading_classloaders_JNIClassloader_loadThroughJNI0 (JNIEnv * env,
+                                         jclass clazz, jstring className, jobject classLoader, jbyteArray bytecode) {
+
+  const char * classNameChar = JNI_ENV_PTR(env)->GetStringUTFChars(JNI_ENV_ARG(env, className), NULL);
+  jbyte * arrayContent = JNI_ENV_PTR(env)->GetByteArrayElements(JNI_ENV_ARG(env, bytecode), NULL);
+  jsize bytecodeLength = JNI_ENV_PTR(env)->GetArrayLength(JNI_ENV_ARG(env, bytecode));
+  jclass returnValue = JNI_ENV_PTR(env)->DefineClass(JNI_ENV_ARG(env, classNameChar), classLoader, arrayContent, bytecodeLength);
+  if (!returnValue) {
+    printf("ERROR: DefineClass call returned NULL by some reason. Classloading failed.\n");
+  }
+
+  return returnValue;
+}
+
+ /*
+  * Class:     gc_g1_unloading_unloading_loading_ClassLoadingThread
+  * Method:    makeRedefinition0
+  * Signature: (ILjava/lang/Class;[B)I
+  */
+JNIEXPORT jint JNICALL  Java_gc_g1_unloading_loading_ClassLoadingThread_makeRedefinition0(JNIEnv *env,
+                jclass cls, jint fl, jclass redefCls, jbyteArray classBytes) {
+    JavaVM * jvm;
+    jvmtiEnv * jvmti;
+    jvmtiError err;
+    jvmtiCapabilities caps;
+    jvmtiClassDefinition classDef;
+    jint jint_err = JNI_ENV_PTR(env)->GetJavaVM(JNI_ENV_ARG(env, &jvm));
+    if (jint_err) {
+        printf("GetJavaVM returned nonzero: %d", jint_err);
+        return STATUS_FAILED;
+    }
+
+    jint_err = JNI_ENV_PTR(jvm)->GetEnv(JNI_ENV_ARG(jvm, (void **)&jvmti), JVMTI_VERSION_1_0);
+    if (jint_err) {
+        printf("GetEnv returned nonzero: %d", jint_err);
+        return STATUS_FAILED;
+    }
+
+    err = JNI_ENV_PTR(jvmti)->GetPotentialCapabilities(JNI_ENV_ARG(jvmti, &caps));
+    if (err != JVMTI_ERROR_NONE) {
+        printf("(GetPotentialCapabilities) unexpected error: %d\n",err);
+        return JNI_ERR;
+    }
+
+    err = JNI_ENV_PTR(jvmti)->AddCapabilities(JNI_ENV_ARG(jvmti, &caps));
+    if (err != JVMTI_ERROR_NONE) {
+        printf("(AddCapabilities) unexpected error: %d\n", err);
+        return JNI_ERR;
+    }
+
+    if (!caps.can_redefine_classes) {
+        printf("ERROR: Can't redefine classes. jvmtiCapabilities.can_redefine_classes isn't set up.");
+        return STATUS_FAILED;
+    }
+
+    classDef.klass = redefCls;
+    classDef.class_byte_count =
+        JNI_ENV_PTR(env)->GetArrayLength(JNI_ENV_ARG(env, classBytes));
+    classDef.class_bytes = (unsigned char *)
+        JNI_ENV_PTR(env)->GetByteArrayElements(JNI_ENV_ARG(env, classBytes),
+            NULL);
+
+    if (fl == 2) {
+        printf(">>>>>>>> Invoke RedefineClasses():\n");
+        printf("\tnew class byte count=%d\n", classDef.class_byte_count);
+    }
+    err = JNI_ENV_PTR(jvmti)->RedefineClasses(JNI_ENV_ARG(jvmti, 1), &classDef);
+    if (err != JVMTI_ERROR_NONE) {
+        printf("%s: Failed to call RedefineClasses():\n", __FILE__);
+        printf("\tthe function returned error %d\n", err);
+        printf("\tFor more info about this error see the JVMTI spec.\n");
+        return STATUS_FAILED;
+    }
+    if (fl == 2)
+        printf("<<<<<<<< RedefineClasses() is successfully done\n");
+
+    return STATUS_PASSED;
+}
+
+jobject referencesArray[REFERENCES_ARRAY_SIZE];
+int firstFreeIndex = 0;
+
+/*
+ * Class:     gc_g1_unloading_unloading_keepref_JNIGlobalRefHolder
+ * Method:    keepGlobalJNIReference
+ * Signature: (Ljava/lang/Object;)I
+ */
+JNIEXPORT jint JNICALL Java_gc_g1_unloading_keepref_JNIGlobalRefHolder_keepGlobalJNIReference
+  (JNIEnv * env, jclass clazz, jobject obj) {
+    int returnValue;
+    referencesArray[firstFreeIndex] = JNI_ENV_PTR(env)->NewGlobalRef(JNI_ENV_ARG(env, obj));
+    printf("checkpoint1 %d \n", firstFreeIndex);
+    returnValue = firstFreeIndex;
+    firstFreeIndex++;
+    return returnValue;
+}
+
+/*
+ * Class:     gc_g1_unloading_unloading_keepref_JNIGlobalRefHolder
+ * Method:    deleteGlobalJNIReference
+ * Signature: (I)V
+ */
+JNIEXPORT void JNICALL Java_gc_g1_unloading_keepref_JNIGlobalRefHolder_deleteGlobalJNIReference
+  (JNIEnv * env, jclass clazz, jint index) {
+    JNI_ENV_PTR(env)->DeleteGlobalRef(JNI_ENV_ARG(env, referencesArray[index]));
+}
+
+
+/*
+ * Class:     gc_g1_unloading_unloading_keepref_JNILocalRefHolder
+ * Method:    holdWithJNILocalReference
+ * Signature: (Ljava/lang/Object;)V
+ */
+JNIEXPORT void JNICALL Java_gc_g1_unloading_keepref_JNILocalRefHolder_holdWithJNILocalReference
+  (JNIEnv * env, jobject thisObject, jobject syncObject) {
+    jclass clazz, objectClazz;
+    jfieldID objectToKeepField;
+    jobject objectToKeep, localRef;
+    jmethodID waitMethod;
+
+    clazz = (*env)->GetObjectClass(env, thisObject);
+    objectToKeepField = (*env)->GetFieldID(env, clazz, "objectToKeep", "Ljava/lang/Object;");
+    objectToKeep = (*env)->GetObjectField(env, thisObject, objectToKeepField);
+    localRef = (*env)->NewLocalRef(env, objectToKeep);
+    (*env)->SetObjectField(env, thisObject, objectToKeepField, NULL);
+
+    objectClazz = (*env)->FindClass(env, "Ljava/lang/Object;");
+    waitMethod = (*env)->GetMethodID(env, objectClazz, "wait", "()V");
+    (*env)->CallVoidMethod(env, syncObject, waitMethod);
+    printf("checkpoint2 \n");
+  }
+
+
+#ifdef __cplusplus
+}
+#endif
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/loading/ClassLoadingHelper.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,349 @@
+/*
+ * Copyright (c) 2014, 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.
+ */
+package gc.g1.unloading.loading;
+
+import gc.g1.unloading.ExecutionTask;
+import gc.g1.unloading.bytecode.*;
+//import gc.g1.unloading.check.*;
+import gc.g1.unloading.check.Assertion;
+import gc.g1.unloading.check.ClassAssertion;
+import gc.g1.unloading.check.PhantomizedAssertion;
+
+import gc.g1.unloading.check.FinalizedAssertion;
+import gc.g1.unloading.check.PhantomizationServiceThread;
+import gc.g1.unloading.check.cleanup.UnusedThreadKiller;
+import gc.g1.unloading.classloaders.DoItYourselfClassLoader;
+import gc.g1.unloading.classloaders.FinalizableClassloader;
+import gc.g1.unloading.classloaders.JNIClassloader;
+import gc.g1.unloading.classloaders.ReflectionClassloader;
+import gc.g1.unloading.configuration.ClassloadingMethod;
+import gc.g1.unloading.configuration.KeepRefMode;
+import gc.g1.unloading.configuration.TestConfiguration;
+import gc.g1.unloading.keepref.*;
+import nsk.share.test.ExecutionController;
+import sun.hotspot.WhiteBox;
+import jdk.internal.misc.Unsafe;
+
+import java.lang.ref.*;
+import java.lang.reflect.Field;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.util.Collection;
+import java.util.LinkedList;
+import java.util.Random;
+
+/**
+ * This helper performs dirty job: loads classes, instantiate objects, performs redefinition etc...
+ */
+public class ClassLoadingHelper {
+
+    private static final int NATIVE_VERBOSITY = 2;
+
+    private static final Object[] NO_CP_PATCHES = new Object[0];
+
+    private static BytecodeFactory bf;
+
+    private ExecutionController executionController;
+
+    private PhantomizationServiceThread phantomizationServiceThread;
+
+    private Random random;
+
+    private TestConfiguration configuration;
+
+    /**
+     * Constructor that creates instance of helper. All arguments are self-explaining.
+     * @param executionController
+     * @param randomSeed
+     * @param testConfiguration
+     */
+    public ClassLoadingHelper(ExecutionController executionController,
+                              long randomSeed, TestConfiguration testConfiguration) {
+        random = new Random(randomSeed);
+        this.executionController = executionController;
+        this.configuration = testConfiguration;
+
+        phantomizationServiceThread = new PhantomizationServiceThread(executionController);
+        Thread thread = new Thread(phantomizationServiceThread);
+        thread.setDaemon(true);
+        thread.start();
+
+        if (configuration.isInMemoryCompilation() && !configuration.isHumongousClass() && !(configuration.getKeepRefMode() == KeepRefMode.THREAD_ITSELF)) {
+            bf = new BytecodeGeneratorFactory(random.nextLong());
+        } else {
+            if (configuration.isHumongousClass()) {
+                bf = new BytecodeMutatorFactory(HumongousTemplateClass.class.getName());
+            } else if (configuration.getKeepRefMode() == KeepRefMode.THREAD_ITSELF) {
+                bf = new BytecodeMutatorFactory(ThreadTemplateClass.class.getName());
+            } else {
+                bf = new BytecodeMutatorFactory();
+            }
+        }
+    }
+
+    /**
+     * Load class that's supposed to live. Method returns collection of assertions to check it will live.
+     * @param className_
+     * @return
+     */
+    public Collection<Assertion> loadClassThatGonnaLive(String className_) {
+        Bytecode kit = bf.createBytecode(className_);
+        String className = kit.getClassName();
+        byte[] bytecode = kit.getBytecode();
+        Class<?> clazz = loadClass(className, bytecode);
+        Object object = instantiateObject(clazz);
+        Object referenceToKeep = configuration.getWhatToKeep().decideUponRefToKeep(clazz, clazz.getClassLoader(), object);
+
+        redefineIfNeeded(bytecode, clazz);
+
+        warmUpClassIfNeeded(object);
+        Assertion assertion;
+        // The JVM prepends the host class's package to the anonymous class name.
+        if (configuration.getClassloadingMethod() != ClassloadingMethod.ANONYMOUS_CLASSLOADER) {
+            assertion = new ClassAssertion(className, true);
+        } else {
+            assertion = new ClassAssertion("gc/g1/unloading/loading/" + className, true);
+        }
+        switch (configuration.getKeepRefMode()) {
+            case STRONG_REFERENCE:
+                assertion.keepLink(referenceToKeep);
+                break;
+            case SOFT_REFERENCE:
+                assertion.keepLink(new SoftReference<Object>(referenceToKeep));
+                break;
+            case STATIC_FIELD:
+                RefHolder holder1 = new InStaticFieldHolder();
+                assertion.keepLink(holder1.hold(referenceToKeep));
+                break;
+            case STACK_LOCAL:
+                RefHolder holder2 = new InStackLocalHolder(); // UnusedThreadKiller
+                assertion.keepLink(holder2.hold(referenceToKeep));
+                break;
+            case THREAD_FIELD:
+                RefHolder holder3 = new InThreadFieldHolder(); // UnusedThreadKiller
+                assertion.keepLink(holder3.hold(referenceToKeep));
+                break;
+            case THREAD_ITSELF:
+                Thread objectThread = (Thread) object;
+                objectThread.setDaemon(true);
+                objectThread.start();
+                assertion.keepLink(new UnusedThreadKiller(objectThread.getId())); // UnusedThreadKiller
+                break;
+            case STATIC_FIELD_OF_ROOT_CLASS:
+                RefHolder holder4 = new NullClassloaderHolder();
+                Object keep = holder4.hold(referenceToKeep);
+                if (keep != null) {
+                    assertion.keepLink(keep);
+                }
+                break;
+            case JNI_GLOBAL_REF:
+                JNIGlobalRefHolder holder5 = new JNIGlobalRefHolder();
+                assertion.keepLink(holder5.hold(referenceToKeep));
+                break;
+            case JNI_LOCAL_REF:
+                JNILocalRefHolder holder6 = new JNILocalRefHolder();
+                assertion.keepLink(holder6.hold(referenceToKeep));
+                break;
+        }
+
+        Collection<Assertion> returnValue = new LinkedList<>();
+        returnValue.add(assertion);
+        return returnValue;
+    }
+
+    /**
+     * Load class that's supposed to be unloaded. Method returns collection of assertions to check it will be unloaded.
+     * @param className_
+     * @return
+     */
+    public Collection<Assertion> loadClassThatGonnaDie(String className_) {
+        Collection<Assertion> returnValue = new LinkedList<>();
+        Bytecode kit = bf.createBytecode(className_);
+        String className = kit.getClassName();
+        byte[] bytecode = kit.getBytecode();
+        Class<?> clazz = loadClass(className, bytecode);
+        FinalizableClassloader cl = null;
+        if (clazz.getClassLoader() instanceof FinalizableClassloader) {
+            cl = (FinalizableClassloader) clazz.getClassLoader();
+        }
+        Object object = instantiateObject(clazz);
+        Object referenceToKeep = configuration.getWhatToKeep().decideUponRefToKeep(clazz, clazz.getClassLoader(), object);
+
+        redefineIfNeeded(bytecode, clazz);
+
+        warmUpClassIfNeeded(object);
+        Assertion assertion;
+        // The JVM prepends the host class's package to the anonymous class name.
+        if (configuration.getClassloadingMethod() != ClassloadingMethod.ANONYMOUS_CLASSLOADER) {
+            assertion = new ClassAssertion(className, false);
+        } else {
+            assertion = new ClassAssertion("gc/g1/unloading/loading/" + className, false);
+        }
+        switch (configuration.getReleaseRefMode()) {
+            case WEAK:
+                assertion.keepLink(new WeakReference<Object>(referenceToKeep));
+                break;
+            case PHANTOM:
+                final ReferenceQueue queue = new ReferenceQueue<Object>();
+                assertion.keepLink(new PhantomReference<Object>(referenceToKeep, queue));
+                new Thread(new ReferenceCleaningThread(executionController, queue)).start();
+                break;
+        }
+        returnValue.add(assertion);
+
+        if (cl != null) {
+            // Check that classloader will be finalized
+            FinalizedAssertion finalizedAssertion = new FinalizedAssertion();
+            cl.setFinalizedAssertion(finalizedAssertion);
+            returnValue.add(finalizedAssertion);
+
+            // Check that classloader will be phantomized
+            PhantomizedAssertion phantomizedAssertion = new PhantomizedAssertion();
+            PhantomReference phantomReference = new PhantomReference<Object>(cl, phantomizationServiceThread.getQueue());
+            phantomizationServiceThread.add(phantomReference, phantomizedAssertion);
+            returnValue.add(phantomizedAssertion);
+        }
+        return returnValue;
+    }
+
+    private void redefineIfNeeded(byte[] bytecode, Class<?> clazz) {
+        if (configuration.isRedefineClasses()) {
+            BytecodePatcher.patch(bytecode);
+            makeRedefinition(NATIVE_VERBOSITY, clazz, bytecode);
+
+            // This will call class's method
+            instantiateObject(clazz);
+        }
+    }
+
+    private Class<?> loadClass(String className, byte[] bytecode) {
+        try {
+            switch (configuration.getClassloadingMethod()) {
+                case PLAIN:
+                    DoItYourselfClassLoader loader1 = new DoItYourselfClassLoader();
+                    return loader1.defineClass(className, bytecode);
+                case REFLECTION:
+                    return Class.forName(className, true, new ReflectionClassloader(bytecode, className));
+                case JNI:
+                    return JNIClassloader.loadThroughJNI(className, bytecode);
+                case ANONYMOUS_CLASSLOADER:
+                    return getUnsafe().defineAnonymousClass(ClassLoadingHelper.class, bytecode, NO_CP_PATCHES);
+            }
+            return null;
+        } catch (ClassNotFoundException e) {
+            throw new RuntimeException("Test bug!", e);
+        }
+    }
+
+    private Object instantiateObject(Class<?> clazz) {
+        try {
+            Object object = clazz.newInstance();
+
+            // Call method just for fun
+            for (Method m : clazz.getMethods()) {
+                if (m.getName().equals("main")) {
+                    m.invoke(object);
+                }
+            }
+            return object;
+        } catch (InstantiationException | IllegalAccessException | IllegalArgumentException | InvocationTargetException e) {
+            throw new RuntimeException("Test bug!", e);
+        }
+    }
+
+    private void warmUpClassIfNeeded(Object object) {
+        if (configuration.getCompilationLevel() < 1 || configuration.getCompilationNumber() == 0) {
+            return;
+        }
+        Method m = null;
+        for (Method method : object.getClass().getMethods()) {
+            if (method.getName().equalsIgnoreCase("methodForCompilation")) {
+                m = method;
+            }
+        }
+        WhiteBox wb = WhiteBox.getWhiteBox();
+        if (!wb.isMethodCompilable(m)) {
+            throw new RuntimeException("Test bug! Method occured to be not compilable. Requires investigation.");
+        }
+
+        for (int i = configuration.getCompilationNumber(); i >= 0 && executionController.continueExecution(); i--) {
+            if (!wb.isMethodCompilable(m, configuration.getCompilationLevel())) {
+              continue;
+            }
+            wb.enqueueMethodForCompilation(m, configuration.getCompilationLevel());
+            while (!wb.isMethodCompiled(m) && executionController.continueExecution()) {
+                sleep(50);
+                try {
+                    m.invoke(object, new Object());
+                } catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException e) {
+                    throw new RuntimeException("Something went wrong while compilation", e);
+                }
+            }
+            if (i > 0) {
+                wb.deoptimizeMethod(m);
+            }
+        }
+    }
+
+    native static int makeRedefinition0(int verbose, Class<?> redefClass, byte[] classBytes);
+
+    private static void makeRedefinition(int verbose, Class<?> redefClass, byte[] classBytes) {
+        new LibLoader().hashCode();
+        if (makeRedefinition0(verbose, redefClass, classBytes) != 0) {
+            throw new RuntimeException("Test bug: native method \"makeRedefinition\" return nonzero");
+        }
+    }
+
+    private static void sleep(long millis) {
+        try {
+            Thread.sleep(millis);
+        } catch (InterruptedException e) {
+            throw new RuntimeException("Got InterruptedException while sleeping.", e);
+        }
+    }
+
+    private static Unsafe getUnsafe() {
+        return Unsafe.getUnsafe();
+    }
+
+}
+
+class ReferenceCleaningThread extends ExecutionTask {
+
+    private ReferenceQueue<?> queue;
+
+    public ReferenceCleaningThread(ExecutionController executionController, ReferenceQueue<?> queue) {
+        super(executionController);
+        this.queue = queue;
+    }
+
+    @Override
+    protected void task() throws Exception {
+        Reference<?> ref = queue.remove(100);
+        if (ref != null) {
+            ref.clear();
+            return;
+        }
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/loading/LibLoader.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,37 @@
+/*
+ * Copyright (c) 2014, 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.
+ */
+package gc.g1.unloading.loading;
+
+public class LibLoader {
+
+    static {
+        try {
+            System.loadLibrary("define");
+        } catch (UnsatisfiedLinkError e) {
+            System.err.println("Could not load \"define\" library");
+            System.err.println("java.library.path:" + System.getProperty("java.library.path"));
+            throw e;
+        }
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_anonclassloader_inMemoryCompilation_keep_class/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_anonclassloader_inMemoryCompilation_keep_class/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,67 @@
+/*
+ * 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
+ * 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
+ * @modules java.base/jdk.internal.misc:+open
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/g1/unloading/tests/unloading_anonclassloader_inMemoryCompilation_keep_class.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent, javac]
+ *
+ * @modules java.base/jdk.internal.misc
+ * @library /vmTestbase
+ *          /test/lib
+ *
+ * @run driver jdk.test.lib.FileInstaller . .
+ *
+ * @comment generate HumongousTemplateClass and compile it to test.classes
+ * @run driver gc.g1.unloading.bytecode.GenClassesBuilder
+ *
+ * @build sun.hotspot.WhiteBox
+ * @run driver ClassFileInstaller sun.hotspot.WhiteBox
+ *                                sun.hotspot.WhiteBox$WhiteBoxPermission
+ * @run main/othervm
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      gc.g1.unloading.UnloadingTest
+ *      -classloadingMethod anonymous_classloader
+ *      -inMemoryCompilation
+ *      -keep class
+ *      -numberOfChecksLimit 4
+ *      -stressTime 180
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_anonclassloader_inMemoryCompilation_keep_obj/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_anonclassloader_inMemoryCompilation_keep_obj/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,67 @@
+/*
+ * 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
+ * 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
+ * @modules java.base/jdk.internal.misc:+open
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/g1/unloading/tests/unloading_anonclassloader_inMemoryCompilation_keep_obj.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent, javac]
+ *
+ * @modules java.base/jdk.internal.misc
+ * @library /vmTestbase
+ *          /test/lib
+ *
+ * @run driver jdk.test.lib.FileInstaller . .
+ *
+ * @comment generate HumongousTemplateClass and compile it to test.classes
+ * @run driver gc.g1.unloading.bytecode.GenClassesBuilder
+ *
+ * @build sun.hotspot.WhiteBox
+ * @run driver ClassFileInstaller sun.hotspot.WhiteBox
+ *                                sun.hotspot.WhiteBox$WhiteBoxPermission
+ * @run main/othervm
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      gc.g1.unloading.UnloadingTest
+ *      -classloadingMethod anonymous_classloader
+ *      -inMemoryCompilation
+ *      -keep object
+ *      -numberOfChecksLimit 4
+ *      -stressTime 180
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_anonclassloader_keep_class/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_anonclassloader_keep_class/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,66 @@
+/*
+ * 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
+ * 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
+ * @modules java.base/jdk.internal.misc:+open
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/g1/unloading/tests/unloading_anonclassloader_keep_class.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent, javac]
+ *
+ * @modules java.base/jdk.internal.misc
+ * @library /vmTestbase
+ *          /test/lib
+ *
+ * @run driver jdk.test.lib.FileInstaller . .
+ *
+ * @comment generate HumongousTemplateClass and compile it to test.classes
+ * @run driver gc.g1.unloading.bytecode.GenClassesBuilder
+ *
+ * @build sun.hotspot.WhiteBox
+ * @run driver ClassFileInstaller sun.hotspot.WhiteBox
+ *                                sun.hotspot.WhiteBox$WhiteBoxPermission
+ * @run main/othervm
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      gc.g1.unloading.UnloadingTest
+ *      -classloadingMethod anonymous_classloader
+ *      -keep class
+ *      -numberOfChecksLimit 4
+ *      -stressTime 180
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_anonclassloader_keep_obj/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_anonclassloader_keep_obj/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,66 @@
+/*
+ * 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
+ * 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
+ * @modules java.base/jdk.internal.misc:+open
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/g1/unloading/tests/unloading_anonclassloader_keep_obj.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent, javac]
+ *
+ * @modules java.base/jdk.internal.misc
+ * @library /vmTestbase
+ *          /test/lib
+ *
+ * @run driver jdk.test.lib.FileInstaller . .
+ *
+ * @comment generate HumongousTemplateClass and compile it to test.classes
+ * @run driver gc.g1.unloading.bytecode.GenClassesBuilder
+ *
+ * @build sun.hotspot.WhiteBox
+ * @run driver ClassFileInstaller sun.hotspot.WhiteBox
+ *                                sun.hotspot.WhiteBox$WhiteBoxPermission
+ * @run main/othervm
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      gc.g1.unloading.UnloadingTest
+ *      -classloadingMethod anonymous_classloader
+ *      -keep object
+ *      -numberOfChecksLimit 4
+ *      -stressTime 180
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_compilation_level1_inMemoryCompilation_keep_cl/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_compilation_level1_inMemoryCompilation_keep_cl/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,67 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/g1/unloading/tests/unloading_compilation_level1_inMemoryCompilation_keep_cl.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent, javac]
+ *
+ * @modules java.base/jdk.internal.misc
+ * @library /vmTestbase
+ *          /test/lib
+ *
+ * @run driver jdk.test.lib.FileInstaller . .
+ *
+ * @comment generate HumongousTemplateClass and compile it to test.classes
+ * @run driver gc.g1.unloading.bytecode.GenClassesBuilder
+ *
+ * @build sun.hotspot.WhiteBox
+ * @run driver ClassFileInstaller sun.hotspot.WhiteBox
+ *                                sun.hotspot.WhiteBox$WhiteBoxPermission
+ * @run main/othervm
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      gc.g1.unloading.UnloadingTest
+ *      -compilationNumber 1
+ *      -compilationLevel 1
+ *      -inMemoryCompilation
+ *      -keep classloader
+ *      -numberOfChecksLimit 4
+ *      -stressTime 180
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_compilation_level1_inMemoryCompilation_keep_class/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_compilation_level1_inMemoryCompilation_keep_class/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,67 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/g1/unloading/tests/unloading_compilation_level1_inMemoryCompilation_keep_class.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent, javac]
+ *
+ * @modules java.base/jdk.internal.misc
+ * @library /vmTestbase
+ *          /test/lib
+ *
+ * @run driver jdk.test.lib.FileInstaller . .
+ *
+ * @comment generate HumongousTemplateClass and compile it to test.classes
+ * @run driver gc.g1.unloading.bytecode.GenClassesBuilder
+ *
+ * @build sun.hotspot.WhiteBox
+ * @run driver ClassFileInstaller sun.hotspot.WhiteBox
+ *                                sun.hotspot.WhiteBox$WhiteBoxPermission
+ * @run main/othervm
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      gc.g1.unloading.UnloadingTest
+ *      -compilationNumber 1
+ *      -compilationLevel 1
+ *      -inMemoryCompilation
+ *      -keep class
+ *      -numberOfChecksLimit 4
+ *      -stressTime 180
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_compilation_level1_inMemoryCompilation_keep_obj/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_compilation_level1_inMemoryCompilation_keep_obj/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,67 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/g1/unloading/tests/unloading_compilation_level1_inMemoryCompilation_keep_obj.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent, javac]
+ *
+ * @modules java.base/jdk.internal.misc
+ * @library /vmTestbase
+ *          /test/lib
+ *
+ * @run driver jdk.test.lib.FileInstaller . .
+ *
+ * @comment generate HumongousTemplateClass and compile it to test.classes
+ * @run driver gc.g1.unloading.bytecode.GenClassesBuilder
+ *
+ * @build sun.hotspot.WhiteBox
+ * @run driver ClassFileInstaller sun.hotspot.WhiteBox
+ *                                sun.hotspot.WhiteBox$WhiteBoxPermission
+ * @run main/othervm
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      gc.g1.unloading.UnloadingTest
+ *      -compilationNumber 1
+ *      -compilationLevel 1
+ *      -inMemoryCompilation
+ *      -keep object
+ *      -numberOfChecksLimit 4
+ *      -stressTime 180
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_compilation_level1_keep_cl/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_compilation_level1_keep_cl/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,66 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/g1/unloading/tests/unloading_compilation_level1_keep_cl.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent, javac]
+ *
+ * @modules java.base/jdk.internal.misc
+ * @library /vmTestbase
+ *          /test/lib
+ *
+ * @run driver jdk.test.lib.FileInstaller . .
+ *
+ * @comment generate HumongousTemplateClass and compile it to test.classes
+ * @run driver gc.g1.unloading.bytecode.GenClassesBuilder
+ *
+ * @build sun.hotspot.WhiteBox
+ * @run driver ClassFileInstaller sun.hotspot.WhiteBox
+ *                                sun.hotspot.WhiteBox$WhiteBoxPermission
+ * @run main/othervm
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      gc.g1.unloading.UnloadingTest
+ *      -compilationNumber 1
+ *      -compilationLevel 1
+ *      -keep classloader
+ *      -numberOfChecksLimit 4
+ *      -stressTime 180
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_compilation_level1_keep_class/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_compilation_level1_keep_class/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,66 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/g1/unloading/tests/unloading_compilation_level1_keep_class.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent, javac]
+ *
+ * @modules java.base/jdk.internal.misc
+ * @library /vmTestbase
+ *          /test/lib
+ *
+ * @run driver jdk.test.lib.FileInstaller . .
+ *
+ * @comment generate HumongousTemplateClass and compile it to test.classes
+ * @run driver gc.g1.unloading.bytecode.GenClassesBuilder
+ *
+ * @build sun.hotspot.WhiteBox
+ * @run driver ClassFileInstaller sun.hotspot.WhiteBox
+ *                                sun.hotspot.WhiteBox$WhiteBoxPermission
+ * @run main/othervm
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      gc.g1.unloading.UnloadingTest
+ *      -compilationNumber 1
+ *      -compilationLevel 1
+ *      -keep class
+ *      -numberOfChecksLimit 4
+ *      -stressTime 180
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_compilation_level1_keep_obj/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_compilation_level1_keep_obj/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,66 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/g1/unloading/tests/unloading_compilation_level1_keep_obj.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent, javac]
+ *
+ * @modules java.base/jdk.internal.misc
+ * @library /vmTestbase
+ *          /test/lib
+ *
+ * @run driver jdk.test.lib.FileInstaller . .
+ *
+ * @comment generate HumongousTemplateClass and compile it to test.classes
+ * @run driver gc.g1.unloading.bytecode.GenClassesBuilder
+ *
+ * @build sun.hotspot.WhiteBox
+ * @run driver ClassFileInstaller sun.hotspot.WhiteBox
+ *                                sun.hotspot.WhiteBox$WhiteBoxPermission
+ * @run main/othervm
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      gc.g1.unloading.UnloadingTest
+ *      -compilationNumber 1
+ *      -compilationLevel 1
+ *      -keep object
+ *      -numberOfChecksLimit 4
+ *      -stressTime 180
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_compilation_level2_inMemoryCompilation_keep_cl/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_compilation_level2_inMemoryCompilation_keep_cl/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,67 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/g1/unloading/tests/unloading_compilation_level2_inMemoryCompilation_keep_cl.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent, javac]
+ *
+ * @modules java.base/jdk.internal.misc
+ * @library /vmTestbase
+ *          /test/lib
+ *
+ * @run driver jdk.test.lib.FileInstaller . .
+ *
+ * @comment generate HumongousTemplateClass and compile it to test.classes
+ * @run driver gc.g1.unloading.bytecode.GenClassesBuilder
+ *
+ * @build sun.hotspot.WhiteBox
+ * @run driver ClassFileInstaller sun.hotspot.WhiteBox
+ *                                sun.hotspot.WhiteBox$WhiteBoxPermission
+ * @run main/othervm
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      gc.g1.unloading.UnloadingTest
+ *      -compilationNumber 1
+ *      -compilationLevel 2
+ *      -inMemoryCompilation
+ *      -keep classloader
+ *      -numberOfChecksLimit 4
+ *      -stressTime 180
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_compilation_level2_inMemoryCompilation_keep_class/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_compilation_level2_inMemoryCompilation_keep_class/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,67 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/g1/unloading/tests/unloading_compilation_level2_inMemoryCompilation_keep_class.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent, javac]
+ *
+ * @modules java.base/jdk.internal.misc
+ * @library /vmTestbase
+ *          /test/lib
+ *
+ * @run driver jdk.test.lib.FileInstaller . .
+ *
+ * @comment generate HumongousTemplateClass and compile it to test.classes
+ * @run driver gc.g1.unloading.bytecode.GenClassesBuilder
+ *
+ * @build sun.hotspot.WhiteBox
+ * @run driver ClassFileInstaller sun.hotspot.WhiteBox
+ *                                sun.hotspot.WhiteBox$WhiteBoxPermission
+ * @run main/othervm
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      gc.g1.unloading.UnloadingTest
+ *      -compilationNumber 1
+ *      -compilationLevel 2
+ *      -inMemoryCompilation
+ *      -keep class
+ *      -numberOfChecksLimit 4
+ *      -stressTime 180
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_compilation_level2_inMemoryCompilation_keep_obj/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_compilation_level2_inMemoryCompilation_keep_obj/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,67 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/g1/unloading/tests/unloading_compilation_level2_inMemoryCompilation_keep_obj.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent, javac]
+ *
+ * @modules java.base/jdk.internal.misc
+ * @library /vmTestbase
+ *          /test/lib
+ *
+ * @run driver jdk.test.lib.FileInstaller . .
+ *
+ * @comment generate HumongousTemplateClass and compile it to test.classes
+ * @run driver gc.g1.unloading.bytecode.GenClassesBuilder
+ *
+ * @build sun.hotspot.WhiteBox
+ * @run driver ClassFileInstaller sun.hotspot.WhiteBox
+ *                                sun.hotspot.WhiteBox$WhiteBoxPermission
+ * @run main/othervm
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      gc.g1.unloading.UnloadingTest
+ *      -compilationNumber 1
+ *      -compilationLevel 2
+ *      -inMemoryCompilation
+ *      -keep object
+ *      -numberOfChecksLimit 4
+ *      -stressTime 180
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_compilation_level2_keep_cl/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_compilation_level2_keep_cl/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,66 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/g1/unloading/tests/unloading_compilation_level2_keep_cl.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent, javac]
+ *
+ * @modules java.base/jdk.internal.misc
+ * @library /vmTestbase
+ *          /test/lib
+ *
+ * @run driver jdk.test.lib.FileInstaller . .
+ *
+ * @comment generate HumongousTemplateClass and compile it to test.classes
+ * @run driver gc.g1.unloading.bytecode.GenClassesBuilder
+ *
+ * @build sun.hotspot.WhiteBox
+ * @run driver ClassFileInstaller sun.hotspot.WhiteBox
+ *                                sun.hotspot.WhiteBox$WhiteBoxPermission
+ * @run main/othervm
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      gc.g1.unloading.UnloadingTest
+ *      -compilationNumber 1
+ *      -compilationLevel 2
+ *      -keep classloader
+ *      -numberOfChecksLimit 4
+ *      -stressTime 180
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_compilation_level2_keep_class/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_compilation_level2_keep_class/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,66 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/g1/unloading/tests/unloading_compilation_level2_keep_class.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent, javac]
+ *
+ * @modules java.base/jdk.internal.misc
+ * @library /vmTestbase
+ *          /test/lib
+ *
+ * @run driver jdk.test.lib.FileInstaller . .
+ *
+ * @comment generate HumongousTemplateClass and compile it to test.classes
+ * @run driver gc.g1.unloading.bytecode.GenClassesBuilder
+ *
+ * @build sun.hotspot.WhiteBox
+ * @run driver ClassFileInstaller sun.hotspot.WhiteBox
+ *                                sun.hotspot.WhiteBox$WhiteBoxPermission
+ * @run main/othervm
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      gc.g1.unloading.UnloadingTest
+ *      -compilationNumber 1
+ *      -compilationLevel 2
+ *      -keep class
+ *      -numberOfChecksLimit 4
+ *      -stressTime 180
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_compilation_level2_keep_obj/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_compilation_level2_keep_obj/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,66 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/g1/unloading/tests/unloading_compilation_level2_keep_obj.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent, javac]
+ *
+ * @modules java.base/jdk.internal.misc
+ * @library /vmTestbase
+ *          /test/lib
+ *
+ * @run driver jdk.test.lib.FileInstaller . .
+ *
+ * @comment generate HumongousTemplateClass and compile it to test.classes
+ * @run driver gc.g1.unloading.bytecode.GenClassesBuilder
+ *
+ * @build sun.hotspot.WhiteBox
+ * @run driver ClassFileInstaller sun.hotspot.WhiteBox
+ *                                sun.hotspot.WhiteBox$WhiteBoxPermission
+ * @run main/othervm
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      gc.g1.unloading.UnloadingTest
+ *      -compilationNumber 1
+ *      -compilationLevel 2
+ *      -keep object
+ *      -numberOfChecksLimit 4
+ *      -stressTime 180
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_compilation_level3_inMemoryCompilation_keep_cl/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_compilation_level3_inMemoryCompilation_keep_cl/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,67 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/g1/unloading/tests/unloading_compilation_level3_inMemoryCompilation_keep_cl.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent, javac]
+ *
+ * @modules java.base/jdk.internal.misc
+ * @library /vmTestbase
+ *          /test/lib
+ *
+ * @run driver jdk.test.lib.FileInstaller . .
+ *
+ * @comment generate HumongousTemplateClass and compile it to test.classes
+ * @run driver gc.g1.unloading.bytecode.GenClassesBuilder
+ *
+ * @build sun.hotspot.WhiteBox
+ * @run driver ClassFileInstaller sun.hotspot.WhiteBox
+ *                                sun.hotspot.WhiteBox$WhiteBoxPermission
+ * @run main/othervm
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      gc.g1.unloading.UnloadingTest
+ *      -compilationNumber 1
+ *      -compilationLevel 3
+ *      -inMemoryCompilation
+ *      -keep classloader
+ *      -numberOfChecksLimit 4
+ *      -stressTime 180
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_compilation_level3_inMemoryCompilation_keep_class/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_compilation_level3_inMemoryCompilation_keep_class/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,67 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/g1/unloading/tests/unloading_compilation_level3_inMemoryCompilation_keep_class.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent, javac]
+ *
+ * @modules java.base/jdk.internal.misc
+ * @library /vmTestbase
+ *          /test/lib
+ *
+ * @run driver jdk.test.lib.FileInstaller . .
+ *
+ * @comment generate HumongousTemplateClass and compile it to test.classes
+ * @run driver gc.g1.unloading.bytecode.GenClassesBuilder
+ *
+ * @build sun.hotspot.WhiteBox
+ * @run driver ClassFileInstaller sun.hotspot.WhiteBox
+ *                                sun.hotspot.WhiteBox$WhiteBoxPermission
+ * @run main/othervm
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      gc.g1.unloading.UnloadingTest
+ *      -compilationNumber 1
+ *      -compilationLevel 3
+ *      -inMemoryCompilation
+ *      -keep class
+ *      -numberOfChecksLimit 4
+ *      -stressTime 180
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_compilation_level3_inMemoryCompilation_keep_obj/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_compilation_level3_inMemoryCompilation_keep_obj/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,67 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/g1/unloading/tests/unloading_compilation_level3_inMemoryCompilation_keep_obj.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent, javac]
+ *
+ * @modules java.base/jdk.internal.misc
+ * @library /vmTestbase
+ *          /test/lib
+ *
+ * @run driver jdk.test.lib.FileInstaller . .
+ *
+ * @comment generate HumongousTemplateClass and compile it to test.classes
+ * @run driver gc.g1.unloading.bytecode.GenClassesBuilder
+ *
+ * @build sun.hotspot.WhiteBox
+ * @run driver ClassFileInstaller sun.hotspot.WhiteBox
+ *                                sun.hotspot.WhiteBox$WhiteBoxPermission
+ * @run main/othervm
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      gc.g1.unloading.UnloadingTest
+ *      -compilationNumber 1
+ *      -compilationLevel 3
+ *      -inMemoryCompilation
+ *      -keep object
+ *      -numberOfChecksLimit 4
+ *      -stressTime 180
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_compilation_level3_keep_cl/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_compilation_level3_keep_cl/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,66 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/g1/unloading/tests/unloading_compilation_level3_keep_cl.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent, javac]
+ *
+ * @modules java.base/jdk.internal.misc
+ * @library /vmTestbase
+ *          /test/lib
+ *
+ * @run driver jdk.test.lib.FileInstaller . .
+ *
+ * @comment generate HumongousTemplateClass and compile it to test.classes
+ * @run driver gc.g1.unloading.bytecode.GenClassesBuilder
+ *
+ * @build sun.hotspot.WhiteBox
+ * @run driver ClassFileInstaller sun.hotspot.WhiteBox
+ *                                sun.hotspot.WhiteBox$WhiteBoxPermission
+ * @run main/othervm
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      gc.g1.unloading.UnloadingTest
+ *      -compilationNumber 1
+ *      -compilationLevel 3
+ *      -keep classloader
+ *      -numberOfChecksLimit 4
+ *      -stressTime 180
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_compilation_level3_keep_class/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_compilation_level3_keep_class/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,66 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/g1/unloading/tests/unloading_compilation_level3_keep_class.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent, javac]
+ *
+ * @modules java.base/jdk.internal.misc
+ * @library /vmTestbase
+ *          /test/lib
+ *
+ * @run driver jdk.test.lib.FileInstaller . .
+ *
+ * @comment generate HumongousTemplateClass and compile it to test.classes
+ * @run driver gc.g1.unloading.bytecode.GenClassesBuilder
+ *
+ * @build sun.hotspot.WhiteBox
+ * @run driver ClassFileInstaller sun.hotspot.WhiteBox
+ *                                sun.hotspot.WhiteBox$WhiteBoxPermission
+ * @run main/othervm
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      gc.g1.unloading.UnloadingTest
+ *      -compilationNumber 1
+ *      -compilationLevel 3
+ *      -keep class
+ *      -numberOfChecksLimit 4
+ *      -stressTime 180
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_compilation_level3_keep_obj/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_compilation_level3_keep_obj/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,66 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/g1/unloading/tests/unloading_compilation_level3_keep_obj.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent, javac]
+ *
+ * @modules java.base/jdk.internal.misc
+ * @library /vmTestbase
+ *          /test/lib
+ *
+ * @run driver jdk.test.lib.FileInstaller . .
+ *
+ * @comment generate HumongousTemplateClass and compile it to test.classes
+ * @run driver gc.g1.unloading.bytecode.GenClassesBuilder
+ *
+ * @build sun.hotspot.WhiteBox
+ * @run driver ClassFileInstaller sun.hotspot.WhiteBox
+ *                                sun.hotspot.WhiteBox$WhiteBoxPermission
+ * @run main/othervm
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      gc.g1.unloading.UnloadingTest
+ *      -compilationNumber 1
+ *      -compilationLevel 3
+ *      -keep object
+ *      -numberOfChecksLimit 4
+ *      -stressTime 180
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_compilation_level4_inMemoryCompilation_keep_cl/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_compilation_level4_inMemoryCompilation_keep_cl/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,67 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/g1/unloading/tests/unloading_compilation_level4_inMemoryCompilation_keep_cl.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent, javac]
+ *
+ * @modules java.base/jdk.internal.misc
+ * @library /vmTestbase
+ *          /test/lib
+ *
+ * @run driver jdk.test.lib.FileInstaller . .
+ *
+ * @comment generate HumongousTemplateClass and compile it to test.classes
+ * @run driver gc.g1.unloading.bytecode.GenClassesBuilder
+ *
+ * @build sun.hotspot.WhiteBox
+ * @run driver ClassFileInstaller sun.hotspot.WhiteBox
+ *                                sun.hotspot.WhiteBox$WhiteBoxPermission
+ * @run main/othervm
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      gc.g1.unloading.UnloadingTest
+ *      -compilationNumber 1
+ *      -compilationLevel 4
+ *      -inMemoryCompilation
+ *      -keep classloader
+ *      -numberOfChecksLimit 4
+ *      -stressTime 180
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_compilation_level4_inMemoryCompilation_keep_class/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_compilation_level4_inMemoryCompilation_keep_class/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,67 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/g1/unloading/tests/unloading_compilation_level4_inMemoryCompilation_keep_class.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent, javac]
+ *
+ * @modules java.base/jdk.internal.misc
+ * @library /vmTestbase
+ *          /test/lib
+ *
+ * @run driver jdk.test.lib.FileInstaller . .
+ *
+ * @comment generate HumongousTemplateClass and compile it to test.classes
+ * @run driver gc.g1.unloading.bytecode.GenClassesBuilder
+ *
+ * @build sun.hotspot.WhiteBox
+ * @run driver ClassFileInstaller sun.hotspot.WhiteBox
+ *                                sun.hotspot.WhiteBox$WhiteBoxPermission
+ * @run main/othervm
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      gc.g1.unloading.UnloadingTest
+ *      -compilationNumber 1
+ *      -compilationLevel 4
+ *      -inMemoryCompilation
+ *      -keep class
+ *      -numberOfChecksLimit 4
+ *      -stressTime 180
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_compilation_level4_inMemoryCompilation_keep_obj/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_compilation_level4_inMemoryCompilation_keep_obj/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,67 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/g1/unloading/tests/unloading_compilation_level4_inMemoryCompilation_keep_obj.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent, javac]
+ *
+ * @modules java.base/jdk.internal.misc
+ * @library /vmTestbase
+ *          /test/lib
+ *
+ * @run driver jdk.test.lib.FileInstaller . .
+ *
+ * @comment generate HumongousTemplateClass and compile it to test.classes
+ * @run driver gc.g1.unloading.bytecode.GenClassesBuilder
+ *
+ * @build sun.hotspot.WhiteBox
+ * @run driver ClassFileInstaller sun.hotspot.WhiteBox
+ *                                sun.hotspot.WhiteBox$WhiteBoxPermission
+ * @run main/othervm
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      gc.g1.unloading.UnloadingTest
+ *      -compilationNumber 1
+ *      -compilationLevel 4
+ *      -inMemoryCompilation
+ *      -keep object
+ *      -numberOfChecksLimit 4
+ *      -stressTime 180
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_compilation_level4_keep_cl/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_compilation_level4_keep_cl/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,66 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/g1/unloading/tests/unloading_compilation_level4_keep_cl.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent, javac]
+ *
+ * @modules java.base/jdk.internal.misc
+ * @library /vmTestbase
+ *          /test/lib
+ *
+ * @run driver jdk.test.lib.FileInstaller . .
+ *
+ * @comment generate HumongousTemplateClass and compile it to test.classes
+ * @run driver gc.g1.unloading.bytecode.GenClassesBuilder
+ *
+ * @build sun.hotspot.WhiteBox
+ * @run driver ClassFileInstaller sun.hotspot.WhiteBox
+ *                                sun.hotspot.WhiteBox$WhiteBoxPermission
+ * @run main/othervm
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      gc.g1.unloading.UnloadingTest
+ *      -compilationNumber 1
+ *      -compilationLevel 4
+ *      -keep classloader
+ *      -numberOfChecksLimit 4
+ *      -stressTime 180
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_compilation_level4_keep_class/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_compilation_level4_keep_class/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,66 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/g1/unloading/tests/unloading_compilation_level4_keep_class.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent, javac]
+ *
+ * @modules java.base/jdk.internal.misc
+ * @library /vmTestbase
+ *          /test/lib
+ *
+ * @run driver jdk.test.lib.FileInstaller . .
+ *
+ * @comment generate HumongousTemplateClass and compile it to test.classes
+ * @run driver gc.g1.unloading.bytecode.GenClassesBuilder
+ *
+ * @build sun.hotspot.WhiteBox
+ * @run driver ClassFileInstaller sun.hotspot.WhiteBox
+ *                                sun.hotspot.WhiteBox$WhiteBoxPermission
+ * @run main/othervm
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      gc.g1.unloading.UnloadingTest
+ *      -compilationNumber 1
+ *      -compilationLevel 4
+ *      -keep class
+ *      -numberOfChecksLimit 4
+ *      -stressTime 180
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_compilation_level4_keep_obj/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_compilation_level4_keep_obj/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,66 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/g1/unloading/tests/unloading_compilation_level4_keep_obj.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent, javac]
+ *
+ * @modules java.base/jdk.internal.misc
+ * @library /vmTestbase
+ *          /test/lib
+ *
+ * @run driver jdk.test.lib.FileInstaller . .
+ *
+ * @comment generate HumongousTemplateClass and compile it to test.classes
+ * @run driver gc.g1.unloading.bytecode.GenClassesBuilder
+ *
+ * @build sun.hotspot.WhiteBox
+ * @run driver ClassFileInstaller sun.hotspot.WhiteBox
+ *                                sun.hotspot.WhiteBox$WhiteBoxPermission
+ * @run main/othervm
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      gc.g1.unloading.UnloadingTest
+ *      -compilationNumber 1
+ *      -compilationLevel 4
+ *      -keep object
+ *      -numberOfChecksLimit 4
+ *      -stressTime 180
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_humongous_class_inMemoryCompilation_keep_cl/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_humongous_class_inMemoryCompilation_keep_cl/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,66 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/g1/unloading/tests/unloading_humongous_class_inMemoryCompilation_keep_cl.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent, javac]
+ *
+ * @modules java.base/jdk.internal.misc
+ * @library /vmTestbase
+ *          /test/lib
+ *
+ * @run driver jdk.test.lib.FileInstaller . .
+ *
+ * @comment generate HumongousTemplateClass and compile it to test.classes
+ * @run driver gc.g1.unloading.bytecode.GenClassesBuilder
+ *
+ * @build sun.hotspot.WhiteBox
+ * @run driver ClassFileInstaller sun.hotspot.WhiteBox
+ *                                sun.hotspot.WhiteBox$WhiteBoxPermission
+ * @run main/othervm
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      gc.g1.unloading.UnloadingTest
+ *      -humongousClass
+ *      -inMemoryCompilation
+ *      -keep classloader
+ *      -numberOfChecksLimit 4
+ *      -stressTime 180
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_humongous_class_inMemoryCompilation_keep_class/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_humongous_class_inMemoryCompilation_keep_class/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,66 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/g1/unloading/tests/unloading_humongous_class_inMemoryCompilation_keep_class.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent, javac]
+ *
+ * @modules java.base/jdk.internal.misc
+ * @library /vmTestbase
+ *          /test/lib
+ *
+ * @run driver jdk.test.lib.FileInstaller . .
+ *
+ * @comment generate HumongousTemplateClass and compile it to test.classes
+ * @run driver gc.g1.unloading.bytecode.GenClassesBuilder
+ *
+ * @build sun.hotspot.WhiteBox
+ * @run driver ClassFileInstaller sun.hotspot.WhiteBox
+ *                                sun.hotspot.WhiteBox$WhiteBoxPermission
+ * @run main/othervm
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      gc.g1.unloading.UnloadingTest
+ *      -humongousClass
+ *      -inMemoryCompilation
+ *      -keep class
+ *      -numberOfChecksLimit 4
+ *      -stressTime 180
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_humongous_class_inMemoryCompilation_keep_obj/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_humongous_class_inMemoryCompilation_keep_obj/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,66 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/g1/unloading/tests/unloading_humongous_class_inMemoryCompilation_keep_obj.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent, javac]
+ *
+ * @modules java.base/jdk.internal.misc
+ * @library /vmTestbase
+ *          /test/lib
+ *
+ * @run driver jdk.test.lib.FileInstaller . .
+ *
+ * @comment generate HumongousTemplateClass and compile it to test.classes
+ * @run driver gc.g1.unloading.bytecode.GenClassesBuilder
+ *
+ * @build sun.hotspot.WhiteBox
+ * @run driver ClassFileInstaller sun.hotspot.WhiteBox
+ *                                sun.hotspot.WhiteBox$WhiteBoxPermission
+ * @run main/othervm
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      gc.g1.unloading.UnloadingTest
+ *      -humongousClass
+ *      -inMemoryCompilation
+ *      -keep object
+ *      -numberOfChecksLimit 4
+ *      -stressTime 180
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_humongous_class_keep_cl/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_humongous_class_keep_cl/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,65 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/g1/unloading/tests/unloading_humongous_class_keep_cl.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent, javac]
+ *
+ * @modules java.base/jdk.internal.misc
+ * @library /vmTestbase
+ *          /test/lib
+ *
+ * @run driver jdk.test.lib.FileInstaller . .
+ *
+ * @comment generate HumongousTemplateClass and compile it to test.classes
+ * @run driver gc.g1.unloading.bytecode.GenClassesBuilder
+ *
+ * @build sun.hotspot.WhiteBox
+ * @run driver ClassFileInstaller sun.hotspot.WhiteBox
+ *                                sun.hotspot.WhiteBox$WhiteBoxPermission
+ * @run main/othervm
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      gc.g1.unloading.UnloadingTest
+ *      -humongousClass
+ *      -keep classloader
+ *      -numberOfChecksLimit 4
+ *      -stressTime 180
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_humongous_class_keep_class/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_humongous_class_keep_class/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,65 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/g1/unloading/tests/unloading_humongous_class_keep_class.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent, javac]
+ *
+ * @modules java.base/jdk.internal.misc
+ * @library /vmTestbase
+ *          /test/lib
+ *
+ * @run driver jdk.test.lib.FileInstaller . .
+ *
+ * @comment generate HumongousTemplateClass and compile it to test.classes
+ * @run driver gc.g1.unloading.bytecode.GenClassesBuilder
+ *
+ * @build sun.hotspot.WhiteBox
+ * @run driver ClassFileInstaller sun.hotspot.WhiteBox
+ *                                sun.hotspot.WhiteBox$WhiteBoxPermission
+ * @run main/othervm
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      gc.g1.unloading.UnloadingTest
+ *      -humongousClass
+ *      -keep class
+ *      -numberOfChecksLimit 4
+ *      -stressTime 180
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_humongous_class_keep_obj/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_humongous_class_keep_obj/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,65 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/g1/unloading/tests/unloading_humongous_class_keep_obj.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent, javac]
+ *
+ * @modules java.base/jdk.internal.misc
+ * @library /vmTestbase
+ *          /test/lib
+ *
+ * @run driver jdk.test.lib.FileInstaller . .
+ *
+ * @comment generate HumongousTemplateClass and compile it to test.classes
+ * @run driver gc.g1.unloading.bytecode.GenClassesBuilder
+ *
+ * @build sun.hotspot.WhiteBox
+ * @run driver ClassFileInstaller sun.hotspot.WhiteBox
+ *                                sun.hotspot.WhiteBox$WhiteBoxPermission
+ * @run main/othervm
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      gc.g1.unloading.UnloadingTest
+ *      -humongousClass
+ *      -keep object
+ *      -numberOfChecksLimit 4
+ *      -stressTime 180
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_jni_classloading_inMemoryCompilation_keep_cl/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_jni_classloading_inMemoryCompilation_keep_cl/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,66 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/g1/unloading/tests/unloading_jni_classloading_inMemoryCompilation_keep_cl.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent, javac]
+ *
+ * @modules java.base/jdk.internal.misc
+ * @library /vmTestbase
+ *          /test/lib
+ *
+ * @run driver jdk.test.lib.FileInstaller . .
+ *
+ * @comment generate HumongousTemplateClass and compile it to test.classes
+ * @run driver gc.g1.unloading.bytecode.GenClassesBuilder
+ *
+ * @build sun.hotspot.WhiteBox
+ * @run driver ClassFileInstaller sun.hotspot.WhiteBox
+ *                                sun.hotspot.WhiteBox$WhiteBoxPermission
+ * @run main/othervm/native
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      gc.g1.unloading.UnloadingTest
+ *      -classloadingMethod jni
+ *      -inMemoryCompilation
+ *      -keep classloader
+ *      -numberOfChecksLimit 4
+ *      -stressTime 180
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_jni_classloading_inMemoryCompilation_keep_class/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_jni_classloading_inMemoryCompilation_keep_class/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,66 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/g1/unloading/tests/unloading_jni_classloading_inMemoryCompilation_keep_class.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent, javac]
+ *
+ * @modules java.base/jdk.internal.misc
+ * @library /vmTestbase
+ *          /test/lib
+ *
+ * @run driver jdk.test.lib.FileInstaller . .
+ *
+ * @comment generate HumongousTemplateClass and compile it to test.classes
+ * @run driver gc.g1.unloading.bytecode.GenClassesBuilder
+ *
+ * @build sun.hotspot.WhiteBox
+ * @run driver ClassFileInstaller sun.hotspot.WhiteBox
+ *                                sun.hotspot.WhiteBox$WhiteBoxPermission
+ * @run main/othervm/native
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      gc.g1.unloading.UnloadingTest
+ *      -classloadingMethod jni
+ *      -inMemoryCompilation
+ *      -keep class
+ *      -numberOfChecksLimit 4
+ *      -stressTime 180
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_jni_classloading_inMemoryCompilation_keep_obj/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_jni_classloading_inMemoryCompilation_keep_obj/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,66 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/g1/unloading/tests/unloading_jni_classloading_inMemoryCompilation_keep_obj.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent, javac]
+ *
+ * @modules java.base/jdk.internal.misc
+ * @library /vmTestbase
+ *          /test/lib
+ *
+ * @run driver jdk.test.lib.FileInstaller . .
+ *
+ * @comment generate HumongousTemplateClass and compile it to test.classes
+ * @run driver gc.g1.unloading.bytecode.GenClassesBuilder
+ *
+ * @build sun.hotspot.WhiteBox
+ * @run driver ClassFileInstaller sun.hotspot.WhiteBox
+ *                                sun.hotspot.WhiteBox$WhiteBoxPermission
+ * @run main/othervm/native
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      gc.g1.unloading.UnloadingTest
+ *      -classloadingMethod jni
+ *      -inMemoryCompilation
+ *      -keep object
+ *      -numberOfChecksLimit 4
+ *      -stressTime 180
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_jni_classloading_keep_cl/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_jni_classloading_keep_cl/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,65 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/g1/unloading/tests/unloading_jni_classloading_keep_cl.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent, javac]
+ *
+ * @modules java.base/jdk.internal.misc
+ * @library /vmTestbase
+ *          /test/lib
+ *
+ * @run driver jdk.test.lib.FileInstaller . .
+ *
+ * @comment generate HumongousTemplateClass and compile it to test.classes
+ * @run driver gc.g1.unloading.bytecode.GenClassesBuilder
+ *
+ * @build sun.hotspot.WhiteBox
+ * @run driver ClassFileInstaller sun.hotspot.WhiteBox
+ *                                sun.hotspot.WhiteBox$WhiteBoxPermission
+ * @run main/othervm/native
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      gc.g1.unloading.UnloadingTest
+ *      -classloadingMethod jni
+ *      -keep classloader
+ *      -numberOfChecksLimit 4
+ *      -stressTime 180
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_jni_classloading_keep_class/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_jni_classloading_keep_class/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,65 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/g1/unloading/tests/unloading_jni_classloading_keep_class.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent, javac]
+ *
+ * @modules java.base/jdk.internal.misc
+ * @library /vmTestbase
+ *          /test/lib
+ *
+ * @run driver jdk.test.lib.FileInstaller . .
+ *
+ * @comment generate HumongousTemplateClass and compile it to test.classes
+ * @run driver gc.g1.unloading.bytecode.GenClassesBuilder
+ *
+ * @build sun.hotspot.WhiteBox
+ * @run driver ClassFileInstaller sun.hotspot.WhiteBox
+ *                                sun.hotspot.WhiteBox$WhiteBoxPermission
+ * @run main/othervm/native
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      gc.g1.unloading.UnloadingTest
+ *      -classloadingMethod jni
+ *      -keep class
+ *      -numberOfChecksLimit 4
+ *      -stressTime 180
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_jni_classloading_keep_obj/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_jni_classloading_keep_obj/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,65 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/g1/unloading/tests/unloading_jni_classloading_keep_obj.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent, javac]
+ *
+ * @modules java.base/jdk.internal.misc
+ * @library /vmTestbase
+ *          /test/lib
+ *
+ * @run driver jdk.test.lib.FileInstaller . .
+ *
+ * @comment generate HumongousTemplateClass and compile it to test.classes
+ * @run driver gc.g1.unloading.bytecode.GenClassesBuilder
+ *
+ * @build sun.hotspot.WhiteBox
+ * @run driver ClassFileInstaller sun.hotspot.WhiteBox
+ *                                sun.hotspot.WhiteBox$WhiteBoxPermission
+ * @run main/othervm/native
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      gc.g1.unloading.UnloadingTest
+ *      -classloadingMethod jni
+ *      -keep object
+ *      -numberOfChecksLimit 4
+ *      -stressTime 180
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_keepRef_jni_global_ref_inMemoryCompilation_keep_cl/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_keepRef_jni_global_ref_inMemoryCompilation_keep_cl/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,66 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/g1/unloading/tests/unloading_keepRef_jni_global_ref_inMemoryCompilation_keep_cl.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent, javac]
+ *
+ * @modules java.base/jdk.internal.misc
+ * @library /vmTestbase
+ *          /test/lib
+ *
+ * @run driver jdk.test.lib.FileInstaller . .
+ *
+ * @comment generate HumongousTemplateClass and compile it to test.classes
+ * @run driver gc.g1.unloading.bytecode.GenClassesBuilder
+ *
+ * @build sun.hotspot.WhiteBox
+ * @run driver ClassFileInstaller sun.hotspot.WhiteBox
+ *                                sun.hotspot.WhiteBox$WhiteBoxPermission
+ * @run main/othervm/native
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      gc.g1.unloading.UnloadingTest
+ *      -keepRefMode JNI_GLOBAL_REF
+ *      -inMemoryCompilation
+ *      -keep classloader
+ *      -numberOfChecksLimit 4
+ *      -stressTime 180
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_keepRef_jni_global_ref_inMemoryCompilation_keep_class/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_keepRef_jni_global_ref_inMemoryCompilation_keep_class/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,66 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/g1/unloading/tests/unloading_keepRef_jni_global_ref_inMemoryCompilation_keep_class.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent, javac]
+ *
+ * @modules java.base/jdk.internal.misc
+ * @library /vmTestbase
+ *          /test/lib
+ *
+ * @run driver jdk.test.lib.FileInstaller . .
+ *
+ * @comment generate HumongousTemplateClass and compile it to test.classes
+ * @run driver gc.g1.unloading.bytecode.GenClassesBuilder
+ *
+ * @build sun.hotspot.WhiteBox
+ * @run driver ClassFileInstaller sun.hotspot.WhiteBox
+ *                                sun.hotspot.WhiteBox$WhiteBoxPermission
+ * @run main/othervm/native
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      gc.g1.unloading.UnloadingTest
+ *      -keepRefMode JNI_GLOBAL_REF
+ *      -inMemoryCompilation
+ *      -keep class
+ *      -numberOfChecksLimit 4
+ *      -stressTime 180
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_keepRef_jni_global_ref_inMemoryCompilation_keep_obj/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_keepRef_jni_global_ref_inMemoryCompilation_keep_obj/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,66 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/g1/unloading/tests/unloading_keepRef_jni_global_ref_inMemoryCompilation_keep_obj.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent, javac]
+ *
+ * @modules java.base/jdk.internal.misc
+ * @library /vmTestbase
+ *          /test/lib
+ *
+ * @run driver jdk.test.lib.FileInstaller . .
+ *
+ * @comment generate HumongousTemplateClass and compile it to test.classes
+ * @run driver gc.g1.unloading.bytecode.GenClassesBuilder
+ *
+ * @build sun.hotspot.WhiteBox
+ * @run driver ClassFileInstaller sun.hotspot.WhiteBox
+ *                                sun.hotspot.WhiteBox$WhiteBoxPermission
+ * @run main/othervm/native
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      gc.g1.unloading.UnloadingTest
+ *      -keepRefMode JNI_GLOBAL_REF
+ *      -inMemoryCompilation
+ *      -keep object
+ *      -numberOfChecksLimit 4
+ *      -stressTime 180
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_keepRef_jni_global_ref_keep_cl/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_keepRef_jni_global_ref_keep_cl/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,65 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/g1/unloading/tests/unloading_keepRef_jni_global_ref_keep_cl.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent, javac]
+ *
+ * @modules java.base/jdk.internal.misc
+ * @library /vmTestbase
+ *          /test/lib
+ *
+ * @run driver jdk.test.lib.FileInstaller . .
+ *
+ * @comment generate HumongousTemplateClass and compile it to test.classes
+ * @run driver gc.g1.unloading.bytecode.GenClassesBuilder
+ *
+ * @build sun.hotspot.WhiteBox
+ * @run driver ClassFileInstaller sun.hotspot.WhiteBox
+ *                                sun.hotspot.WhiteBox$WhiteBoxPermission
+ * @run main/othervm/native
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      gc.g1.unloading.UnloadingTest
+ *      -keepRefMode JNI_GLOBAL_REF
+ *      -keep classloader
+ *      -numberOfChecksLimit 4
+ *      -stressTime 180
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_keepRef_jni_global_ref_keep_class/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_keepRef_jni_global_ref_keep_class/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,65 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/g1/unloading/tests/unloading_keepRef_jni_global_ref_keep_class.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent, javac]
+ *
+ * @modules java.base/jdk.internal.misc
+ * @library /vmTestbase
+ *          /test/lib
+ *
+ * @run driver jdk.test.lib.FileInstaller . .
+ *
+ * @comment generate HumongousTemplateClass and compile it to test.classes
+ * @run driver gc.g1.unloading.bytecode.GenClassesBuilder
+ *
+ * @build sun.hotspot.WhiteBox
+ * @run driver ClassFileInstaller sun.hotspot.WhiteBox
+ *                                sun.hotspot.WhiteBox$WhiteBoxPermission
+ * @run main/othervm/native
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      gc.g1.unloading.UnloadingTest
+ *      -keepRefMode JNI_GLOBAL_REF
+ *      -keep class
+ *      -numberOfChecksLimit 4
+ *      -stressTime 180
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_keepRef_jni_global_ref_keep_obj/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_keepRef_jni_global_ref_keep_obj/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,65 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/g1/unloading/tests/unloading_keepRef_jni_global_ref_keep_obj.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent, javac]
+ *
+ * @modules java.base/jdk.internal.misc
+ * @library /vmTestbase
+ *          /test/lib
+ *
+ * @run driver jdk.test.lib.FileInstaller . .
+ *
+ * @comment generate HumongousTemplateClass and compile it to test.classes
+ * @run driver gc.g1.unloading.bytecode.GenClassesBuilder
+ *
+ * @build sun.hotspot.WhiteBox
+ * @run driver ClassFileInstaller sun.hotspot.WhiteBox
+ *                                sun.hotspot.WhiteBox$WhiteBoxPermission
+ * @run main/othervm/native
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      gc.g1.unloading.UnloadingTest
+ *      -keepRefMode JNI_GLOBAL_REF
+ *      -keep object
+ *      -numberOfChecksLimit 4
+ *      -stressTime 180
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_keepRef_jni_local_ref_inMemoryCompilation_keep_cl/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_keepRef_jni_local_ref_inMemoryCompilation_keep_cl/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,66 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/g1/unloading/tests/unloading_keepRef_jni_local_ref_inMemoryCompilation_keep_cl.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent, javac]
+ *
+ * @modules java.base/jdk.internal.misc
+ * @library /vmTestbase
+ *          /test/lib
+ *
+ * @run driver jdk.test.lib.FileInstaller . .
+ *
+ * @comment generate HumongousTemplateClass and compile it to test.classes
+ * @run driver gc.g1.unloading.bytecode.GenClassesBuilder
+ *
+ * @build sun.hotspot.WhiteBox
+ * @run driver ClassFileInstaller sun.hotspot.WhiteBox
+ *                                sun.hotspot.WhiteBox$WhiteBoxPermission
+ * @run main/othervm/native
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      gc.g1.unloading.UnloadingTest
+ *      -keepRefMode JNI_LOCAL_REF
+ *      -inMemoryCompilation
+ *      -keep classloader
+ *      -numberOfChecksLimit 4
+ *      -stressTime 180
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_keepRef_jni_local_ref_inMemoryCompilation_keep_class/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_keepRef_jni_local_ref_inMemoryCompilation_keep_class/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,66 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/g1/unloading/tests/unloading_keepRef_jni_local_ref_inMemoryCompilation_keep_class.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent, javac]
+ *
+ * @modules java.base/jdk.internal.misc
+ * @library /vmTestbase
+ *          /test/lib
+ *
+ * @run driver jdk.test.lib.FileInstaller . .
+ *
+ * @comment generate HumongousTemplateClass and compile it to test.classes
+ * @run driver gc.g1.unloading.bytecode.GenClassesBuilder
+ *
+ * @build sun.hotspot.WhiteBox
+ * @run driver ClassFileInstaller sun.hotspot.WhiteBox
+ *                                sun.hotspot.WhiteBox$WhiteBoxPermission
+ * @run main/othervm/native
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      gc.g1.unloading.UnloadingTest
+ *      -keepRefMode JNI_LOCAL_REF
+ *      -inMemoryCompilation
+ *      -keep class
+ *      -numberOfChecksLimit 4
+ *      -stressTime 180
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_keepRef_jni_local_ref_inMemoryCompilation_keep_obj/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_keepRef_jni_local_ref_inMemoryCompilation_keep_obj/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,66 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/g1/unloading/tests/unloading_keepRef_jni_local_ref_inMemoryCompilation_keep_obj.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent, javac]
+ *
+ * @modules java.base/jdk.internal.misc
+ * @library /vmTestbase
+ *          /test/lib
+ *
+ * @run driver jdk.test.lib.FileInstaller . .
+ *
+ * @comment generate HumongousTemplateClass and compile it to test.classes
+ * @run driver gc.g1.unloading.bytecode.GenClassesBuilder
+ *
+ * @build sun.hotspot.WhiteBox
+ * @run driver ClassFileInstaller sun.hotspot.WhiteBox
+ *                                sun.hotspot.WhiteBox$WhiteBoxPermission
+ * @run main/othervm/native
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      gc.g1.unloading.UnloadingTest
+ *      -keepRefMode JNI_LOCAL_REF
+ *      -inMemoryCompilation
+ *      -keep object
+ *      -numberOfChecksLimit 4
+ *      -stressTime 180
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_keepRef_jni_local_ref_keep_cl/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_keepRef_jni_local_ref_keep_cl/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,65 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/g1/unloading/tests/unloading_keepRef_jni_local_ref_keep_cl.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent, javac]
+ *
+ * @modules java.base/jdk.internal.misc
+ * @library /vmTestbase
+ *          /test/lib
+ *
+ * @run driver jdk.test.lib.FileInstaller . .
+ *
+ * @comment generate HumongousTemplateClass and compile it to test.classes
+ * @run driver gc.g1.unloading.bytecode.GenClassesBuilder
+ *
+ * @build sun.hotspot.WhiteBox
+ * @run driver ClassFileInstaller sun.hotspot.WhiteBox
+ *                                sun.hotspot.WhiteBox$WhiteBoxPermission
+ * @run main/othervm/native
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      gc.g1.unloading.UnloadingTest
+ *      -keepRefMode JNI_LOCAL_REF
+ *      -keep classloader
+ *      -numberOfChecksLimit 4
+ *      -stressTime 180
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_keepRef_jni_local_ref_keep_class/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_keepRef_jni_local_ref_keep_class/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,65 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/g1/unloading/tests/unloading_keepRef_jni_local_ref_keep_class.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent, javac]
+ *
+ * @modules java.base/jdk.internal.misc
+ * @library /vmTestbase
+ *          /test/lib
+ *
+ * @run driver jdk.test.lib.FileInstaller . .
+ *
+ * @comment generate HumongousTemplateClass and compile it to test.classes
+ * @run driver gc.g1.unloading.bytecode.GenClassesBuilder
+ *
+ * @build sun.hotspot.WhiteBox
+ * @run driver ClassFileInstaller sun.hotspot.WhiteBox
+ *                                sun.hotspot.WhiteBox$WhiteBoxPermission
+ * @run main/othervm/native
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      gc.g1.unloading.UnloadingTest
+ *      -keepRefMode JNI_LOCAL_REF
+ *      -keep class
+ *      -numberOfChecksLimit 4
+ *      -stressTime 180
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_keepRef_jni_local_ref_keep_obj/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_keepRef_jni_local_ref_keep_obj/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,65 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/g1/unloading/tests/unloading_keepRef_jni_local_ref_keep_obj.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent, javac]
+ *
+ * @modules java.base/jdk.internal.misc
+ * @library /vmTestbase
+ *          /test/lib
+ *
+ * @run driver jdk.test.lib.FileInstaller . .
+ *
+ * @comment generate HumongousTemplateClass and compile it to test.classes
+ * @run driver gc.g1.unloading.bytecode.GenClassesBuilder
+ *
+ * @build sun.hotspot.WhiteBox
+ * @run driver ClassFileInstaller sun.hotspot.WhiteBox
+ *                                sun.hotspot.WhiteBox$WhiteBoxPermission
+ * @run main/othervm/native
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      gc.g1.unloading.UnloadingTest
+ *      -keepRefMode JNI_LOCAL_REF
+ *      -keep object
+ *      -numberOfChecksLimit 4
+ *      -stressTime 180
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_keepRef_rootClass_inMemoryCompilation_keep_cl/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_keepRef_rootClass_inMemoryCompilation_keep_cl/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,71 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/g1/unloading/tests/unloading_keepRef_rootClass_inMemoryCompilation_keep_cl.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent, javac]
+ *
+ * @modules java.base/jdk.internal.misc
+ *          java.base/jdk.internal.org.objectweb.asm
+ * @library /vmTestbase
+ *          /test/lib
+ *
+ * @run driver jdk.test.lib.FileInstaller . .
+ *
+ * @comment generate HumongousTemplateClass and compile it to test.classes
+ * @run driver gc.g1.unloading.bytecode.GenClassesBuilder
+ *
+ * @comment build classPool.jar
+ * @run driver gc.g1.unloading.GenClassesBuilder
+ *
+ * @build sun.hotspot.WhiteBox
+ * @run driver ClassFileInstaller sun.hotspot.WhiteBox
+ *                                sun.hotspot.WhiteBox$WhiteBoxPermission
+ * @run main/othervm
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xbootclasspath/a:classPool.jar
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      gc.g1.unloading.UnloadingTest
+ *      -keepRefMode STATIC_FIELD_OF_ROOT_CLASS
+ *      -inMemoryCompilation
+ *      -keep classloader
+ *      -numberOfChecksLimit 4
+ *      -stressTime 180
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_keepRef_rootClass_inMemoryCompilation_keep_class/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_keepRef_rootClass_inMemoryCompilation_keep_class/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,71 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/g1/unloading/tests/unloading_keepRef_rootClass_inMemoryCompilation_keep_class.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent, javac]
+ *
+ * @modules java.base/jdk.internal.misc
+ *          java.base/jdk.internal.org.objectweb.asm
+ * @library /vmTestbase
+ *          /test/lib
+ *
+ * @run driver jdk.test.lib.FileInstaller . .
+ *
+ * @comment generate HumongousTemplateClass and compile it to test.classes
+ * @run driver gc.g1.unloading.bytecode.GenClassesBuilder
+ *
+ * @comment build classPool.jar
+ * @run driver gc.g1.unloading.GenClassesBuilder
+ *
+ * @build sun.hotspot.WhiteBox
+ * @run driver ClassFileInstaller sun.hotspot.WhiteBox
+ *                                sun.hotspot.WhiteBox$WhiteBoxPermission
+ * @run main/othervm
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xbootclasspath/a:classPool.jar
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      gc.g1.unloading.UnloadingTest
+ *      -keepRefMode STATIC_FIELD_OF_ROOT_CLASS
+ *      -inMemoryCompilation
+ *      -keep class
+ *      -numberOfChecksLimit 4
+ *      -stressTime 180
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_keepRef_rootClass_inMemoryCompilation_keep_obj/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_keepRef_rootClass_inMemoryCompilation_keep_obj/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,71 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/g1/unloading/tests/unloading_keepRef_rootClass_inMemoryCompilation_keep_obj.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent, javac]
+ *
+ * @modules java.base/jdk.internal.misc
+ *          java.base/jdk.internal.org.objectweb.asm
+ * @library /vmTestbase
+ *          /test/lib
+ *
+ * @run driver jdk.test.lib.FileInstaller . .
+ *
+ * @comment generate HumongousTemplateClass and compile it to test.classes
+ * @run driver gc.g1.unloading.bytecode.GenClassesBuilder
+ *
+ * @comment build classPool.jar
+ * @run driver gc.g1.unloading.GenClassesBuilder
+ *
+ * @build sun.hotspot.WhiteBox
+ * @run driver ClassFileInstaller sun.hotspot.WhiteBox
+ *                                sun.hotspot.WhiteBox$WhiteBoxPermission
+ * @run main/othervm
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xbootclasspath/a:classPool.jar
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      gc.g1.unloading.UnloadingTest
+ *      -keepRefMode STATIC_FIELD_OF_ROOT_CLASS
+ *      -inMemoryCompilation
+ *      -keep object
+ *      -numberOfChecksLimit 4
+ *      -stressTime 180
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_keepRef_rootClass_keep_cl/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_keepRef_rootClass_keep_cl/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,70 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/g1/unloading/tests/unloading_keepRef_rootClass_keep_cl.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent, javac]
+ *
+ * @modules java.base/jdk.internal.misc
+ *          java.base/jdk.internal.org.objectweb.asm
+ * @library /vmTestbase
+ *          /test/lib
+ *
+ * @run driver jdk.test.lib.FileInstaller . .
+ *
+ * @comment generate HumongousTemplateClass and compile it to test.classes
+ * @run driver gc.g1.unloading.bytecode.GenClassesBuilder
+ *
+ * @comment build classPool.jar
+ * @run driver gc.g1.unloading.GenClassesBuilder
+ *
+ * @build sun.hotspot.WhiteBox
+ * @run driver ClassFileInstaller sun.hotspot.WhiteBox
+ *                                sun.hotspot.WhiteBox$WhiteBoxPermission
+ * @run main/othervm
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xbootclasspath/a:classPool.jar
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      gc.g1.unloading.UnloadingTest
+ *      -keepRefMode STATIC_FIELD_OF_ROOT_CLASS
+ *      -keep classloader
+ *      -numberOfChecksLimit 4
+ *      -stressTime 180
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_keepRef_rootClass_keep_class/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_keepRef_rootClass_keep_class/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,70 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/g1/unloading/tests/unloading_keepRef_rootClass_keep_class.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent, javac]
+ *
+ * @modules java.base/jdk.internal.misc
+ *          java.base/jdk.internal.org.objectweb.asm
+ * @library /vmTestbase
+ *          /test/lib
+ *
+ * @run driver jdk.test.lib.FileInstaller . .
+ *
+ * @comment generate HumongousTemplateClass and compile it to test.classes
+ * @run driver gc.g1.unloading.bytecode.GenClassesBuilder
+ *
+ * @comment build classPool.jar
+ * @run driver gc.g1.unloading.GenClassesBuilder
+ *
+ * @build sun.hotspot.WhiteBox
+ * @run driver ClassFileInstaller sun.hotspot.WhiteBox
+ *                                sun.hotspot.WhiteBox$WhiteBoxPermission
+ * @run main/othervm
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xbootclasspath/a:classPool.jar
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      gc.g1.unloading.UnloadingTest
+ *      -keepRefMode STATIC_FIELD_OF_ROOT_CLASS
+ *      -keep class
+ *      -numberOfChecksLimit 4
+ *      -stressTime 180
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_keepRef_rootClass_keep_obj/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_keepRef_rootClass_keep_obj/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,70 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/g1/unloading/tests/unloading_keepRef_rootClass_keep_obj.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent, javac]
+ *
+ * @modules java.base/jdk.internal.misc
+ *          java.base/jdk.internal.org.objectweb.asm
+ * @library /vmTestbase
+ *          /test/lib
+ *
+ * @run driver jdk.test.lib.FileInstaller . .
+ *
+ * @comment generate HumongousTemplateClass and compile it to test.classes
+ * @run driver gc.g1.unloading.bytecode.GenClassesBuilder
+ *
+ * @comment build classPool.jar
+ * @run driver gc.g1.unloading.GenClassesBuilder
+ *
+ * @build sun.hotspot.WhiteBox
+ * @run driver ClassFileInstaller sun.hotspot.WhiteBox
+ *                                sun.hotspot.WhiteBox$WhiteBoxPermission
+ * @run main/othervm
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xbootclasspath/a:classPool.jar
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      gc.g1.unloading.UnloadingTest
+ *      -keepRefMode STATIC_FIELD_OF_ROOT_CLASS
+ *      -keep object
+ *      -numberOfChecksLimit 4
+ *      -stressTime 180
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_keepRef_stackLocal_inMemoryCompilation_keep_cl/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_keepRef_stackLocal_inMemoryCompilation_keep_cl/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,66 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/g1/unloading/tests/unloading_keepRef_stackLocal_inMemoryCompilation_keep_cl.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent, javac]
+ *
+ * @modules java.base/jdk.internal.misc
+ * @library /vmTestbase
+ *          /test/lib
+ *
+ * @run driver jdk.test.lib.FileInstaller . .
+ *
+ * @comment generate HumongousTemplateClass and compile it to test.classes
+ * @run driver gc.g1.unloading.bytecode.GenClassesBuilder
+ *
+ * @build sun.hotspot.WhiteBox
+ * @run driver ClassFileInstaller sun.hotspot.WhiteBox
+ *                                sun.hotspot.WhiteBox$WhiteBoxPermission
+ * @run main/othervm
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      gc.g1.unloading.UnloadingTest
+ *      -keepRefMode STACK_LOCAL
+ *      -inMemoryCompilation
+ *      -keep classloader
+ *      -numberOfChecksLimit 4
+ *      -stressTime 180
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_keepRef_stackLocal_inMemoryCompilation_keep_class/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_keepRef_stackLocal_inMemoryCompilation_keep_class/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,66 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/g1/unloading/tests/unloading_keepRef_stackLocal_inMemoryCompilation_keep_class.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent, javac]
+ *
+ * @modules java.base/jdk.internal.misc
+ * @library /vmTestbase
+ *          /test/lib
+ *
+ * @run driver jdk.test.lib.FileInstaller . .
+ *
+ * @comment generate HumongousTemplateClass and compile it to test.classes
+ * @run driver gc.g1.unloading.bytecode.GenClassesBuilder
+ *
+ * @build sun.hotspot.WhiteBox
+ * @run driver ClassFileInstaller sun.hotspot.WhiteBox
+ *                                sun.hotspot.WhiteBox$WhiteBoxPermission
+ * @run main/othervm
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      gc.g1.unloading.UnloadingTest
+ *      -keepRefMode STACK_LOCAL
+ *      -inMemoryCompilation
+ *      -keep class
+ *      -numberOfChecksLimit 4
+ *      -stressTime 180
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_keepRef_stackLocal_inMemoryCompilation_keep_obj/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_keepRef_stackLocal_inMemoryCompilation_keep_obj/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,66 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/g1/unloading/tests/unloading_keepRef_stackLocal_inMemoryCompilation_keep_obj.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent, javac]
+ *
+ * @modules java.base/jdk.internal.misc
+ * @library /vmTestbase
+ *          /test/lib
+ *
+ * @run driver jdk.test.lib.FileInstaller . .
+ *
+ * @comment generate HumongousTemplateClass and compile it to test.classes
+ * @run driver gc.g1.unloading.bytecode.GenClassesBuilder
+ *
+ * @build sun.hotspot.WhiteBox
+ * @run driver ClassFileInstaller sun.hotspot.WhiteBox
+ *                                sun.hotspot.WhiteBox$WhiteBoxPermission
+ * @run main/othervm
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      gc.g1.unloading.UnloadingTest
+ *      -keepRefMode STACK_LOCAL
+ *      -inMemoryCompilation
+ *      -keep object
+ *      -numberOfChecksLimit 4
+ *      -stressTime 180
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_keepRef_stackLocal_keep_cl/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_keepRef_stackLocal_keep_cl/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,65 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/g1/unloading/tests/unloading_keepRef_stackLocal_keep_cl.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent, javac]
+ *
+ * @modules java.base/jdk.internal.misc
+ * @library /vmTestbase
+ *          /test/lib
+ *
+ * @run driver jdk.test.lib.FileInstaller . .
+ *
+ * @comment generate HumongousTemplateClass and compile it to test.classes
+ * @run driver gc.g1.unloading.bytecode.GenClassesBuilder
+ *
+ * @build sun.hotspot.WhiteBox
+ * @run driver ClassFileInstaller sun.hotspot.WhiteBox
+ *                                sun.hotspot.WhiteBox$WhiteBoxPermission
+ * @run main/othervm
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      gc.g1.unloading.UnloadingTest
+ *      -keepRefMode STACK_LOCAL
+ *      -keep classloader
+ *      -numberOfChecksLimit 4
+ *      -stressTime 180
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_keepRef_stackLocal_keep_class/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_keepRef_stackLocal_keep_class/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,65 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/g1/unloading/tests/unloading_keepRef_stackLocal_keep_class.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent, javac]
+ *
+ * @modules java.base/jdk.internal.misc
+ * @library /vmTestbase
+ *          /test/lib
+ *
+ * @run driver jdk.test.lib.FileInstaller . .
+ *
+ * @comment generate HumongousTemplateClass and compile it to test.classes
+ * @run driver gc.g1.unloading.bytecode.GenClassesBuilder
+ *
+ * @build sun.hotspot.WhiteBox
+ * @run driver ClassFileInstaller sun.hotspot.WhiteBox
+ *                                sun.hotspot.WhiteBox$WhiteBoxPermission
+ * @run main/othervm
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      gc.g1.unloading.UnloadingTest
+ *      -keepRefMode STACK_LOCAL
+ *      -keep class
+ *      -numberOfChecksLimit 4
+ *      -stressTime 180
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_keepRef_stackLocal_keep_obj/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_keepRef_stackLocal_keep_obj/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,65 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/g1/unloading/tests/unloading_keepRef_stackLocal_keep_obj.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent, javac]
+ *
+ * @modules java.base/jdk.internal.misc
+ * @library /vmTestbase
+ *          /test/lib
+ *
+ * @run driver jdk.test.lib.FileInstaller . .
+ *
+ * @comment generate HumongousTemplateClass and compile it to test.classes
+ * @run driver gc.g1.unloading.bytecode.GenClassesBuilder
+ *
+ * @build sun.hotspot.WhiteBox
+ * @run driver ClassFileInstaller sun.hotspot.WhiteBox
+ *                                sun.hotspot.WhiteBox$WhiteBoxPermission
+ * @run main/othervm
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      gc.g1.unloading.UnloadingTest
+ *      -keepRefMode STACK_LOCAL
+ *      -keep object
+ *      -numberOfChecksLimit 4
+ *      -stressTime 180
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_keepRef_staticField_inMemoryCompilation_keep_cl/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_keepRef_staticField_inMemoryCompilation_keep_cl/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,66 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/g1/unloading/tests/unloading_keepRef_staticField_inMemoryCompilation_keep_cl.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent, javac]
+ *
+ * @modules java.base/jdk.internal.misc
+ * @library /vmTestbase
+ *          /test/lib
+ *
+ * @run driver jdk.test.lib.FileInstaller . .
+ *
+ * @comment generate HumongousTemplateClass and compile it to test.classes
+ * @run driver gc.g1.unloading.bytecode.GenClassesBuilder
+ *
+ * @build sun.hotspot.WhiteBox
+ * @run driver ClassFileInstaller sun.hotspot.WhiteBox
+ *                                sun.hotspot.WhiteBox$WhiteBoxPermission
+ * @run main/othervm
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      gc.g1.unloading.UnloadingTest
+ *      -keepRefMode STATIC_FIELD
+ *      -inMemoryCompilation
+ *      -keep classloader
+ *      -numberOfChecksLimit 4
+ *      -stressTime 180
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_keepRef_staticField_inMemoryCompilation_keep_class/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_keepRef_staticField_inMemoryCompilation_keep_class/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,66 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/g1/unloading/tests/unloading_keepRef_staticField_inMemoryCompilation_keep_class.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent, javac]
+ *
+ * @modules java.base/jdk.internal.misc
+ * @library /vmTestbase
+ *          /test/lib
+ *
+ * @run driver jdk.test.lib.FileInstaller . .
+ *
+ * @comment generate HumongousTemplateClass and compile it to test.classes
+ * @run driver gc.g1.unloading.bytecode.GenClassesBuilder
+ *
+ * @build sun.hotspot.WhiteBox
+ * @run driver ClassFileInstaller sun.hotspot.WhiteBox
+ *                                sun.hotspot.WhiteBox$WhiteBoxPermission
+ * @run main/othervm
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      gc.g1.unloading.UnloadingTest
+ *      -keepRefMode STATIC_FIELD
+ *      -inMemoryCompilation
+ *      -keep class
+ *      -numberOfChecksLimit 4
+ *      -stressTime 180
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_keepRef_staticField_inMemoryCompilation_keep_obj/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_keepRef_staticField_inMemoryCompilation_keep_obj/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,66 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/g1/unloading/tests/unloading_keepRef_staticField_inMemoryCompilation_keep_obj.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent, javac]
+ *
+ * @modules java.base/jdk.internal.misc
+ * @library /vmTestbase
+ *          /test/lib
+ *
+ * @run driver jdk.test.lib.FileInstaller . .
+ *
+ * @comment generate HumongousTemplateClass and compile it to test.classes
+ * @run driver gc.g1.unloading.bytecode.GenClassesBuilder
+ *
+ * @build sun.hotspot.WhiteBox
+ * @run driver ClassFileInstaller sun.hotspot.WhiteBox
+ *                                sun.hotspot.WhiteBox$WhiteBoxPermission
+ * @run main/othervm
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      gc.g1.unloading.UnloadingTest
+ *      -keepRefMode STATIC_FIELD
+ *      -inMemoryCompilation
+ *      -keep object
+ *      -numberOfChecksLimit 4
+ *      -stressTime 180
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_keepRef_staticField_keep_cl/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_keepRef_staticField_keep_cl/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,65 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/g1/unloading/tests/unloading_keepRef_staticField_keep_cl.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent, javac]
+ *
+ * @modules java.base/jdk.internal.misc
+ * @library /vmTestbase
+ *          /test/lib
+ *
+ * @run driver jdk.test.lib.FileInstaller . .
+ *
+ * @comment generate HumongousTemplateClass and compile it to test.classes
+ * @run driver gc.g1.unloading.bytecode.GenClassesBuilder
+ *
+ * @build sun.hotspot.WhiteBox
+ * @run driver ClassFileInstaller sun.hotspot.WhiteBox
+ *                                sun.hotspot.WhiteBox$WhiteBoxPermission
+ * @run main/othervm
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      gc.g1.unloading.UnloadingTest
+ *      -keepRefMode STATIC_FIELD
+ *      -keep classloader
+ *      -numberOfChecksLimit 4
+ *      -stressTime 180
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_keepRef_staticField_keep_class/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_keepRef_staticField_keep_class/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,65 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/g1/unloading/tests/unloading_keepRef_staticField_keep_class.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent, javac]
+ *
+ * @modules java.base/jdk.internal.misc
+ * @library /vmTestbase
+ *          /test/lib
+ *
+ * @run driver jdk.test.lib.FileInstaller . .
+ *
+ * @comment generate HumongousTemplateClass and compile it to test.classes
+ * @run driver gc.g1.unloading.bytecode.GenClassesBuilder
+ *
+ * @build sun.hotspot.WhiteBox
+ * @run driver ClassFileInstaller sun.hotspot.WhiteBox
+ *                                sun.hotspot.WhiteBox$WhiteBoxPermission
+ * @run main/othervm
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      gc.g1.unloading.UnloadingTest
+ *      -keepRefMode STATIC_FIELD
+ *      -keep class
+ *      -numberOfChecksLimit 4
+ *      -stressTime 180
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_keepRef_staticField_keep_obj/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_keepRef_staticField_keep_obj/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,65 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/g1/unloading/tests/unloading_keepRef_staticField_keep_obj.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent, javac]
+ *
+ * @modules java.base/jdk.internal.misc
+ * @library /vmTestbase
+ *          /test/lib
+ *
+ * @run driver jdk.test.lib.FileInstaller . .
+ *
+ * @comment generate HumongousTemplateClass and compile it to test.classes
+ * @run driver gc.g1.unloading.bytecode.GenClassesBuilder
+ *
+ * @build sun.hotspot.WhiteBox
+ * @run driver ClassFileInstaller sun.hotspot.WhiteBox
+ *                                sun.hotspot.WhiteBox$WhiteBoxPermission
+ * @run main/othervm
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      gc.g1.unloading.UnloadingTest
+ *      -keepRefMode STATIC_FIELD
+ *      -keep object
+ *      -numberOfChecksLimit 4
+ *      -stressTime 180
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_keepRef_strongRef_inMemoryCompilation_keep_cl/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_keepRef_strongRef_inMemoryCompilation_keep_cl/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,66 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/g1/unloading/tests/unloading_keepRef_strongRef_inMemoryCompilation_keep_cl.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent, javac]
+ *
+ * @modules java.base/jdk.internal.misc
+ * @library /vmTestbase
+ *          /test/lib
+ *
+ * @run driver jdk.test.lib.FileInstaller . .
+ *
+ * @comment generate HumongousTemplateClass and compile it to test.classes
+ * @run driver gc.g1.unloading.bytecode.GenClassesBuilder
+ *
+ * @build sun.hotspot.WhiteBox
+ * @run driver ClassFileInstaller sun.hotspot.WhiteBox
+ *                                sun.hotspot.WhiteBox$WhiteBoxPermission
+ * @run main/othervm
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      gc.g1.unloading.UnloadingTest
+ *      -keepRefMode STRONG_REFERENCE
+ *      -inMemoryCompilation
+ *      -keep classloader
+ *      -numberOfChecksLimit 4
+ *      -stressTime 180
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_keepRef_strongRef_inMemoryCompilation_keep_class/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_keepRef_strongRef_inMemoryCompilation_keep_class/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,66 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/g1/unloading/tests/unloading_keepRef_strongRef_inMemoryCompilation_keep_class.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent, javac]
+ *
+ * @modules java.base/jdk.internal.misc
+ * @library /vmTestbase
+ *          /test/lib
+ *
+ * @run driver jdk.test.lib.FileInstaller . .
+ *
+ * @comment generate HumongousTemplateClass and compile it to test.classes
+ * @run driver gc.g1.unloading.bytecode.GenClassesBuilder
+ *
+ * @build sun.hotspot.WhiteBox
+ * @run driver ClassFileInstaller sun.hotspot.WhiteBox
+ *                                sun.hotspot.WhiteBox$WhiteBoxPermission
+ * @run main/othervm
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      gc.g1.unloading.UnloadingTest
+ *      -keepRefMode STRONG_REFERENCE
+ *      -inMemoryCompilation
+ *      -keep class
+ *      -numberOfChecksLimit 4
+ *      -stressTime 180
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_keepRef_strongRef_inMemoryCompilation_keep_obj/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_keepRef_strongRef_inMemoryCompilation_keep_obj/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,66 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/g1/unloading/tests/unloading_keepRef_strongRef_inMemoryCompilation_keep_obj.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent, javac]
+ *
+ * @modules java.base/jdk.internal.misc
+ * @library /vmTestbase
+ *          /test/lib
+ *
+ * @run driver jdk.test.lib.FileInstaller . .
+ *
+ * @comment generate HumongousTemplateClass and compile it to test.classes
+ * @run driver gc.g1.unloading.bytecode.GenClassesBuilder
+ *
+ * @build sun.hotspot.WhiteBox
+ * @run driver ClassFileInstaller sun.hotspot.WhiteBox
+ *                                sun.hotspot.WhiteBox$WhiteBoxPermission
+ * @run main/othervm
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      gc.g1.unloading.UnloadingTest
+ *      -keepRefMode STRONG_REFERENCE
+ *      -inMemoryCompilation
+ *      -keep object
+ *      -numberOfChecksLimit 4
+ *      -stressTime 180
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_keepRef_strongRef_keep_cl/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_keepRef_strongRef_keep_cl/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,65 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/g1/unloading/tests/unloading_keepRef_strongRef_keep_cl.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent, javac]
+ *
+ * @modules java.base/jdk.internal.misc
+ * @library /vmTestbase
+ *          /test/lib
+ *
+ * @run driver jdk.test.lib.FileInstaller . .
+ *
+ * @comment generate HumongousTemplateClass and compile it to test.classes
+ * @run driver gc.g1.unloading.bytecode.GenClassesBuilder
+ *
+ * @build sun.hotspot.WhiteBox
+ * @run driver ClassFileInstaller sun.hotspot.WhiteBox
+ *                                sun.hotspot.WhiteBox$WhiteBoxPermission
+ * @run main/othervm
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      gc.g1.unloading.UnloadingTest
+ *      -keepRefMode STRONG_REFERENCE
+ *      -keep classloader
+ *      -numberOfChecksLimit 4
+ *      -stressTime 180
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_keepRef_strongRef_keep_class/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_keepRef_strongRef_keep_class/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,65 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/g1/unloading/tests/unloading_keepRef_strongRef_keep_class.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent, javac]
+ *
+ * @modules java.base/jdk.internal.misc
+ * @library /vmTestbase
+ *          /test/lib
+ *
+ * @run driver jdk.test.lib.FileInstaller . .
+ *
+ * @comment generate HumongousTemplateClass and compile it to test.classes
+ * @run driver gc.g1.unloading.bytecode.GenClassesBuilder
+ *
+ * @build sun.hotspot.WhiteBox
+ * @run driver ClassFileInstaller sun.hotspot.WhiteBox
+ *                                sun.hotspot.WhiteBox$WhiteBoxPermission
+ * @run main/othervm
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      gc.g1.unloading.UnloadingTest
+ *      -keepRefMode STRONG_REFERENCE
+ *      -keep class
+ *      -numberOfChecksLimit 4
+ *      -stressTime 180
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_keepRef_strongRef_keep_obj/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_keepRef_strongRef_keep_obj/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,65 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/g1/unloading/tests/unloading_keepRef_strongRef_keep_obj.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent, javac]
+ *
+ * @modules java.base/jdk.internal.misc
+ * @library /vmTestbase
+ *          /test/lib
+ *
+ * @run driver jdk.test.lib.FileInstaller . .
+ *
+ * @comment generate HumongousTemplateClass and compile it to test.classes
+ * @run driver gc.g1.unloading.bytecode.GenClassesBuilder
+ *
+ * @build sun.hotspot.WhiteBox
+ * @run driver ClassFileInstaller sun.hotspot.WhiteBox
+ *                                sun.hotspot.WhiteBox$WhiteBoxPermission
+ * @run main/othervm
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      gc.g1.unloading.UnloadingTest
+ *      -keepRefMode STRONG_REFERENCE
+ *      -keep object
+ *      -numberOfChecksLimit 4
+ *      -stressTime 180
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_keepRef_threadItself_inMemoryCompilation_keep_cl/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_keepRef_threadItself_inMemoryCompilation_keep_cl/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,66 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/g1/unloading/tests/unloading_keepRef_threadItself_inMemoryCompilation_keep_cl.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent, javac]
+ *
+ * @modules java.base/jdk.internal.misc
+ * @library /vmTestbase
+ *          /test/lib
+ *
+ * @run driver jdk.test.lib.FileInstaller . .
+ *
+ * @comment generate HumongousTemplateClass and compile it to test.classes
+ * @run driver gc.g1.unloading.bytecode.GenClassesBuilder
+ *
+ * @build sun.hotspot.WhiteBox
+ * @run driver ClassFileInstaller sun.hotspot.WhiteBox
+ *                                sun.hotspot.WhiteBox$WhiteBoxPermission
+ * @run main/othervm
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      gc.g1.unloading.UnloadingTest
+ *      -keepRefMode THREAD_ITSELF
+ *      -inMemoryCompilation
+ *      -keep classloader
+ *      -numberOfChecksLimit 4
+ *      -stressTime 180
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_keepRef_threadItself_inMemoryCompilation_keep_class/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_keepRef_threadItself_inMemoryCompilation_keep_class/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,66 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/g1/unloading/tests/unloading_keepRef_threadItself_inMemoryCompilation_keep_class.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent, javac]
+ *
+ * @modules java.base/jdk.internal.misc
+ * @library /vmTestbase
+ *          /test/lib
+ *
+ * @run driver jdk.test.lib.FileInstaller . .
+ *
+ * @comment generate HumongousTemplateClass and compile it to test.classes
+ * @run driver gc.g1.unloading.bytecode.GenClassesBuilder
+ *
+ * @build sun.hotspot.WhiteBox
+ * @run driver ClassFileInstaller sun.hotspot.WhiteBox
+ *                                sun.hotspot.WhiteBox$WhiteBoxPermission
+ * @run main/othervm
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      gc.g1.unloading.UnloadingTest
+ *      -keepRefMode THREAD_ITSELF
+ *      -inMemoryCompilation
+ *      -keep class
+ *      -numberOfChecksLimit 4
+ *      -stressTime 180
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_keepRef_threadItself_inMemoryCompilation_keep_obj/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_keepRef_threadItself_inMemoryCompilation_keep_obj/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,66 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/g1/unloading/tests/unloading_keepRef_threadItself_inMemoryCompilation_keep_obj.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent, javac]
+ *
+ * @modules java.base/jdk.internal.misc
+ * @library /vmTestbase
+ *          /test/lib
+ *
+ * @run driver jdk.test.lib.FileInstaller . .
+ *
+ * @comment generate HumongousTemplateClass and compile it to test.classes
+ * @run driver gc.g1.unloading.bytecode.GenClassesBuilder
+ *
+ * @build sun.hotspot.WhiteBox
+ * @run driver ClassFileInstaller sun.hotspot.WhiteBox
+ *                                sun.hotspot.WhiteBox$WhiteBoxPermission
+ * @run main/othervm
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      gc.g1.unloading.UnloadingTest
+ *      -keepRefMode THREAD_ITSELF
+ *      -inMemoryCompilation
+ *      -keep object
+ *      -numberOfChecksLimit 4
+ *      -stressTime 180
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_keepRef_threadItself_keep_cl/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_keepRef_threadItself_keep_cl/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,65 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/g1/unloading/tests/unloading_keepRef_threadItself_keep_cl.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent, javac]
+ *
+ * @modules java.base/jdk.internal.misc
+ * @library /vmTestbase
+ *          /test/lib
+ *
+ * @run driver jdk.test.lib.FileInstaller . .
+ *
+ * @comment generate HumongousTemplateClass and compile it to test.classes
+ * @run driver gc.g1.unloading.bytecode.GenClassesBuilder
+ *
+ * @build sun.hotspot.WhiteBox
+ * @run driver ClassFileInstaller sun.hotspot.WhiteBox
+ *                                sun.hotspot.WhiteBox$WhiteBoxPermission
+ * @run main/othervm
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      gc.g1.unloading.UnloadingTest
+ *      -keepRefMode THREAD_ITSELF
+ *      -keep classloader
+ *      -numberOfChecksLimit 4
+ *      -stressTime 180
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_keepRef_threadItself_keep_class/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_keepRef_threadItself_keep_class/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,65 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/g1/unloading/tests/unloading_keepRef_threadItself_keep_class.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent, javac]
+ *
+ * @modules java.base/jdk.internal.misc
+ * @library /vmTestbase
+ *          /test/lib
+ *
+ * @run driver jdk.test.lib.FileInstaller . .
+ *
+ * @comment generate HumongousTemplateClass and compile it to test.classes
+ * @run driver gc.g1.unloading.bytecode.GenClassesBuilder
+ *
+ * @build sun.hotspot.WhiteBox
+ * @run driver ClassFileInstaller sun.hotspot.WhiteBox
+ *                                sun.hotspot.WhiteBox$WhiteBoxPermission
+ * @run main/othervm
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      gc.g1.unloading.UnloadingTest
+ *      -keepRefMode THREAD_ITSELF
+ *      -keep class
+ *      -numberOfChecksLimit 4
+ *      -stressTime 180
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_keepRef_threadItself_keep_obj/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_keepRef_threadItself_keep_obj/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,65 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/g1/unloading/tests/unloading_keepRef_threadItself_keep_obj.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent, javac]
+ *
+ * @modules java.base/jdk.internal.misc
+ * @library /vmTestbase
+ *          /test/lib
+ *
+ * @run driver jdk.test.lib.FileInstaller . .
+ *
+ * @comment generate HumongousTemplateClass and compile it to test.classes
+ * @run driver gc.g1.unloading.bytecode.GenClassesBuilder
+ *
+ * @build sun.hotspot.WhiteBox
+ * @run driver ClassFileInstaller sun.hotspot.WhiteBox
+ *                                sun.hotspot.WhiteBox$WhiteBoxPermission
+ * @run main/othervm
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      gc.g1.unloading.UnloadingTest
+ *      -keepRefMode THREAD_ITSELF
+ *      -keep object
+ *      -numberOfChecksLimit 4
+ *      -stressTime 180
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_phantom_ref_inMemoryCompilation_keep_cl/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_phantom_ref_inMemoryCompilation_keep_cl/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,66 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/g1/unloading/tests/unloading_phantom_ref_inMemoryCompilation_keep_cl.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent, javac]
+ *
+ * @modules java.base/jdk.internal.misc
+ * @library /vmTestbase
+ *          /test/lib
+ *
+ * @run driver jdk.test.lib.FileInstaller . .
+ *
+ * @comment generate HumongousTemplateClass and compile it to test.classes
+ * @run driver gc.g1.unloading.bytecode.GenClassesBuilder
+ *
+ * @build sun.hotspot.WhiteBox
+ * @run driver ClassFileInstaller sun.hotspot.WhiteBox
+ *                                sun.hotspot.WhiteBox$WhiteBoxPermission
+ * @run main/othervm
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      gc.g1.unloading.UnloadingTest
+ *      -referenceMode phantom
+ *      -inMemoryCompilation
+ *      -keep classloader
+ *      -numberOfChecksLimit 4
+ *      -stressTime 180
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_phantom_ref_inMemoryCompilation_keep_class/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_phantom_ref_inMemoryCompilation_keep_class/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,66 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/g1/unloading/tests/unloading_phantom_ref_inMemoryCompilation_keep_class.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent, javac]
+ *
+ * @modules java.base/jdk.internal.misc
+ * @library /vmTestbase
+ *          /test/lib
+ *
+ * @run driver jdk.test.lib.FileInstaller . .
+ *
+ * @comment generate HumongousTemplateClass and compile it to test.classes
+ * @run driver gc.g1.unloading.bytecode.GenClassesBuilder
+ *
+ * @build sun.hotspot.WhiteBox
+ * @run driver ClassFileInstaller sun.hotspot.WhiteBox
+ *                                sun.hotspot.WhiteBox$WhiteBoxPermission
+ * @run main/othervm
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      gc.g1.unloading.UnloadingTest
+ *      -referenceMode phantom
+ *      -inMemoryCompilation
+ *      -keep class
+ *      -numberOfChecksLimit 4
+ *      -stressTime 180
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_phantom_ref_inMemoryCompilation_keep_obj/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_phantom_ref_inMemoryCompilation_keep_obj/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,66 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/g1/unloading/tests/unloading_phantom_ref_inMemoryCompilation_keep_obj.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent, javac]
+ *
+ * @modules java.base/jdk.internal.misc
+ * @library /vmTestbase
+ *          /test/lib
+ *
+ * @run driver jdk.test.lib.FileInstaller . .
+ *
+ * @comment generate HumongousTemplateClass and compile it to test.classes
+ * @run driver gc.g1.unloading.bytecode.GenClassesBuilder
+ *
+ * @build sun.hotspot.WhiteBox
+ * @run driver ClassFileInstaller sun.hotspot.WhiteBox
+ *                                sun.hotspot.WhiteBox$WhiteBoxPermission
+ * @run main/othervm
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      gc.g1.unloading.UnloadingTest
+ *      -referenceMode phantom
+ *      -inMemoryCompilation
+ *      -keep object
+ *      -numberOfChecksLimit 4
+ *      -stressTime 180
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_phantom_ref_keep_cl/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_phantom_ref_keep_cl/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,65 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/g1/unloading/tests/unloading_phantom_ref_keep_cl.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent, javac]
+ *
+ * @modules java.base/jdk.internal.misc
+ * @library /vmTestbase
+ *          /test/lib
+ *
+ * @run driver jdk.test.lib.FileInstaller . .
+ *
+ * @comment generate HumongousTemplateClass and compile it to test.classes
+ * @run driver gc.g1.unloading.bytecode.GenClassesBuilder
+ *
+ * @build sun.hotspot.WhiteBox
+ * @run driver ClassFileInstaller sun.hotspot.WhiteBox
+ *                                sun.hotspot.WhiteBox$WhiteBoxPermission
+ * @run main/othervm
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      gc.g1.unloading.UnloadingTest
+ *      -referenceMode phantom
+ *      -keep classloader
+ *      -numberOfChecksLimit 4
+ *      -stressTime 180
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_phantom_ref_keep_class/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_phantom_ref_keep_class/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,65 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/g1/unloading/tests/unloading_phantom_ref_keep_class.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent, javac]
+ *
+ * @modules java.base/jdk.internal.misc
+ * @library /vmTestbase
+ *          /test/lib
+ *
+ * @run driver jdk.test.lib.FileInstaller . .
+ *
+ * @comment generate HumongousTemplateClass and compile it to test.classes
+ * @run driver gc.g1.unloading.bytecode.GenClassesBuilder
+ *
+ * @build sun.hotspot.WhiteBox
+ * @run driver ClassFileInstaller sun.hotspot.WhiteBox
+ *                                sun.hotspot.WhiteBox$WhiteBoxPermission
+ * @run main/othervm
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      gc.g1.unloading.UnloadingTest
+ *      -referenceMode phantom
+ *      -keep class
+ *      -numberOfChecksLimit 4
+ *      -stressTime 180
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_phantom_ref_keep_obj/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_phantom_ref_keep_obj/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,65 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/g1/unloading/tests/unloading_phantom_ref_keep_obj.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent, javac]
+ *
+ * @modules java.base/jdk.internal.misc
+ * @library /vmTestbase
+ *          /test/lib
+ *
+ * @run driver jdk.test.lib.FileInstaller . .
+ *
+ * @comment generate HumongousTemplateClass and compile it to test.classes
+ * @run driver gc.g1.unloading.bytecode.GenClassesBuilder
+ *
+ * @build sun.hotspot.WhiteBox
+ * @run driver ClassFileInstaller sun.hotspot.WhiteBox
+ *                                sun.hotspot.WhiteBox$WhiteBoxPermission
+ * @run main/othervm
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      gc.g1.unloading.UnloadingTest
+ *      -referenceMode phantom
+ *      -keep object
+ *      -numberOfChecksLimit 4
+ *      -stressTime 180
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_prot_domains_inMemoryCompilation_keep_cl/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_prot_domains_inMemoryCompilation_keep_cl/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,66 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/g1/unloading/tests/unloading_prot_domains_inMemoryCompilation_keep_cl.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent, javac]
+ *
+ * @modules java.base/jdk.internal.misc
+ * @library /vmTestbase
+ *          /test/lib
+ *
+ * @run driver jdk.test.lib.FileInstaller . .
+ *
+ * @comment generate HumongousTemplateClass and compile it to test.classes
+ * @run driver gc.g1.unloading.bytecode.GenClassesBuilder
+ *
+ * @build sun.hotspot.WhiteBox
+ * @run driver ClassFileInstaller sun.hotspot.WhiteBox
+ *                                sun.hotspot.WhiteBox$WhiteBoxPermission
+ * @run main/othervm
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      gc.g1.unloading.UnloadingTest
+ *      -classloadingMethod plain
+ *      -inMemoryCompilation
+ *      -keep classloader
+ *      -numberOfChecksLimit 4
+ *      -stressTime 180
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_prot_domains_inMemoryCompilation_keep_class/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_prot_domains_inMemoryCompilation_keep_class/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,66 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/g1/unloading/tests/unloading_prot_domains_inMemoryCompilation_keep_class.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent, javac]
+ *
+ * @modules java.base/jdk.internal.misc
+ * @library /vmTestbase
+ *          /test/lib
+ *
+ * @run driver jdk.test.lib.FileInstaller . .
+ *
+ * @comment generate HumongousTemplateClass and compile it to test.classes
+ * @run driver gc.g1.unloading.bytecode.GenClassesBuilder
+ *
+ * @build sun.hotspot.WhiteBox
+ * @run driver ClassFileInstaller sun.hotspot.WhiteBox
+ *                                sun.hotspot.WhiteBox$WhiteBoxPermission
+ * @run main/othervm
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      gc.g1.unloading.UnloadingTest
+ *      -classloadingMethod plain
+ *      -inMemoryCompilation
+ *      -keep class
+ *      -numberOfChecksLimit 4
+ *      -stressTime 180
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_prot_domains_inMemoryCompilation_keep_obj/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_prot_domains_inMemoryCompilation_keep_obj/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,66 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/g1/unloading/tests/unloading_prot_domains_inMemoryCompilation_keep_obj.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent, javac]
+ *
+ * @modules java.base/jdk.internal.misc
+ * @library /vmTestbase
+ *          /test/lib
+ *
+ * @run driver jdk.test.lib.FileInstaller . .
+ *
+ * @comment generate HumongousTemplateClass and compile it to test.classes
+ * @run driver gc.g1.unloading.bytecode.GenClassesBuilder
+ *
+ * @build sun.hotspot.WhiteBox
+ * @run driver ClassFileInstaller sun.hotspot.WhiteBox
+ *                                sun.hotspot.WhiteBox$WhiteBoxPermission
+ * @run main/othervm
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      gc.g1.unloading.UnloadingTest
+ *      -classloadingMethod plain
+ *      -inMemoryCompilation
+ *      -keep object
+ *      -numberOfChecksLimit 4
+ *      -stressTime 180
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_prot_domains_keep_cl/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_prot_domains_keep_cl/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,65 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/g1/unloading/tests/unloading_prot_domains_keep_cl.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent, javac]
+ *
+ * @modules java.base/jdk.internal.misc
+ * @library /vmTestbase
+ *          /test/lib
+ *
+ * @run driver jdk.test.lib.FileInstaller . .
+ *
+ * @comment generate HumongousTemplateClass and compile it to test.classes
+ * @run driver gc.g1.unloading.bytecode.GenClassesBuilder
+ *
+ * @build sun.hotspot.WhiteBox
+ * @run driver ClassFileInstaller sun.hotspot.WhiteBox
+ *                                sun.hotspot.WhiteBox$WhiteBoxPermission
+ * @run main/othervm
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      gc.g1.unloading.UnloadingTest
+ *      -classloadingMethod plain
+ *      -keep classloader
+ *      -numberOfChecksLimit 4
+ *      -stressTime 180
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_prot_domains_keep_class/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_prot_domains_keep_class/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,65 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/g1/unloading/tests/unloading_prot_domains_keep_class.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent, javac]
+ *
+ * @modules java.base/jdk.internal.misc
+ * @library /vmTestbase
+ *          /test/lib
+ *
+ * @run driver jdk.test.lib.FileInstaller . .
+ *
+ * @comment generate HumongousTemplateClass and compile it to test.classes
+ * @run driver gc.g1.unloading.bytecode.GenClassesBuilder
+ *
+ * @build sun.hotspot.WhiteBox
+ * @run driver ClassFileInstaller sun.hotspot.WhiteBox
+ *                                sun.hotspot.WhiteBox$WhiteBoxPermission
+ * @run main/othervm
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      gc.g1.unloading.UnloadingTest
+ *      -classloadingMethod plain
+ *      -keep class
+ *      -numberOfChecksLimit 4
+ *      -stressTime 180
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_prot_domains_keep_obj/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_prot_domains_keep_obj/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,65 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/g1/unloading/tests/unloading_prot_domains_keep_obj.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent, javac]
+ *
+ * @modules java.base/jdk.internal.misc
+ * @library /vmTestbase
+ *          /test/lib
+ *
+ * @run driver jdk.test.lib.FileInstaller . .
+ *
+ * @comment generate HumongousTemplateClass and compile it to test.classes
+ * @run driver gc.g1.unloading.bytecode.GenClassesBuilder
+ *
+ * @build sun.hotspot.WhiteBox
+ * @run driver ClassFileInstaller sun.hotspot.WhiteBox
+ *                                sun.hotspot.WhiteBox$WhiteBoxPermission
+ * @run main/othervm
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      gc.g1.unloading.UnloadingTest
+ *      -classloadingMethod plain
+ *      -keep object
+ *      -numberOfChecksLimit 4
+ *      -stressTime 180
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_redefinition_inMemoryCompilation_keep_cl/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_redefinition_inMemoryCompilation_keep_cl/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,66 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/g1/unloading/tests/unloading_redefinition_inMemoryCompilation_keep_cl.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent, javac]
+ *
+ * @modules java.base/jdk.internal.misc
+ * @library /vmTestbase
+ *          /test/lib
+ *
+ * @run driver jdk.test.lib.FileInstaller . .
+ *
+ * @comment generate HumongousTemplateClass and compile it to test.classes
+ * @run driver gc.g1.unloading.bytecode.GenClassesBuilder
+ *
+ * @build sun.hotspot.WhiteBox
+ * @run driver ClassFileInstaller sun.hotspot.WhiteBox
+ *                                sun.hotspot.WhiteBox$WhiteBoxPermission
+ * @run main/othervm
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      gc.g1.unloading.UnloadingTest
+ *      -redefineClasses
+ *      -inMemoryCompilation
+ *      -keep classloader
+ *      -numberOfChecksLimit 4
+ *      -stressTime 180
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_redefinition_inMemoryCompilation_keep_class/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_redefinition_inMemoryCompilation_keep_class/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,66 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/g1/unloading/tests/unloading_redefinition_inMemoryCompilation_keep_class.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent, javac]
+ *
+ * @modules java.base/jdk.internal.misc
+ * @library /vmTestbase
+ *          /test/lib
+ *
+ * @run driver jdk.test.lib.FileInstaller . .
+ *
+ * @comment generate HumongousTemplateClass and compile it to test.classes
+ * @run driver gc.g1.unloading.bytecode.GenClassesBuilder
+ *
+ * @build sun.hotspot.WhiteBox
+ * @run driver ClassFileInstaller sun.hotspot.WhiteBox
+ *                                sun.hotspot.WhiteBox$WhiteBoxPermission
+ * @run main/othervm
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      gc.g1.unloading.UnloadingTest
+ *      -redefineClasses
+ *      -inMemoryCompilation
+ *      -keep class
+ *      -numberOfChecksLimit 4
+ *      -stressTime 180
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_redefinition_inMemoryCompilation_keep_obj/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_redefinition_inMemoryCompilation_keep_obj/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,66 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/g1/unloading/tests/unloading_redefinition_inMemoryCompilation_keep_obj.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent, javac]
+ *
+ * @modules java.base/jdk.internal.misc
+ * @library /vmTestbase
+ *          /test/lib
+ *
+ * @run driver jdk.test.lib.FileInstaller . .
+ *
+ * @comment generate HumongousTemplateClass and compile it to test.classes
+ * @run driver gc.g1.unloading.bytecode.GenClassesBuilder
+ *
+ * @build sun.hotspot.WhiteBox
+ * @run driver ClassFileInstaller sun.hotspot.WhiteBox
+ *                                sun.hotspot.WhiteBox$WhiteBoxPermission
+ * @run main/othervm
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      gc.g1.unloading.UnloadingTest
+ *      -redefineClasses
+ *      -inMemoryCompilation
+ *      -keep object
+ *      -numberOfChecksLimit 4
+ *      -stressTime 180
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_redefinition_keep_cl/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_redefinition_keep_cl/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,65 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/g1/unloading/tests/unloading_redefinition_keep_cl.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent, javac]
+ *
+ * @modules java.base/jdk.internal.misc
+ * @library /vmTestbase
+ *          /test/lib
+ *
+ * @run driver jdk.test.lib.FileInstaller . .
+ *
+ * @comment generate HumongousTemplateClass and compile it to test.classes
+ * @run driver gc.g1.unloading.bytecode.GenClassesBuilder
+ *
+ * @build sun.hotspot.WhiteBox
+ * @run driver ClassFileInstaller sun.hotspot.WhiteBox
+ *                                sun.hotspot.WhiteBox$WhiteBoxPermission
+ * @run main/othervm
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      gc.g1.unloading.UnloadingTest
+ *      -redefineClasses
+ *      -keep classloader
+ *      -numberOfChecksLimit 4
+ *      -stressTime 180
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_redefinition_keep_class/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_redefinition_keep_class/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,65 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/g1/unloading/tests/unloading_redefinition_keep_class.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent, javac]
+ *
+ * @modules java.base/jdk.internal.misc
+ * @library /vmTestbase
+ *          /test/lib
+ *
+ * @run driver jdk.test.lib.FileInstaller . .
+ *
+ * @comment generate HumongousTemplateClass and compile it to test.classes
+ * @run driver gc.g1.unloading.bytecode.GenClassesBuilder
+ *
+ * @build sun.hotspot.WhiteBox
+ * @run driver ClassFileInstaller sun.hotspot.WhiteBox
+ *                                sun.hotspot.WhiteBox$WhiteBoxPermission
+ * @run main/othervm
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      gc.g1.unloading.UnloadingTest
+ *      -redefineClasses
+ *      -keep class
+ *      -numberOfChecksLimit 4
+ *      -stressTime 180
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_redefinition_keep_obj/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_redefinition_keep_obj/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,65 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/g1/unloading/tests/unloading_redefinition_keep_obj.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent, javac]
+ *
+ * @modules java.base/jdk.internal.misc
+ * @library /vmTestbase
+ *          /test/lib
+ *
+ * @run driver jdk.test.lib.FileInstaller . .
+ *
+ * @comment generate HumongousTemplateClass and compile it to test.classes
+ * @run driver gc.g1.unloading.bytecode.GenClassesBuilder
+ *
+ * @build sun.hotspot.WhiteBox
+ * @run driver ClassFileInstaller sun.hotspot.WhiteBox
+ *                                sun.hotspot.WhiteBox$WhiteBoxPermission
+ * @run main/othervm
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      gc.g1.unloading.UnloadingTest
+ *      -redefineClasses
+ *      -keep object
+ *      -numberOfChecksLimit 4
+ *      -stressTime 180
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_reflection_classloading_inMemoryCompilation_keep_cl/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_reflection_classloading_inMemoryCompilation_keep_cl/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,66 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/g1/unloading/tests/unloading_reflection_classloading_inMemoryCompilation_keep_cl.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent, javac]
+ *
+ * @modules java.base/jdk.internal.misc
+ * @library /vmTestbase
+ *          /test/lib
+ *
+ * @run driver jdk.test.lib.FileInstaller . .
+ *
+ * @comment generate HumongousTemplateClass and compile it to test.classes
+ * @run driver gc.g1.unloading.bytecode.GenClassesBuilder
+ *
+ * @build sun.hotspot.WhiteBox
+ * @run driver ClassFileInstaller sun.hotspot.WhiteBox
+ *                                sun.hotspot.WhiteBox$WhiteBoxPermission
+ * @run main/othervm
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      gc.g1.unloading.UnloadingTest
+ *      -classloadingMethod reflection
+ *      -inMemoryCompilation
+ *      -keep classloader
+ *      -numberOfChecksLimit 4
+ *      -stressTime 180
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_reflection_classloading_inMemoryCompilation_keep_class/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_reflection_classloading_inMemoryCompilation_keep_class/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,66 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/g1/unloading/tests/unloading_reflection_classloading_inMemoryCompilation_keep_class.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent, javac]
+ *
+ * @modules java.base/jdk.internal.misc
+ * @library /vmTestbase
+ *          /test/lib
+ *
+ * @run driver jdk.test.lib.FileInstaller . .
+ *
+ * @comment generate HumongousTemplateClass and compile it to test.classes
+ * @run driver gc.g1.unloading.bytecode.GenClassesBuilder
+ *
+ * @build sun.hotspot.WhiteBox
+ * @run driver ClassFileInstaller sun.hotspot.WhiteBox
+ *                                sun.hotspot.WhiteBox$WhiteBoxPermission
+ * @run main/othervm
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      gc.g1.unloading.UnloadingTest
+ *      -classloadingMethod reflection
+ *      -inMemoryCompilation
+ *      -keep class
+ *      -numberOfChecksLimit 4
+ *      -stressTime 180
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_reflection_classloading_inMemoryCompilation_keep_obj/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_reflection_classloading_inMemoryCompilation_keep_obj/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,66 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/g1/unloading/tests/unloading_reflection_classloading_inMemoryCompilation_keep_obj.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent, javac]
+ *
+ * @modules java.base/jdk.internal.misc
+ * @library /vmTestbase
+ *          /test/lib
+ *
+ * @run driver jdk.test.lib.FileInstaller . .
+ *
+ * @comment generate HumongousTemplateClass and compile it to test.classes
+ * @run driver gc.g1.unloading.bytecode.GenClassesBuilder
+ *
+ * @build sun.hotspot.WhiteBox
+ * @run driver ClassFileInstaller sun.hotspot.WhiteBox
+ *                                sun.hotspot.WhiteBox$WhiteBoxPermission
+ * @run main/othervm
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      gc.g1.unloading.UnloadingTest
+ *      -classloadingMethod reflection
+ *      -inMemoryCompilation
+ *      -keep object
+ *      -numberOfChecksLimit 4
+ *      -stressTime 180
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_reflection_classloading_keep_cl/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_reflection_classloading_keep_cl/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,65 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/g1/unloading/tests/unloading_reflection_classloading_keep_cl.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent, javac]
+ *
+ * @modules java.base/jdk.internal.misc
+ * @library /vmTestbase
+ *          /test/lib
+ *
+ * @run driver jdk.test.lib.FileInstaller . .
+ *
+ * @comment generate HumongousTemplateClass and compile it to test.classes
+ * @run driver gc.g1.unloading.bytecode.GenClassesBuilder
+ *
+ * @build sun.hotspot.WhiteBox
+ * @run driver ClassFileInstaller sun.hotspot.WhiteBox
+ *                                sun.hotspot.WhiteBox$WhiteBoxPermission
+ * @run main/othervm
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      gc.g1.unloading.UnloadingTest
+ *      -classloadingMethod reflection
+ *      -keep classloader
+ *      -numberOfChecksLimit 4
+ *      -stressTime 180
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_reflection_classloading_keep_class/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_reflection_classloading_keep_class/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,65 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/g1/unloading/tests/unloading_reflection_classloading_keep_class.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent, javac]
+ *
+ * @modules java.base/jdk.internal.misc
+ * @library /vmTestbase
+ *          /test/lib
+ *
+ * @run driver jdk.test.lib.FileInstaller . .
+ *
+ * @comment generate HumongousTemplateClass and compile it to test.classes
+ * @run driver gc.g1.unloading.bytecode.GenClassesBuilder
+ *
+ * @build sun.hotspot.WhiteBox
+ * @run driver ClassFileInstaller sun.hotspot.WhiteBox
+ *                                sun.hotspot.WhiteBox$WhiteBoxPermission
+ * @run main/othervm
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      gc.g1.unloading.UnloadingTest
+ *      -classloadingMethod reflection
+ *      -keep class
+ *      -numberOfChecksLimit 4
+ *      -stressTime 180
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_reflection_classloading_keep_obj/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_reflection_classloading_keep_obj/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,65 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/g1/unloading/tests/unloading_reflection_classloading_keep_obj.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent, javac]
+ *
+ * @modules java.base/jdk.internal.misc
+ * @library /vmTestbase
+ *          /test/lib
+ *
+ * @run driver jdk.test.lib.FileInstaller . .
+ *
+ * @comment generate HumongousTemplateClass and compile it to test.classes
+ * @run driver gc.g1.unloading.bytecode.GenClassesBuilder
+ *
+ * @build sun.hotspot.WhiteBox
+ * @run driver ClassFileInstaller sun.hotspot.WhiteBox
+ *                                sun.hotspot.WhiteBox$WhiteBoxPermission
+ * @run main/othervm
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      gc.g1.unloading.UnloadingTest
+ *      -classloadingMethod reflection
+ *      -keep object
+ *      -numberOfChecksLimit 4
+ *      -stressTime 180
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_weak_ref_inMemoryCompilation_keep_cl/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_weak_ref_inMemoryCompilation_keep_cl/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,66 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/g1/unloading/tests/unloading_weak_ref_inMemoryCompilation_keep_cl.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent, javac]
+ *
+ * @modules java.base/jdk.internal.misc
+ * @library /vmTestbase
+ *          /test/lib
+ *
+ * @run driver jdk.test.lib.FileInstaller . .
+ *
+ * @comment generate HumongousTemplateClass and compile it to test.classes
+ * @run driver gc.g1.unloading.bytecode.GenClassesBuilder
+ *
+ * @build sun.hotspot.WhiteBox
+ * @run driver ClassFileInstaller sun.hotspot.WhiteBox
+ *                                sun.hotspot.WhiteBox$WhiteBoxPermission
+ * @run main/othervm
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      gc.g1.unloading.UnloadingTest
+ *      -referenceMode weak
+ *      -inMemoryCompilation
+ *      -keep classloader
+ *      -numberOfChecksLimit 4
+ *      -stressTime 180
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_weak_ref_inMemoryCompilation_keep_class/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_weak_ref_inMemoryCompilation_keep_class/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,66 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/g1/unloading/tests/unloading_weak_ref_inMemoryCompilation_keep_class.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent, javac]
+ *
+ * @modules java.base/jdk.internal.misc
+ * @library /vmTestbase
+ *          /test/lib
+ *
+ * @run driver jdk.test.lib.FileInstaller . .
+ *
+ * @comment generate HumongousTemplateClass and compile it to test.classes
+ * @run driver gc.g1.unloading.bytecode.GenClassesBuilder
+ *
+ * @build sun.hotspot.WhiteBox
+ * @run driver ClassFileInstaller sun.hotspot.WhiteBox
+ *                                sun.hotspot.WhiteBox$WhiteBoxPermission
+ * @run main/othervm
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      gc.g1.unloading.UnloadingTest
+ *      -referenceMode weak
+ *      -inMemoryCompilation
+ *      -keep class
+ *      -numberOfChecksLimit 4
+ *      -stressTime 180
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_weak_ref_inMemoryCompilation_keep_obj/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_weak_ref_inMemoryCompilation_keep_obj/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,66 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/g1/unloading/tests/unloading_weak_ref_inMemoryCompilation_keep_obj.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent, javac]
+ *
+ * @modules java.base/jdk.internal.misc
+ * @library /vmTestbase
+ *          /test/lib
+ *
+ * @run driver jdk.test.lib.FileInstaller . .
+ *
+ * @comment generate HumongousTemplateClass and compile it to test.classes
+ * @run driver gc.g1.unloading.bytecode.GenClassesBuilder
+ *
+ * @build sun.hotspot.WhiteBox
+ * @run driver ClassFileInstaller sun.hotspot.WhiteBox
+ *                                sun.hotspot.WhiteBox$WhiteBoxPermission
+ * @run main/othervm
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      gc.g1.unloading.UnloadingTest
+ *      -referenceMode weak
+ *      -inMemoryCompilation
+ *      -keep object
+ *      -numberOfChecksLimit 4
+ *      -stressTime 180
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_weak_ref_keep_cl/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_weak_ref_keep_cl/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,65 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/g1/unloading/tests/unloading_weak_ref_keep_cl.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent, javac]
+ *
+ * @modules java.base/jdk.internal.misc
+ * @library /vmTestbase
+ *          /test/lib
+ *
+ * @run driver jdk.test.lib.FileInstaller . .
+ *
+ * @comment generate HumongousTemplateClass and compile it to test.classes
+ * @run driver gc.g1.unloading.bytecode.GenClassesBuilder
+ *
+ * @build sun.hotspot.WhiteBox
+ * @run driver ClassFileInstaller sun.hotspot.WhiteBox
+ *                                sun.hotspot.WhiteBox$WhiteBoxPermission
+ * @run main/othervm
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      gc.g1.unloading.UnloadingTest
+ *      -referenceMode weak
+ *      -keep classloader
+ *      -numberOfChecksLimit 4
+ *      -stressTime 180
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_weak_ref_keep_class/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_weak_ref_keep_class/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,65 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/g1/unloading/tests/unloading_weak_ref_keep_class.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent, javac]
+ *
+ * @modules java.base/jdk.internal.misc
+ * @library /vmTestbase
+ *          /test/lib
+ *
+ * @run driver jdk.test.lib.FileInstaller . .
+ *
+ * @comment generate HumongousTemplateClass and compile it to test.classes
+ * @run driver gc.g1.unloading.bytecode.GenClassesBuilder
+ *
+ * @build sun.hotspot.WhiteBox
+ * @run driver ClassFileInstaller sun.hotspot.WhiteBox
+ *                                sun.hotspot.WhiteBox$WhiteBoxPermission
+ * @run main/othervm
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      gc.g1.unloading.UnloadingTest
+ *      -referenceMode weak
+ *      -keep class
+ *      -numberOfChecksLimit 4
+ *      -stressTime 180
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_weak_ref_keep_obj/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/g1/unloading/tests/unloading_weak_ref_keep_obj/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,65 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/g1/unloading/tests/unloading_weak_ref_keep_obj.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent, javac]
+ *
+ * @modules java.base/jdk.internal.misc
+ * @library /vmTestbase
+ *          /test/lib
+ *
+ * @run driver jdk.test.lib.FileInstaller . .
+ *
+ * @comment generate HumongousTemplateClass and compile it to test.classes
+ * @run driver gc.g1.unloading.bytecode.GenClassesBuilder
+ *
+ * @build sun.hotspot.WhiteBox
+ * @run driver ClassFileInstaller sun.hotspot.WhiteBox
+ *                                sun.hotspot.WhiteBox$WhiteBoxPermission
+ * @run main/othervm
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xbootclasspath/a:.
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+WhiteBoxAPI
+ *      -XX:+UseG1GC
+ *      -XX:+ExplicitGCInvokesConcurrent
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      -Xlog:gc:gc.log
+ *      -XX:-UseGCOverheadLimit
+ *      gc.g1.unloading.UnloadingTest
+ *      -referenceMode weak
+ *      -keep object
+ *      -numberOfChecksLimit 4
+ *      -stressTime 180
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/gctests/AllocateWithoutOomTest/AllocateWithoutOomTest.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,153 @@
+/*
+ * Copyright (c) 2011, 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/gctests/AllocateWithoutOomTest.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent, jrockit]
+ * VM Testbase readme:
+ * DESCRIPTION
+ *   Small stress test that should be able to run for a specified
+ *   time without hitting an OOM.
+ *
+ * COMMENTS
+ * This test was ported from JRockit test suite.
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm
+ *      -XX:-UseGCOverheadLimit
+ *      gc.gctests.AllocateWithoutOomTest.AllocateWithoutOomTest
+ */
+
+package gc.gctests.AllocateWithoutOomTest;
+
+import java.util.ArrayList;
+import java.util.Random;
+import nsk.share.TestFailure;
+import nsk.share.gc.GC;
+import nsk.share.gc.GCTestBase;
+import nsk.share.test.Stresser;
+
+/**
+ * Small stress test that should be able to run for a specified
+ * time without hitting an OOM.
+ */
+public class AllocateWithoutOomTest extends GCTestBase {
+
+    /**
+     * Small stress test that allocates objects in a certain interval
+     * and runs for a specified time. It should not throw any OOM during
+     * the execution.
+     *
+     * @return success if the test runs for the specified time without
+     *         and exceptions being thrown.
+     */
+    @Override
+    public void run() {
+        int minSize;
+        int maxSize;
+
+
+
+        minSize = 2048;
+        maxSize = 32768;
+
+
+        ArrayList placeholder = new ArrayList();
+        long multiplier = maxSize - minSize;
+        Random rndGenerator = new Random(runParams.getSeed());
+
+        long memoryUpperLimit = runParams.getTestMemory();
+        long memoryLowerLimit = runParams.getTestMemory() / 3;
+        long memoryAllocatedLowerLimit = memoryUpperLimit
+                - memoryLowerLimit;
+
+
+        long totalAllocatedMemory = 0;
+        long totalAllocatedObjects = 0;
+        int allocationSize = -1;
+        long roundCounter = 1;
+
+        try {
+            Stresser stresser = new Stresser(runParams.getStressOptions());
+            stresser.start(0);
+            while (stresser.continueExecution()) {
+                while (totalAllocatedMemory < memoryUpperLimit) {
+                    allocationSize = ((int) (rndGenerator.nextDouble()
+                            * multiplier)) + minSize;
+                    byte[] tmp = new byte[allocationSize];
+                    totalAllocatedMemory += allocationSize;
+                    totalAllocatedObjects++;
+                    placeholder.add(tmp);
+                    tmp = null;
+                }
+
+                // NOTE: Start on index 1 to make sure we don't remove to many
+                // consecutive objects in the beginning
+                int indexToRemove = 1;
+
+                while (totalAllocatedMemory > memoryAllocatedLowerLimit) {
+                    // NOTE: Terminate if we only have zero objects left
+                    if (placeholder.size() == 0) {
+                        throw new TestFailure("No more objects to free, "
+                                + "so we can't continue");
+                    }
+
+                    if (indexToRemove >= placeholder.size()) {
+                        indexToRemove = (placeholder.size() == 1) ? 0 : 1;
+                    }
+
+                    byte[] tmp = (byte[]) placeholder.remove(indexToRemove);
+
+                    totalAllocatedMemory -= tmp.length;
+                    totalAllocatedObjects--;
+
+                    tmp = null;
+                    // NOTE: Since we removed one object, we only need to
+                    // increment index by 1 to move two steps. We want to
+                    // remove every other object to create fragmentation
+                    indexToRemove++;
+                }
+
+                roundCounter++;
+            }
+            placeholder = null;
+            log.info("Passed. Completed " + roundCounter
+                    + " rounds during the test");
+        } catch (OutOfMemoryError oome) {
+            placeholder = null;
+            throw new TestFailure("OOM thrown when allocating an object of size "
+                    + allocationSize, oome);
+        } finally {
+            placeholder = null;
+        }
+    }
+
+    public static void main(String[] args) {
+        GC.runTest(new AllocateWithoutOomTest(), args);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/gctests/AllocateWithoutOomTest/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/gctests/BigChains/BigChains.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,140 @@
+/*
+ * Copyright (c) 2011, 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/gctests/BigChains.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent, jrockit]
+ * VM Testbase readme:
+ * DESCRIPTION
+ * Creates big chains of allocated objects, with a mix of objects
+ * with and without finalizers.
+ *
+ * COMMENTS
+ * This test was ported from JRockit test suite.
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm -XX:-UseGCOverheadLimit gc.gctests.BigChains.BigChains
+ */
+
+package gc.gctests.BigChains;
+
+import nsk.share.gc.GC;
+import nsk.share.gc.ThreadedGCTest;
+
+/**
+ * Test ported from dev test suite. Creates big chains of
+ * allocated objects, with a mix of objects with and without
+ * finalizers.
+ */
+public class BigChains extends ThreadedGCTest {
+
+    public static void main(String[] args) {
+        GC.runTest(new BigChains(), args);
+    }
+
+    @Override
+    protected Runnable createRunnable(int i) {
+
+        return new Runnable() {
+
+            /**
+             * Create a big chain of mixed objects and make sure nothing
+             * crashes.
+             *
+             * @return success if the program test could run without any
+             * problems.
+             */
+            public void run() {
+
+                createChain(100000, true);
+
+
+                int i = 0;
+
+                while (i++ < 100) {
+                    createChain(10000, false);
+                }
+            }
+
+            private void createChain(int noof, boolean firstIsFinalizable) {
+                BaseClass first;
+
+                if (firstIsFinalizable) {
+                    first = new FinalizerYes();
+                } else {
+                    first = new FinalizerNo();
+                }
+
+                BaseClass current = first;
+
+                for (int i = 0; i < noof; i++) {
+                    current.next = new FinalizerNo();
+                    current = current.next;
+                }
+
+                current.next = first;
+            }
+        };
+    }
+}
+
+/**
+ * Helper base class for the BigChains test.
+ */
+class BaseClass {
+
+    /**
+     * Base class.
+     */
+    public BaseClass next;
+}
+
+/**
+ * Helper class withfinalizer and counter for number of
+ * calls to the finalize() method.
+ */
+class FinalizerYes extends BaseClass {
+
+    private static int noOfFinalized = 0;
+
+    /**
+     * Finalizer for the help class, that increments a counter
+     * for each call to this method.
+     */
+    public final void finalize() {
+        synchronized (this.getClass()) {
+            FinalizerYes.noOfFinalized++;
+        }
+    }
+}
+
+/**
+ * Helper class without finalizer.
+ */
+class FinalizerNo extends BaseClass {
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/gctests/BigChains/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/gctests/CallGC/CallGC01/CallGC01.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,58 @@
+/*
+ * Copyright (c) 2007, 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/gctests/CallGC/CallGC01.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent]
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm gc.gctests.CallGC.CallGC01.CallGC01 -t 100
+ */
+
+package gc.gctests.CallGC.CallGC01;
+
+import nsk.share.gc.*;
+import nsk.share.runner.*;
+
+/**
+ * This test starts a number of threads that do System.gc() and
+ * System.runFinalization() and checks that there are no crashes.
+ */
+public class CallGC01 extends ThreadedGCTest {
+        protected Runnable createRunnable(int i) {
+                if (i % 2 == 0)
+                        return new GCRunner();
+                else
+                        return new FinRunner();
+        }
+
+        public static void main(String[] args) {
+                GC.runTest(new CallGC01(), args);
+        }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/gctests/CallGC/CallGC01/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/gctests/CallGC/CallGC02/CallGC02.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,76 @@
+/*
+ * Copyright (c) 2007, 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/gctests/CallGC/CallGC02.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent]
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm gc.gctests.CallGC.CallGC02.CallGC02 -t 100 -gp random(arrays)
+ */
+
+package gc.gctests.CallGC.CallGC02;
+
+import nsk.share.gc.*;
+import nsk.share.gc.gp.*;
+import nsk.share.runner.*;
+
+/**
+ * This test starts a number of threads that do System.gc() and
+ * System.runFinalization() and checks that there are no crashes.
+ *
+ * There is also a thread that produces garbage.
+ */
+public class CallGC02 extends ThreadedGCTest implements GarbageProducerAware {
+        private GarbageProducer garbageProducer;
+        private final int objectSize = 100;
+
+        private class GarbageProduction implements Runnable {
+                public void run() {
+                        garbageProducer.create(objectSize);
+                }
+        }
+
+        protected Runnable createRunnable(int i) {
+                if (i == 0)
+                        return new GarbageProduction();
+                else if (i % 2 == 0)
+                        return new GCRunner();
+                else
+                        return new FinRunner();
+        }
+
+        public final void setGarbageProducer(GarbageProducer garbageProducer) {
+                this.garbageProducer = garbageProducer;
+        }
+
+        public static void main(String[] args) {
+                GC.runTest(new CallGC02(), args);
+        }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/gctests/CallGC/CallGC02/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/gctests/ClassDeallocGC/ClassDeallocGC.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,109 @@
+/*
+ * Copyright (c) 2002, 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
+ * @key gc
+ *
+ * @summary converted from VM Testbase gc/gctests/ClassDeallocGC.
+ * VM Testbase keywords: [gc]
+ * VM Testbase readme:
+ * This test is a slightly modified version of a test taken from a research paper
+ * by CE McDowell of UCSC titled 'No so static "static fields"'.
+ * To quote from the paper :
+ * " In this paper we have identified a problem with the Java Language
+ * Specification with regard to class unloading and static fields. We have
+ * provided an example that demonstrates how the current implementation of
+ * class unloading can result in a static field being reinitialized resulting
+ * in a program that changes its behavior depending upon when garbage collection occurs."
+ * In this test, the creation of the object first assigned to
+ * class_one_object (actually an instance of ClassOne) also creates an instance
+ * of ClassTwo which contains a static field. Once the references to the ClassOne
+ * object and the Class object are set to null, a call to the garbage
+ * collector results in both ClassOne and ClassTwo being unloaded. When
+ * the final assignment to class_one_object occurs, creating a new instance of ClassOne
+ * and a new instance of ClassTwo, the program should print out the value of counter in
+ * ClassTwo as 2.  This would mean that class was not unloaded and the static field
+ * was not reinitialized. If the test prints out 1, the test has failed as  the static
+ * field was reinitilized.
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm gc.gctests.ClassDeallocGC.ClassDeallocGC
+ */
+
+package gc.gctests.ClassDeallocGC;
+
+import nsk.share.TestFailure;
+
+public class ClassDeallocGC
+{
+    public static void main(String[] args)
+    throws java.io.IOException, ClassNotFoundException,
+    IllegalAccessException, InstantiationException
+    {
+        int count = 0, counter;
+        ClassOne class_one_object;
+
+        /* load the class ClassOne and instantiate an instance of it */
+        /* ClassOne uses ClassTwo which will thus get loaded also */
+        Class theClass = Class.forName("gc.gctests.ClassDeallocGC.ClassOne");
+        class_one_object = (ClassOne)theClass.newInstance();
+
+        /* remove all references to the class and the instance */
+        class_one_object = null;
+        theClass = null;
+
+        System.gc(); /* force garbage collection which also unloads classes */
+
+        /*loads and instantiates ClassOne again. ClassTwo also gets reloaded*/
+        class_one_object = (ClassOne) new ClassOne();
+        if ( (counter = class_one_object.getCounter()) == 2 ) {
+           System.out.println("Test Passed.");
+        } else {
+           throw new TestFailure("Test failed. counter = " + counter + ", should be 2.");
+        }
+    }
+}
+
+class ClassOne {
+    ClassTwo class_two;
+    public ClassOne(){
+      class_two = new ClassTwo();
+    }
+    public int getCounter() {
+      return class_two.getCounter();
+    }
+}
+
+
+class ClassTwo {
+    static int counter = 0;
+    public ClassTwo(){
+        counter++;
+    }
+    public int getCounter() {
+      return counter;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/gctests/FinalizeTest01/FinalizeTest01.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,186 @@
+/*
+ * Copyright (c) 2002, 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/gctests/FinalizeTest01.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent, monitoring]
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm -XX:-UseGCOverheadLimit gc.gctests.FinalizeTest01.FinalizeTest01
+ */
+
+package gc.gctests.FinalizeTest01;
+
+import java.lang.management.ManagementFactory;
+import java.lang.management.MemoryMXBean;
+import nsk.share.gc.*;
+import nsk.share.TestFailure;
+import nsk.share.test.ExecutionController;
+import nsk.share.test.Stresser;
+
+/**
+ * Tests that GC works correctly with finalizers.
+ *
+ * Create a number of objects, some of which register their
+ * creation/finalization. Then try to eat available memory
+ * which forces garbage collection of created objects.
+ * Garbage collector should try to collect the garbage and thus
+ * call finalizers. The test checks that all finalizers have been called.
+ */
+
+/*
+Reworked original test (4933478). Original comment:
+
+Tests that objects w/finalizers will eventually finalize
+(and by the way, the system doesn't crash!).
+
+Returns exit code 0 on success, and 1 on failure.
+
+ */
+/**
+ * Class with finalizer that throws Exception.
+ * Used for FinalizeTest02
+ */
+class FinExceptMemoryObject extends FinMemoryObject {
+
+    public FinExceptMemoryObject(int size) {
+        super(size);
+    }
+
+    protected void finalize() {
+        super.finalize();
+        throw new RuntimeException("Exception in finalizer");
+    }
+}
+
+public class FinalizeTest01 extends GCTestBase {
+
+    private final int allocRatio = 5;
+    private final int size = 1024 * 2;
+    private int count = 1000;
+    private static boolean throwExceptions = false;
+    private ExecutionController stresser;
+
+    private void runOne() {
+        Object o;
+        for (int i = 0; i < count; i++) {
+            if (i % allocRatio == 0) {
+                if (throwExceptions) {
+                    o = new FinExceptMemoryObject(size);
+                } else {
+                    o = new FinMemoryObject(size);
+                }
+            } else {
+                o = new byte[size - Memory.getObjectExtraSize()];
+            }
+        }
+        o = null;
+
+        MemoryMXBean mbean = ManagementFactory.getMemoryMXBean();
+        long finalizationMaxTime = 1000 * 60; // 1min
+
+        /* Provoke GC to start finalization. */
+        Algorithms.eatMemory(stresser);
+        if (!stresser.continueExecution()) {
+            // we did not eat all memory
+            return;
+        }
+        long waitTime = System.currentTimeMillis() + finalizationMaxTime;
+
+        /*
+         * Before we force finalization it is needed to check that we have
+         * any object pending for finazlization. If not then is a GC bug.
+         */
+        while (FinMemoryObject.getFinalizedCount()
+                + mbean.getObjectPendingFinalizationCount() == 0
+                && (System.currentTimeMillis() < waitTime)) {
+            System.out.println("No objects are found in the finalization queue. Waiting..");
+            try {
+                Thread.sleep(1000);
+            } catch (InterruptedException ie) {
+            }
+        }
+        if (FinMemoryObject.getFinalizedCount()
+                + mbean.getObjectPendingFinalizationCount() == 0) {
+            throw new TestFailure("Test failed. (No objects were not queued for finalization during 1min)");
+        }
+
+        /* force finalization and wait for it finishs */
+        Runtime.getRuntime().runFinalization();
+
+        boolean error = (FinMemoryObject.getLiveCount() != 0);
+
+        /*
+         * The runFinalization() starts the second finalization thread and wait until it finishs.
+         * However it is a very little probability (less then 1%) that not all object are finalized yet.
+         * Possibly the regular Finalizer thread have not finished its work when we check getLiveCount()
+         * or GC is still clearing memory and adding objects to the queue.
+         */
+        waitTime = System.currentTimeMillis() + finalizationMaxTime;
+        while (error && (System.currentTimeMillis() < waitTime)) {
+            // wait 1 sec (it could be less due to potential InterruptedException)
+            try {
+                Thread.sleep(1000);
+            } catch (InterruptedException ie) {
+            }
+            error = (FinMemoryObject.getLiveCount() != 0);
+        }
+
+        if (error) {
+            throw new TestFailure("Test failed (objects were not finalized during 1min)");
+        }
+
+
+        System.out.println("Allocated: " + FinMemoryObject.getAllocatedCount());
+        System.out.println("Finalized: " + FinMemoryObject.getFinalizedCount());
+        error = (FinMemoryObject.getLiveCount() != 0);
+        if (error) {
+            throw new TestFailure("Test failed.");
+        }
+    }
+
+    public void run() {
+        stresser = new Stresser(runParams.getStressOptions());
+        stresser.start(runParams.getIterations());
+        count = (int) Math.min(runParams.getTestMemory() / size, Integer.MAX_VALUE);
+        System.out.println("Allocating " + count
+                + " objects. 1 out of " + allocRatio
+                + " will have a finalizer.");
+        System.out.flush();
+        runOne();
+    }
+
+    public static void main(String[] args) {
+        for (int i = 0; i < args.length; ++i) {
+            if (args[i].equals("-throwExceptions")) {
+                throwExceptions = true;
+            }
+        }
+        GC.runTest(new FinalizeTest01(), args);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/gctests/FinalizeTest01/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/gctests/FinalizeTest02/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/gctests/FinalizeTest02/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,40 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/gctests/FinalizeTest02.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent, monitoring]
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm
+ *      -XX:-UseGCOverheadLimit
+ *      gc.gctests.FinalizeTest01.FinalizeTest01
+ *      -throwExceptions
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/gctests/FinalizeTest04/FinalizeTest04.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,88 @@
+/*
+ * Copyright (c) 2007, 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/gctests/FinalizeTest04.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent]
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm -XX:-UseGCOverheadLimit gc.gctests.FinalizeTest04.FinalizeTest04
+ */
+
+package gc.gctests.FinalizeTest04;
+
+import nsk.share.test.*;
+import nsk.share.gc.*;
+
+/**
+ * Test that synchronization between GC and finalizer thread
+ * (if any) is correct.
+ *
+ * This test creates objects that do GC-related work in finalizer,
+ * e.g. call System.gc(), System.runFinalization(), Algorithms.eatMemory().
+ *
+ * @see nsk.share.gc.Algorithms#eatMemory()
+ * @see java.lang.System#gc()
+ * @see java.lang.System#runFinalization()
+ */
+public class FinalizeTest04 extends GCTestBase {
+
+    private int objectSize = 100;
+    private int objectCount = 100;
+    private ExecutionController stresser;
+
+    private class FinMemoryObject2 extends FinMemoryObject {
+
+        public FinMemoryObject2(int size) {
+            super(size);
+        }
+
+        protected void finalize() {
+            super.finalize();
+            System.gc();
+            Algorithms.eatMemory(stresser);
+            System.runFinalization();
+            System.gc();
+            Algorithms.eatMemory(stresser);
+            System.gc();
+        }
+    }
+
+    public void run() {
+        stresser = new Stresser(runParams.getStressOptions());
+        stresser.start(runParams.getIterations());
+        for (int i = 0; i < objectCount; ++i) {
+            new FinMemoryObject2(objectSize);
+        }
+        Algorithms.eatMemory(stresser);
+    }
+
+    public static void main(String[] args) {
+        GC.runTest(new FinalizeTest04(), args);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/gctests/FinalizeTest04/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/gctests/FinalizeTest05/FinalizeTest05.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,104 @@
+/*
+ * Copyright (c) 2009, 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/gctests/FinalizeTest05.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent]
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm -XX:-UseGCOverheadLimit gc.gctests.FinalizeTest05.FinalizeTest05
+ */
+
+package gc.gctests.FinalizeTest05;
+
+import nsk.share.gc.*;
+import java.util.*;
+import nsk.share.TestFailure;
+import nsk.share.test.ExecutionController;
+import nsk.share.test.Stresser;
+
+/**
+ */
+public class FinalizeTest05 extends GCTestBase {
+
+    private final int allocRatio = 5;
+    private final int size = 1024 * 2;
+    private int count = 1000;
+    private ExecutionController stresser;
+
+    private void runOne() {
+        ArrayList objs = new ArrayList(count);
+        Object o;
+        for (int i = 0; i < count; i++) {
+            if (i % allocRatio == 0) {
+                o = new FinMemoryObject(size);
+                objs.add(o);
+            } else {
+                o = new byte[size - Memory.getObjectExtraSize()];
+            }
+        }
+        FinMemoryObject.dumpStatistics();
+        o = null;
+
+        /* force finalization  */
+        Algorithms.eatMemory(stresser);
+        System.gc();
+        Runtime.getRuntime().runFinalization();
+        System.gc();
+        Runtime.getRuntime().runFinalization();
+
+        FinMemoryObject.dumpStatistics();
+
+        boolean error;
+        System.out.println("Allocated: " + FinMemoryObject.getAllocatedCount());
+        System.out.println("Finalized: " + FinMemoryObject.getFinalizedCount());
+        error = (FinMemoryObject.getFinalizedCount() != 0);
+
+        // Just hit the objs array to do say VM that we use this object
+        // and it should be alive in this point.
+        objs.clear();
+        if (error) {
+            throw new TestFailure("Test failed.");
+        }
+    }
+
+    public void run() {
+        stresser = new Stresser(runParams.getStressOptions());
+        stresser.start(runParams.getIterations());
+        count = (int) Math.min(runParams.getTestMemory() / size, Integer.MAX_VALUE);
+        System.out.println("Allocating " + count
+                + " objects. 1 out of " + allocRatio
+                + " will have a finalizer.");
+        System.out.flush();
+        runOne();
+    }
+
+    public static void main(String[] args) {
+        GC.runTest(new FinalizeTest05(), args);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/gctests/FinalizeTest05/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/gctests/FinalizerGC01/FinalizerGC01.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,148 @@
+/*
+ * Copyright (c) 2002, 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
+ * @key gc
+ *
+ * @summary converted from VM Testbase gc/gctests/FinalizerGC01.
+ * VM Testbase keywords: [gc]
+ * VM Testbase readme:
+ * This rather contrived test checks the interplay of garbage collection
+ * and finalizers. Just before a 0.5 Meg linked list is garbage collected,
+ * the finalizer generates more garbage . The test fails if an OutOfMemoryError
+ * is thrown.
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm gc.gctests.FinalizerGC01.FinalizerGC01
+ */
+
+package gc.gctests.FinalizerGC01;
+
+import nsk.share.TestFailure;
+
+class node {
+        byte [] arr;
+        node next;
+        node prev;
+        node(int info){ arr = new byte[128]; }
+}
+
+class CircularLinkedList{
+        private void addElement(int info) {
+                node newnode;
+                newnode = new node(info);
+                if (Root == null){
+                        Root = newnode;
+                        Root.next = Root;
+                        Root.prev = Root;
+                } else{
+                        newnode.next = Root.next;
+                        Root.next.prev = newnode;
+                        Root.next = newnode;
+                        newnode.prev = Root;
+                }
+        }
+        int elementCount() {
+                node p;
+                int count;
+                p = Root;
+                count = 0;
+                do {
+                        p = p.prev;
+                        count++;
+                }while(p != Root);
+                return count;
+        }
+        public void build1MegList() {
+                for (int i = 0 ; i < NELEMENTS ; i++)
+                        addElement(i);
+        }
+        node Root=null;
+        static final int NELEMENTS=4096;
+}
+class CircularLinkedListFinal extends CircularLinkedList {
+        protected void finalize () {
+                CircularLinkedList cl = null;
+                // generate 1.5Meg more garbage
+                int i = 0;
+                int gcFails=0;
+                while (i < 3){
+                        Root = null;
+                        gcFails=0;
+                        while (gcFails < NGCFAILS) {
+                                try {
+                                        cl = new CircularLinkedList();
+                                        cl.build1MegList();
+                                        cl = null;
+                                        break;
+                                }
+                                catch (OutOfMemoryError e) {
+                                        System.gc();
+                                        gcFails++;
+                                }
+                        }
+                        if (gcFails >= NGCFAILS) break;
+                        i++;
+                }
+                if (i < 3) throw new OutOfMemoryError();
+        }
+        private static final int NGCFAILS=10;
+}
+
+public class FinalizerGC01 {
+        public static void main(String args[]) {
+                int count = 0;
+                int gcFails = 0;
+                CircularLinkedListFinal cl = null;
+                while (count < 64) {
+                        gcFails = 0;
+                        while (gcFails<NGCFAILS) {
+                                try {
+                                        cl = new CircularLinkedListFinal();
+                                        cl.build1MegList();
+                                        doComputation();
+                                        cl = null;
+                                        break;
+                                } catch (OutOfMemoryError e) {
+                                        gcFails++;
+                                        System.gc();
+                                }
+                        }
+                        if (gcFails >= NGCFAILS) break;
+                        count++;
+                }
+                if (count < 64)
+                        throw new TestFailure("Test failed on " + count + " iteration");
+                else
+                        System.out.println("Test Passed");
+        }
+        static void doComputation(){
+                long i = 0;
+                while ( i < 1000000L) { i++; }
+        }
+        private static final int NGCFAILS=10;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/gctests/FinalizerGC02/FinalizerGC02.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,131 @@
+/*
+ * Copyright (c) 2002, 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
+ * @key gc
+ *
+ * @summary converted from VM Testbase gc/gctests/FinalizerGC02.
+ * VM Testbase keywords: [gc]
+ * VM Testbase readme:
+ * In this contrived test, the finalizer creates more garbage. As the finalizer
+ * is invoked prior to garbage collection, this puts more stress on the
+ * garbage collector.
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm gc.gctests.FinalizerGC02.FinalizerGC02
+ */
+
+package gc.gctests.FinalizerGC02;
+
+import nsk.share.TestFailure;
+
+class node {
+    byte [] arr;
+    node next;
+    node prev;
+    node(int info){ arr = new byte[100]; }
+}
+
+class CircularLinkedList{
+   node Root;
+
+   private void addElement(int info) {
+      node newnode;
+
+      newnode = new node(info);
+      if (Root == null){
+        Root = newnode;
+        Root.next = Root;
+         Root.prev = Root;
+      } else {
+         newnode.next = Root.next;
+         Root.next.prev = newnode;
+         Root.next = newnode;
+         newnode.prev = Root;
+      }
+   }
+
+   int elementCount() {
+      node p;
+      int count;
+
+       p = Root;
+       count = 0;
+
+       do {
+          p = p.prev;
+          count++;
+       }while(p != Root);
+       return count;
+   }
+
+   public void buildNMegList(int N) {
+     for (int i = 0 ; i < N*10000 ; i++)
+        addElement(i);
+   }
+
+   protected void finalize () {
+     // generate 1Meg more garbage
+     FinalizerGC02.listHolder = new CircularLinkedList();
+     FinalizerGC02.listHolder.buildNMegList(1);
+   }
+}
+
+
+public class FinalizerGC02 {
+
+  static CircularLinkedList listHolder;
+  static int count;
+  static int returnCount() { return count; }
+
+  public static void main(String args[]) {
+    int memory_reserve[] = new int [1000];
+
+    listHolder = new CircularLinkedList();
+    listHolder.buildNMegList(1);
+
+    try {
+      while (count < 5) {
+        listHolder = new CircularLinkedList();
+        listHolder.buildNMegList(1);
+        count ++;
+      }
+    } catch (OutOfMemoryError e) {
+       memory_reserve = null;
+       System.gc();
+       throw new TestFailure("Test failed at " + count +"th iteration.");
+    }
+       System.out.println("Test Passed");
+    }
+
+    static void doComputation(){
+      long i = 0;
+      while ( i < 1000000) {
+        i ++;
+      }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/gctests/GcPointerCheckTest/GcPointerCheckTest.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,137 @@
+/*
+ * Copyright (c) 2011, 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/gctests/GcPointerCheckTest.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent, jrockit]
+ * VM Testbase readme:
+ * DESCRIPTION
+ * Test that no pointers are broken.
+ *
+ * COMMENTS
+ * This test was ported from JRockit test suite.
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm -XX:-UseGCOverheadLimit gc.gctests.GcPointerCheckTest.GcPointerCheckTest
+ */
+
+package gc.gctests.GcPointerCheckTest;
+
+import nsk.share.TestFailure;
+import nsk.share.gc.GC;
+import nsk.share.gc.ThreadedGCTest;
+import nsk.share.test.ExecutionController;
+
+/**
+ * Test that no pointers are broken.
+ */
+public class GcPointerCheckTest extends ThreadedGCTest {
+
+    @Override
+    protected Runnable createRunnable(int i) {
+        return new Test();
+    }
+
+    class Test implements Runnable {
+
+        /**
+         * Helper class for linking objects together.
+         */
+        private class PointerHelper {
+
+            public PointerHelper next;
+        }
+        private PointerHelper first;
+        ExecutionController stresser;
+
+        @Override
+        public void run() {
+            if (stresser == null) {
+                stresser = getExecutionController();
+            }
+            while (stresser.continueExecution()) {
+                testGcPointers();
+            }
+        }
+
+        /**
+         * Create a lot of objects and link them together, then verify
+         * that the pointers are pointing to the correct type of objects.
+         *
+         * @return success if all references points to the correct type
+         * of object.
+         */
+        public void testGcPointers() {
+
+            int innerIters = 1;
+            int outerIters = 200;
+
+            PointerHelper tmp1;
+            PointerHelper tmp2;
+
+            while (outerIters > 0) {
+                int i = 0;
+                tmp1 = new PointerHelper();
+                this.first = tmp1;
+
+                while (i != innerIters) {
+                    i++;
+                    tmp2 = new PointerHelper();
+                    tmp1.next = tmp2;
+                    tmp1 = tmp2;
+                    tmp2 = new PointerHelper();
+                }
+
+                outerIters--;
+
+                if (!checkRefs()) {
+                    throw new TestFailure("Some references were bad");
+                }
+            }
+        }
+
+        private boolean checkRefs() {
+            PointerHelper iter = this.first;
+
+            for (int i = 0; iter != null; iter = iter.next) {
+                i++;
+
+                if (iter.getClass() != PointerHelper.class) {
+                    //("GC causer bad ref on " + i);
+                    return false;
+                }
+            }
+
+            return true;
+        }
+    }
+
+    public static void main(String[] args) {
+        GC.runTest(new GcPointerCheckTest(), args);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/gctests/GcPointerCheckTest/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/gctests/HeapUsageTest/HeapUsageTest.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,161 @@
+/*
+ * Copyright (c) 2011, 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/gctests/HeapUsageTest.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent, jrockit]
+ * VM Testbase readme:
+ * DESCRIPTION
+ * Originally it was Micro benchmark that tests the heap usage.
+ *
+ * COMMENTS
+ * This test was ported from JRockit test suite.
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm -XX:-UseGCOverheadLimit gc.gctests.HeapUsageTest.HeapUsageTest
+ */
+
+package gc.gctests.HeapUsageTest;
+
+import java.util.ArrayList;
+import nsk.share.TestFailure;
+import nsk.share.gc.GC;
+import nsk.share.gc.GCTestBase;
+import nsk.share.test.Stresser;
+
+/**
+ * Micro benchmark that tests the heap usage.
+ */
+public class HeapUsageTest extends GCTestBase {
+
+    /**
+     *  Helper class to store allocation size and iterations for the
+     *  HeapUsageTest heap usage test program
+     */
+    private class TestValue {
+
+        private int allocationSize;
+        private int allocationIterations;
+
+        TestValue(int allocSize, int allocIters) {
+            allocationSize = allocSize;
+            allocationIterations = allocIters;
+        }
+
+        final int getSize() {
+            return allocationSize;
+        }
+
+        final int getIterations() {
+            return allocationIterations;
+        }
+    }
+
+    /**
+     * Simple micro benchmark for testing heap usage. Returns a percentage
+     * that tells how much of the total heap size the test was able to
+     * allocate.
+     *
+     * @return success if test could run until OOME was thrown, and was
+     * able to determine the heap usage in percent without any other
+     * exceptions being thrown.
+     */
+    public void run() {
+
+        try {
+            int[] testParams =
+                    new int[]{512, 5, 2048, 3, 3145728, 2};
+
+
+            TestValue[] values = new TestValue[testParams.length / 2];
+            for (int i = 0; i < testParams.length / 2; i++) {
+                values[i] = new TestValue(testParams[i * 2],
+                        testParams[i * 2 + 1]);
+            }
+
+            // NOTE: The call to Runtime might not look like it does anything
+            // here, but it codegens the class, so it will not OOM later on
+            // due to low-mem sitation for codegen.
+            Runtime r = Runtime.getRuntime();
+            // NOTE: Codegen freeMemory() and maxMemory() so this
+            // doesn't cause OOM in a OOM situation
+            ArrayList holdObjects = new ArrayList();
+            long currentAllocatedSize = 0;
+            Stresser stresser = new Stresser(runParams.getStressOptions());
+            stresser.start(0);
+            try {
+                long loopCount;
+                int nrOfLoops = 0;
+
+                for (int i = 0; i < values.length; i++) {
+                    if (values[i].getIterations() > nrOfLoops) {
+                        nrOfLoops = values[i].getIterations();
+                    }
+                }
+
+                for (loopCount = 0;; loopCount++) {
+                    for (int i = 0; i < nrOfLoops; i++) {
+                        for (int k = 0; k < values.length; k++) {
+                            if (i < values[k].getIterations()) {
+                                if (!stresser.continueExecution()) {
+                                    // no time to eat all heap
+                                    return;
+                                }
+                                byte[] tmp = new byte[values[k].getSize()];
+                                holdObjects.add(tmp);
+                                currentAllocatedSize += (long) values[k].getSize();
+                            }
+                        }
+                    }
+                }
+            } catch (OutOfMemoryError oome) {
+                long oomMaxMemory = r.maxMemory();
+
+                holdObjects = null;
+
+                double myPercentUsed =
+                        (((double) (currentAllocatedSize))
+                        / oomMaxMemory) * 100;
+
+                log.info("Heap usage percentage ( "
+                        + myPercentUsed + " %) " + myPercentUsed);
+            } finally {
+                // NOTE: In case OOM wasn't hit, release references
+                // and cleanup by calling System.gc();
+                holdObjects = null;
+            }
+        } catch (OutOfMemoryError oome2) {
+            throw new TestFailure("OutOfMemoryError thrown even though it shouldn't. "
+                    + "Please investigate.", oome2);
+        }
+    }
+
+    public static void main(String[] args) {
+        GC.runTest(new HeapUsageTest(), args);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/gctests/HeapUsageTest/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/gctests/InterruptGC/InterruptGC.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,116 @@
+/*
+ * Copyright (c) 2002, 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/gctests/InterruptGC.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent]
+ * VM Testbase readme:
+ * In this test, threads perform garbage collection while constantly
+ * interrupting each other. Another thread generates the garbage.
+ * The test runs for approximately one minute (see nsk.share.runner.ThreadsRunner
+ * and nsk.share.runner.RunParams). The test passes if no exceptions are generated.
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm gc.gctests.InterruptGC.InterruptGC -gp random(arrays) -ms low
+ */
+
+package gc.gctests.InterruptGC;
+
+import nsk.share.gc.*;
+import nsk.share.test.*;
+import nsk.share.gc.gp.*;
+
+import java.util.*;
+
+/**
+ * The test starts one thread which generates garbage and several other
+ * thread which continuously do System.gc() and interrupt each other.
+ */
+public class InterruptGC extends ThreadedGCTest implements GarbageProducerAware, MemoryStrategyAware {
+        private GarbageProducer garbageProducer;
+        private MemoryStrategy memoryStrategy;
+        private List<Interrupter> interrupters = new ArrayList<Interrupter>();
+        private int count;
+        private long size;
+
+        private class GarbageCreator implements Runnable {
+                public void run() {
+                        Object[] arr = new Object[count];
+                        for (int i = 0; i < count && getExecutionController().continueExecution(); ++i)
+                                arr[i] = garbageProducer.create(size);
+                }
+        }
+
+        private class Interrupter implements Runnable {
+                private Thread thread;
+
+                public void run() {
+                        if (thread == null)
+                                thread = Thread.currentThread();
+                        Interrupter interrupter = interrupters.get(LocalRandom.nextInt(interrupters.size()));
+                        Thread thread = interrupter.getThread();
+                        if (thread != null)
+                                thread.interrupt();
+                        System.gc();
+                }
+
+                public Thread getThread() {
+                        return thread;
+                }
+        }
+
+        protected Runnable createRunnable(int i) {
+                switch (i) {
+                case 0:
+                        return new GarbageCreator();
+                default:
+                        Interrupter interrupter = new Interrupter();
+                        interrupters.add(interrupter);
+                        return interrupter;
+                }
+        }
+
+        public void run() {
+                size = GarbageUtils.getArraySize(runParams.getTestMemory(), memoryStrategy);
+                count = GarbageUtils.getArrayCount(runParams.getTestMemory(), memoryStrategy);
+                super.run();
+        }
+
+        public void setGarbageProducer(GarbageProducer garbageProducer) {
+                this.garbageProducer = garbageProducer;
+        }
+
+        public void setMemoryStrategy(MemoryStrategy memoryStrategy) {
+                this.memoryStrategy = memoryStrategy;
+        }
+
+        public static void main(String[] args) {
+                GC.runTest(new InterruptGC(), args);
+        }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/gctests/InterruptGC/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/gctests/JumbleGC/JumbleGC.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,120 @@
+/*
+ * Copyright (c) 2002, 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/gctests/JumbleGC.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent]
+ * VM Testbase readme:
+ * A vector of 10 elements is filled up with references to
+ * CicrcularLinkedList and Binary Trees of 0.1 Meg. Once this
+ * entire structure has been built, all elements in the Vecor are set to null
+ * creating 1Meg of garbage. The Vector is repopulated once again.
+ * With ineffective garbage collection, the heap will soon fill up.
+ * If an OutofMemoryError is thrown, the test fails.
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm -XX:-UseGCOverheadLimit gc.gctests.JumbleGC.JumbleGC
+ */
+
+package gc.gctests.JumbleGC;
+
+import nsk.share.test.*;
+import nsk.share.gc.*;
+import java.util.Vector;
+
+public class JumbleGC extends TestBase {
+        public void run() {
+                int TreeSize = 1000;
+                int gc_count;
+                int randNum;
+                int num = 0;
+
+                Vector v = new Vector(10);
+
+                // Build a tree containing 100 treeNodes occupying about
+                // 1Meg of heap space.
+
+                gc_count = 0;
+                try {
+                        for(int i = 0; i < 10 ; i++) {
+                                if ( i % 2 == 0 )
+                                        v.addElement(buildCircularLinkedList());
+                                else
+                                        v.addElement(buildTree());
+                        }
+
+                        while (gc_count < 10) {
+
+                                for (int i = 0; i < 10 ; i++)
+                                        v.setElementAt(null, i);
+
+                                for (int i = 0; i < 10 ; i++) {
+                                        if ( i % 2 == 0 )
+                                                v.setElementAt(buildCircularLinkedList(),i);
+                                        else
+                                                v.setElementAt(buildTree(),i);
+                                }
+                                gc_count ++;
+                                log.info("Finished iteration # " + gc_count);
+                        }
+
+                } catch (OutOfMemoryError e) {
+                        log.error("Test Failed.");
+                        setFailed(true);
+                }
+                log.info("Test Passed.");
+        }
+
+        public static void main(String args[]){
+                GC.runTest(new JumbleGC(), args);
+        }
+
+        // build a binary tree of 0.1 Meg.(100 treeNodes in the three, each of 100 bytes
+
+        private Tree buildTree() {
+                int i, randNum;
+
+                i = 0;
+                Tree newTree = new Tree(100);
+                while (i < 100) {
+                        randNum = LocalRandom.nextInt(0, 1000000);
+                        newTree.addElement(randNum);
+                        i++;
+                }
+                return newTree;
+        }
+
+        // build a circular linked list of 0.1 Meg
+        private CircularLinkedList  buildCircularLinkedList() {
+                CircularLinkedList cl;
+                cl = new CircularLinkedList(100);
+                for(int i = 0; i < 1000; i++)
+                        cl.grow();
+                return cl;
+        }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/gctests/JumbleGC/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/gctests/JumbleGC/Tree.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,221 @@
+/*
+ * Copyright (c) 2002, 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.
+ */
+
+package gc.gctests.JumbleGC;
+
+import java.util.Vector ;
+
+class treeNode {
+   static int memorySinkSize = 100;
+   int info;
+   treeNode left;
+   treeNode right;
+   int [] memory_sink;
+
+   public treeNode(int info) {
+      this.info = info;
+      memory_sink = new int[memorySinkSize];
+   }
+}
+
+
+public class Tree {
+
+    private treeNode TreeRoot;      // root of Tree
+    private int elementCount;   // number of elements in Tree
+    Vector TreeValues;   // all the nodal values in the tree
+                                // duplicated in this array.
+    private int TreeValueIndex; // Where to store next Tree value
+
+
+    Tree(int TreeSize) { TreeValues = new Vector(TreeSize); }
+
+    synchronized void addElement(int o) {
+      treeNode p,q;
+
+      treeNode newnode = new treeNode(o);
+      p = TreeRoot;
+      q = null;
+
+      while(p != null){
+         q = p;
+         if(newnode.info <= p.info)
+            p = p.left;
+         else
+            p = p.right;
+      }
+
+      if ( q == null ){
+          TreeRoot = newnode;
+          return;
+      }
+      if (newnode.info <= q.info )
+          q.left = newnode;
+      else
+          q.right = newnode;
+      elementCount++;
+      TreeValues.addElement(new Integer(o));
+   }
+
+
+int getTreeValue(int index) {
+      Integer num;
+      num = (Integer) TreeValues.elementAt(index);
+      TreeValues.removeElementAt(index);
+      return num.intValue();
+   }
+
+
+   int vectorSize(){ return TreeValues.size(); }
+
+
+   synchronized void PrettyPrint(){
+      Print(TreeRoot, "");
+   }
+
+   private void Print( treeNode root, String indent) {
+      if(root == null){
+         return;
+      }
+      Print(root.right, indent + "    ");
+      System.out.println(indent + root.info);
+      Print(root.left, indent + "    ");
+   }
+
+
+   synchronized int getNodeNumber(){return elementCount; }
+
+   synchronized private treeNode findNode(int o) {
+      treeNode p, q;
+      p = TreeRoot;
+      while(p != null && p.info != o){
+          q = p;
+          if (o < p.info )
+              p = p.left;
+          else if(o > p.info)
+              p = p.right;
+      }
+      return p;
+   }
+
+   // destroy subtree rooted at treeNode containing int o
+   // creating a subtree of garbage rooted at treeNode containing int o
+
+   void destroySubTree(int o) {
+       treeNode p,q;
+
+       // find treeNode containing p.
+       p = TreeRoot;
+       q = null;
+       while(p != null && p.info != o){
+          q = p;
+          if (o < p.info )
+              p = p.left;
+          else if(o > p.info)
+              p = p.right;
+       }
+
+       if (p == null){  // couldnt find treeNode
+           return;
+       }
+
+      //  decrease elementCount of tree by the number of treeNodes
+      //  in sub-tree rooted at p
+
+       elementCount -= getCount(p);
+       if (q == null){ // destroy the whole tree
+           TreeRoot = null;
+           return;
+       }
+
+       if (p.info > q.info ) // deleting right child
+           q.right = null;
+       else
+           q.left = null;
+   }
+
+
+   synchronized void deleteElement(int o){
+      treeNode p,q;
+      treeNode rc, sub_node, leftmost, leftmost_parent,s;
+
+      p = TreeRoot;
+      q = null;
+      sub_node = null;
+
+      while(p != null && p.info != o){
+          q = p;
+          if (o < p.info )
+              p = p.left;
+          else if(o > p.info)
+              p = p.right;
+      }
+
+      if ( p == null) // couldnt find treeNode
+           return;
+
+      rc = p.right;
+
+      if (rc == null){
+          sub_node = p.left;
+      } else if (rc.left == null) {
+          rc.left = p.left;
+          sub_node = p.right;
+      }else if ( rc.left != null && rc.right != null) {
+          s = rc;
+          leftmost_parent = null;
+          leftmost = null;
+          while ( s != null){
+              leftmost_parent = leftmost;
+              leftmost = s;
+              s = s.left;
+          }
+          leftmost_parent.left = leftmost.right;
+          leftmost.left = p.left;
+          leftmost.right= p.right;
+          sub_node = leftmost;
+      }
+
+      if ( q == null ){
+           TreeRoot = sub_node;
+           return;
+      }
+
+      if (p.info > q.info ) // deleting right child
+           q.right = sub_node;
+      else
+           q.left = sub_node;
+
+      return;
+   }
+
+
+   private int getCount( treeNode root) {
+      if (root == null )
+         return 0;
+      if (root.left == null && root.right == null)
+         return 1;
+      else
+         return getCount(root.left) + getCount(root.right) + 1;
+   }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/gctests/JumbleGC002/JumbleGC002.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,201 @@
+/*
+ * Copyright (c) 2003, 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/gctests/JumbleGC002.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent, quarantine]
+ * VM Testbase readme:
+ * DESCRIPTION
+ *     The test checks that Garbage Collector can manage jumble in the JVM. The
+ *     test fails if any unexpected exceptions and errors are thrown or the JVM
+ *     is not crashed.
+ *     The test starts a number of threads that is set in *.cfg file or calculates
+ *     that value based on the machine. All threads have
+ *     java.util.Vector field anf they fill that vector with 4 types of objects:
+ *         1. Initialized long[]
+ *         2. Uninitialized double[]
+ *         3. Initialized int[]
+ *         4. A nsk.share.gc.NonbranchyTree (number of nodes and their size depend
+ *            on valkue returned by Runtime.maxMemory())
+ *     As soon as the vector is filled, each thread removes half elements of it and
+ *     then fills those places of the vector again. However, all threads use just
+ *     about 10% of maximum amount of memory that JVM attemts to use, so
+ *     OutOfMemoryError is treated as a failure. That means GC does not work
+ *     quickly enough to destroy all objects that do not have references. The
+ *     procedure of filling and cleaning of the vector is repeated for
+ *     INTERNAL_ITERATIONS times.
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm -XX:-UseGCOverheadLimit gc.gctests.JumbleGC002.JumbleGC002
+ */
+
+package gc.gctests.JumbleGC002;
+
+import java.io.*;
+import java.util.*;
+import java.util.concurrent.ThreadLocalRandom;
+
+import nsk.share.*;
+import nsk.share.gc.*;
+
+/**
+ * This test simply does Algorithms.eatMemory() in a loop
+ * in multiple threads.
+ */
+public class JumbleGC002 extends ThreadedGCTest {
+
+    // The test should fill just about 10% of the heap
+    final static double PART_OF_HEAP = 0.1;
+    // Maximum number of elements in an array of primitive types
+    final static int ARRAY_MAX_LENGTH = 10;
+    // Internal number of iterations to create new objects and to drop
+    // references
+    final static int INTERNAL_ITERATIONS = 150;
+    // Size of core for each node of a tree
+    final static int EACH_NODE_SIZE = 1;
+    // Number of bytes that arrays of primitive types take in the vector
+    final static long PRIMITIVE_ARRAYS_SIZE = (long) (8 * ARRAY_MAX_LENGTH
+            + 8 * ARRAY_MAX_LENGTH + 4 * ARRAY_MAX_LENGTH);
+
+    private class Eater implements Runnable {
+
+        private Vector vector;
+        int numberOfElements;
+        int numberOfQuarters;
+        int id;
+        int nodes;
+        ThreadLocalRandom random = ThreadLocalRandom.current();
+
+        public Eater(int id, int numberOfQuarters, int nodes) {
+            this.numberOfQuarters = numberOfQuarters;
+            numberOfElements = 4 * numberOfQuarters;
+            this.id = id;
+            this.nodes = nodes;
+        }
+
+        public void run() {
+            // Make jumble in the heap!
+            initVector();
+            while (getExecutionController().continueExecution()) {
+                fillVector();
+                cleanVector();
+            }
+        }
+
+        // Initialize the vector and build appropriate number of cells in it
+        private void initVector() {
+            vector = new Vector();
+            for (int i = 0; i < numberOfElements; i++) {
+                vector.addElement(null);
+            }
+        }
+
+        // Fill the vector. It is devided into quarters. Each quarters has an
+        // initialized array of long and int, and uninitialized array of double.
+        // Each array has not more than ARRAY_MAX_LENGTH elements. The fourth
+        // element in the quarter is a NonbranchyTree.
+        private void fillVector() {
+            for (int i = 0; i < numberOfQuarters; i++) {
+
+                // Append initialized long[]
+                int length = random.nextInt(ARRAY_MAX_LENGTH);
+                long[] l = new long[length];
+                for (int j = 0; j < length; j++) {
+                    l[j] = (long) j;
+                }
+                if (vector.elementAt(4 * i) == null) {
+                    vector.setElementAt(l, 4 * i);
+                }
+
+                // Append not initialized double[]
+                length = random.nextInt(ARRAY_MAX_LENGTH);
+                double[] d = new double[length];
+                if (vector.elementAt(4 * i + 1) == null) {
+                    vector.setElementAt(d, 4 * i + 1);
+                }
+
+                // Append initialized int[]
+                length = random.nextInt(ARRAY_MAX_LENGTH);
+                int[] n = new int[length];
+                for (int j = 0; j < length; j++) {
+                    n[j] = j;
+                }
+                if (vector.elementAt(4 * i + 2) == null) {
+                    vector.setElementAt(n, 4 * i + 2);
+                }
+
+                // Append a tree. Every even thread has a "bent" tree.
+                NonbranchyTree tree = new NonbranchyTree(nodes, 0.3f, EACH_NODE_SIZE);
+                if (id % 2 == 0) {
+                    tree.bend();
+                }
+                if (vector.elementAt(4 * i + 3) == null) {
+                    vector.setElementAt(tree, 4 * i + 3);
+                }
+            }
+        }
+
+        // Drop references to half of the elements of the vector
+        private void cleanVector() {
+            int index = random.nextInt(numberOfElements / 2);
+            for (int i = index; i < index + numberOfElements / 2; i++) {
+                vector.setElementAt(null, i);
+            }
+        }
+    }
+
+    protected Runnable createRunnable(int i) {
+        // Perform calculations specific to the test
+        long memoryForThread = (long) (Runtime.getRuntime().maxMemory() * PART_OF_HEAP / runParams.getNumberOfThreads());
+        int numberOfQuarters;
+
+        if (i == 0) {
+            // The very first thread
+            numberOfQuarters = 1;
+        } else {
+            // All other threads
+            numberOfQuarters = 8;
+        }
+
+        // Calculate number of nodes for a tree depending on number of
+        // elements in the Vector
+
+        double freeMemory = (double) memoryForThread / numberOfQuarters
+                - (double) PRIMITIVE_ARRAYS_SIZE;
+        int nodes = (int) (freeMemory / (NonbranchyTree.MIN_NODE_SIZE + EACH_NODE_SIZE));
+        nodes = Math.max(1, nodes);
+        log.debug("Thread " + i + " has a tree with "
+                + nodes + " node(s).");
+
+        return new Eater(i, numberOfQuarters, nodes);
+    }
+
+    public static void main(String args[]) {
+        GC.runTest(new JumbleGC002(), args);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/gctests/JumbleGC002/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/gctests/LargeObjects/large001/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/gctests/LargeObjects/large001/large001.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,255 @@
+/*
+ * Copyright (c) 2004, 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/gctests/LargeObjects/large001.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent, quick]
+ * VM Testbase readme:
+ * DESCRIPTION
+ *     The test checks that Garbage Collector correctly does not throw any
+ *     unexpected exceptions/errors while allocating large objects (classes
+ *     that have more than 65535 fields and classes that have less than 65535
+ *     fields). 65535 of fields is a limitation for JVM (see JVM specification
+ *     Second edition 4.10).
+ *     Since it is impossible to create one class with about 65535 of fields
+ *     (javac cannot compile it), a child class extends a parent class, so the
+ *     fields are devided into two subsets. However, the child class still has
+ *     about 65535 of fields.
+ *     The test starts a number of threads. This number is either set in *.cfg
+ *     file or is calculated by the test itself based on the machine (see
+ *     nsk.share.gc.Algorithms.getThreadsCount() method). As soon as all threads
+ *     are started, each thread begins its checking.
+ *     There are 13 classes to be loaded by each thread. These classes are
+ *     generated by nsk.share.gc.Generator (see its javadoc for more details).
+ *     Each class has a huge number of fields, but this number is less than the JVM
+ *     limitation.
+ *     The test loads the classes with nsk.share.gc.GCClassUnloader class that
+ *     extends nsk.share.ClassUnloader and has a bit different algorith of eating
+ *     heap. As soon as a class is loaded, the test creates an instance of
+ *     it - allocates an object of that type. Then it drops references to the
+ *     class and to the instance and tries to unload the class. The test does not
+ *     expect any exceptions to be thrown.
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ *
+ * @comment generate and compile nsk.share.gc.newclass.* classes
+ * @run driver nsk.share.gc.GenClassesBuilder
+ *
+ * @run main/othervm
+ *      -XX:-UseGCOverheadLimit
+ *      -Xlog:gc*
+ *      gc.gctests.LargeObjects.large001.large001
+ *      -largeClassesPath classes
+ *      -isOverLimitFields false
+ *      -aggregationDepth 0
+ *      -t 1
+ */
+
+package gc.gctests.LargeObjects.large001;
+
+import java.lang.reflect.*;
+import java.lang.ref.WeakReference;
+import java.util.*;
+import nsk.share.TestFailure;
+
+
+import nsk.share.gc.*;
+import nsk.share.*;
+
+public class large001 extends ThreadedGCTest {
+
+    // Package of the classes to be loaded
+    final static String PREFIX = "nsk.share.gc.newclass.";
+    // A bunch of classes that have number of fields more than JVM limitation
+    final static String[] LCLASSES = {PREFIX + "private_int_lchild",
+        PREFIX + "protected_short_lchild",
+        PREFIX + "public_long_lchild",
+        PREFIX + "public_Object_lchild",
+        PREFIX + "static_byte_lchild",
+        PREFIX + "static_float_lchild",
+        PREFIX + "transient_boolean_lchild",
+        PREFIX + "volatile_double_lchild",
+        PREFIX + "protected_combination_lchild",
+        PREFIX + "public_combination_lchild",
+        PREFIX + "static_combination_lchild",
+        PREFIX + "transient_combination_lchild",
+        PREFIX + "volatile_combination_lchild"
+    };
+    // A bunch of classes that have number of fields less than JVM limitation
+    final static String[] SCLASSES = {PREFIX + "private_int_schild",
+        PREFIX + "protected_short_schild",
+        PREFIX + "public_long_schild",
+        PREFIX + "public_Object_schild",
+        PREFIX + "static_byte_schild",
+        PREFIX + "static_float_schild",
+        PREFIX + "transient_boolean_schild",
+        PREFIX + "volatile_double_schild",
+        PREFIX + "protected_combination_schild",
+        PREFIX + "public_combination_schild",
+        PREFIX + "static_combination_schild",
+        PREFIX + "transient_combination_schild",
+        PREFIX + "volatile_combination_schild"
+    };
+    boolean isOverLimitFields = true;
+    int aggregationDepth = 0;
+    String largeClassesPath;
+
+    private class Worker implements Runnable {
+
+        int id;
+
+        public Worker(int id) {
+            this.id = id;
+        }
+
+        public void run() {
+            try {
+                // Use special ClassUnloader to load/unload classes
+                ClassUnloader unloader = new ClassUnloader();
+                String[] classes = isOverLimitFields ? LCLASSES : SCLASSES;
+
+                for (String name : classes) {
+                    // Load the class
+                    log.debug(id + ": Loading class: " + name);
+                    unloader.loadClass(name, largeClassesPath);
+                    log.debug(id + ": Class loaded: " + name);
+
+                    Class loadedClass = unloader.getLoadedClass();
+                    Object loadedClassInstance = loadedClass.newInstance();
+
+                    log.debug(id + ": Instance of the class: " + loadedClassInstance);
+                    int depth = aggregationDepth;
+                    List<WeakReference> refs = new ArrayList<WeakReference>(depth);
+                    addObjRef(loadedClassInstance, loadedClass, depth, refs);
+
+                    // Drop all references to the class and try to unload it
+                    Algorithms.eatMemory(getExecutionController());
+                    log.debug(id + ": Testing non-null after GC force for: " + name);
+                    if (loadedClass == null || loadedClassInstance == null) {
+                        throw new Exception("Null class");
+                    }
+                    verifyObjRef(loadedClassInstance, depth);
+                    for (WeakReference ref : refs) {
+                        if (ref.get() == null) {
+                            throw new Exception("Unexpected null reference");
+                        }
+                    }
+                    refs = null;
+                    loadedClass = null;
+                    loadedClassInstance = null;
+
+                    log.debug(id + ": Unloading class: "
+                            + name);
+                    boolean result = unloader.unloadClass(getExecutionController());
+                    log.debug(id + ": Result of uloading "
+                            + "class " + name + ": " + result);
+                }
+            } catch (OutOfMemoryError oome) {
+                // just skip if we eat memory in several threads...
+                // rethrow in the case of one thread
+                if (runParams.getNumberOfThreads() == 1) {
+                    throw oome;
+                }
+            } catch (Throwable t) {
+                throw new TestFailure("Unexpected exception: ", t);
+            }
+        }
+
+        // This method recursively create chain of aggregated objects for given object
+        public void addObjRef(Object object, Class clazz, int count, List<WeakReference> list) throws Throwable {
+            if (count == 0) {
+                return;
+            }
+
+            Field[] fields = object.getClass().getFields();
+            for (Field field : fields) {
+                if (field.getName().startsWith("obj")) {
+                    Object addedObject = clazz.newInstance();
+                    field.set(object, addedObject);
+                    System.out.println("Added field " + field.getName() + "  .... " + count);
+                    addObjRef(addedObject, clazz, count - 1, list);
+                    list.add(new WeakReference<Object>(addedObject));
+                }
+            }
+        }
+
+        // This method recursively verfiy chain of aggregated objects for given object.
+        // Throws null pointer exception of objP/C field is null
+        public void verifyObjRef(Object object, int count) throws Throwable {
+            if (count == 0) {
+                return;
+            }
+
+            Field[] fields = object.getClass().getFields();
+            for (Field field : fields) {
+                if (field.getName().startsWith("obj")) {
+                    Object obj = field.get(object);
+                    verifyObjRef(obj, count - 1);
+                }
+            }
+        }
+    }
+
+    public large001(String[] args) {
+        for (int i = 0; i < args.length; i++) {
+            if (args[i].equals("-largeClassesPath")) {
+                largeClassesPath = args[++i];
+            } else if (args[i].equals("-isOverLimitFields")) {
+                isOverLimitFields = Boolean.getBoolean(args[++i]);
+            } else if (args[i].equals("-aggregationDepth")) {
+                aggregationDepth = Integer.parseInt(args[++i]);
+            }
+        }
+        if (largeClassesPath == null || largeClassesPath.length() == 0) {
+            throw new TestFailure("No classpath for large classes is given");
+        }
+    }
+
+    @Override
+    protected Runnable createRunnable(int i) {
+        return new Worker(i);
+    }
+
+    @Override
+    public void run() {
+        if (isOverLimitFields) {
+            log.debug("Loading classes that have number "
+                    + "of fields over limitation (more "
+                    + "than 65535)");
+        } else {
+            log.debug("Loading classes that have number "
+                    + "of fields under limitation (less "
+                    + "than 65535)");
+        }
+        super.run();
+    }
+
+    public static void main(String args[]) {
+        GC.runTest(new large001(args), args);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/gctests/LargeObjects/large002/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/gctests/LargeObjects/large002/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,72 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/gctests/LargeObjects/large002.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent]
+ * VM Testbase readme:
+ * DESCRIPTION
+ *     The test checks that Garbage Collector correctly does not throw any
+ *     unexpected exceptions/errors while allocating large objects (classes
+ *     that have more than 65535 fields and classes that have less than 65535
+ *     fields). 65535 of fields is a limitation for JVM (see JVM specification
+ *     Second edition 4.10).
+ *     Since it is impossible to create one class with about 65535 of fields
+ *     (javac cannot compile it), a child class extends a parent class, so the
+ *     fields are devided into two subsets. However, the child class still has
+ *     about 65535 of fields.
+ *     The test starts a number of threads. This number is either set in *.cfg
+ *     file or is calculated by the test itself based on the machine (see
+ *     nsk.share.gc.Algorithms.getThreadsCount() method). As soon as all threads
+ *     are started, each thread begins its checking.
+ *     There are 13 classes to be loaded by each thread. These classes are
+ *     generated by nsk.share.gc.Generator (see its javadoc for more details).
+ *     Each class has a huge number of fields, and the number of fields is more than
+ *     the JVM limitation.
+ *     The test loads the classes with nsk.share.gc.GCClassUnloader class that
+ *     extends nsk.share.ClassUnloader and has a bit different algorith of eating
+ *     heap. As soon as a class is loaded, the test creates an instance of
+ *     it - allocates an object of that type. Then it drops references to the
+ *     class and to the instance and tries to unload the class. The test does not
+ *     expect any exceptions to be thrown.
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ *
+ * @comment generate and compile nsk.share.gc.newclass.* classes
+ * @run driver nsk.share.gc.GenClassesBuilder
+ *
+ * @run main/othervm
+ *      -XX:-UseGCOverheadLimit
+ *      gc.gctests.LargeObjects.large001.large001
+ *      -largeClassesPath classes
+ *      -isOverLimitFields true
+ *      -aggregationDepth 0
+ *      -t 1
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/gctests/LargeObjects/large003/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/gctests/LargeObjects/large003/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,76 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/gctests/LargeObjects/large003.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent]
+ * VM Testbase readme:
+ * DESCRIPTION
+ *     The test checks that Garbage Collector correctly does not throw any
+ *     unexpected exceptions/errors while allocating large objects (classes
+ *     that have more than 65535 fields and classes that have less than 65535
+ *     fields). 65535 of fields is a limitation for JVM (see JVM specification
+ *     Second edition 4.10).
+ *     Since it is impossible to create one class with about 65535 of fields
+ *     (javac cannot compile it), a child class extends a parent class, so the
+ *     fields are devided into two subsets. However, the child class still has
+ *     about 65535 of fields.
+ *     The test starts a number of threads. This number is either set in *.cfg
+ *     file or is calculated by the test itself based on the machine (see
+ *     nsk.share.gc.Algorithms.getThreadsCount() method). As soon as all threads
+ *     are started, each thread begins its checking.
+ *     There are 13 classes to be loaded by each thread. These classes are
+ *     generated by nsk.share.gc.Generator (see its javadoc for more details).
+ *     Each class has a huge number of fields, but this number is less than the JVM
+ *     limitation.
+ *     The test loads the classes with nsk.share.gc.GCClassUnloader class that
+ *     extends nsk.share.ClassUnloader and has a bit different algorith of eating
+ *     heap. As soon as a class is loaded, the test creates an instance of
+ *     it - allocates an object of that type. Then it drops references to the
+ *     class and to the instance and tries to unload the class. The test does not
+ *     expect any exceptions to be thrown.
+ *     Additionaly to original tests this test create object with large count of
+ *     field which contains also a reference to other such object wich also
+ *     contains same reference and so on. The deep of such aggregation is controlled
+ *     by the test. These references are verified after GC.
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ *
+ * @comment generate and compile nsk.share.gc.newclass.* classes
+ * @run driver nsk.share.gc.GenClassesBuilder
+ *
+ * @run main/othervm
+ *      -XX:-UseGCOverheadLimit
+ *      gc.gctests.LargeObjects.large001.large001
+ *      -largeClassesPath classes
+ *      -isOverLimitFields false
+ *      -aggregationDepth 3
+ *      -t 1
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/gctests/LargeObjects/large004/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/gctests/LargeObjects/large004/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,76 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/gctests/LargeObjects/large004.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent]
+ * VM Testbase readme:
+ * DESCRIPTION
+ *     The test checks that Garbage Collector correctly does not throw any
+ *     unexpected exceptions/errors while allocating large objects (classes
+ *     that have more than 65535 fields and classes that have less than 65535
+ *     fields). 65535 of fields is a limitation for JVM (see JVM specification
+ *     Second edition 4.10).
+ *     Since it is impossible to create one class with about 65535 of fields
+ *     (javac cannot compile it), a child class extends a parent class, so the
+ *     fields are devided into two subsets. However, the child class still has
+ *     about 65535 of fields.
+ *     The test starts a number of threads. This number is either set in *.cfg
+ *     file or is calculated by the test itself based on the machine (see
+ *     nsk.share.gc.Algorithms.getThreadsCount() method). As soon as all threads
+ *     are started, each thread begins its checking.
+ *     There are 13 classes to be loaded by each thread. These classes are
+ *     generated by nsk.share.gc.Generator (see its javadoc for more details).
+ *     Each class has a huge number of fields, but this number is less than the JVM
+ *     limitation.
+ *     The test loads the classes with nsk.share.gc.GCClassUnloader class that
+ *     extends nsk.share.ClassUnloader and has a bit different algorith of eating
+ *     heap. As soon as a class is loaded, the test creates an instance of
+ *     it - allocates an object of that type. Then it drops references to the
+ *     class and to the instance and tries to unload the class. The test does not
+ *     expect any exceptions to be thrown.
+ *     Additionaly to original tests this test create object with large count of
+ *     field which contains also a reference to other such object wich also
+ *     contains same reference and so on. The deep of such aggregation is controlled
+ *     by the test. These references are verified after GC.
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ *
+ * @comment generate and compile nsk.share.gc.newclass.* classes
+ * @run driver nsk.share.gc.GenClassesBuilder
+ *
+ * @run main/othervm
+ *      -XX:-UseGCOverheadLimit
+ *      gc.gctests.LargeObjects.large001.large001
+ *      -largeClassesPath classes
+ *      -isOverLimitFields true
+ *      -aggregationDepth 1
+ *      -t 1
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/gctests/LargeObjects/large005/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/gctests/LargeObjects/large005/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,76 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/gctests/LargeObjects/large005.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent]
+ * VM Testbase readme:
+ * DESCRIPTION
+ *     The test checks that Garbage Collector correctly does not throw any
+ *     unexpected exceptions/errors while allocating large objects (classes
+ *     that have more than 65535 fields and classes that have less than 65535
+ *     fields). 65535 of fields is a limitation for JVM (see JVM specification
+ *     Second edition 4.10).
+ *     Since it is impossible to create one class with about 65535 of fields
+ *     (javac cannot compile it), a child class extends a parent class, so the
+ *     fields are devided into two subsets. However, the child class still has
+ *     about 65535 of fields.
+ *     The test starts a number of threads. This number is either set in *.cfg
+ *     file or is calculated by the test itself based on the machine (see
+ *     nsk.share.gc.Algorithms.getThreadsCount() method). As soon as all threads
+ *     are started, each thread begins its checking.
+ *     There are 13 classes to be loaded by each thread. These classes are
+ *     generated by nsk.share.gc.Generator (see its javadoc for more details).
+ *     Each class has a huge number of fields, but this number is less than the JVM
+ *     limitation.
+ *     The test loads the classes with nsk.share.gc.GCClassUnloader class that
+ *     extends nsk.share.ClassUnloader and has a bit different algorith of eating
+ *     heap. As soon as a class is loaded, the test creates an instance of
+ *     it - allocates an object of that type. Then it drops references to the
+ *     class and to the instance and tries to unload the class. The test does not
+ *     expect any exceptions to be thrown.
+ *     Additionaly to original tests this test create object with large count of
+ *     field which contains also a reference to other such object wich also
+ *     contains same reference and so on. The deep of such aggregation is controlled
+ *     by the test. These references are verified after GC.
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ *
+ * @comment generate and compile nsk.share.gc.newclass.* classes
+ * @run driver nsk.share.gc.GenClassesBuilder
+ *
+ * @run main/othervm
+ *      -XX:-UseGCOverheadLimit
+ *      gc.gctests.LargeObjects.large001.large001
+ *      -largeClassesPath classes
+ *      -isOverLimitFields true
+ *      -aggregationDepth 3
+ *      -t 1
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/gctests/LoadUnloadGC/LoadUnloadGC.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,130 @@
+/*
+ * Copyright (c) 2002, 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/gctests/LoadUnloadGC.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent, monitoring]
+ * VM Testbase readme:
+ * In this test a 1000 classes are loaded and unloaded in a loop.
+ * Class0 gets loaded which results in Class1 getting loaded and so on all
+ * the way uptill class1000.  The classes should be unloaded whenever a
+ * garbage collection takes place because their classloader is made unreachable
+ * at the end of the each loop iteration. The loop is repeated 1000 times.
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @build nsk.share.gc.ClassChain
+ * @run main/othervm
+ *      -XX:MaxMetaspaceSize=64M
+ *      -XX:MetaspaceSize=32M
+ *      -XX:CompressedClassSpaceSize=32M
+ *      gc.gctests.LoadUnloadGC.LoadUnloadGC
+ */
+
+package gc.gctests.LoadUnloadGC;
+
+import nsk.share.test.*;
+import nsk.share.gc.*;
+import nsk.share.classload.ClassPathNonDelegatingClassLoader;
+import vm.share.monitoring.MemoryPoolFinder;
+
+import java.io.*;
+import java.util.*;
+import java.lang.management.MemoryPoolMXBean;
+
+/**
+ * This test checks that classes are unloaded when loaded multiple times
+ * with custom class loader.
+ */
+public class LoadUnloadGC extends ThreadedGCTest {
+        private final String className = "nsk.share.gc.ClassChain";
+        private int [] memory_reserve = new int[10000];
+
+        private class Loader implements Runnable {
+                private Class class_zero_class;
+                private Object class_zero_object;
+
+                public void run() {
+                        try {
+                                // load Class0 and instantiate it
+                                // This will cause all thousand classes to get loaded
+                                ClassPathNonDelegatingClassLoader loader = new ClassPathNonDelegatingClassLoader();
+                                class_zero_class = loader.loadClass(className, false);
+                                class_zero_object = class_zero_class.newInstance();
+                                // Set all references to null . This should cause a GC
+                                // which should forces an unloading of all these
+                                // unreferenced classes.
+                                class_zero_class = null;
+                                class_zero_object = null;
+                                loader = null;
+                        } catch (ClassNotFoundException e) {
+                                throw new RuntimeException(e);
+                        } catch (InstantiationException e) {
+                                throw new RuntimeException(e);
+                        } catch (IllegalAccessException e) {
+                                throw new RuntimeException(e);
+                        }
+                }
+        }
+
+        protected Runnable createRunnable(int i) {
+                return new Loader();
+        }
+
+        protected static int getThreadCount() {
+                MemoryPoolMXBean bean = MemoryPoolFinder.findPool(MemoryPoolFinder.METASPACE);
+                ClassPathNonDelegatingClassLoader loader = new ClassPathNonDelegatingClassLoader();
+                long used = bean.getUsage().getUsed();
+                long free = 0;
+                int classesCount = 1000;
+                int classesToLoad = 10;
+                if(bean.getUsage().getMax() == -1) {
+                        throw new RuntimeException("Metaspace size should be limited for this test.");
+                }
+                try {
+                        for(int i = 1; i <= classesToLoad; i++) {
+                                loader.loadClass("nsk.share.gc.Class"+i);
+                        }
+                } catch (Exception e) {
+                        throw new RuntimeException(e);
+                }
+                used = bean.getUsage().getUsed() - used;
+                free = (bean.getUsage().getMax() - bean.getUsage().getUsed())/2;
+                return Math.min((int)(0.95*free/(classesCount/classesToLoad*used)),
+                                Runtime.getRuntime().availableProcessors());
+        }
+
+        public static void main(String args[]) {
+                int threadCount = getThreadCount();
+                if (Arrays.binarySearch(args,"-t") < 0) {
+                       args = Arrays.copyOf(args,args.length+2);
+                       args[args.length-2] = "-t";
+                       args[args.length-1] = Integer.toString(threadCount);
+                }
+                GC.runTest(new LoadUnloadGC(), args);
+        }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/gctests/LoadUnloadGC/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/gctests/LoadUnloadGC2/LoadUnloadGC2.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,66 @@
+/*
+ * Copyright (c) 2007, 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/gctests/LoadUnloadGC2.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent, quick]
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm -XX:-UseGCOverheadLimit gc.gctests.LoadUnloadGC2.LoadUnloadGC2
+ */
+
+package gc.gctests.LoadUnloadGC2;
+
+import nsk.share.*;
+import nsk.share.test.*;
+import nsk.share.gc.*;
+import nsk.share.gc.gp.*;
+import nsk.share.gc.gp.classload.*;
+import java.lang.reflect.Array;
+
+public class LoadUnloadGC2 extends GCTestBase {
+        public void run() {
+                Stresser stresser = new Stresser(runParams.getStressOptions());
+                stresser.start(500000);
+                try {
+                        while (stresser.iteration()) {
+                                GarbageProducer garbageProducer = new GeneratedClassProducer();
+                                log.info("Iteration: " + stresser.getIteration());
+                                GarbageUtils.eatMemory(stresser, garbageProducer, 0);
+                                garbageProducer = null;
+                        }
+                } finally {
+                        stresser.finish();
+                }
+        }
+
+        public static void main(String[] args) {
+                Tests.runTest(new LoadUnloadGC2(), args);
+        }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/gctests/LoadUnloadGC2/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/gctests/MTLinkedListGC/MTLinkedListGC.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,133 @@
+/*
+ * Copyright (c) 2002, 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/gctests/MTLinkedListGC.
+ * VM Testbase keywords: [gc, stress, nonconcurrent]
+ * VM Testbase readme:
+ * In this test 1000 threads contribute in the formation
+ * of 1 Meg circular Linked list. Insertion into the linked list
+ * is sequential. Once formed, the linked list is converted to
+ * garbage and the process repeated 50 times. The test fails
+ * if an OutofMemoryException is thrown and passes otherwise.
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm gc.gctests.MTLinkedListGC.MTLinkedListGC
+ */
+
+package gc.gctests.MTLinkedListGC;
+
+import java.util.Vector;
+import nsk.share.TestFailure;
+
+class CircularLinkedList {
+        synchronized void addElement(String info) {
+                node newnode;
+                int elementCount ; // Number of nodes in LinkedList
+                elementCount = elementCount();
+                // Do not allow the linked list to grow to more
+                // than  100000 nodes
+                if (elementCount >= MAXNODES)
+                         return;
+                newnode = new node(info);
+                if (Root == null) {
+                         Root = newnode;
+                         Root.next = Root;
+                         Root.prev = Root;
+                }
+                else {
+                         newnode.next = Root.next;
+                         Root.next.prev = newnode;
+                         Root.next = newnode;
+                         newnode.prev = Root;
+                }
+        }
+        private synchronized int elementCount() {
+                node p;
+                int count;
+                if (Root == null)
+                        return 0;
+                p = Root;
+                count = 0;
+                do {
+                        p = p.prev;
+                        count++;
+                } while(p != Root);
+                return count;
+        }
+        private node Root;
+        private final int MAXNODES = 100000;
+}
+
+class LinkedListGrower extends Thread {
+        LinkedListGrower(int ThreadNumber) {
+                setName("Thread-" + ThreadNumber);
+        }
+
+        public void run() {
+                LinkedListHolder.getCircularLinkedList().addElement(getName());
+        }
+}
+
+class LinkedListHolder {
+        private static CircularLinkedList cl = new CircularLinkedList();
+        static CircularLinkedList getCircularLinkedList() { return cl; }
+        static void getNewList() { cl = new CircularLinkedList(); }
+}
+
+public class MTLinkedListGC {
+        public static void main(String args[]) {
+                int memory_reserve[] = new int [1000];
+                Thread ThreadsArray[] = new LinkedListGrower[1000];
+                int count;
+//              for(int i = 0; i < ThreadsArray.length; i++ )
+//                      ThreadsArray[i] = new LinkedListGrower(i);
+                count = 0;
+                try {
+                        while(count < 50 ){
+                                for(int i = 0; i < ThreadsArray.length; i++ )
+                                        ThreadsArray[i] = new LinkedListGrower(i);
+                                for(int i = 0 ; i < ThreadsArray.length ; i++)
+                                        ThreadsArray[i].start();
+                                try {
+                                        for(int i =0 ; i < ThreadsArray.length ; i++)
+                                                ThreadsArray[i].join();
+                                } catch(Exception e) { }
+                                //turn the old linked list into garbage
+                                LinkedListHolder.getNewList();
+                                System.out.println("Finished iteration " + count);
+                                count ++;
+                        }
+                } catch (OutOfMemoryError e) {
+                        memory_reserve = null;
+                        System.gc();
+                        throw new TestFailure("Test Failed at " + count +"th iteration.");
+                }
+                System.out.println("Test Passed");
+        }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/gctests/MTLinkedListGC/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/gctests/MTLinkedListGC/node.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,35 @@
+/*
+ * Copyright (c) 2002, 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.
+ */
+package gc.gctests.MTLinkedListGC;
+
+class node {
+  int sink[];
+  String name;
+  node prev;
+  node next;
+
+  public node (String threadName){
+     name = threadName;
+     sink = new int[1000];
+  }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/gctests/MTasyncGC/MTasyncGC.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,93 @@
+/*
+ * Copyright (c) 2002, 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
+ * @key gc
+ *
+ * @summary converted from VM Testbase gc/gctests/MTasyncGC.
+ * VM Testbase keywords: [gc]
+ * VM Testbase readme:
+ * This test creates 1000 threads that run in a sequential
+ * fashion with each thread in turn generating 1Meg of garbage.
+ * The test relies upon the garbage collector asynchrnonously
+ * reclaiming garbage.
+ * The test fails if an OutOfMemoryError is thrown and passes
+ * if the test proceeds to completion without an exception being
+ * thrown.
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm gc.gctests.MTasyncGC.MTasyncGC
+ */
+
+package gc.gctests.MTasyncGC;
+
+import java.util.Vector;
+import nsk.share.TestFailure;
+
+// Each thread creates 1Meg of garbage in the run() method.
+
+class MemEvil extends Thread {
+    static Vector v = new Vector();
+    static {
+        for(int i = 0; i < 10; i++)
+           v.addElement(new char [100000]);
+    }
+
+    public void run () {
+        int i = 0;
+        while(i < 10) {
+           v.setElementAt(new char[100000], i);
+           i++;
+        }
+   }
+}
+
+
+public class MTasyncGC {
+
+    public static void main(String args[] ){
+       int i;
+       int memory_reserve[] = new int [10000];
+       Thread threadsHolder[] = new Thread[1000];
+
+       for(i = 0; i < threadsHolder.length; i++)
+           threadsHolder[i] = new MemEvil();
+
+       i = 0;
+       while(i < threadsHolder.length ){
+           try {
+              threadsHolder[i].start();
+              threadsHolder[i].join();
+           } catch ( Exception  e ) {
+                memory_reserve = null;
+                System.gc();
+                throw new TestFailure("Test Failed.", e);
+           }
+           threadsHolder[i] = null;
+           i++;
+       }
+   }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/gctests/MTsyncGC/MTsyncGC.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,108 @@
+/*
+ * Copyright (c) 2002, 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
+ * @key gc
+ *
+ * @summary converted from VM Testbase gc/gctests/MTsyncGC.
+ * VM Testbase keywords: [gc]
+ * VM Testbase readme:
+ * This test creates 1000 threads that run in a sequential
+ * fashion with each thread in turn generating 1Meg of garbage.
+ * Before exiting, each of these threads synchronously calls
+ * the garbage collector in another thread.
+ * The test fails if an OutOfMemoryError is thrown and passes
+ * if nothing happens.
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm gc.gctests.MTsyncGC.MTsyncGC
+ */
+
+package gc.gctests.MTsyncGC;
+
+import nsk.share.TestFailure;
+import java.util.Vector;
+
+
+
+
+// Each thread creates 1Meg of garbage in the run() method.
+
+class MemEvil extends Thread {
+    static Vector v = new Vector();
+    static {
+        for(int i = 0; i < 10; i++)
+           v.addElement(new char [100000]);
+    }
+
+    public void run () {
+        int i = 0;
+        while(i < 10) {
+           v.setElementAt(new char[100000], i);
+           i++;
+        }
+        try {
+            //synchronously invoke the garbage
+            // collector in  another thread
+           MTsyncGC.reclaimer.start();
+           MTsyncGC.reclaimer.join();
+        }catch (Exception e) {}
+   }
+}
+
+
+class Reclaimer extends Thread{
+    public void run() {
+       System.gc();
+    }
+}
+
+public class MTsyncGC {
+    static Reclaimer reclaimer = new Reclaimer();
+    public static void main(String args[] ){
+       int i;
+       int memory_reserve[] = new int [10000];
+       Thread threadsHolder[] = new Thread[1000];
+
+       for(i = 0; i < threadsHolder.length; i++)
+           threadsHolder[i] = new MemEvil();
+
+       i = 0;
+       while(i < threadsHolder.length ){
+           try {
+              threadsHolder[i].start();
+              threadsHolder[i].join();
+           } catch ( Exception  e ) {
+                memory_reserve = null;
+                System.gc();
+                throw new TestFailure("Test Failed.", e);
+           }
+           threadsHolder[i] = null;
+           i++;
+       }
+   }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/gctests/MatrixJuggleGC/MatrixJuggleGC.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,196 @@
+/*
+ * Copyright (c) 2002, 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/gctests/MatrixJuggleGC.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent]
+ * VM Testbase readme:
+ * ********************************
+ * set TIMEOUT = 20
+ * *******************************
+ * This test creates a 2 dimensional matrix of (100X100)10,000 elements.
+ * Each element in this matrix houses the address of a "Cell" that
+ * occupies about 100 bytes. The total memory occupied by this structure is
+ * about 1M.
+ * Once this structure, has been built, 5 threads are let loose that
+ * randomly choose an element in this matrix and set its contents to null
+ * effectively creating 100bytes of garbage. The threads continue to act
+ * until all 5 threads combined have "nulled out" half the cells in the matrix.
+ * At this point, 5 refiller threads proceed to refill the empty
+ * matrix elements with new cells.
+ * Once the refiller threads have refilled all the empty matrix elements
+ * with new cells, the cycle begins all over again with the 5 "emptier"
+ * threads "nulling out" cells randomly.
+ * This is repeated 50 times.  Every iteration produces  0.5 Meg
+ * of garbage. The maximum amount of live memory at use at any time is 1Meg.
+ * If no garbage collection takes place during any of the ten iterations,
+ * the total amount(live + garbage) of heap space consumed at the end
+ * of the program is 0.5*50 + 1 = 26Meg.
+ * The test fails if an OutOfMemory Exception is thrown.
+ *        -----------------------------        --------
+ *       |     |     |     |     |     |       | 100  |
+ *       |     |     |     |     |  *--|------>| bytes|
+ *       |     |     |     |     |     |       --------
+ *        -----------------------------
+ *       .     .     .     .     .     .
+ *       .     .     .     .     .     .
+ *       .     .     .     .     .     .
+ *       .
+ *       |     |     |     |     |     |
+ *       |     |     |     |     |     |
+ *       |     |     |     |     |     |
+ *        ------------------------------
+ *       |     |     |     |     |     |
+ *       |     |     |     |     |     |
+ *       |     |     |     |     |     |
+ *        ------------------------------
+ *       |     |     |     |     |     |
+ *       |     |     |     |     |     |
+ *       |     |     |     |     |     |
+ *        ------------------------------
+ *       |     |     |     |     |     |
+ *       |     |     |     |     |     |
+ *       |     |     |     |     |     |
+ *        -----------------------------
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm gc.gctests.MatrixJuggleGC.MatrixJuggleGC -iterations 1000000
+ */
+
+package gc.gctests.MatrixJuggleGC;
+
+import nsk.share.test.*;
+import nsk.share.gc.*;
+import java.util.Stack;
+import java.util.EmptyStackException;
+
+public class MatrixJuggleGC extends GCTestBase {
+        private int threadCount = 5;
+        private Matrix cm = new Matrix(100, 100);
+        private Stack<IndexPair> emptiedLocations = new Stack<IndexPair>();
+
+        private class CellEmptier extends Thread {
+                private boolean keepEmptying(){
+                        int numberOfCells;
+                        int matrixSize;
+
+                        matrixSize = cm.returnArrayBound();
+                        numberOfCells = (matrixSize + 1) * (matrixSize + 1) ;
+                        if (cm.getCellCount() < numberOfCells/2)
+                                return true;
+                        else
+                                return false;
+                }
+
+                public void run() {
+                        int i, j, matrixSize,emptyCells;
+
+                        matrixSize = cm.returnArrayBound();
+                        while (keepEmptying()) {
+                                i = LocalRandom.nextInt(0, matrixSize);
+                                j = LocalRandom.nextInt(0, matrixSize);
+                                emptiedLocations.push(new IndexPair(i,j));
+                                cm.clear(i, j);
+                        }
+                }
+        }
+
+        private class CellRefiller extends Thread {
+                public void run() {
+                        int i, j, emptyCells;
+                        while (!emptiedLocations.empty()) {
+                                try {
+                                        IndexPair pair = emptiedLocations.pop();
+                                        cm.repopulate(pair.getI(), pair.getJ());
+                                } catch (EmptyStackException e) {
+                                        break;
+                                }
+                        }
+                }
+        }
+
+        private class StackDump extends Thread {
+                public void run() {
+                        int emptyCells;
+                        while (true) {
+                                emptyCells = emptiedLocations.size();
+                                System.out.println("Number of empty cells = " + emptyCells);
+                        }
+                }
+        }
+
+        private void runIteration() {
+                Thread emptierArray[] = new Thread[threadCount];
+                Thread fillerArray[]  = new Thread[threadCount];
+                for (int i = 0; i < threadCount; i++)
+                        emptierArray[i] = new CellEmptier();
+                for (int i = 0; i < threadCount; i++)
+                        emptierArray[i].start();
+
+                // wait for "emptier" threads to finish their job
+
+                int i = 0;
+                while (i < threadCount) {
+                        try {
+                                emptierArray[i].join();
+                        } catch(InterruptedException e) {}
+                        i++;
+                }
+
+                // Now start refilling.
+
+                for (i = 0; i < threadCount; i++)
+                        fillerArray[i] = new CellRefiller();
+                for (i = 0; i < threadCount; i++)
+                        fillerArray[i].start();
+
+                i = 0;
+                while (i < threadCount ){
+                        try {
+                                fillerArray[i].join();
+                        } catch(InterruptedException e){}
+                        i++;
+                }
+                // reset count of cells
+                cm.resetCellCount();
+        }
+
+        public void run() {
+                threadCount = runParams.getNumberOfThreads();
+                Stresser stresser = new Stresser(runParams.getStressOptions());
+                stresser.start(runParams.getIterations());
+                while (stresser.iteration())
+                        runIteration();
+                stresser.finish();
+        }
+
+        public static void main(String args[]) {
+                GC.runTest(new MatrixJuggleGC(), args);
+        }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/gctests/MatrixJuggleGC/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/gctests/MemoryEater/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/gctests/MemoryEater/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,37 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/gctests/MemoryEater.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent]
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm -XX:-UseGCOverheadLimit gc.gctests.MemoryEaterMT.MemoryEaterMT -t 1
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/gctests/MemoryEaterMT/MemoryEaterMT.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,60 @@
+/*
+ * Copyright (c) 2007, 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/gctests/MemoryEaterMT.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent]
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm -XX:-UseGCOverheadLimit gc.gctests.MemoryEaterMT.MemoryEaterMT
+ */
+
+package gc.gctests.MemoryEaterMT;
+
+import nsk.share.gc.*;
+
+/**
+ * This test simply does Algorithms.eatMemory() in a loop
+ * in multiple threads.
+ */
+public class MemoryEaterMT extends ThreadedGCTest {
+
+    private class Eater implements Runnable, OOMStress {
+        public void run() {
+            Algorithms.eatMemory(getExecutionController());
+        }
+    }
+
+    protected Runnable createRunnable(int i) {
+        return new Eater();
+    }
+
+    public static void main(String args[]) {
+        GC.runTest(new MemoryEaterMT(), args);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/gctests/MemoryEaterMT/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/gctests/ObjectMonitorCleanup/MonitorThread.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,81 @@
+/*
+ * Copyright (c) 2011, 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.
+ */
+package gc.gctests.ObjectMonitorCleanup;
+
+import nsk.share.test.ExecutionController;
+
+/**
+ * Helper thread class for ObjectMonitorCleanup class
+ */
+public class MonitorThread extends Thread {
+
+    /**
+     * Object used for synchronization between threads in the test.
+     */
+    public static volatile Object otherObject;
+    /**
+     * Simple way for the test to check if the running thread completed
+     * it's work or not.
+     */
+    public boolean completedOk;
+    /**
+     * Tells the worker thread if it should keep running or if
+     * it should terminate.
+     */
+    public volatile boolean keepRunning;
+    private ExecutionController stresser;
+
+    /**
+     * Constructor for the thread.
+     *
+     * @param maxRunTimeMillis Maximum time in milliseconds that
+     * the thread should run.
+     */
+    public MonitorThread(ExecutionController stresser) {
+        this.stresser = stresser;
+        this.otherObject = new Object(); /* avoid null on first reference */
+    }
+
+    /**
+     * Main entry point for the thread.
+     */
+    public final void run() {
+        synchronized (this) {
+            completedOk = false;
+            keepRunning = true;
+        }
+
+        // Do we need to lock keepRunning before we check it?
+        while (keepRunning
+                && stresser.continueExecution()) {
+            Object placeholder = otherObject;
+            synchronized (placeholder) {
+                placeholder.notifyAll();
+            }
+        }
+
+        synchronized (this) {
+            completedOk = keepRunning;
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/gctests/ObjectMonitorCleanup/ObjectMonitorCleanup.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,104 @@
+/*
+ * Copyright (c) 2011, 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/gctests/ObjectMonitorCleanup.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent, jrockit]
+ * VM Testbase readme:
+ * DESCRIPTION
+ * Verifies that object monitor objects are cleared
+ * out just like PhantomReferences are.
+ *
+ * COMMENTS
+ * This test was ported from JRockit test suite.
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm -XX:-UseGCOverheadLimit gc.gctests.ObjectMonitorCleanup.ObjectMonitorCleanup
+ */
+
+package gc.gctests.ObjectMonitorCleanup;
+
+import nsk.share.TestFailure;
+import nsk.share.gc.GC;
+import nsk.share.gc.GCTestBase;
+import nsk.share.test.Stresser;
+
+
+public class ObjectMonitorCleanup extends GCTestBase {
+
+    /**
+     * Verifies that object monitor objects are cleared out
+     * just like PhantomReferences are.
+     *
+     * @return True if successful.
+     */
+    @Override
+    public void run() {
+        Stresser stresser = new Stresser(runParams.getStressOptions());
+        stresser.start(0);
+
+
+        MonitorThread mt = new MonitorThread(stresser);
+        mt.start();
+
+        try {
+            while (stresser.continueExecution()) {
+                MonitorThread.otherObject = new byte[(int) (runParams.getTestMemory() / 10000)];
+                synchronized (MonitorThread.otherObject) {
+                    MonitorThread.otherObject.wait(10);
+                }
+            }
+        } catch (InterruptedException e) {
+            synchronized (mt) {
+                mt.keepRunning = false;
+            }
+
+            try {
+                Thread.sleep(runParams.getSleepTime());
+            } catch (InterruptedException e1) {
+            }
+
+            throw new TestFailure("Problem doing synchronization.");
+        }
+
+        try {
+            mt.join();
+
+            if (!mt.completedOk) {
+                throw new TestFailure("Test thread didn't report "
+                        + "successful completion");
+            }
+        } catch (InterruptedException e) {
+            throw new TestFailure("Couldn't wait for thread to finish.");
+        }
+    }
+
+    public static void main(String[] args) {
+        GC.runTest(new ObjectMonitorCleanup(), args);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/gctests/ObjectMonitorCleanup/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/gctests/OneeFinalizerTest/OneeFinalizerTest.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,214 @@
+/*
+ * Copyright (c) 2011, 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/gctests/OneeFinalizerTest.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent, jrockit]
+ * VM Testbase readme:
+ * DESCRIPTION
+ * Regression test that verifies that only one finalizer gets called.
+ *
+ * COMMENTS
+ * This test was ported from JRockit test suite.
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm
+ *      -XX:-UseGCOverheadLimit
+ *      -Xlog:gc:gc.log
+ *      gc.gctests.OneeFinalizerTest.OneeFinalizerTest
+ */
+
+package gc.gctests.OneeFinalizerTest;
+
+import nsk.share.TestFailure;
+import nsk.share.gc.GC;
+import nsk.share.gc.GCTestBase;
+import nsk.share.gc.gp.GarbageUtils;
+import nsk.share.test.Stresser;
+
+/**
+ * Test that verifies that finalize() method is invoking only once.
+ */
+public class OneeFinalizerTest extends GCTestBase {
+
+    private GlobalSafeCounter[] finalizerCounters = null;
+
+    /**
+     * Helper class used for counting number of calls to finalizers.
+     */
+    protected class GlobalSafeCounter {
+
+        private int counter;
+
+        /**
+         * Constructor that inits the global counter to 0.
+         */
+        protected GlobalSafeCounter() {
+            counter = 0;
+        }
+
+        /**
+         * Reset the global counter to 0.
+         */
+        protected final void resetCounter() {
+            synchronized (this) {
+                counter = 0;
+            }
+        }
+
+        /**
+         * Increase the global counter by 1.
+         */
+        protected final void increaseCounter() {
+            synchronized (this) {
+                counter++;
+            }
+        }
+
+        /**
+         * Retrieve the global counter value.
+         *
+         * @return value of the global counter
+         */
+        protected final int getCounterValue() {
+            int value;
+
+            synchronized (this) {
+                value = counter;
+            }
+
+            return value;
+        }
+    }
+
+    /**
+     * Helper class the implements finalize(), and that increments
+     * the global counters for each finalize() invokation.
+     */
+    protected class FinalizedObject {
+
+        private final int counterIndex;
+
+        /**
+         * Constructor for the helper object which implements finalize().
+         *
+         * @param index Index for the counter in the global array, that
+         * corresponds to this object.
+         */
+        protected FinalizedObject(int index) {
+            counterIndex = index;
+        }
+
+        /**
+         * Increases the global counter for this object when finalize()
+         * gets called (to make sure each finalizer gets called onee).
+         */
+        @Override
+        protected final void finalize() {
+            finalizerCounters[counterIndex].increaseCounter();
+        }
+    }
+
+    private void initOneeFinalizerTest(int numberOfObjects) {
+        // NOTE: Set to null in case it's been used before (to prevent OOM)
+        finalizerCounters = null;
+        finalizerCounters = new GlobalSafeCounter[numberOfObjects];
+
+        for (int i = 0; i < numberOfObjects; i++) {
+            finalizerCounters[i] = new GlobalSafeCounter();
+        }
+    }
+
+    /**
+     * Tests that the finalize() method on each FinalizedObject instance
+     * has been called exactly one time.
+     */
+    @Override
+    public void run() {
+
+
+        int numberOfObjects = 2000;
+
+        initOneeFinalizerTest(numberOfObjects);
+
+        FinalizedObject[] testObjects = new FinalizedObject[numberOfObjects];
+
+        // creates garbage
+        for (int i = 0; i < numberOfObjects; i++) {
+            testObjects[i] = new FinalizedObject(i);
+        }
+
+        if (testObjects[0].hashCode() == 212_85_06) {
+            System.out.println("Bingo!!!");
+        }
+
+        testObjects = null;
+
+        Stresser stresser = new Stresser(runParams.getStressOptions());
+        stresser.start(0);
+        /* force finalization  */
+        GarbageUtils.eatMemory(stresser);
+        if (!stresser.continueExecution()) {
+            // may be we didn't eat all memory and didn't provoke GC
+            System.out.println("Passed without check");
+            return;
+        }
+        System.gc();
+        System.runFinalization();
+        System.gc();
+        System.runFinalization();
+        System.gc();
+
+        int numberOfFinalizersRunMoreThanOnce = 0;
+        int numberOfFinalizersNotRun = 0;
+
+        for (int i = 0; i < numberOfObjects; i++) {
+            int counter = finalizerCounters[i].getCounterValue();
+            if (counter > 1) {
+                numberOfFinalizersRunMoreThanOnce++;
+                System.err.println("Object #" + i + " counter = " + counter);
+            } else if (counter == 0) {
+                System.err.println("WARNING: Finalizer not run for object #" + i);
+                numberOfFinalizersNotRun++;
+            }
+        }
+
+        if (numberOfFinalizersNotRun > 0) {
+            System.err.println("WARNING: " + numberOfFinalizersNotRun + " finalizers not run");
+        }
+
+        if (numberOfFinalizersRunMoreThanOnce != 0) {
+            throw new TestFailure("OneeFinalizerTest failed. " + numberOfFinalizersRunMoreThanOnce + " errors");
+        }
+        System.out.println("Test passed.");
+    }
+
+    public static void main(String[] args) {
+        GC.runTest(new OneeFinalizerTest(), args);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/gctests/OneeFinalizerTest/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/gctests/PhantomReference/PRHelper.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,64 @@
+/*
+ * Copyright (c) 2011, 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.
+ */
+package gc.gctests.PhantomReference;
+
+import java.lang.ref.PhantomReference;
+import java.lang.ref.ReferenceQueue;
+
+/**
+ * Helper class that extends PhantomReference, that we can use
+ * to match the hash code for the referent object.
+ */
+public final class PRHelper extends PhantomReference {
+
+    private int referentHashCode;
+
+    /**
+     * Constructor for extended PhantomReference class.
+     *
+     * @param o              Referred object
+     * @param referenceQueue Reference queue to attach the PR to
+     */
+    public PRHelper(Object o, ReferenceQueue referenceQueue) {
+        super(o, referenceQueue);
+        referentHashCode = -1;
+    }
+
+    /**
+     * Get the referred objects hash code.
+     *
+     * @return Hash code for referred object
+     */
+    public int getReferentHashCode() {
+        return referentHashCode;
+    }
+
+    /**
+     * Set the original referred objects hash code for tracking.
+     *
+     * @param referentHashCode New hash code
+     */
+    public void setReferentHashCode(int referentHashCode) {
+        this.referentHashCode = referentHashCode;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/gctests/PhantomReference/PhantomHelper.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,142 @@
+/*
+ * Copyright (c) 2011, 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.
+ */
+package gc.gctests.PhantomReference;
+
+import java.lang.ref.ReferenceQueue;
+import java.util.Date;
+import java.util.HashMap;
+
+/**
+ * Helper class that tracks the original hash code for the
+ * object.
+ */
+public final class PhantomHelper {
+
+    private int originalHashCode;
+    private int hashCounter;
+
+    /**
+     * Constructor for helper class that tracks the hash code.
+     *
+     * @param originalHashCode Referred objects hash code
+     */
+    public PhantomHelper(int originalHashCode) {
+        this.originalHashCode = originalHashCode;
+        hashCounter = 1;
+    }
+
+    /**
+     * Get the referred objects original hash code.
+     *
+     * @return Original referred objects hash code
+     */
+    public int getOriginalHashCode() {
+        return originalHashCode;
+    }
+
+    /**
+     * Increase the counter for the number of objects
+     * using this hash code.
+     */
+    public void increaseHashCounter() {
+        hashCounter++;
+    }
+
+    /**
+     * Decrease the counter for the number of objects
+     * using this hash code.
+     */
+    public void decreaseHashCounter() {
+        hashCounter--;
+    }
+
+    /**
+     * Retreive the hash code counter.
+     *
+     * @return Hash code counter value
+     */
+    public int getHashCounter() {
+        return hashCounter;
+    }
+
+    /**
+     * Verify all the hash codes from the objects in the reference
+     * queue against the hash map.
+     *
+     * @param rq Reference queue for the phantom references.
+     * @param hmHelper Hashmap that contains all the hash codes
+     * @param maxWaitTime Maximum time to wait for completion of deref:ing
+     * from the reference queue.
+     * @return True if all hash codes matches
+     */
+    public static final String checkAllHashCodes(ReferenceQueue rq,
+                                                 HashMap hmHelper,
+                                                 long maxWaitTime) {
+        // Check all the phantom references
+        long startTime = new Date().getTime();
+        boolean keepRunning = true;
+
+        while (keepRunning) {
+            try {
+                PRHelper prh = (PRHelper) rq.remove(1000);
+
+                if (prh != null) {
+                    Integer ik = new Integer(prh.getReferentHashCode());
+                    PhantomHelper ph = (PhantomHelper) hmHelper.get(ik);
+
+                    if (ph != null) {
+                        if (ph.getOriginalHashCode()
+                                == prh.getReferentHashCode()) {
+                            ph.decreaseHashCounter();
+                            if (ph.getHashCounter() == 0) {
+                                hmHelper.remove(
+                                        new Integer(prh.getReferentHashCode()));
+                            } else {
+                                hmHelper.put(ik, ph);
+                            }
+                            prh.clear();
+                        }
+                    } else {
+                        return "Unmapped hash code detected. The test is faulty.";
+                    }
+
+                    prh = null;
+                }
+            } catch (InterruptedException e) {
+                ; // Checkstyle wants at least one line here...
+            }
+
+            if (new Date().getTime() - startTime > maxWaitTime) {
+                return "All phantom references weren't processed "
+                        + "in the configured max time ("
+                        + (maxWaitTime / 1000) + " secs)";
+            }
+
+            if (hmHelper.size() == 0) {
+                keepRunning = false;
+            }
+        }
+
+        return null;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/gctests/PhantomReference/PhantomReferenceEvilTest/PhantomReferenceEvilTest.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,183 @@
+/*
+ * Copyright (c) 2004, 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/gctests/PhantomReference/PhantomReferenceEvilTest.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent, jrockit]
+ * VM Testbase readme:
+ * DESCRIPTION
+ * Test that verifies the PhantomReference handling in a more evil way.
+ * In this test, it will only keep every Xth object, thus causing more
+ * fragmentation and fill the heap with unused objects. This test should
+ * not throw any OOME during the test execution.
+ *
+ * COMMENTS
+ * This test was ported from JRockit test suite.
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm
+ *      -XX:-UseGCOverheadLimit
+ *      gc.gctests.PhantomReference.PhantomReferenceEvilTest.PhantomReferenceEvilTest
+ */
+
+package gc.gctests.PhantomReference.PhantomReferenceEvilTest;
+
+import gc.gctests.PhantomReference.PhantomHelper;
+import gc.gctests.PhantomReference.PRHelper;
+import java.lang.ref.ReferenceQueue;
+import java.util.ArrayList;
+import java.util.Random;
+import java.util.HashMap;
+import nsk.share.TestFailure;
+import nsk.share.gc.GC;
+import nsk.share.gc.GCTestBase;
+import nsk.share.gc.Memory;
+import nsk.share.gc.gp.GarbageUtils;
+import nsk.share.test.Stresser;
+
+/**
+ * Tests for the PhantomReference handling in a more evil way.
+ *
+ * This test must be run with a mx value set to ensure
+ * Runtime.maxMemory() doesn't return 0.
+ */
+public class PhantomReferenceEvilTest extends GCTestBase {
+
+    /**
+     * Test that verifies the PhantomReference handling in a more evil way.
+     * In this test, it will only keep every Xth object, thus causing more
+     * fragmentation and fill the heap with unused objects. This test should
+     * not throw any OOME during the test execution.
+     *
+     * @return success if all phantom references were enqueued
+     */
+    public final void run() {
+        long seed;
+        int minSize;
+        int maxSize;
+        int keepEveryXthObject;
+        double memPercentToFill;
+        long maxWaitTime;
+        long counter = 0;
+        long totalMemAlloced = 0;
+        long memToAlloc = 0;
+        long nrOfPrs = 0;
+        Runtime r = Runtime.getRuntime();
+
+
+        seed = runParams.getSeed();
+        minSize = 2048;
+        maxSize = 32768;
+        keepEveryXthObject = 5;
+        memPercentToFill = 0.45;
+        maxWaitTime = 30000;
+        memToAlloc = (long) (r.maxMemory() * memPercentToFill);
+        Random rndGenerator = new Random(seed);
+        long multiplier = maxSize - minSize;
+        ReferenceQueue rq = new ReferenceQueue();
+        HashMap hmHelper = new HashMap();
+        ArrayList alPhantomRefs = new ArrayList();
+
+        try {
+            try {
+                while (totalMemAlloced + Memory.getReferenceSize()
+                        * hmHelper.size() < memToAlloc) {
+                    int allocationSize = ((int) (rndGenerator.nextDouble()
+                            * multiplier)) + minSize;
+                    byte[] tmp = new byte[allocationSize];
+
+                    if (counter % keepEveryXthObject == 0) {
+                        Integer ik = new Integer(tmp.hashCode());
+                        if (hmHelper.containsKey(ik)) {
+                            PhantomHelper ph = (PhantomHelper) hmHelper.get(ik);
+                            ph.increaseHashCounter();
+                            hmHelper.put(ik, ph);
+                        } else {
+                            hmHelper.put(ik, new PhantomHelper(tmp.hashCode()));
+                        }
+
+                        PRHelper prh = new PRHelper(tmp, rq);
+                        prh.setReferentHashCode(tmp.hashCode());
+                        alPhantomRefs.add(prh);
+                        totalMemAlloced +=
+                                Memory.getArraySize(allocationSize, Memory.getByteSize())
+                                + Memory.getReferenceSize()
+                                + Memory.getReferenceObjectSize();
+
+                        //Make sure the temporary object is dereferenced
+                        prh = null;
+                        nrOfPrs++;
+                    }
+
+                    // Make sure the temporary object is dereferenced
+                    tmp = null;
+                    counter++;
+                    if (counter == Long.MAX_VALUE) {
+                        counter = 0;
+                    }
+                }
+            } catch (OutOfMemoryError oome) {
+                alPhantomRefs.clear();
+                hmHelper.clear();
+                log.info(nrOfPrs + " phantom refs had been allocated when "
+                        + "OOME occured");
+                throw new TestFailure("OutOfMemoryException was thrown. This should "
+                        + "not happen during the execution of this test.");
+            }
+
+
+            Stresser stresser = new Stresser(runParams.getStressOptions());
+            stresser.start(0);
+            GarbageUtils.eatMemory(stresser);
+            if (!stresser.continueExecution()) {
+                return; //we couldn't be sure that FullGC is triggered
+            }
+
+            String retInfo = PhantomHelper.checkAllHashCodes(
+                    rq, hmHelper, maxWaitTime);
+            if (retInfo != null) {
+                alPhantomRefs.clear();
+                hmHelper.clear();
+                throw new TestFailure(retInfo);
+            }
+
+            log.info(nrOfPrs + " phantom refs were allocated during the test");
+        } finally {
+            // Make sure the ArrayList:s are live at the end of the test
+            // to make sure that the references gets enqueued.
+            alPhantomRefs.clear();
+            hmHelper.clear();
+            alPhantomRefs = null;
+            hmHelper = null;
+        }
+    }
+
+    public static void main(String[] args) {
+        GC.runTest(new PhantomReferenceEvilTest(), args);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/gctests/PhantomReference/PhantomReferenceEvilTest/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/gctests/PhantomReference/PhantomReferenceTest/PhantomReferenceTest.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,137 @@
+/*
+ * Copyright (c) 2004, 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/gctests/PhantomReference/PhantomReferenceTest.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent, jrockit]
+ * VM Testbase readme:
+ * DESCRIPTION
+ * Test that verifies the PhantomReference handling in JRockit.
+ *
+ * COMMENTS
+ * This test was ported from JRockit test suite.
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm
+ *      -XX:-UseGCOverheadLimit
+ *      gc.gctests.PhantomReference.PhantomReferenceTest.PhantomReferenceTest
+ */
+
+package gc.gctests.PhantomReference.PhantomReferenceTest;
+
+import gc.gctests.PhantomReference.PRHelper;
+import gc.gctests.PhantomReference.PhantomHelper;
+import java.lang.ref.ReferenceQueue;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Random;
+import nsk.share.TestFailure;
+import nsk.share.gc.GC;
+import nsk.share.gc.GCTestBase;
+import nsk.share.gc.gp.GarbageUtils;
+import nsk.share.test.Stresser;
+
+/**
+ * Tests for the PhantomReference handling in JRockit.
+ */
+public class PhantomReferenceTest extends GCTestBase {
+
+    /**
+     * Test that verifies the PhantomReference handling in JRockit.
+     *
+     * @return success if all phantom references were enqueued
+     */
+    public final void run() {
+        long seed;
+        int minSize;
+        int maxSize;
+        int nrOfObjs;
+        int sleepTime;
+        long maxWaitTime;
+
+
+        seed = runParams.getSeed();
+        minSize = 2048;
+        maxSize = 32768;
+        nrOfObjs = 1000;
+        sleepTime = 10000;
+        maxWaitTime = 30000;
+
+        Random rndGenerator = new Random(seed);
+        long multiplier = maxSize - minSize;
+        ReferenceQueue rq = new ReferenceQueue();
+        HashMap hmHelper = new HashMap();
+        ArrayList alPhantomRefs = new ArrayList();
+
+        for (int i = 0; i < nrOfObjs; i++) {
+            int allocationSize = ((int) (rndGenerator.nextDouble()
+                    * multiplier)) + minSize;
+            byte[] tmp = new byte[allocationSize];
+            Integer ik = new Integer(tmp.hashCode());
+            if (hmHelper.containsKey(ik)) {
+                PhantomHelper ph = (PhantomHelper) hmHelper.get(ik);
+                ph.increaseHashCounter();
+                hmHelper.put(ik, ph);
+            } else {
+                hmHelper.put(ik, new PhantomHelper(tmp.hashCode()));
+            }
+
+            PRHelper prh = new PRHelper(tmp, rq);
+            prh.setReferentHashCode(tmp.hashCode());
+            alPhantomRefs.add(prh);
+            prh = null;
+            tmp = null;
+        }
+
+        Stresser stresser = new Stresser(runParams.getStressOptions());
+        stresser.start(0);
+        GarbageUtils.eatMemory(stresser);
+        if (!stresser.continueExecution()) {
+            return; //we couldn't be sure that FullGC is triggered
+        }
+        String retInfo = PhantomHelper.checkAllHashCodes(
+                rq, hmHelper, maxWaitTime);
+        if (retInfo != null) {
+            alPhantomRefs.clear();
+            hmHelper.clear();
+            throw new TestFailure(retInfo);
+        }
+
+        // Make sure the ArrayList:s are live at the end of the test
+        // to make sure that the references gets enqueued.
+        alPhantomRefs.clear();
+        hmHelper.clear();
+
+        alPhantomRefs = null;
+        hmHelper = null;
+    }
+
+    public static void main(String[] args) {
+        GC.runTest(new PhantomReferenceTest(), args);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/gctests/PhantomReference/PhantomReferenceTest/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/gctests/PhantomReference/phantom001/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/gctests/PhantomReference/phantom001/phantom001.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,221 @@
+/*
+ * Copyright (c) 2004, 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/gctests/PhantomReference/phantom001.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent]
+ * VM Testbase readme:
+ * DESCRIPTION
+ *     The test checks that Garbage Collector correctly works with
+ *     PhantomReferences. It also checks that no unexpected exceptions and errors
+ *     are thrown or the JVM is not crashed.
+ *     The test starts a number of threads. Each thread run tests for some time
+ *     or serveral iterations.  See javadoc StressOptions for configuration.
+ *     First of all each thread defines what type to check (there are 11 types
+ *     totally). As soon as the type is defined, a PhantomRefence is created that
+ *     refers to an array of tested type and is registered with in a queue. A
+ *     PhantomRefence for NonbranchyTree and Referent calsses does not refer to
+ *     arrays, but to instances of the classes.
+ *     After that a thread performs next checks for the reference:
+ *         1. The reference is in queue after GC is provoked with
+ *            Algorithms.eatMemory() method (a single thread eats the memory).
+ *         2. reference.get() returns null.
+ *         3. queue.poll() returns the reference that was created.
+ *         4. queue.poll() again returns null.
+ *         5. If the checked type is class (Referent), then it must be finalized,
+ *            since the reference is already enqueued.
+ *         6. reference.clear() does not throw any exception.
+ *     The test extends ThreadedGCTest and implements GarbageProducerAware and
+ *     MemoryStrategyAware interfaces. The corresponding javadoc documentation
+ *     for additional test configuration.
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm gc.gctests.PhantomReference.phantom001.phantom001 -ms low
+ */
+
+package gc.gctests.PhantomReference.phantom001;
+
+import java.lang.ref.*;
+import nsk.share.gc.*;
+import nsk.share.gc.gp.*;
+import nsk.share.gc.gp.string.InternedStringProducer;
+import nsk.share.gc.gp.string.RandomStringProducer;
+
+public class phantom001 extends ThreadedGCTest implements GarbageProducerAware, MemoryStrategyAware {
+
+    private GarbageProducer garbageProducer;
+    private MemoryStrategy memoryStrategy;
+    private InternedStringProducer internedStringProducer = new InternedStringProducer(new RandomStringProducer(10));
+    // Total number of types to test
+    final static int TYPES_COUNT = 12;
+    // Size of array of each tested type. The constant also specifies the
+    // number of nodes in a NonbranchyTree and size of each node
+    final static int SIZE = 100;
+
+    protected Runnable createRunnable(int i) {
+        return new Test();
+    }
+
+    public void setGarbageProducer(GarbageProducer garbageProducer) {
+        this.garbageProducer = garbageProducer;
+    }
+
+    public void setMemoryStrategy(MemoryStrategy memoryStrategy) {
+        this.memoryStrategy = memoryStrategy;
+    }
+
+    public static void main(String[] args) {
+        GC.runTest(new phantom001(), args);
+    }
+
+    // The class implements the logic of the testcase
+    class Test implements Runnable {
+
+        int iteration;
+        private volatile boolean finalized;
+
+        public void run() {
+            try {
+                log.info("iteration " + iteration);
+                ReferenceQueue queue = new ReferenceQueue();
+                PhantomReference reference;
+                int code = iteration % TYPES_COUNT;
+                String type;
+                // Define a specific type for each thread to test
+                switch (code) {
+                    case 0:
+                        reference = new PhantomReference(new byte[SIZE], queue);
+                        type = "byte";
+                        break;
+                    case 1:
+                        reference = new PhantomReference(new short[SIZE], queue);
+                        type = "short";
+                        break;
+                    case 2:
+                        reference = new PhantomReference(new int[SIZE], queue);
+                        type = "int";
+                        break;
+                    case 3:
+                        reference = new PhantomReference(new long[SIZE], queue);
+                        type = "long";
+                        break;
+                    case 4:
+                        reference = new PhantomReference(new char[SIZE], queue);
+                        type = "char";
+                        break;
+                    case 5:
+                        reference = new PhantomReference(new boolean[SIZE], queue);
+                        type = "boolean";
+                        break;
+                    case 6:
+                        reference = new PhantomReference(new double[SIZE], queue);
+                        type = "double";
+                        break;
+                    case 7:
+                        reference = new PhantomReference(new float[SIZE], queue);
+                        type = "float";
+                        break;
+                    case 8:
+                        reference = new PhantomReference(new Object[SIZE], queue);
+                        type = "Object";
+                        break;
+                    case 9:
+                        reference = new PhantomReference(new NonbranchyTree(SIZE, 0.3f, SIZE),
+                                queue);
+                        type = "NonbranchyTree";
+                        break;
+                    case 10:
+                        reference = new PhantomReference(internedStringProducer.create(SIZE), queue);
+                        type = "InternedString";
+                        break;
+                    default:
+                        reference = new PhantomReference(new Referent(), queue);
+                        type = "class";
+                }
+
+                int initialFactor = memoryStrategy.equals(MemoryStrategy.HIGH) ? 1 : (memoryStrategy.equals(MemoryStrategy.LOW) ? 10 : 2);
+                GarbageUtils.eatMemory(getExecutionController(), garbageProducer, initialFactor , 10, 0);
+                if (type.equals("class")) {
+                        while (!finalized && getExecutionController().continueExecution()) {
+                                System.runFinalization(); //does not guarantee finalization, but increases the chance
+                                try {
+                                        Thread.sleep(100);
+                                } catch (InterruptedException e) {}
+                                GarbageUtils.eatMemory(getExecutionController(), garbageProducer, initialFactor , 10, 0);
+                        }
+
+                        //provoke gc once more to make finalized object phantom reachable
+                        GarbageUtils.eatMemory(getExecutionController(), garbageProducer, initialFactor , 10, 0);
+                }
+                if (!getExecutionController().continueExecution()) {
+                    // we were interrrupted by stresser. just exit...
+                    return;
+                }
+                Reference polledReference = null;
+                try {
+                    polledReference = queue.remove();
+                } catch (InterruptedException e) {
+                    log.error("Unexpected InterruptedException during queue.remove().");
+                    setFailed(true);
+                }
+                // Check the reference and the queue
+                // The polled reference must be equal to the one enqueued to
+                // the queue
+
+                if (polledReference != reference) {
+                    log.error("The original reference is not equal to polled reference.");
+                    setFailed(true);
+                }
+
+                // queue.poll() once again must return null now, since there is
+                // only one reference in the queue
+                polledReference = queue.poll();
+                if (polledReference != null) {
+                    log.error("There are more  than one references in the queue.");
+                    setFailed(true);
+                }
+                reference.clear();
+            } catch (OutOfMemoryError e) {
+            }
+            iteration++;
+        }
+
+        class Referent {
+
+                //We need discard this flag to make second and following checks with type.equals("class") useful
+                public Referent() {
+                                finalized = false;
+                        }
+
+                        protected void finalize() {
+                finalized = true;
+            }
+        }
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/gctests/PhantomReference/phantom002/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/gctests/PhantomReference/phantom002/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,61 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/gctests/PhantomReference/phantom002.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent]
+ * VM Testbase readme:
+ * DESCRIPTION
+ *     The test checks that Garbage Collector correctly works with
+ *     PhantomReferences. It also checks that no unexpected exceptions and errors
+ *     are thrown or the JVM is not crashed.
+ *     The test starts a number of threads. Each thread run tests for some time
+ *     or serveral iterations.  See javadoc StressOptions for configuration.
+ *     First of all each thread defines what type to check (there are 11 types
+ *     totally). As soon as the type is defined, a PhantomRefence is created that
+ *     refers to an array of tested type and is registered with in a queue. A
+ *     PhantomRefence for NonbranchyTree and Referent calsses does not refer to
+ *     arrays, but to instances of the classes.
+ *     After that a thread performs next checks for the reference:
+ *         1. The reference is in queue after GC is provoked with
+ *            Algorithms.eatMemory() method (a single thread eats the memory).
+ *         2. reference.get() returns null.
+ *         3. queue.poll() returns the reference that was created.
+ *         4. queue.poll() again returns null.
+ *         5. If the checked type is class (Referent), then it must be finalized,
+ *            since the reference is already enqueued.
+ *         6. reference.clear() does not throw any exception.
+ *     The test extends ThreadedGCTest and implements GarbageProducerAware and
+ *     MemoryStrategyAware interfaces. The corresponding javadoc documentation
+ *     for additional test configuration.
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm gc.gctests.PhantomReference.phantom001.phantom001 -ms high
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/gctests/ReferencesGC/CircularLinkedList.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,83 @@
+/*
+ * Copyright (c) 2002, 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.
+ */
+
+package gc.gctests.ReferencesGC;
+
+class node {
+    byte [] arr;
+    node next;
+    node prev;
+    node(){ arr = new byte[100]; }
+}
+
+public class CircularLinkedList implements Cloneable {
+    private node Root;
+
+    public void addElement() {
+       node newnode;
+
+       newnode = new node();
+       if (Root == null){
+          Root = newnode;
+          Root.next = Root;
+          Root.prev = Root;
+       } else{
+          newnode.next = Root.next;
+          Root.next.prev = newnode;
+          Root.next = newnode;
+          newnode.prev = Root;
+       }
+    }
+
+    public void addNelements(int n) {
+       for (int i = 0; i < n ; i++)
+          addElement();
+    }
+
+    public int elementCount() {
+       node p;
+       int count;
+
+       p = Root;
+       count = 0;
+
+       do {
+          p = p.prev;
+          count++;
+       }while(p != Root);
+       return count;
+    }
+
+    public Object clone() {
+       node p;
+       p = Root;
+
+       if ( p == null ) return null;
+       CircularLinkedList clone = new CircularLinkedList();
+       do {
+          clone.addElement();
+          p = p.prev;
+       } while(p != Root);
+       return clone;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/gctests/ReferencesGC/ReferencesGC.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,213 @@
+/*
+ * Copyright (c) 2002, 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/gctests/ReferencesGC.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent, quick]
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm
+ *      -XX:-UseGCOverheadLimit
+ *      gc.gctests.ReferencesGC.ReferencesGC
+ *      -range 200
+ *      -ratio 0.9
+ *      -t 1
+ */
+
+package gc.gctests.ReferencesGC;
+
+import java.lang.ref.*;
+import nsk.share.TestFailure;
+import nsk.share.gc.Algorithms;
+import nsk.share.gc.GC;
+import nsk.share.gc.ThreadedGCTest;
+import nsk.share.gc.gp.GarbageProducer;
+import nsk.share.gc.gp.GarbageUtils;
+import nsk.share.test.ExecutionController;
+
+public class ReferencesGC extends ThreadedGCTest {
+
+    static int RANGE = 256;
+    static float RATIO = (float) 1.0;
+
+    public static void main(String[] args) {
+        parseArgs(args);
+        GC.runTest(new ReferencesGC(), args);
+    }
+
+    public static void parseArgs(String[] args) {
+        for (int i = 0; i < args.length; i++) {
+            if (args[i].compareTo("-range") == 0) {
+                RANGE = new Integer(args[++i]).intValue();
+            } else if (args[i].compareTo("-ratio") == 0) {
+                RATIO = new Float(args[++i]).floatValue();
+            }
+        }
+    }
+
+    private class Worker implements Runnable {
+
+        static final int WEAK = 0;
+        static final int SOFT = 1;
+        static final int PHANTOM = 2;
+        private ExecutionController stresser;
+        int finalizationMaxTime = 1000 * 60 * runParams.getNumberOfThreads();
+        int[] alive = new int[3];
+        int[] enqued = new int[3];
+        CircularLinkedList holder[] = new CircularLinkedList[RANGE];
+        WeakReference wr[] = new WeakReference[RANGE];
+        SoftReference sr[] = new SoftReference[RANGE];
+        PhantomReference phr[] = new PhantomReference[RANGE];
+        ReferenceQueue refq = new ReferenceQueue();
+        GarbageProducer gp = GarbageUtils.getArrayProducers().get(0);
+        int iter = 0;
+
+        @Override
+        public void run() {
+            if (stresser == null) {
+                stresser = getExecutionController();
+            }
+
+            while (stresser.continueExecution()) {
+                int totalQ = 0;
+                try {
+                    refq = new ReferenceQueue();
+                    alive = new int[3];
+                    enqued = new int[3];
+                    for (int j = 0; j < RANGE; j++) {
+                        holder[j] = new CircularLinkedList();
+                        holder[j].addNelements(300);
+                        wr[j] = new WeakReference(holder[j], refq);
+                        sr[j] = new SoftReference(holder[j], refq);
+                        phr[j] = new PhantomReference(holder[j], refq);
+                    }
+                } catch (OutOfMemoryError oome) {
+                    // we should just skip the test
+                    // the other thread could eat all memory
+                    continue;
+                }
+
+                for (int i = 0; i < RANGE; i++) {
+                    if (wr[i].isEnqueued()) {
+                        ++totalQ;
+                    }
+                    if (sr[i].isEnqueued()) {
+                        ++totalQ;
+                    }
+                    if (phr[i].isEnqueued()) {
+                        ++totalQ;
+                    }
+                }
+                if (totalQ != 0) {
+                    throw new TestFailure("There are " + totalQ + " references in the queue instead 0 before null-assigment.");
+                }
+
+                for (int i = 0; i < (int) (RANGE * RATIO); i++) {
+                    holder[i] = null;
+                }
+
+                Algorithms.eatMemory(stresser);
+                if (!stresser.continueExecution()) {
+                    break;
+                }
+                // At this point OOME was thrown and accordingly to spec
+                // all weak refs should be processed
+
+                alive = new int[3];
+                enqued = new int[3];
+                for (int i = 0; i < RANGE; i++) {
+                    if (wr[i].get() != null) {
+                        ++alive[WEAK];
+                    }
+                    if (wr[i].isEnqueued()) {
+                        ++enqued[WEAK];
+                    }
+                    if (sr[i].get() != null) {
+                        ++alive[SOFT];
+                    }
+                    if (sr[i].isEnqueued()) {
+                        ++enqued[SOFT];
+                    }
+                    if (phr[i].isEnqueued()) {
+                        ++enqued[PHANTOM];
+                    }
+                }
+
+                long waitTime = System.currentTimeMillis() + finalizationMaxTime;
+                while (totalQ < (RANGE * RATIO * 3 * 0.9) && (System.currentTimeMillis() < waitTime)) {
+                    alive = new int[3];
+                    enqued = new int[3];
+                    for (int i = 0; i < RANGE; i++) {
+                        if (wr[i].get() != null) {
+                            ++alive[WEAK];
+                        }
+                        if (wr[i].isEnqueued()) {
+                            ++enqued[WEAK];
+                        }
+                        if (sr[i].get() != null) {
+                            ++alive[SOFT];
+                        }
+                        if (sr[i].isEnqueued()) {
+                            ++enqued[SOFT];
+                        }
+                        if (phr[i].isEnqueued()) {
+                            ++enqued[PHANTOM];
+                        }
+                    }
+                    totalQ = (enqued[WEAK] + enqued[SOFT] + enqued[PHANTOM]);
+                    if (totalQ < (int) (3 * RANGE * RATIO * 0.9)) {
+                        log.debug("After null-assignment to " + (int) (RANGE * RATIO) +
+                                //" elements from " + lower + " to " + (upper - 1) +
+                                " and provoking gc found:\n\t" +
+                                enqued[WEAK] + " weak\n\t" +
+                                enqued[SOFT] + " soft\n\t" +
+                                enqued[PHANTOM] + " phantom " +
+                                " queuened refs and \n\t" +
+                                alive[WEAK] + " weak\n\t" +
+                                alive[SOFT] + " soft\n\t" +
+                                "alive refs.");
+                        try {
+                            log.debug("sleeping to give gc one more chance ......");
+                            Thread.sleep(1000);
+                        } catch (InterruptedException ie) {
+                        }
+                    }
+                }
+                log.debug("iteration.... " + iter++);
+                if (totalQ < (int) (3 * RANGE * RATIO * 0.9) || totalQ > (int) (3 * RANGE * RATIO)) {
+                    throw new TestFailure("Test failed");
+                }
+            }
+        }
+    }
+
+    @Override
+    protected Runnable createRunnable(int i) {
+        return new Worker();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/gctests/ReferencesGC/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/gctests/RememberedSet/RememberedSet.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,170 @@
+/*
+ * Copyright (c) 2010, 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.
+ */
+/*
+ * This test stress RememberetSet procerssing in the G1 by creation of references
+ * between different 1MB blocks.
+ * Test is specific for G1, for other GCs it should just pass.
+ */
+
+
+/*
+ * @test
+ * @modules java.base/jdk.internal.misc:+open java.base/jdk.internal.vm.annotation:+open java.base/sun.reflect.annotation:+open
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/gctests/RememberedSet.
+ * VM Testbase keywords: [gc, stress, stressopt, feature_g1, nonconcurrent]
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm -XX:-UseGCOverheadLimit gc.gctests.RememberedSet.RememberedSet
+ */
+
+package gc.gctests.RememberedSet;
+
+import java.lang.reflect.Field;
+import java.util.ArrayList;
+import java.util.List;
+import nsk.share.gc.GC;
+import nsk.share.gc.MemoryObject;
+import nsk.share.gc.ThreadedGCTest;
+import nsk.share.test.ExecutionController;
+import jdk.internal.misc.Unsafe;
+
+public class RememberedSet extends ThreadedGCTest {
+
+    static class PointerUtils {
+        private static Unsafe unsafe;
+        private static long fieldOffset;
+        private static PointerUtils instance = new PointerUtils();
+        private static boolean compressedRef = false;
+
+        static {
+            try {
+                unsafe = Unsafe.getUnsafe();
+                fieldOffset = unsafe.objectFieldOffset(PointerUtils.class.getDeclaredField("obj"));
+                long fieldOffset0 = unsafe.objectFieldOffset(PointerUtils.class.getDeclaredField("obj0"));
+                int oopSize = (int)Math.abs(fieldOffset - fieldOffset0);
+
+                if (oopSize != unsafe.addressSize()) {
+                    System.out.println("Compressed oops detected");
+                    compressedRef = true;
+                }
+            } catch (Exception ex) {
+                throw new RuntimeException(ex);
+            }
+        }
+
+        private Object obj;
+        private Object obj0;
+
+        public synchronized static long toAddress(Object o) {
+            long address;
+            instance.obj = o;
+
+            if (compressedRef || unsafe.addressSize() == 4) {
+                address = unsafe.getInt(instance, fieldOffset);
+            }
+            else {
+                address = unsafe.getLong(instance, fieldOffset);
+            }
+
+            return address;
+        }
+
+    }
+    private ExecutionController stresser;
+
+    @Override
+    protected Runnable createRunnable(int i) {
+        return new Worker();
+    }
+
+    class Worker implements Runnable {
+
+        static final long BLOCK_SIZE = 1024 * 1024;
+
+
+        // this method tries to allocate a new MemoryObject
+        // which is in another 1MB block
+        MemoryObject getOutOfTheBlockObject(int size, Object obj) {
+            long address = PointerUtils.toAddress(obj);
+            MemoryObject ref = new MemoryObject(size);
+            int attempt = (int) (BLOCK_SIZE / size);
+            while (attempt != 0 && Math.abs(address - PointerUtils.toAddress(ref)) < BLOCK_SIZE) {
+                ref = new MemoryObject(size);
+                attempt--;
+            }
+            return ref;
+        }
+
+        @Override
+        public void run() {
+
+            int size = (int) Math.sqrt(BLOCK_SIZE);
+            int refsCount = (int) (runParams.getTestMemory() / BLOCK_SIZE);
+            int count = (int) (runParams.getTestMemory() / runParams.getNumberOfThreads() / (refsCount * size));
+            // Each cycle 10% of references and 10% of arrays are reallocated
+            int step = 10;
+
+            List<List<MemoryObject>> objs = new ArrayList<List<MemoryObject>>(count);
+            for (int i = 0; i < count; i++) {
+                List<MemoryObject> obj = new ArrayList<MemoryObject>();
+                objs.add(obj);
+                for (int j = 0; j < refsCount; j++) {
+                    obj.add(getOutOfTheBlockObject(size, obj));
+                }
+            }
+            if (stresser == null) {
+                stresser = getExecutionController();
+            }
+            int shift = 0;
+            while (stresser.continueExecution()) {
+                for (int j = shift; j < refsCount; j += step) {
+                    for (int i = 0; i < count; i ++) {
+                        // update each 10th reference to allow GC previous one
+                        List<MemoryObject> obj = objs.get(i);
+                        obj.set(j, getOutOfTheBlockObject(size, obj));
+                    }
+                }
+                for (int i = step - shift; i < count; i += step) {
+                    // update each 10th array of references
+                    // to allocate it in the another 1MB block (as new young object)
+                    List<MemoryObject> obj = new ArrayList<MemoryObject>();
+                    objs.set(i, obj);
+                    for (int j = 0; j < refsCount; j++) {
+                        obj.add(getOutOfTheBlockObject(size, obj));
+                    }
+                }
+                // shift is changed from 0 to step - 1
+                log.debug("shift = " + shift);
+                shift = (shift + 1) % step;
+            }
+        }
+    }
+
+    public static void main(String[] args) {
+        GC.runTest(new RememberedSet(), args);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/gctests/RememberedSet/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/gctests/SoftReference/SoftReferenceTest/SoftReferenceTest.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,150 @@
+/*
+ * Copyright (c) 2004, 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/gctests/SoftReference/SoftReferenceTest.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent, jrockit]
+ * VM Testbase readme:
+ * DESCRIPTION
+ * Test that all SoftReferences has been cleared at time of OOM.
+ *
+ * COMMENTS
+ * This test was ported from JRockit test suite.
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm gc.gctests.SoftReference.SoftReferenceTest.SoftReferenceTest -stressTime 600
+ */
+
+package gc.gctests.SoftReference.SoftReferenceTest;
+
+import java.lang.ref.SoftReference;
+import java.util.ArrayList;
+import java.util.Random;
+import nsk.share.TestFailure;
+import nsk.share.gc.GC;
+import nsk.share.gc.GCTestBase;
+import nsk.share.test.ExecutionController;
+import nsk.share.test.Stresser;
+
+/**
+ * Tests for the SoftReference handling in JRockit.
+ */
+public final class SoftReferenceTest extends GCTestBase {
+
+        private ExecutionController stresser;
+
+    /**
+     * Test that all SoftReferences has been cleared at
+     * time of OOM.
+     *
+     * @return success if all SoftReferences are NULL at
+     * time of OOM.
+     */
+    public void run() {
+        //prepare stresser
+        stresser = new Stresser("Stresser to limit execution time", runParams.getStressOptions());
+        stresser.start(1);
+
+        long seed;
+        int minSize;
+        int maxSize;
+        int keepEveryXthObject;
+        long counter = 0;
+
+        seed = runParams.getSeed();
+        minSize = 2048;
+        maxSize = 32768;
+        keepEveryXthObject = 4;
+
+
+        Random rndGenerator = new Random(seed);
+        long multiplier = maxSize - minSize;
+        ArrayList arrSoftRefs = new ArrayList();
+        ArrayList arrObjects = new ArrayList();
+        long numberOfNotNulledObjects = 0;
+        long oomSoftArraySize = 0;
+
+        try {
+            while (true && stresser.continueExecution()) {
+                int allocationSize = ((int) (rndGenerator.nextDouble()
+                        * multiplier)) + minSize;
+                byte[] tmp = new byte[allocationSize];
+
+                // Keep every Xth object to make sure we hit OOM pretty fast
+                if (counter % keepEveryXthObject == 0) {
+                    arrObjects.add(tmp);
+                } else {
+                    arrSoftRefs.add(new SoftReference(tmp));
+                }
+
+                // Make sure the temporary object is dereferenced
+                tmp = null;
+
+                counter++;
+                if (counter == Long.MAX_VALUE) {
+                    counter = 0;
+                }
+            }
+        } catch (OutOfMemoryError oome) {
+            // Get the number of soft refs first, so we don't trigger
+            // another OOM.
+            oomSoftArraySize = arrSoftRefs.size();
+
+            for (int i = 0; i < arrSoftRefs.size(); i++) {
+                SoftReference sr = (SoftReference) arrSoftRefs.get(i);
+                Object o = sr.get();
+
+                if (o != null) {
+                    numberOfNotNulledObjects++;
+                }
+            }
+
+            // Make sure we clear all refs before we return failure, since
+            // coconut require some memory to complete, and since we're in
+            // an OOM situation, that could cause trouble.
+
+            arrSoftRefs = null;
+            arrObjects = null;
+
+            if (numberOfNotNulledObjects > 0) {
+                throw new TestFailure(numberOfNotNulledObjects + " out of "
+                        + oomSoftArraySize + " SoftReferences was not "
+                        + "null at time of OutOfMemoryError");
+            }
+        } finally {
+            arrSoftRefs = null;
+            arrObjects = null;
+        }
+
+
+    }
+
+    public static void main(String[] args) {
+        GC.runTest(new SoftReferenceTest(), args);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/gctests/SoftReference/SoftReferenceTest/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/gctests/SoftReference/soft001/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/gctests/SoftReference/soft001/soft001.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,201 @@
+/*
+ * Copyright (c) 2004, 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/gctests/SoftReference/soft001.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent]
+ * VM Testbase readme:
+ * DESCRIPTION
+ *     The test checks that Garbage Collector correctly works with
+ *     SoftReferences. It also checks that no unexpected exceptions and errors
+ *     are thrown or the JVM is not crashed.
+ *     The test starts a number of threads. Each thread run tests for some time
+ *     or serveral iterations.  See javadoc StressOptions for configuration.
+ *     First of all each thread defines what type to check (there are 10 types
+ *     totally). As soon as the type is defined, a SoftRefence is created that
+ *     refers to an array of tested type and is registered with in a queue. A
+ *     SoftRefence for NonbranchyTree class does not refer to an array, but to
+ *     instances of the class.
+ *     After that a thread performs next checks for the reference:
+ *         1. The reference is in queue after GC is provoked with
+ *            Algorithms.eatMemory() method (a single thread eats the memory).
+ *         2. queue.remove() returns reference from the queue.
+ *         3. queue.poll() returns null.
+ *         4. reference.clear() does not throw any exception.
+ *     The test extends ThreadedGCTest and implements GarbageProducerAware and
+ *     MemoryStrategyAware interfaces. The corresponding javadoc documentation
+ *     for additional test configuration.
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm gc.gctests.SoftReference.soft001.soft001 -ms low
+ */
+
+package gc.gctests.SoftReference.soft001;
+
+import java.lang.ref.Reference;
+import java.lang.ref.ReferenceQueue;
+import java.lang.ref.SoftReference;
+
+import nsk.share.gc.GC;
+import nsk.share.gc.NonbranchyTree;
+import nsk.share.gc.ThreadedGCTest;
+import nsk.share.gc.gp.GarbageProducer;
+import nsk.share.gc.gp.GarbageProducerAware;
+import nsk.share.gc.gp.GarbageUtils;
+import nsk.share.gc.gp.MemoryStrategy;
+import nsk.share.gc.gp.MemoryStrategyAware;
+import nsk.share.gc.gp.string.InternedStringProducer;
+import nsk.share.gc.gp.string.RandomStringProducer;
+
+public class soft001 extends ThreadedGCTest implements GarbageProducerAware, MemoryStrategyAware {
+
+    private GarbageProducer garbageProducer;
+    private InternedStringProducer internedStringProducer = new InternedStringProducer(new RandomStringProducer(10));
+    private MemoryStrategy memoryStrategy;
+    // Total number of types to test
+    final static int TYPES_COUNT = 11;
+    // Size of array of each tested type. The constant also specifies the
+    // number of nodes in a NonbranchyTree and size of each node
+    final static int SIZE = 100;
+
+    protected Runnable createRunnable(int i) {
+        return new Test();
+    }
+
+    public void setGarbageProducer(GarbageProducer garbageProducer) {
+        this.garbageProducer = garbageProducer;
+    }
+
+    public void setMemoryStrategy(MemoryStrategy memoryStrategy) {
+        this.memoryStrategy = memoryStrategy;
+    }
+
+    public static void main(String[] args) {
+        GC.runTest(new soft001(), args);
+    }
+
+    // The class implements the logic of the testcase
+    class Test implements Runnable {
+
+        int iteration;
+
+        public void run() {
+            // Pre-allocated OOME message to avoid OOME when logging it
+            String oomMsg = "Ignored OOME in run()";
+            try {
+
+                log.info("iteration " + iteration);
+                ReferenceQueue queue = new ReferenceQueue();
+                SoftReference reference;
+                int code = iteration % TYPES_COUNT;
+                String type;
+                // Define a specific type for each thread to test
+                switch (code) {
+                    case 0:
+                        reference = new SoftReference(new byte[SIZE], queue);
+                        type = "byte";
+                        break;
+                    case 1:
+                        reference = new SoftReference(new short[SIZE], queue);
+                        type = "short";
+                        break;
+                    case 2:
+                        reference = new SoftReference(new int[SIZE], queue);
+                        type = "int";
+                        break;
+                    case 3:
+                        reference = new SoftReference(new long[SIZE], queue);
+                        type = "long";
+                        break;
+                    case 4:
+                        reference = new SoftReference(new char[SIZE], queue);
+                        type = "char";
+                        break;
+                    case 5:
+                        reference = new SoftReference(new boolean[SIZE], queue);
+                        type = "boolean";
+                        break;
+                    case 6:
+                        reference = new SoftReference(new double[SIZE], queue);
+                        type = "double";
+                        break;
+                    case 7:
+                        reference = new SoftReference(new float[SIZE], queue);
+                        type = "float";
+                        break;
+                    case 8:
+                        reference = new SoftReference(new Object[SIZE], queue);
+                        type = "Object";
+                        break;
+                    case 9:
+                        reference = new SoftReference(internedStringProducer.create(SIZE), queue);
+                        type = "InternedString";
+                        break;
+                    default:
+                        reference = new SoftReference(new NonbranchyTree(SIZE, 0.3f, SIZE),
+                                queue);
+                        type = "NonbranchyTree";
+                        break;
+                }
+                int initialFactor = memoryStrategy.equals(MemoryStrategy.HIGH) ? 1 : (memoryStrategy.equals(MemoryStrategy.LOW) ? 10 : 2);
+                GarbageUtils.eatMemory(getExecutionController(), garbageProducer, initialFactor , 10, 0);
+                if (!getExecutionController().continueExecution()) {
+                    // we were interrrupted by stresser. just exit...
+                    return;
+                }
+                Reference polledReference = null;
+                try {
+                    polledReference = queue.remove();
+                } catch (InterruptedException e) {
+                    log.error("Unexpected InterruptedException during queue.remove().");
+                    setFailed(true);
+                }
+                // Check the reference and the queue
+                // The polled reference must be equal to the one enqueued to
+                // the queue
+
+                if (polledReference != reference) {
+                    log.error("The original reference is not equal to polled reference.");
+                    setFailed(true);
+                }
+
+                // queue.poll() once again must return null now, since there is
+                // only one reference in the queue
+                polledReference = queue.poll();
+                if (polledReference != null) {
+                    log.error("There are more  than one references in the queue.");
+                    setFailed(true);
+                }
+                reference.clear();
+            } catch (OutOfMemoryError e) {
+                log.info(oomMsg);
+            }
+            iteration++;
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/gctests/SoftReference/soft002/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/gctests/SoftReference/soft002/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,58 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/gctests/SoftReference/soft002.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent]
+ * VM Testbase readme:
+ * DESCRIPTION
+ *     The test checks that Garbage Collector correctly works with
+ *     SoftReferences. It also checks that no unexpected exceptions and errors
+ *     are thrown or the JVM is not crashed.
+ *     The test starts a number of threads. Each thread run tests for some time
+ *     or serveral iterations.  See javadoc StressOptions for configuration.
+ *     First of all each thread defines what type to check (there are 10 types
+ *     totally). As soon as the type is defined, a SoftRefence is created that
+ *     refers to an array of tested type and is registered with in a queue. A
+ *     SoftRefence for NonbranchyTree class does not refer to an array, but to
+ *     instances of the class.
+ *     After that a thread performs next checks for the reference:
+ *         1. The reference is in queue after GC is provoked with
+ *            Algorithms.eatMemory() method (a single thread eats the memory).
+ *         2. queue.remove() returns reference from the queue.
+ *         3. queue.poll() returns null.
+ *         4. reference.clear() does not throw any exception.
+ *     The test extends ThreadedGCTest and implements GarbageProducerAware and
+ *     MemoryStrategyAware interfaces. The corresponding javadoc documentation
+ *     for additional test configuration.
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm gc.gctests.SoftReference.soft001.soft001 -ms high
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/gctests/SoftReference/soft003/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/gctests/SoftReference/soft003/soft003.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,96 @@
+/*
+ * Copyright (c) 2007, 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/gctests/SoftReference/soft003.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent]
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm -XX:-UseGCOverheadLimit gc.gctests.SoftReference.soft003.soft003 -t 1
+ */
+
+package gc.gctests.SoftReference.soft003;
+
+import java.lang.ref.Reference;
+import nsk.share.test.*;
+import nsk.share.gc.*;
+import nsk.share.TestFailure;
+import java.lang.ref.SoftReference;
+
+/**
+ * Test that GC clears soft references before throwing OOM.
+ *
+ * This test creates a number of soft references, then provokes
+ * GC with Algorithms.eatMemory() and checks that all references
+ * have been cleared.
+ */
+public class soft003 extends ThreadedGCTest {
+
+    class Worker implements Runnable {
+
+        private int arrayLength;
+        private int objectSize = 100;
+        private Reference[] references;
+
+        public void run() {
+            for (int i = 0; i < arrayLength; ++i) {
+                references[i] = new SoftReference<MemoryObject>(new MemoryObject(LocalRandom.nextInt(objectSize)));
+            }
+            Algorithms.eatMemory(getExecutionController());
+            if (!getExecutionController().continueExecution()) {
+                return;
+            }
+            // Check that all references have been cleared
+            int n = 0;
+            for (int i = 0; i < arrayLength; ++i) {
+                if (references[i].get() != null) {
+                    ++n;
+                }
+            }
+            if (n != 0) {
+                references = null;
+                throw new TestFailure("Some of the references have been not cleared: " + n);
+            }
+        }
+
+        public void Worker() {
+            arrayLength = Memory.getArrayLength(runParams.getTestMemory(), Memory.getReferenceSize() + objectSize);
+            System.out.println("Array size: " + arrayLength);
+            references = new Reference[arrayLength];
+        }
+    }
+
+    @Override
+    protected Runnable createRunnable(int i) {
+        return new Worker();
+    }
+
+    public static void main(String[] args) {
+        GC.runTest(new soft003(), args);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/gctests/SoftReference/soft004/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/gctests/SoftReference/soft004/soft004.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,95 @@
+/*
+ * Copyright (c) 2007, 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/gctests/SoftReference/soft004.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent]
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm -XX:-UseGCOverheadLimit gc.gctests.SoftReference.soft004.soft004 -t 1
+ */
+
+package gc.gctests.SoftReference.soft004;
+
+import nsk.share.gc.*;
+import java.lang.ref.SoftReference;
+
+/**
+ * Test that GC correctly clears soft references.
+ *
+ * This test is the same as soft003 except that it creates
+ * a number of soft references to same object.
+ *
+ * @see gc.gctests.SoftReference.soft003
+ */
+public class soft004 extends ThreadedGCTest {
+
+    class Worker implements Runnable {
+
+        private int arrayLength;
+        private int objectSize = 100;
+        private SoftReference[] references;
+
+        private void makeReferences() {
+            MemoryObject obj = new MemoryObject(objectSize);
+            references = new SoftReference[arrayLength];
+            for (int i = 0; i < arrayLength; ++i) {
+                references[i] = new SoftReference<MemoryObject>(obj);
+            }
+        }
+
+        public void run() {
+            arrayLength = Memory.getArrayLength(runParams.getTestMemory() - objectSize, Memory.getReferenceSize() + objectSize);
+            System.out.println("Array size: " + arrayLength);
+            makeReferences();
+            Algorithms.eatMemory(getExecutionController());
+            if (!getExecutionController().continueExecution()) {
+                return;
+            }
+            int n = 0;
+            for (int i = 0; i < arrayLength; ++i) {
+                if (references[i].get() != null) {
+                    ++n;
+                }
+            }
+            if (n != 0) {
+                log.error("Some of the references have been not cleared: " + n);
+                setFailed(true);
+            }
+        }
+    }
+
+    @Override
+    protected Runnable createRunnable(int i) {
+        return new Worker();
+    }
+
+    public static void main(String[] args) {
+        GC.runTest(new soft004(), args);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/gctests/SoftReference/soft005/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/gctests/SoftReference/soft005/soft005.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,97 @@
+/*
+ * Copyright (c) 2007, 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/gctests/SoftReference/soft005.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent]
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm -XX:-UseGCOverheadLimit gc.gctests.SoftReference.soft005.soft005 -t 1
+ */
+
+package gc.gctests.SoftReference.soft005;
+
+import nsk.share.gc.*;
+import java.lang.ref.SoftReference;
+
+/**
+ * Test that GC correctly clears soft references.
+ *
+ * This test creates a number of soft references,
+ * each of which points to the next,
+ * then provokes GC with Algorithms.eatMemory(). Then
+ * checks that first reference has been cleared.
+ */
+public class soft005 extends ThreadedGCTest {
+
+    class Worker implements Runnable {
+
+        private int length = 10000;
+        private int objectSize = 10000;
+        private SoftReference[] references;
+
+        public Worker() {
+            System.out.println("Array size: " + length);
+            System.out.println("Object size: " + objectSize);
+            references = new SoftReference[length];
+        }
+
+        private void makeReferences() {
+            references[length - 1] = null;
+            MemoryObject obj = new MemoryObject(objectSize);
+            references[0] = new SoftReference(obj);
+            for (int i = 1; i < length; ++i) {
+                references[i] = new SoftReference(references[i - 1]);
+            }
+            for (int i = 0; i < length - 1; ++i) {
+                references[i] = null;
+            }
+        }
+
+        public void run() {
+            makeReferences();
+            Algorithms.eatMemory(getExecutionController());
+            if (!getExecutionController().continueExecution()) {
+                return;
+            }
+            if (references[length - 1].get() != null) {
+                log.error("Last soft reference has not been cleared");
+                setFailed(true);
+            }
+        }
+    }
+
+    @Override
+    protected Runnable createRunnable(int i) {
+        return new Worker();
+    }
+
+    public static void main(String[] args) {
+        GC.runTest(new soft005(), args);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/gctests/Steal/steal001/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/gctests/Steal/steal001/steal001.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,134 @@
+/*
+ * Copyright (c) 2003, 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/gctests/Steal/steal001.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent]
+ * VM Testbase readme:
+ * DESCRIPTION
+ *     The test checks that Garbage Collector correctly uses stealing technique:
+ *     no unexpected exceptions and errors are thrown; the JVM is not crashed.
+ *     Actually, the test is intended for Parallel Collector.
+ *     The test starts just one thread and fills the memory with NonbranyTrees
+ *     (the number of nodes of the tree and its size are based on
+ *     Runtime.maxMemory() value) until OutOfMemoryError is thrown. All references
+ *     to the trees are saved in a java.util.Vector. Then the test removes a
+ *     number of trees from the vector, this number is equal to number of
+ *     processors (returned by nsk.share.gc.Algorithms.availableProcessors()).
+ *     Algorithms.eatMemory(int) is invoked after that to provoke GC to clean the
+ *     memory. Then procedure is repeated.
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm -XX:-UseGCOverheadLimit gc.gctests.Steal.steal001.steal001
+ */
+
+package gc.gctests.Steal.steal001;
+
+import java.util.*;
+import java.util.concurrent.ThreadLocalRandom;
+import nsk.share.gc.*;
+import nsk.share.gc.gp.GarbageUtils;
+import nsk.share.test.ExecutionController;
+
+public class steal001 extends ThreadedGCTest {
+    // Preload ThreadLocalRandom class to avoid class initialization failure
+    // due to OOM error in static class initializer
+    final static public ThreadLocalRandom threadLocalRandom = ThreadLocalRandom.current();
+
+    // Internal number of iterations to remove and create new elements
+    // for the vector
+    final static int INTERNAL_ITERATIONS = 10;
+    // Approximate number of trees to fill the heap with
+    final static int TREES = 50;
+    // Number of nodes for each tree
+    final static int NODES = 500;
+
+    private class Eater implements Runnable {
+
+        private int nodeSize;
+        private List<NonbranchyTree> list;
+        int processors = Runtime.getRuntime().availableProcessors();
+        ExecutionController stresser;
+
+        public Eater(int nodeSize) {
+            list = new ArrayList<>();
+            this.nodeSize = nodeSize;
+        }
+
+        @Override
+        public void run() {
+            if (stresser == null) {
+                stresser = getExecutionController();
+            }
+            int counter = NODES;
+            while (stresser.continueExecution()) {
+                fillHeap(counter);
+                removeElements();
+                counter = (counter == 1) ? 1 : counter - 1;
+            }
+        }
+
+        // Fill the memory with trees of defined size until OutOfMemoryError
+        private void fillHeap(int n) {
+            try {
+                while (stresser.continueExecution()) {
+                    // Passing in the ExecutionController to make sure we
+                    // stop allocating nodes when time is up.
+                    list.add(new NonbranchyTree(n, 0.3f, nodeSize, stresser));
+                }
+            } catch (OutOfMemoryError e) {
+            }
+        }
+
+        // Remove a number of elements (equal to number of processors) from the
+        // vector and provoke GC to clean the heap
+        private void removeElements() {
+            if (list.size() <= 0) {
+                return;
+            }
+            list.remove(0);
+            GarbageUtils.eatMemory(stresser);
+        }
+    }
+
+    @Override
+    protected Runnable createRunnable(int i) {
+        // Perform calculations specific to the test
+        double treeSize = Runtime.getRuntime().maxMemory() / TREES;
+        int nodeSize = (int) (treeSize / NODES - NonbranchyTree.MIN_NODE_SIZE);
+        nodeSize = Math.max(1, nodeSize);
+        return new Eater(nodeSize);
+    }
+
+    public static void main(String args[]) {
+        // just to preload GarbageUtils and avoid exception
+        // in removeElements()
+        GarbageUtils.getGarbageProducers();
+        GC.runTest(new steal001(), args);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/gctests/Steal/steal002/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/gctests/Steal/steal002/steal002.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,99 @@
+/*
+ * Copyright (c) 2003, 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/gctests/Steal/steal002.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent]
+ * VM Testbase readme:
+ * DESCRIPTION
+ *     The test checks that Garbage Collector correctly uses stealing technique:
+ *     no unexpected exceptions and errors are thrown; the JVM is not crashed.
+ *     Actually, the test is intended for Parallel Collector.
+ *     The test starts just one thread, then creates a small NonbranyTree and a
+ *     huge one. Both trees are to fill about 80% of the memory. Then the test
+ *     drops references to both trees and invoke Algorithms.eatMemory(int) to
+ *     provoke GC to clean the memory. the GC should correctly remove both
+ *     objects. If the GC is Parallel, there are more than one GC threads, so one
+ *     will try to "steal" some job from others.
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm -XX:-UseGCOverheadLimit gc.gctests.Steal.steal002.steal002
+ */
+
+package gc.gctests.Steal.steal002;
+
+import nsk.share.gc.*;
+import nsk.share.test.ExecutionController;
+import nsk.share.test.Stresser;
+
+public class steal002 extends GCTestBase {
+
+    ExecutionController stresser;
+    // Number of nodes for the small tree
+    final static int SMALL_NODES = 10;
+    // Size (in bytes) for a node of the small tree
+    final static int SMALL_NODE_SIZE = 1;
+    // Number of nodes for the huge tree
+    final static int HUGE_NODES = 500;
+    // Part of the heap to fill with both trees
+    final static double PART_OF_HEAP = 0.8;
+    final int hugeNodeSize;
+    public static NonbranchyTree smallTree;
+    public static NonbranchyTree hugeTree;
+
+    @Override
+    public void run() {
+        if (stresser == null) {
+            stresser = new Stresser(runParams.getStressOptions());
+            stresser.start(runParams.getIterations());
+        }
+        while (stresser.continueExecution()) {
+            // Create a small tree and a huge one. Then drop references
+            // to both of them.
+            smallTree = new NonbranchyTree(SMALL_NODES, 0.3f, SMALL_NODE_SIZE);
+            hugeTree = new NonbranchyTree(HUGE_NODES, 0.3f, hugeNodeSize);
+
+            // Drop references to both trees and provoke GC to clean
+            // the memory
+            hugeTree = null;
+            smallTree = null;
+
+            // Provoke GC to clean the memory
+            Algorithms.eatMemory(stresser);
+        }
+    }
+
+    public steal002() {
+        hugeNodeSize = Math.max(1, (int) (PART_OF_HEAP * Runtime.getRuntime().maxMemory() / HUGE_NODES
+                - NonbranchyTree.MIN_NODE_SIZE));
+    }
+
+    public static void main(String args[]) {
+        GC.runTest(new steal002(), args);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/gctests/StringGC/StringGC.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,78 @@
+/*
+ * Copyright (c) 2007, 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/gctests/StringGC.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent, quick]
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm gc.gctests.StringGC.StringGC
+ */
+
+package gc.gctests.StringGC;
+
+import nsk.share.test.*;
+import nsk.share.gc.*;
+
+/**
+ * Test that added strings are collected.
+ *
+ * Idea based on old tests:
+ *      gc/gctests/StringGC02
+ *      gc/gctests/TestStringGC
+ */
+public class StringGC extends ThreadedGCTest {
+        private final String toAdd = "abcdef";
+        private int maxLength;
+
+        private class StringAdder implements Runnable {
+                private String s;
+
+                public void run() {
+                        s = s + toAdd;
+                        if (s.length() > maxLength)
+                                s = "";
+                }
+        }
+
+        protected Runnable createRunnable(int i) {
+                return new StringAdder();
+        }
+
+        public void run() {
+                maxLength = (int) Math.min(
+                        runParams.getTestMemory() / runParams.getNumberOfThreads() / toAdd.length(),
+                        Integer.MAX_VALUE);
+                super.run();
+        }
+
+        public static void main(String[] args) {
+                GC.runTest(new StringGC(), args);
+        }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/gctests/StringGC/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/gctests/StringIntern/StringIntern.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,86 @@
+/*
+ * Copyright (c) 2007, 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/gctests/StringIntern.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent]
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm gc.gctests.StringIntern.StringIntern
+ */
+
+package gc.gctests.StringIntern;
+
+import nsk.share.test.*;
+import nsk.share.gc.*;
+
+/**
+ * Test that strings returned by String.intern() can be collected.
+ *
+ * Create strings consisting of random characters, call String.intern().
+ * Check that intern() contract.
+ */
+public class StringIntern extends ThreadedGCTest {
+        private int maxLength = 1000;
+        private int checkCount = 100;
+
+        private class StringGenerator implements Runnable {
+                private StringBuffer sb = new StringBuffer();
+
+                private void generateRandomBuffer() {
+                        int length = LocalRandom.nextInt(maxLength);
+                        for (int i = 0; i < length; ++i)
+                                sb.append((char) LocalRandom.nextInt(Integer.MAX_VALUE));
+                }
+
+                private String getString() {
+                        return sb.toString();
+                }
+
+                public void run() {
+                        generateRandomBuffer();
+                        for (int i = 0; i < checkCount; ++i) {
+                                String s1 = getString();
+                                String s2 = getString();
+                                if (s1.intern() != s2.intern()) {
+                                        log.error("Test failed on: " + s1);
+                                        setFailed(true);
+                                }
+                        }
+                }
+        }
+
+        protected Runnable createRunnable(int i) {
+                return new StringGenerator();
+        }
+
+        public static void main(String[] args) {
+                GC.runTest(new StringIntern(), args);
+        }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/gctests/StringIntern/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/gctests/StringInternGC/StringInternGC.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,75 @@
+/*
+ * Copyright (c) 2007, 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/gctests/StringInternGC.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent, quick]
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm gc.gctests.StringInternGC.StringInternGC
+ */
+
+package gc.gctests.StringInternGC;
+
+import nsk.share.test.*;
+import nsk.share.gc.*;
+
+/**
+ * Test that strings returned by String.intern() can be collected.
+ *
+ * Create strings consisting of random characters, call String.intern().
+ * String pool should not overflow.
+ */
+public class StringInternGC extends ThreadedGCTest {
+        private int maxLength = 1000;
+
+        private class StringGenerator implements Runnable {
+                private StringBuffer sb = new StringBuffer();
+
+                private String generateString() {
+                        int length = LocalRandom.nextInt(maxLength);
+                        for (int i = 0; i < length; ++i)
+                                sb.append((char) LocalRandom.nextInt(Integer.MAX_VALUE));
+                        return sb.toString();
+                }
+
+
+                public void run() {
+                        generateString().intern();
+                }
+        }
+
+        protected Runnable createRunnable(int i) {
+                return new StringGenerator();
+        }
+
+        public static void main(String[] args) {
+                GC.runTest(new StringInternGC(), args);
+        }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/gctests/StringInternGC/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/gctests/StringInternSync/StringInternSync.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,168 @@
+/*
+ * Copyright (c) 2011, 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/gctests/StringInternSync.
+ * VM Testbase keywords: [gc, stress, stressopt, feature_perm_removal_jdk7, nonconcurrent]
+ * VM Testbase readme:
+ * The test verifies that String.intern is correctly synchronized.
+ * Test interns same strings in different threads and verifies that all interned equal
+ * strings are same objects.
+ * This test interns a few large strings.
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm
+ *      -XX:+UnlockDiagnosticVMOptions
+ *      -XX:+VerifyStringTableAtExit
+ *      gc.gctests.StringInternSync.StringInternSync
+ *      -ms low
+ */
+
+package gc.gctests.StringInternSync;
+
+import java.util.*;
+import java.util.ArrayList;
+import java.util.concurrent.locks.ReadWriteLock;
+import java.util.concurrent.locks.ReentrantReadWriteLock;
+import nsk.share.TestBug;
+import nsk.share.TestFailure;
+import nsk.share.gc.*;
+import nsk.share.gc.gp.MemoryStrategy;
+import nsk.share.gc.gp.MemoryStrategyAware;
+import nsk.share.gc.gp.string.RandomStringProducer;
+
+public class StringInternSync extends ThreadedGCTest implements MemoryStrategyAware {
+
+    // The list of strings which will be interned
+    static final List<String> stringsToIntern = new ArrayList();
+    // The global container for references to internded strings
+    static final List<List<String>> internedStrings = new ArrayList<List<String>>();
+    // Approximate size occupied by all interned strings
+    long sizeOfAllInteredStrings = 0;
+    // maximum size of one string
+    int maxStringSize;
+    RandomStringProducer gp = new RandomStringProducer();
+    MemoryStrategy memoryStrategy;
+    ReadWriteLock rwlock = new ReentrantReadWriteLock();
+
+    @Override
+    public void setMemoryStrategy(MemoryStrategy memoryStrategy) {
+        this.memoryStrategy = memoryStrategy;
+    }
+
+    private class StringGenerator implements Runnable {
+
+        List<String> internedLocal;
+
+        public StringGenerator(List<String> internedLocal) {
+            this.internedLocal = internedLocal;
+        }
+
+        public void run() {
+            try {
+                rwlock.readLock().lock();
+                internedLocal.clear();
+                for (String str : stringsToIntern) {
+                    // Intern copy of string
+                    // and save reference to it
+                    internedLocal.add(new String(str).intern());
+                }
+            } finally {
+                rwlock.readLock().unlock();
+            }
+
+            // after each iteration 0 thread
+            // lock our main resource and verify String.intern
+            if (internedLocal == internedStrings.get(0)) {
+                try {
+                    rwlock.writeLock().lock();
+                    // We select first list and compare all other with it
+                    // if 2 strings are equal they should be the same "=="
+                    List<String> interned = internedStrings.get(0);
+
+                    for (List<String> list : internedStrings) {
+                        if (list == interned) {
+                            continue;
+                        }
+                        if (list.size() == 0) {
+                            continue; // this thread haven't got lock
+                        }
+
+                        if (list.size() != interned.size()) {
+                            throw new TestFailure("Size of interned string list differ from origial."
+                                    + " interned " + list.size() + " original " + interned.size());
+                        }
+                        for (int i = 0; i < interned.size(); i++) {
+                            String str = interned.get(i);
+                            if (!str.equals(list.get(i))) {
+                                throw new TestFailure("The interned strings are not the equals.");
+                            }
+                            if (str != list.get(i)) {
+                                throw new TestFailure("The equal interned strings are not the same.");
+                            }
+                        }
+                        list.clear();
+
+                    }
+                    interned.clear();
+                    stringsToIntern.clear();
+                    for (long currentSize = 0; currentSize <= sizeOfAllInteredStrings; currentSize++) {
+                        stringsToIntern.add(gp.create(maxStringSize));
+                        currentSize += maxStringSize;
+                    }
+                } finally {
+                    rwlock.writeLock().unlock();
+                }
+            }
+        }
+    }
+
+    @Override
+    public void run() {
+        sizeOfAllInteredStrings = 10 * 1024 * 1024; // let use 100 * strings of size 10000
+        maxStringSize = (int) (sizeOfAllInteredStrings / memoryStrategy.getSize(sizeOfAllInteredStrings));
+        log.debug("The overall size of interned strings  : " + sizeOfAllInteredStrings / (1024 * 1024) + "M");
+        log.debug("The count of interned strings : " + sizeOfAllInteredStrings / maxStringSize);
+        for (long currentSize = 0; currentSize <= sizeOfAllInteredStrings; currentSize++) {
+            stringsToIntern.add(gp.create(maxStringSize));
+            currentSize += maxStringSize;
+        }
+        super.run();
+    }
+
+    @Override
+    protected Runnable createRunnable(int i) {
+        ArrayList list = new ArrayList();
+        internedStrings.add(list);
+        return new StringGenerator(list);
+    }
+
+    public static void main(String[] args) {
+        GC.runTest(new StringInternSync(), args);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/gctests/StringInternSync/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/gctests/StringInternSync2/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/gctests/StringInternSync2/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,42 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/gctests/StringInternSync2.
+ * VM Testbase keywords: [gc, stress, stressopt, feature_perm_removal_jdk7, nonconcurrent]
+ * VM Testbase readme:
+ * The test verifies that String.intern is correctly synchronized.
+ * Test interns same strings in different threads and verifies that all interned equal
+ * strings are same objects.
+ * This test interns a lot of small strings.
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm gc.gctests.StringInternSync.StringInternSync -ms high
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/gctests/StringInternSyncWithGC/StringGenerator.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,136 @@
+/*
+ * 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
+ * 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 gc.gctests.StringInternSyncWithGC;
+
+import java.lang.ref.Reference;
+import java.lang.ref.SoftReference;
+import java.lang.ref.WeakReference;
+import java.util.List;
+import java.util.concurrent.locks.ReadWriteLock;
+import java.util.concurrent.locks.ReentrantReadWriteLock;
+import nsk.share.TestBug;
+import nsk.share.TestFailure;
+import nsk.share.gc.gp.string.RandomStringProducer;
+import nsk.share.test.ExecutionController;
+import nsk.share.test.LocalRandom;
+
+class StringGenerator implements Runnable {
+
+    private final RandomStringProducer gp;
+    private final List<String> stringsToIntern;
+    private final int threadNumber;
+    private final int numberOfActions;
+    private final int maxStringSize;
+    private final StringInternSyncWithGC base;
+    private static final ReadWriteLock RWLOCK = new ReentrantReadWriteLock();
+
+    public StringGenerator(int threadId, StringInternSyncWithGC base) {
+        this.base = base;
+        threadNumber = threadId;
+        stringsToIntern = base.getStringsToIntern();
+        numberOfActions = base.getNumberOfThreads() > 4 ? base.getNumberOfThreads() : 4;
+        gp = base.getGarbageProducer();
+        maxStringSize = base.getMaxStringSize();
+    }
+
+    /* This field is public just to be not optimized */
+    public String copy;
+
+    @Override
+    public void run() {
+        ExecutionController stresser = base.getExecController();
+        try {
+            RWLOCK.readLock().lock();
+            Object[] refToInterned = new Object[stringsToIntern.size()];
+            for (int i = 0; i < stringsToIntern.size(); i++) {
+                if (!stresser.continueExecution()) {
+                    return;
+                }
+                int index = LocalRandom.nextInt(stringsToIntern.size());
+                String str = stringsToIntern.get(index);
+                int action = LocalRandom.nextInt(numberOfActions);
+
+                /* We want to provoke a lot of collections for each interned copy
+                 * so map should be "sparse".
+                 */
+                copy = new String(str);
+                switch (action) {
+                    case 0:
+                        refToInterned[index] = copy.intern();
+                        break;
+                    case 1:
+                        refToInterned[index] = new WeakReference(copy.intern());
+                        break;
+                    case 2:
+                        refToInterned[index] = new SoftReference(copy.intern());
+                        break;
+                    default:
+                        refToInterned[index] = null;
+                        break;
+                }
+            }
+            for (int index = 0; index < stringsToIntern.size(); index++) {
+                verify(refToInterned[index], stringsToIntern.get(index));
+            }
+        } finally {
+            RWLOCK.readLock().unlock();
+        }
+
+        if (threadNumber == 0) {
+            try {
+                RWLOCK.writeLock().lock();
+                for (int index = 0; index < stringsToIntern.size(); index++) {
+                    stringsToIntern.set(index, gp.create(maxStringSize).intern());
+                }
+            } finally {
+                RWLOCK.writeLock().unlock();
+            }
+        }
+    }
+
+    /*
+     * Verify that all exist interned strings in a map
+     * a same objects.
+     */
+    private void verify(Object obj, String str) {
+        if (obj == null) {
+            return;
+        }
+        if (obj instanceof Reference) {
+            obj = ((Reference) obj).get();
+            if (obj == null) {
+                return;
+            }
+        }
+        if (!(obj instanceof String)) {
+            throw new TestBug("Expected String. Find :" + obj.getClass());
+        }
+        String interned = (String) obj;
+        if (!interned.equals(str)) {
+            throw new TestFailure("Interned not equals to original string.");
+        }
+        if (obj != str.intern()) {
+            throw new TestFailure("Interned not same as original string.");
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/gctests/StringInternSyncWithGC/StringInternSyncWithGC.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,185 @@
+/*
+ * Copyright (c) 2011, 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/gctests/StringInternSyncWithGC.
+ * VM Testbase keywords: [gc, stress, stressopt, feature_perm_removal_jdk7, nonconcurrent]
+ * VM Testbase readme:
+ * The test verifies that String.intern is correctly synchronized with GC.
+ * Test interns and drop the same strings in different threads and provokes GC.
+ * Additionally test creates weak/soft references to interned strings.
+ * Test fails if any string object is inaccessible.
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm
+ *      -Xlog:gc:gc.log
+ *      gc.gctests.StringInternSyncWithGC.StringInternSyncWithGC
+ *      -ms low
+ *      -memUsage 3
+ *      -appTimeout 30
+ *      -capacityVerPart 2
+ */
+
+package gc.gctests.StringInternSyncWithGC;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import nsk.share.gc.*;
+import nsk.share.gc.gp.MemoryStrategy;
+import nsk.share.gc.gp.MemoryStrategyAware;
+import nsk.share.gc.gp.string.RandomStringProducer;
+import nsk.share.test.ExecutionController;
+
+public class StringInternSyncWithGC extends ThreadedGCTest implements MemoryStrategyAware {
+
+    // Maximum size of one string
+    // Depends from all size and memory strategy
+    private int maxStringSize;
+    private MemoryStrategy memoryStrategy;
+    private final int memUsageFactor;
+    private final long endTimeCapacityVer;
+
+    // The list of strings which are interned during iteration
+    private final List<String> stringsToIntern = new ArrayList();
+    private final RandomStringProducer gp = new RandomStringProducer();
+
+    public StringInternSyncWithGC(int memUsage, long endTimeCapVer) {
+        memUsageFactor = memUsage;
+        endTimeCapacityVer = endTimeCapVer;
+    }
+
+    @Override
+    public void setMemoryStrategy(MemoryStrategy memoryStrategy) {
+        this.memoryStrategy = memoryStrategy;
+    }
+
+    /**
+     * Verify that we could use certain amount of memory.
+     */
+    private boolean verifyInternedStringCapacity(long initialSize) {
+        long currentSize = 0;
+        final int STEP = 1000;
+        int iter = 0;
+        char[] template = new char[(int) (initialSize / STEP)];
+
+        List<String> tmpList = new ArrayList<>(STEP);
+        try {
+            while (currentSize <= initialSize) {
+                if (endTimeCapacityVer < System.currentTimeMillis()) {
+                    log.debug("Too long to verify interned string capacity");
+                    log.debug("Silently pass.");
+                    return false;
+                }
+                template[iter]++;
+                if (++iter == template.length) {
+                    iter = 0;
+                }
+                String str = new String(template);
+                tmpList.add(str.intern());
+                currentSize += str.length() * 2; //each char costs 2 bytes
+            }
+        } catch (OutOfMemoryError oome) {
+            log.debug("It is not possible to allocate " + initialSize + " size of interned string.");
+            log.debug("Silently pass.");
+            return false;
+        }
+        return true;
+    }
+
+    @Override
+    public void run() {
+        long size = runParams.getTestMemory() / memUsageFactor;
+        if (!verifyInternedStringCapacity(size)) {
+            return;
+        }
+        // Approximate size occupied by all interned strings
+        long sizeOfAllInternedStrings = size / 2;
+        maxStringSize = (int) (sizeOfAllInternedStrings / memoryStrategy.getSize(sizeOfAllInternedStrings, Memory.getObjectExtraSize()));
+        // Each thread keeps reference to each created string.
+        long extraConsumption = runParams.getNumberOfThreads() * Memory.getReferenceSize();
+        log.debug("The overall size of interned strings  : " + sizeOfAllInternedStrings / (1024 * 1024) + "M");
+        log.debug("The count of interned strings : " + sizeOfAllInternedStrings / (maxStringSize + extraConsumption));
+        for (long currentSize = 0; currentSize <= sizeOfAllInternedStrings;
+                currentSize += maxStringSize + extraConsumption) {
+            stringsToIntern.add(gp.create(maxStringSize));
+        }
+        super.run();
+    }
+
+    @Override
+    protected Runnable createRunnable(int threadId) {
+        return new StringGenerator(threadId, this);
+    }
+
+    public static void main(String[] args) {
+        int appTimeout = -1;
+        int memUsageFactor = 1;
+        // Part of time that function verifyInternedStringCapacity can take. Time = Application_Timeout / capacityVerTimePart
+        double capacityVerPart = 2;
+        for (int i = 0; i < args.length; ++i) {
+            switch (args[i]) {
+                case "-memUsage":
+                    memUsageFactor = Integer.parseInt(args[i + 1]);
+                    break;
+                case "-capacityVerPart":
+                    capacityVerPart = Double.parseDouble(args[i + 1]);
+                    break;
+                case "-appTimeout":
+                    appTimeout = Integer.parseInt(args[i + 1]);
+                    break;
+                default:
+            }
+        }
+        if (appTimeout == -1) {
+            throw new IllegalArgumentException("Specify -appTimeout.");
+        }
+        long endTimeCapacityVer = System.currentTimeMillis() + (long) (appTimeout / capacityVerPart * 60000);
+        GC.runTest(new StringInternSyncWithGC(memUsageFactor, endTimeCapacityVer), args);
+    }
+
+    protected List<String> getStringsToIntern() {
+        return stringsToIntern;
+    }
+
+    protected int getNumberOfThreads() {
+        return runParams.getNumberOfThreads();
+    }
+
+    protected RandomStringProducer getGarbageProducer() {
+        return gp;
+    }
+
+    protected int getMaxStringSize() {
+        return maxStringSize;
+    }
+
+    protected ExecutionController getExecController() {
+        return getExecutionController();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/gctests/StringInternSyncWithGC/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/gctests/StringInternSyncWithGC2/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/gctests/StringInternSyncWithGC2/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,43 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/gctests/StringInternSyncWithGC2.
+ * VM Testbase keywords: [gc, stress, stressopt, feature_perm_removal_jdk7, nonconcurrent]
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm
+ *      -Xlog:gc:gc.log
+ *      gc.gctests.StringInternSyncWithGC.StringInternSyncWithGC
+ *      -ms high
+ *      -memUsage 3
+ *      -appTimeout 30
+ *      -capacityVerPart 2
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/gctests/StringInternSyncWithGC3/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/gctests/StringInternSyncWithGC3/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,43 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/gctests/StringInternSyncWithGC3.
+ * VM Testbase keywords: [gc, stress, stressopt, feature_perm_removal_jdk7, nonconcurrent]
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm
+ *      -Xlog:gc:gc.log
+ *      gc.gctests.StringInternSyncWithGC.StringInternSyncWithGC
+ *      -ms low
+ *      -memUsage 100
+ *      -appTimeout 30
+ *      -capacityVerPart 2
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/gctests/StringInternSyncWithGC4/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/gctests/StringInternSyncWithGC4/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,43 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/gctests/StringInternSyncWithGC4.
+ * VM Testbase keywords: [gc, stress, stressopt, feature_perm_removal_jdk7, nonconcurrent]
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm
+ *      -Xlog:gc:gc.log
+ *      gc.gctests.StringInternSyncWithGC.StringInternSyncWithGC
+ *      -ms high
+ *      -memUsage 100
+ *      -appTimeout 30
+ *      -capacityVerPart 2
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/gctests/ThreadGC/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/gctests/ThreadGC/ThreadGC.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,118 @@
+/*
+ * Copyright (c) 2002, 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/gctests/ThreadGC.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent]
+ * VM Testbase readme:
+ * This tests attempts to stress the garbage collector my making
+ * synchronous calls to the garbage collector after producing garbage.
+ * The garbage collector is invoked in a separate thread.
+ * The test runs for one minute (see nsk.share.runner.ThreadsRunner and
+ * nsk.share.runner.RunParams. It passes if no exceptions are generated.
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm gc.gctests.ThreadGC.ThreadGC -gp random(arrays) -ms low
+ */
+
+package gc.gctests.ThreadGC;
+
+import nsk.share.gc.*;
+import nsk.share.gc.gp.*;
+import java.util.*;
+
+public class ThreadGC extends ThreadedGCTest implements GarbageProducerAware, MemoryStrategyAware {
+        private GarbageProducer garbageProducer;
+        private MemoryStrategy memoryStrategy;
+        private Reclaimer reclaimer;
+        private int count;
+        private long size;
+
+        private class Devourer implements Runnable {
+                private Object[] arr = null;
+                private int index;
+
+                public void run() {
+                        if (arr == null || index >= count) {
+                                arr = null;
+                                arr = new Object[count];
+                                index = 0;
+                                synchronized (reclaimer) {
+                                        reclaimer.notify();
+                                }
+                        }
+                        arr[index] = garbageProducer.create(size);
+                        ++index;
+                }
+        }
+
+        private class Reclaimer implements Runnable {
+                private long waitTime = 1000;
+
+                public void run() {
+                        try {
+                                synchronized (this) {
+                                        this.wait(waitTime);
+                                }
+                        } catch (InterruptedException e) {
+                        }
+                        System.gc();
+                }
+        }
+
+        protected Runnable createRunnable(int i) {
+                if (i == 0)
+                        return new Devourer();
+                else if (i == 1) {
+                        reclaimer = new Reclaimer();
+                        return reclaimer;
+                } else
+                        return null;
+        }
+
+        public void run() {
+                size = GarbageUtils.getArraySize(runParams.getTestMemory(), memoryStrategy);
+                count = GarbageUtils.getArrayCount(runParams.getTestMemory(), memoryStrategy);
+                runParams.setIterations(count);
+                super.run();
+        }
+
+        public static void main(String[] args) {
+                GC.runTest(new ThreadGC(), args);
+        }
+
+        public void setGarbageProducer(GarbageProducer garbageProducer) {
+                this.garbageProducer = garbageProducer;
+        }
+
+        public void setMemoryStrategy(MemoryStrategy memoryStrategy) {
+                this.memoryStrategy = memoryStrategy;
+        }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/gctests/WeakReference/WeakReferenceEvilTest/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/gctests/WeakReference/WeakReferenceEvilTest/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,46 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/gctests/WeakReference/WeakReferenceEvilTest.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent, jrockit]
+ * VM Testbase readme:
+ * DESCRIPTION
+ * Test the WeakReference handling in a more evil way. In this test,
+ * it will only keep every Xth object, thus causing more fragmentation
+ * and fill the heap with unused objects. This test should not
+ * throw any OOME during the test execution.
+ *
+ * COMMENTS
+ * This test was ported from JRockit test suite.
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm -XX:-UseGCOverheadLimit gc.gctests.WeakReference.WeakReferenceEvilTest
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/gctests/WeakReference/WeakReferenceEvilTest/WeakReferenceEvilTest.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,126 @@
+/*
+ * Copyright (c) 2004, 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.
+ */
+
+package gc.gctests.WeakReference;
+
+import java.util.Random;
+import java.util.ArrayList;
+import java.lang.ref.WeakReference;
+import nsk.share.TestFailure;
+import nsk.share.gc.GC;
+import nsk.share.gc.GCTestBase;
+
+/**
+ * Original description from JRockit test:
+ * Tests for the WeakReference handling in JRockit (in a more evil way :)).
+ *
+ * This test must be run with a mx value set, as well as with
+ * -XXfullsystemgc, to ensure Runtime.maxMemory() doesn't return 0
+ * and that System.gc() gets run when called from Java.
+ */
+public class WeakReferenceEvilTest extends GCTestBase {
+
+    /**
+     * Test the WeakReference handling in a more evil way. In this test,
+     * it will only keep every Xth object, thus causing more fragmentation
+     * and fill the heap with unused objects. This test should not
+     * throw any OOME during the test execution.
+     *
+     * @return success if all WeakReferences are NULL after
+     * the test has run
+     */
+    public void run() {
+        long seed;
+        int minSize;
+        int maxSize;
+        int keepEveryXthObject;
+        double memPercentToFill;
+        long counter = 0;
+        long totalMemAlloced = 0;
+        long memToAlloc = 0;
+        Runtime r = Runtime.getRuntime();
+
+        seed = runParams.getSeed();
+        minSize = 2048;
+        maxSize = 32768;
+        memPercentToFill =  0.45;
+        keepEveryXthObject = 5;
+
+        memToAlloc = (long) (r.maxMemory() * memPercentToFill);
+
+        Random rndGenerator = new Random(seed);
+        long multiplier = maxSize - minSize;
+        ArrayList arrWeakRefs = new ArrayList();
+
+        try {
+            while (totalMemAlloced < memToAlloc) {
+                int allocationSize = ((int) (rndGenerator.nextDouble()
+                        * multiplier)) + minSize;
+                byte[] tmp = new byte[allocationSize];
+
+                if (counter % keepEveryXthObject == 0) {
+                    arrWeakRefs.add(new WeakReference(tmp));
+                    totalMemAlloced += allocationSize;
+                }
+
+                // Make sure the temporary object is dereferenced
+                tmp = null;
+
+                counter++;
+                if (counter == Long.MAX_VALUE) {
+                    counter = 0;
+                }
+            }
+
+            System.gc();
+
+            long numberOfNotNulledObjects = 0;
+
+            for (int i = 0; i < arrWeakRefs.size(); i++) {
+                WeakReference wr = (WeakReference) arrWeakRefs.get(i);
+                Object o = wr.get();
+
+                if (o != null) {
+                    numberOfNotNulledObjects++;
+                }
+            }
+
+            if (numberOfNotNulledObjects > 0) {
+                throw new TestFailure(numberOfNotNulledObjects + " out of "
+                        + arrWeakRefs.size() + " WeakReferences was not "
+                        + "null after the GC had run");
+            }
+
+            log.info("All WeakReferences was cleared after the "
+                    + "GC had run");
+        } catch (OutOfMemoryError oome) {
+            throw new TestFailure("OutOfMemoryException was thrown. This should "
+                + "not happen during the execution of this test.");
+        } finally {
+            arrWeakRefs = null;
+        }
+    }
+     public static void main(String[] args) {
+        GC.runTest(new WeakReferenceEvilTest(), args);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/gctests/WeakReference/WeakReferenceTest/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/gctests/WeakReference/WeakReferenceTest/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,43 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/gctests/WeakReference/WeakReferenceTest.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent, jrockit]
+ * VM Testbase readme:
+ * DESCRIPTION
+ * Tests for the WeakReference handling in JRockit.
+ *
+ * COMMENTS
+ * This test was ported from JRockit test suite.
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm -XX:-UseGCOverheadLimit gc.gctests.WeakReference.WeakReferenceTest
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/gctests/WeakReference/WeakReferenceTest/WeakReferenceTest.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,116 @@
+/*
+ * Copyright (c) 2004, 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.
+ */
+package gc.gctests.WeakReference;
+
+import java.util.Random;
+import java.util.ArrayList;
+import java.lang.ref.WeakReference;
+import nsk.share.TestFailure;
+import nsk.share.gc.GC;
+import nsk.share.gc.GCTestBase;
+
+/**
+ * Original description from JRockit test:
+ *
+ * Tests for the WeakReference handling in JRockit.
+ *
+ * This test must be run with a mx value set, as well as with
+ * -XXfullsystemgc, to ensure Runtime.maxMemory() doesn't return 0
+ * and that System.gc() gets run when called from Java.
+ */
+public class WeakReferenceTest extends GCTestBase {
+
+    /**
+     * Test that all WeakReferences has been cleared after
+     * the GC has run. This test should not throw an OOME
+     * during the test execution.
+     *
+     */
+    @Override
+    public void run() {
+        long seed;
+        int minSize;
+        int maxSize;
+        double memPercentToFill;
+        long totalMemAlloced = 0;
+        long memToAlloc = 0;
+        Runtime r = Runtime.getRuntime();
+
+        seed = runParams.getSeed();
+        minSize = 2048;
+        maxSize = 32768;
+
+        memPercentToFill = 0.45;
+
+        memToAlloc = (long) (r.maxMemory() * memPercentToFill);
+
+        Random rndGenerator = new Random(seed);
+        long multiplier = maxSize - minSize;
+        ArrayList arrWeakRefs = new ArrayList();
+
+        try {
+            while (totalMemAlloced < memToAlloc) {
+                int allocationSize = ((int) (rndGenerator.nextDouble()
+                        * multiplier)) + minSize;
+                byte[] tmp = new byte[allocationSize];
+
+                arrWeakRefs.add(new WeakReference(tmp));
+                totalMemAlloced += allocationSize;
+
+                // Make sure the temporary object is dereferenced
+                tmp = null;
+            }
+
+            System.gc();
+
+            long numberOfNotNulledObjects = 0;
+
+            for (int i = 0; i < arrWeakRefs.size(); i++) {
+                WeakReference wr = (WeakReference) arrWeakRefs.get(i);
+                Object o = wr.get();
+
+                if (o != null) {
+                    numberOfNotNulledObjects++;
+                }
+            }
+
+            if (numberOfNotNulledObjects > 0) {
+                throw new TestFailure(numberOfNotNulledObjects + " out of "
+                        + arrWeakRefs.size() + " WeakReferences was not "
+                        + "null after the GC had run");
+            }
+
+            log.info("All WeakReferences was cleared after the "
+                    + "GC had run");
+        } catch (OutOfMemoryError oome) {
+            throw new TestFailure("OutOfMemoryException was thrown. This should "
+                    + "not happen during the execution of this test.");
+        } finally {
+            arrWeakRefs = null;
+        }
+    }
+
+    public static void main(String[] args) {
+        GC.runTest(new WeakReferenceTest(), args);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/gctests/WeakReference/weak001/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/gctests/WeakReference/weak001/weak001.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,201 @@
+/*
+ * Copyright (c) 2004, 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/gctests/WeakReference/weak001.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent]
+ * VM Testbase readme:
+ * DESCRIPTION
+ *     The test checks that Garbage Collector correctly works with
+ *     WeakReferences. It also checks that no unexpected exceptions and errors
+ *     are thrown or the JVM is not crashed.
+ *     The test starts a number of threads. Each thread run tests for some time
+ *     or serveral iterations.  See javadoc StressOptions for configuration.
+ *     First of all each test defines what type to check (there are 10 types
+ *     totally). As soon as the type is defined, a WeakReference is created that
+ *     refers to an array of tested type and is registered with in a queue. A
+ *     WeakReference for NonbranchyTree class does not refer to an array, but to
+ *     instances of the class.
+ *     After that a thread performs next checks for the reference:
+ *         1. The reference is in queue after GC is provoked with
+ *            Algorithms.eatMemory() method (a single thread eats the memory).
+ *         2. queue.remove() returns reference from the queue.
+ *         3. queue.poll() returns null.
+ *         4. reference.clear() does not throw any exception.
+ *     The test extends ThreadedGCTest and implements GarbageProducerAware and
+ *     MemoryStrategyAware interfaces. The corresponding javadoc documentation
+ *     for additional test configuration.
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm gc.gctests.WeakReference.weak001.weak001 -ms low
+ */
+
+package gc.gctests.WeakReference.weak001;
+
+import java.lang.ref.Reference;
+import java.lang.ref.ReferenceQueue;
+import java.lang.ref.WeakReference;
+
+import nsk.share.gc.GC;
+import nsk.share.gc.NonbranchyTree;
+import nsk.share.gc.ThreadedGCTest;
+import nsk.share.gc.gp.GarbageProducer;
+import nsk.share.gc.gp.GarbageProducerAware;
+import nsk.share.gc.gp.GarbageUtils;
+import nsk.share.gc.gp.MemoryStrategy;
+import nsk.share.gc.gp.MemoryStrategyAware;
+import nsk.share.gc.gp.string.InternedStringProducer;
+import nsk.share.gc.gp.string.RandomStringProducer;
+
+public class weak001 extends ThreadedGCTest implements GarbageProducerAware, MemoryStrategyAware {
+
+    private GarbageProducer garbageProducer;
+    private MemoryStrategy memoryStrategy;
+    private InternedStringProducer internedStringProducer = new InternedStringProducer(new RandomStringProducer(10));
+    // Total number of types to test
+    final static int TYPES_COUNT = 11;
+    // Size of array of each tested type. The constant also specifies the
+    // number of nodes in a NonbranchyTree and size of each node
+    final static int SIZE = 100;
+
+    protected Runnable createRunnable(int i) {
+        return new Test();
+    }
+
+    public void setGarbageProducer(GarbageProducer garbageProducer) {
+        this.garbageProducer = garbageProducer;
+    }
+
+    public void setMemoryStrategy(MemoryStrategy memoryStrategy) {
+        this.memoryStrategy = memoryStrategy;
+    }
+
+    public static void main(String[] args) {
+        GC.runTest(new weak001(), args);
+    }
+
+    // The class implements the logic of the testcase
+    class Test implements Runnable {
+
+        int iteration;
+
+        public void run() {
+            // Pre-allocated OOME message to avoid OOME when logging it
+            String oomMsg = "Ignored OOME in run()";
+            try {
+
+                log.info("iteration " + iteration);
+                ReferenceQueue queue = new ReferenceQueue();
+                WeakReference reference;
+                int code = iteration % TYPES_COUNT;
+                String type;
+                // Define a specific type for each thread to test
+                switch (code) {
+                    case 0:
+                        reference = new WeakReference(new byte[SIZE], queue);
+                        type = "byte";
+                        break;
+                    case 1:
+                        reference = new WeakReference(new short[SIZE], queue);
+                        type = "short";
+                        break;
+                    case 2:
+                        reference = new WeakReference(new int[SIZE], queue);
+                        type = "int";
+                        break;
+                    case 3:
+                        reference = new WeakReference(new long[SIZE], queue);
+                        type = "long";
+                        break;
+                    case 4:
+                        reference = new WeakReference(new char[SIZE], queue);
+                        type = "char";
+                        break;
+                    case 5:
+                        reference = new WeakReference(new boolean[SIZE], queue);
+                        type = "boolean";
+                        break;
+                    case 6:
+                        reference = new WeakReference(new double[SIZE], queue);
+                        type = "double";
+                        break;
+                    case 7:
+                        reference = new WeakReference(new float[SIZE], queue);
+                        type = "float";
+                        break;
+                    case 8:
+                        reference = new WeakReference(new Object[SIZE], queue);
+                        type = "Object";
+                        break;
+                    case 9:
+                        reference = new WeakReference(internedStringProducer.create(SIZE), queue);
+                        type = "InternedString";
+                        break;
+                    default:
+                        reference = new WeakReference(new NonbranchyTree(SIZE, 0.3f, SIZE),
+                                queue);
+                        type = "NonbranchyTree";
+                        break;
+                }
+                int initialFactor = memoryStrategy.equals(MemoryStrategy.HIGH) ? 1 : (memoryStrategy.equals(MemoryStrategy.LOW) ? 10 : 2);
+                GarbageUtils.eatMemory(getExecutionController(), garbageProducer, initialFactor , 10, 0);
+                if (!getExecutionController().continueExecution()) {
+                    // we were interrrupted by stresser. just exit...
+                    return;
+                }
+                Reference polledReference = null;
+                try {
+                    polledReference = queue.remove();
+                } catch (InterruptedException e) {
+                    log.error("Unexpected InterruptedException during queue.remove().");
+                    setFailed(true);
+                }
+                // Check the reference and the queue
+                // The polled reference must be equal to the one enqueued to
+                // the queue
+
+                if (polledReference != reference) {
+                    log.error("The original reference is not equal to polled reference.");
+                    setFailed(true);
+                }
+
+                // queue.poll() once again must return null now, since there is
+                // only one reference in the queue
+                polledReference = queue.poll();
+                if (polledReference != null) {
+                    log.error("There are more  than one references in the queue.");
+                    setFailed(true);
+                }
+                reference.clear();
+            } catch (OutOfMemoryError e) {
+                log.info(oomMsg);
+            }
+            iteration++;
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/gctests/WeakReference/weak002/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/gctests/WeakReference/weak002/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,58 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/gctests/WeakReference/weak002.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent]
+ * VM Testbase readme:
+ * DESCRIPTION
+ *     The test checks that Garbage Collector correctly works with
+ *     WeakReferences. It also checks that no unexpected exceptions and errors
+ *     are thrown or the JVM is not crashed.
+ *     The test starts a number of threads. Each thread run tests for some time
+ *     or serveral iterations.  See javadoc StressOptions for configuration.
+ *     First of all each test defines what type to check (there are 10 types
+ *     totally). As soon as the type is defined, a WeakReference is created that
+ *     refers to an array of tested type and is registered with in a queue. A
+ *     WeakReference for NonbranchyTree class does not refer to an array, but to
+ *     instances of the class.
+ *     After that a thread performs next checks for the reference:
+ *         1. The reference is in queue after GC is provoked with
+ *            Algorithms.eatMemory() method (a single thread eats the memory).
+ *         2. queue.remove() returns reference from the queue.
+ *         3. queue.poll() returns null.
+ *         4. reference.clear() does not throw any exception.
+ *     The test extends ThreadedGCTest and implements GarbageProducerAware and
+ *     MemoryStrategyAware interfaces. The corresponding javadoc documentation
+ *     for additional test configuration.
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm gc.gctests.WeakReference.weak001.weak001 -ms high
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/gctests/WeakReference/weak003/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/gctests/WeakReference/weak003/weak003.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,100 @@
+/*
+ * Copyright (c) 2007, 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/gctests/WeakReference/weak003.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent]
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm -XX:-UseGCOverheadLimit gc.gctests.WeakReference.weak003.weak003 -t 1
+ */
+
+package gc.gctests.WeakReference.weak003;
+
+import java.lang.ref.Reference;
+import nsk.share.test.*;
+import nsk.share.TestFailure;
+import nsk.share.gc.*;
+import java.lang.ref.WeakReference;
+
+/**
+ * Test that GC clears weak references before throwing OOM.
+ *
+ * This test creates a number of weak references, then provokes
+ * GC with Algorithms.eatMemory and checks that all references
+ * have been cleared.
+ *
+ * This assertion is not clearly stated in javadoc for WeakReference,
+ * (but for SoftReference), but one would expect that quality GC
+ *  will do it.
+ */
+public class weak003 extends ThreadedGCTest {
+
+    class Worker implements Runnable {
+
+        private int arrayLength;
+        private int objectSize = 100;
+        private Reference<MemoryObject>[] references;
+
+        public void run() {
+            for (int i = 0; i < arrayLength; ++i) {
+                references[i] = new WeakReference<MemoryObject>(new MemoryObject(LocalRandom.nextInt(objectSize)));
+            }
+            Algorithms.eatMemory(getExecutionController());
+            if (!getExecutionController().continueExecution()) {
+                return;
+            }
+            // Check that all references have been cleared
+            int n = 0;
+            for (int i = 0; i < arrayLength; ++i) {
+                if (references[i].get() != null) {
+                    ++n;
+                }
+            }
+            if (n != 0) {
+                references = null;
+                throw new TestFailure("Some of the references have been not cleared: " + n);
+            }
+        }
+
+        public void Worker() {
+            arrayLength = Memory.getArrayLength(runParams.getTestMemory(), Memory.getReferenceSize() + objectSize);
+            System.out.println("Array size: " + arrayLength);
+            references = new WeakReference[arrayLength];
+        }
+    }
+
+    @Override
+    protected Runnable createRunnable(int i) {
+        return new Worker();
+    }
+
+    public static void main(String[] args) {
+        GC.runTest(new weak003(), args);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/gctests/WeakReference/weak004/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/gctests/WeakReference/weak004/weak004.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,93 @@
+/*
+ * Copyright (c) 2007, 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/gctests/WeakReference/weak004.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent]
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm -XX:-UseGCOverheadLimit gc.gctests.WeakReference.weak004.weak004 -t 1
+ */
+
+package gc.gctests.WeakReference.weak004;
+
+import nsk.share.gc.*;
+import java.lang.ref.WeakReference;
+
+/**
+ * Test that GC correctly clears weak references.
+ *
+ * This test is the same as weak003 except that it creates
+ * weak references to same object.
+ */
+public class weak004 extends ThreadedGCTest {
+
+    class Worker implements Runnable {
+
+        private int arrayLength;
+        private int objectSize = 100;
+        private WeakReference[] references;
+
+        private void makeReferences() {
+            MemoryObject obj = new MemoryObject(objectSize);
+            references = new WeakReference[arrayLength];
+            for (int i = 0; i < arrayLength; ++i) {
+                references[i] = new WeakReference<MemoryObject>(obj);
+            }
+        }
+
+        public void run() {
+            arrayLength = Memory.getArrayLength(runParams.getTestMemory() - objectSize, Memory.getReferenceSize() + objectSize);
+            System.out.println("Array size: " + arrayLength);
+            makeReferences();
+            Algorithms.eatMemory(getExecutionController());
+            if (!getExecutionController().continueExecution()) {
+                return;
+            }
+            int n = 0;
+            for (int i = 0; i < arrayLength; ++i) {
+                if (references[i].get() != null) {
+                    ++n;
+                }
+            }
+            if (n != 0) {
+                log.error("Some of the references have been not cleared: " + n);
+                setFailed(true);
+            }
+        }
+    }
+
+    @Override
+    protected Runnable createRunnable(int i) {
+        return new Worker();
+    }
+
+    public static void main(String[] args) {
+        GC.runTest(new weak004(), args);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/gctests/WeakReference/weak005/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/gctests/WeakReference/weak005/weak005.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,97 @@
+/*
+ * Copyright (c) 2007, 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/gctests/WeakReference/weak005.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent]
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm -XX:-UseGCOverheadLimit gc.gctests.WeakReference.weak005.weak005 -t 1
+ */
+
+package gc.gctests.WeakReference.weak005;
+
+import nsk.share.gc.*;
+import java.lang.ref.WeakReference;
+
+/**
+ * Test that GC correctly clears weak references.
+ *
+ * This test creates a number of weak references,
+ * each of which points to the next, then provokes
+ * GC with Algorithms.eatMemory(). The test succeeds
+ * if last reference has been cleared.
+ */
+public class weak005 extends ThreadedGCTest {
+
+    class Worker implements Runnable {
+
+        private int length = 10000;
+        private int objectSize = 10000;
+        private WeakReference[] references;
+
+        public Worker() {
+            System.out.println("Array size: " + length);
+            System.out.println("Object size: " + objectSize);
+            references = new WeakReference[length];
+        }
+
+        private void makeReferences() {
+            references[length - 1] = null;
+            MemoryObject obj = new MemoryObject(objectSize);
+            references[0] = new WeakReference(obj);
+            for (int i = 1; i < length; ++i) {
+                references[i] = new WeakReference(references[i - 1]);
+            }
+            for (int i = 0; i < length - 1; ++i) {
+                references[i] = null;
+            }
+        }
+
+        public void run() {
+            makeReferences();
+            Algorithms.eatMemory(getExecutionController());
+            if (!getExecutionController().continueExecution()) {
+                return;
+            }
+            if (references[length - 1].get() != null) {
+                log.error("Last weak reference has not been cleared");
+                setFailed(true);
+            }
+        }
+    }
+
+    @Override
+    protected Runnable createRunnable(int i) {
+        return new Worker();
+    }
+
+    public static void main(String[] args) {
+        GC.runTest(new weak005(), args);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/gctests/WeakReference/weak006/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/gctests/WeakReference/weak006/weak006.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,160 @@
+/*
+ * Copyright (c) 2007, 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/gctests/WeakReference/weak006.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent]
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm -XX:-UseGCOverheadLimit gc.gctests.WeakReference.weak006.weak006 -t 1
+ */
+
+package gc.gctests.WeakReference.weak006;
+
+import nsk.share.test.*;
+import nsk.share.gc.*;
+import nsk.share.TestFailure;
+import java.lang.ref.WeakReference;
+import java.lang.ref.SoftReference;
+import java.lang.ref.PhantomReference;
+import java.lang.ref.Reference;
+
+/**
+ * Test that GC correctly clears references.
+ *
+ * This test randomly creates a number of weak, soft,
+ * phantom and strong references,  each of which points
+ * to the next, then provokes GC with Algorithms.eatMemory().
+ * The test succedes if last reference has been cleared.
+ */
+public class weak006 extends ThreadedGCTest {
+
+    class Worker implements Runnable {
+
+        private int length;
+        private int objectSize = 100;
+        private Object[] references;
+        private Reference lastReference;
+
+        private Object makeReference(int n, Object o) {
+            switch (n) {
+                case 0:
+                    return new WeakReference(o);
+                case 1:
+                    return new SoftReference(o);
+                case 2:
+                    return new PhantomReference(o, null);
+                case 4: {
+                    // Array of strong references
+                    int len = Memory.getArrayLength(objectSize, Memory.getReferenceSize());
+                    Object[] arr = new Object[len];
+                    for (int i = 0; i < len; ++i) {
+                        arr[i] = o;
+                    }
+                    return arr;
+                }
+                case 5: {
+                    // reference to array of strong references and strong reference to reference
+                    int len = Memory.getArrayLength(objectSize, Memory.getReferenceSize());
+                    Object[] arr = new Object[len];
+                    for (int i = 1; i < len; ++i) {
+                        arr[i] = o;
+                    }
+                    Reference ref = (Reference) makeReference(LocalRandom.nextInt(3), arr);
+                    if (len > 0) {
+                        arr[0] = ref;
+                    }
+                    return ref;
+                }
+                case 3:
+                default:
+                    // Strong reference
+                    return o;
+            }
+        }
+
+        private void clear() {
+            lastReference = null;
+            references[length - 1] = null;
+        }
+
+        private void makeReferences(int n) {
+            clear();
+            MemoryObject obj = new MemoryObject(objectSize);
+            references[0] = new WeakReference(obj);
+            for (int i = 1; i < length; ++i) {
+                if (i != length - 1) {
+                    references[i] = makeReference(LocalRandom.nextInt(2), references[i - 1]);
+                } else {
+                    lastReference = (Reference) makeReference(n, references[i - 1]);
+                    references[i] = lastReference;
+                }
+            }
+            for (int i = 0; i < length; ++i) {
+                references[i] = null;
+            }
+        }
+
+        public void run() {
+            makeReferences(0);
+            ExecutionController stresser = getExecutionController();
+            Algorithms.eatMemory(stresser);
+            if (!stresser.continueExecution()) {
+                return;
+            }
+            if (lastReference.get() != null) {
+                references = null;
+                throw new TestFailure("Last weak reference has not been cleared");
+            }
+            makeReferences(1);
+            Algorithms.eatMemory(stresser);
+            if (!stresser.continueExecution()) {
+                return;
+            }
+            if (lastReference.get() != null) {
+                references = null;
+                throw new TestFailure("Last soft reference has not been cleared");
+            }
+        }
+
+        public Worker() {
+            length = Memory.getArrayLength(runParams.getTestMemory() - objectSize, Memory.getReferenceSize() + objectSize);
+            System.out.println("Array size: " + length);
+            references = new Object[length];
+        }
+    }
+
+    @Override
+    protected Runnable createRunnable(int i) {
+        return new Worker();
+    }
+
+    public static void main(String[] args) {
+        GC.runTest(new weak006(), args);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/gctests/WeakReference/weak007/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/gctests/WeakReference/weak007/weak007.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,100 @@
+/*
+ * Copyright (c) 2007, 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/gctests/WeakReference/weak007.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent]
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm -XX:-UseGCOverheadLimit gc.gctests.WeakReference.weak007.weak007 -t 1
+ */
+
+package gc.gctests.WeakReference.weak007;
+
+import nsk.share.TestFailure;
+import nsk.share.gc.*;
+import java.lang.ref.WeakReference;
+import java.lang.ref.Reference;
+
+/**
+ * Test that GC correctly clears weak references.
+ *
+ * This test creates a number of weak references,
+ * each of which points to the next, then provokes
+ * GC with Algorithms.eatMemory(). The test succeeds
+ * if last reference has been cleared and the object
+ * has been finalized.
+ */
+public class weak007 extends ThreadedGCTest {
+
+    class Worker implements Runnable {
+
+        private int length = 10000;
+        private int objectSize = 10000;
+        private Reference[] references;
+
+        private void makeReferences() {
+            references[length - 1] = null;
+            FinMemoryObject obj = new FinMemoryObject(objectSize);
+            references[0] = new WeakReference(obj);
+            for (int i = 1; i < length; ++i) {
+                references[i] = new WeakReference(references[i - 1]);
+            }
+            for (int i = 0; i < length - 1; ++i) {
+                references[i] = null;
+            }
+        }
+
+        public void run() {
+            makeReferences();
+            Algorithms.eatMemory(getExecutionController());
+            if (getExecutionController().continueExecution()) {
+                if (references[length - 1].get() != null) {
+                    throw new TestFailure("Last weak reference has not been cleared");
+                }
+            } else {
+                log.info("Completed iterations: " + getExecutionController().getIteration());
+            }
+        }
+
+        public Worker() {
+            log.info("Array size: " + length);
+            log.info("Object size: " + objectSize);
+            references = new WeakReference[length];
+        }
+    }
+
+    @Override
+    protected Runnable createRunnable(int i) {
+        return new Worker();
+    }
+
+    public static void main(String[] args) {
+        GC.runTest(new weak007(), args);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/gctests/WeakReferenceGC/CircularLinkedList.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,83 @@
+/*
+ * Copyright (c) 2002, 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.
+ */
+
+package gc.gctests.WeakReferenceGC;
+
+class node {
+    byte [] arr;
+    node next;
+    node prev;
+    node(){ arr = new byte[100]; }
+}
+
+public class CircularLinkedList implements Cloneable {
+    private node Root;
+
+    public void addElement() {
+       node newnode;
+
+       newnode = new node();
+       if (Root == null){
+          Root = newnode;
+          Root.next = Root;
+          Root.prev = Root;
+       } else{
+          newnode.next = Root.next;
+          Root.next.prev = newnode;
+          Root.next = newnode;
+          newnode.prev = Root;
+       }
+    }
+
+    public void addNelements(int n) {
+       for (int i = 0; i < n ; i++)
+          addElement();
+    }
+
+    public int elementCount() {
+       node p;
+       int count;
+
+       p = Root;
+       count = 0;
+
+       do {
+          p = p.prev;
+          count++;
+       }while(p != Root);
+       return count;
+    }
+
+    public Object clone() {
+       node p;
+       p = Root;
+
+       if ( p == null ) return null;
+       CircularLinkedList clone = new CircularLinkedList();
+       do {
+          clone.addElement();
+          p = p.prev;
+       } while(p != Root);
+       return clone;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/gctests/WeakReferenceGC/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/gctests/WeakReferenceGC/WeakReferenceGC.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,271 @@
+/*
+ * Copyright (c) 2002, 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
+ * @key gc
+ *
+ * @summary converted from VM Testbase gc/gctests/WeakReferenceGC.
+ * VM Testbase keywords: [gc, nonconcurrent]
+ * VM Testbase readme:
+ * *******************************************
+ * set timeout = 25 when running this test
+ * *******************************************
+ * This tests checks to see if the garbage collector enqueues
+ * a weak reference when referrent has been turned to garbage.
+ * Weak references are enqueued in  a non-deterministic way
+ * by the garbage collector, so the test uses a heuristic to
+ * determine whether the references are being enqueued in a timely
+ * manner which in turn determines whether outcome of the test.
+ * IF the user invokes the test with the following command line
+ * parameters :
+ *   java WeakReferenceGC -qFactor 0.9 -gcCount 5
+ * the test expects that 90% of all objects with only weak references
+ * pointing to them will be enqueued within 5 calls to the garbage collector.
+ * When I ran the test, I consistently got figures of 98% enqueueing
+ * with just 1 call to the garbage collector. So if this test fails,
+ * at its current settings, the garbage collector is not performing as well
+ * as it used to.
+ * The test creates circular linked lists of size 0.1Meg each. The number
+ * of lists created can be set via the -numLists flag. The default
+ * value is 50.
+ * The circular linked lists have both strong and weak references pointing
+ * to them. The strong and weak references are kept in arrays.
+ * The strong references are all nulled out and System.gc() is called
+ * explicitly and the heuristic is applied. If the test does not
+ * satisfy the heuristic or an OutOfMemory exception is thrown,
+ * the test fails.
+ * Array containing    Each circular linked list        Array containing
+ * weak references     is 0.1 Meg each and has          strong references
+ * to linked lists.    a weak reference, W<n> and a     to linked lists.
+ *                     strong reference, x<n>
+ *                     pointing to it.
+ *  ----      ----------------------------        -----
+ * |    |     |   ----             ---- <-|      |     |
+ * | W1 |-->  -->|    |---.......>|    |   <---- |  x1 |
+ * |    |     -->|    |<---.......|    |<--      |     |
+ *  ----      |   ----       1000  ---   |        -----
+ *            ---------------------------
+ *   .                                              .
+ *   .                                              .
+ *   .                                              .
+ *   .                                              .
+ *   .                                              .  10
+ *   .                                              .
+ *  ----      ----------------------------        -----
+ * |    |     |   ----             ---- <-|      |     |
+ * | Wn |-->  -->|    |---.......>|    |   <---- |  xn |
+ * |    |     -->|    |<---.......|    |<--      |     |
+ *  ----      |   ----       1000  ---   |        -----
+ *            ---------------------------
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm
+ *      gc.gctests.WeakReferenceGC.WeakReferenceGC
+ *      -numList 50
+ *      -qFactor 0.9
+ *      -gcCount 5
+ *      -iter 100
+ */
+
+package gc.gctests.WeakReferenceGC;
+
+import java.util.*;
+import java.lang.ref.*;
+import nsk.share.TestFailure;
+import nsk.share.gc.GC;
+import nsk.share.gc.ThreadedGCTest;
+import nsk.share.gc.gp.GarbageUtils;
+
+public class WeakReferenceGC extends ThreadedGCTest {
+
+        // A heuristic is used to determine the outcome(pass/fail
+        // status) of a test. If 90% of all objects that have
+        // _only_ weak references pointing to them are garbage
+        // collected with 5 explicit calls to the garbage collector
+        // the test is deemed a pass. The following two variables
+        // are used to define this heuristic: gcCount, qFactor
+
+        static String args[];
+
+        CircularLinkedList holder[];
+
+        int loopCount = 100; // # of times test is performed
+
+        int memory_reserve[];
+        int gcCount = 5;
+        int numLists = 50; // number of linked lists
+        float qFactor = (float) 0.9;
+        ReferenceQueue refQueue;
+        Vector results;
+        WeakReference wholder[];
+
+        public static void main(String[] args) {
+                WeakReferenceGC.args = args;
+                GC.runTest(new WeakReferenceGC(), args);
+        }
+
+        WeakReferenceGC() {
+                holder = new CircularLinkedList[numLists];
+                wholder = new WeakReference[numLists];
+                refQueue = new ReferenceQueue();
+                results = new Vector();
+        }
+
+        protected Runnable createRunnable(int i) {
+                return i > 0 ? null : new Worker();
+        }
+
+        private void dumpTestResults() {
+                double objectsRecovered;
+
+                System.out.println("Percentage of Objects" + "  # of GC's");
+                System.out.println("    Recovered         " + " Required");
+                for (int i = 0; i < results.size(); i++) {
+                        Statistic s = (Statistic) results.elementAt(i);
+                        objectsRecovered = Math.rint((float) (s.numEnqueued)
+                                        / (float) (numLists) * 100.0);
+                        System.out.println("        " + objectsRecovered
+                                        + " %             " + s.iterations);
+                }
+        }
+
+        private boolean hasPassed() {
+                boolean passed;
+                passed = true; // assume passed till proven otherwise
+
+                for (int i = 0; i < results.size(); i++) {
+                        Statistic s = (Statistic) results.elementAt(i);
+                        if ((s.iterations > gcCount)
+                                        || (s.numEnqueued < (int) (numLists * qFactor))) {
+                                passed = false;
+                                break; // test failed
+                        }
+                }
+                return passed;
+        }
+
+        private void parseTestParams(String args[]) {
+                for (int i = 0; i < args.length; i++) {
+                        if (args[i].compareTo("-numList") == 0) {
+                                numLists = new Integer(args[++i]).intValue();
+                        } else if (args[i].compareTo("-qFactor") == 0) {
+                                qFactor = new Float(args[++i]).floatValue();
+                        } else if (args[i].compareTo("-gcCount") == 0) {
+                                gcCount = new Integer(args[++i]).intValue();
+                        } else if (args[i].compareTo("-iter") == 0) {
+                                loopCount = new Integer(args[++i]).intValue();
+                                // } else {
+                                // System.err.println("usage : " +
+                                // "java WeakReferenceGC [-numList <n>] " +
+                                // "[-qFactor <0.x>] [-gcCount <n>] [-iter <n>]");
+                                // throw new TestBug("Invalid arguments");
+                        }
+                }
+        }
+
+        private void persistentGC() {
+                int numEnqueued, iter, qCriterion;
+
+                numEnqueued = 0; // number of weakReference enqueued
+                iter = 0;
+                qCriterion = (int) (numLists * qFactor);
+
+                while ((numEnqueued < qCriterion) && (iter <= gcCount)) {
+                        iter++;
+                        if (!getExecutionController().continueExecution()) {
+                                return;
+                        }
+                        if (GarbageUtils.eatMemory(getExecutionController()) == 0) {
+                                return; // We were unable to provoke OOME before timeout is over
+                        }
+                        numEnqueued = 0; // We set counter to zero to avoid counting references twice
+                        for (int i = 0; i < numLists; i++) {
+                                if (wholder[i].isEnqueued()) {
+                                        numEnqueued++;
+                                }
+                        }
+                }
+                results.addElement((new Statistic(iter, numEnqueued)));
+        }
+
+        private void runTest() {
+                int iter;
+                iter = 1;
+                try {
+                        do {
+                                for (int i = 0; i < numLists; i++) {
+                                        holder[i] = new CircularLinkedList();
+                                        holder[i].addNelements(1000);
+                                        wholder[i] = new WeakReference(holder[i], refQueue);
+                                }
+
+                                for (int i = 0; i < numLists; i++) {
+                                        holder[i] = null;
+                                }
+
+                                if (!getExecutionController().continueExecution()) {
+                                        return;
+                                }
+                                persistentGC();
+
+                                iter++;
+                        } while (iter <= loopCount);
+                } catch (OutOfMemoryError e) {
+                        memory_reserve = null;
+                        System.gc();
+                        throw new TestFailure("Failed at iteration=" + loopCount);
+                }
+        }
+
+        //We can't override run() method in WeakReferenceGC, so we are carrying out it to Worker
+        private class Worker implements Runnable {
+                @Override
+                public void run() {
+                        parseTestParams(args);
+                        runTest();
+                        dumpTestResults();
+                        boolean passed = hasPassed();
+                        if (passed == true) {
+                                log.info("Test passed.");
+                        } else {
+                                log.error("Test failed.");
+                                setFailed(true);
+                        }
+                }
+        }
+}
+
+class Statistic {
+        int iterations;
+        int numEnqueued;
+
+        Statistic(int i, int num) {
+                iterations = i;
+                numEnqueued = num;
+        }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/gctests/fileTest/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/gctests/fileTest/fileTest.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,95 @@
+/*
+ * Copyright (c) 2002, 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/gctests/fileTest.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent]
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm gc.gctests.fileTest.fileTest -Filename fileTest.java -iterations 500
+ */
+
+package gc.gctests.fileTest;
+
+import java.io.*;
+import java.util.*;
+import nsk.share.test.*;
+import nsk.share.gc.*;
+import nsk.share.TestBug;
+import nsk.share.TestFailure;
+
+public class fileTest extends GCTestBase {
+        private File [] fileArray;
+        private FileInputStream [] fileInputArray;
+        private final static int fileNumber = 10000;
+        // The number of open file descriptors per process varies from one
+        // system to another. lets expermiment with just 20 open fd's.
+        private final static int inputStreamNumber = 20;
+        private String fileName;
+
+        public fileTest(String fileName) {
+                this.fileName = fileName;
+                fileArray = new File[fileNumber];
+                fileInputArray = new FileInputStream[inputStreamNumber];
+        }
+
+        public void runIteration() throws IOException {
+                for (int i = 0; i < fileNumber; ++i)
+                        fileArray[i] = new File(fileName);
+                for (int i = 0; i < inputStreamNumber; ++i)
+                        fileInputArray[i] = new FileInputStream(fileName);
+                for (int i = 0; i < inputStreamNumber; ++i)
+                        fileInputArray[i].close();
+        }
+
+        public void run() {
+                try {
+                        Stresser stresser = new Stresser(runParams.getStressOptions());
+                        stresser.start(runParams.getIterations());
+                        try {
+                                while (stresser.iteration())
+                                        runIteration();
+                        } finally {
+                                stresser.finish();
+                        }
+                } catch (IOException e) {
+                        throw new TestFailure(e);
+                }
+        }
+
+        public static void main(String args[]) {
+                String fileName = null;
+                for (int i = 0 ; i < args.length ; i++) {
+                        if( args[i].equals("-Filename"))
+                                fileName = args[++i];
+                }
+                if (fileName == null)
+                        throw new TestBug("No -Filename option is specified");
+                GC.runTest(new fileTest(fileName), args);
+        }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/gctests/gctest01/gctest01.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,260 @@
+/*
+ * Copyright (c) 2002, 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
+ * @key gc
+ *
+ * @summary converted from VM Testbase gc/gctests/gctest01.
+ * VM Testbase keywords: [gc]
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm gc.gctests.gctest01.gctest01 100 10
+ */
+
+package gc.gctests.gctest01;
+
+import nsk.share.test.*;
+import nsk.share.log.*;
+import nsk.share.gc.*;
+import nsk.share.TestBug;
+
+import java.util.Random;
+//import RusageStruct;
+
+/*  -- stress testing
+ create 20 memory evil threads requesting to allocate
+ the object of sizes from 8 to ( 2 ^ 19).
+ The live time of objects is very short.
+ Memory evil thread exits the first time memory allocation fails.
+ */
+
+class ThreadTracker {
+        static int threadCount = 0;
+
+        static synchronized int getThreadCount() {
+                return threadCount;
+        }
+
+        static synchronized void setThreadCount(int count) {
+                threadCount = count;
+        }
+
+        static synchronized void incr() {
+                threadCount++;
+        }
+
+        static synchronized void decr() {
+                threadCount--;
+        }
+}
+
+class PopulationException extends Exception {
+}
+
+class Person {
+        String name;
+        int  ssid;
+        int  age;
+        int  buf[];
+        int  bufsz;
+        static int populationLimit;
+        static int currentPopulation;
+
+        public Person(String n, int ssid, int age, int bufsz) throws PopulationException {
+                this.incr();
+                if (this.getPopulation() > this.getPopulationLimit()) {
+                        throw new PopulationException();
+                }
+                name = n;
+                this.ssid = ssid;
+                this.age = age;
+                if ( bufsz > 0 ) {
+                        this.bufsz = bufsz;
+                        this.buf = new int[bufsz];
+                }
+        }
+
+        static synchronized void incr() {
+                currentPopulation++;
+        }
+
+        static synchronized int getPopulation() {
+                return currentPopulation;
+        }
+
+        static synchronized void setPopulation(int census) {
+                currentPopulation = census;
+        }
+
+        static synchronized void setPopulationLimit(int limit) {
+                populationLimit = limit;
+        }
+
+        static synchronized int getPopulationLimit() {
+                return populationLimit;
+        }
+}
+
+
+
+// create 20 memory evil threads requesting to allocate
+// the object of sizes from 8 to ( 2 ^ 19).
+// The live time of objects is very short.
+public class gctest01 extends TestBase {
+        private String[] args;
+
+        public gctest01(String[] args) {
+                setArgs(args);
+        }
+
+        class memevil extends Thread {
+                int sum;
+                int bufsz = 64;
+
+                public memevil(int bufsz) {
+                        ThreadTracker.incr();
+                        sum = 0;
+                        this.bufsz = bufsz;
+
+                }
+
+                /* Person object is live short, it will be garbage after
+                   control returns
+                   */
+                private boolean doit() {
+                        try {
+                                Person p = new Person("Duke", 100, 100, bufsz);
+                        } catch (OutOfMemoryError e ) {
+                                log.info(getName() + ": Out of Memory");
+                                return false; //should free up some memory
+                        } catch (PopulationException e) {
+                                //we've reached the limit, so stop
+                                return false;
+                        }
+                        return true;
+                }
+
+                public void run() {
+                        while ( doit() ) {
+                                if ( LocalRandom.random() > 0.6668) {
+                                        try {
+                                                sleep(10);   // to be nice
+                                        }
+                                        catch (InterruptedException e) {}
+                                }
+                        }
+                        //must be done, decrement the thread count
+                        ThreadTracker.decr();
+                }
+        }
+
+        class escaper extends Thread {
+                public void run() {
+                        while ( ThreadTracker.getThreadCount() > 0 ) {
+                                int buf[] = new int[32];
+                                try
+                                {
+                                        Thread.currentThread().sleep(1000);
+                                } catch (InterruptedException e) {
+                                }
+                                // log.info("Is the sun rising?");
+                        }
+                }
+        }
+
+
+        public void run() {
+                int bufsz = 8;
+                int i = 3;
+                int peopleLimit = 1000;
+                String usage = "usage: gctest01 [NumberOfObjects [Iterations] ] ]";
+                int loops;
+                int LOOPCOUNT = 10;
+
+                if (args.length > 0) {
+                        try {
+                                peopleLimit = new Integer(args[0]).intValue();
+                        } catch (NumberFormatException e) {
+                                log.info(usage);
+                                throw new TestBug("Bad input to gctest01." +
+                                                " Expected integer, got: ->" + args[0] + "<-", e);
+                        }
+                }
+
+                if (args.length > 1 ) {
+                        try {
+                                LOOPCOUNT = new Integer(args[1]).intValue();
+                        } catch (NumberFormatException e) {
+                                log.error(usage);
+                                throw new TestBug("Bad input to gctest01." +
+                                                " Expected int, got: ->" + args[1] + "<-", e);
+                        }
+
+                }
+
+                double before = 0.0;
+                double after;
+
+                Person.setPopulationLimit(peopleLimit);
+
+                for (loops = 0; loops < LOOPCOUNT; loops++) {
+                        Person.setPopulation(0);
+                        escaper you = new escaper();
+                        you.setName("Escaper");
+                        you.start();
+                        i = 3;
+                        bufsz = 8;
+                        while ( i < 20  )
+                        {
+                                memevil me = new memevil(bufsz);
+                                me.setName("Memevil" + bufsz);
+                                bufsz = 2*bufsz;
+                                me.start();
+                                i++;
+                                Thread.currentThread().yield();
+                        }
+                        try
+                        {
+                                you.join();
+                        }
+                        catch (InterruptedException e)
+                        {
+                                e.printStackTrace();
+                        }
+                } // end of loops
+                log.info("Test passed.");
+
+        }
+
+        public void setArgs(String[] args) {
+                this.args = args;
+        }
+
+        public static void main(String args[]) {
+                GC.runTest(new gctest01(args), args);
+        }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/gctests/gctest02/gctest02.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,260 @@
+/*
+ * Copyright (c) 2002, 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.
+ */
+//gctest02.java
+
+
+/*
+ * @test
+ * @key gc
+ *
+ * @summary converted from VM Testbase gc/gctests/gctest02.
+ * VM Testbase keywords: [gc]
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm gc.gctests.gctest02.gctest02 100
+ */
+
+package gc.gctests.gctest02;
+
+import nsk.share.TestFailure;
+import nsk.share.TestBug;
+/*  stress testing
+ create 16 memory evil threads requesting to allocate
+ the object of sizes from 8 to ( 2 ^ 19).
+ The live time of objects is random (0 ~ 1000).
+ Here we let the threads that reference the objects
+ to simulate the object life time.
+*/
+
+import java.util.Random;
+
+class PopulationException extends Exception {
+    //this exception is used to signal that we've
+    //reached the end of the test
+}
+
+//the LocalRandom class is used to isolate the pseudo-random
+//number generator from other parts of the system which might
+//silently be using it.
+//This is to make sure the tests are repeatable
+
+class LocalRandom {
+    public static Random rGen = null;
+
+    public static double random() {
+        //should fail if rGen is not initialized
+        return rGen.nextDouble();
+    }
+}
+
+class ThreadCount {
+    static int count= 0;
+    static synchronized void inc() { count++; }
+    static synchronized void dec() { count --; }
+    static synchronized int get() { return count; }
+}
+
+class Person {
+        String name;
+        int     ssid;
+        int     age;
+        int     buf[];
+        int     bufsz;
+        static int populationCount = 0;
+        static int populationLimit = 0;
+
+        Person(String n, int ssid, int age, int bufsz)
+        throws PopulationException {
+                name = n;
+                this.ssid = ssid;
+                this.age = age;
+                if ( bufsz > 0 ) {
+                        this.bufsz = bufsz;
+                        this.buf = new int[bufsz];
+                }
+                incPopulation();
+                if (getPopulation() > getPopulationLimit()) {
+                        throw new PopulationException();
+                }
+        }
+        public static synchronized int getPopulationLimit() {
+                return populationLimit;
+        }
+        public static synchronized void setPopulationLimit(int newLimit) {
+                populationLimit = newLimit;
+        }
+        public static synchronized int getPopulation() {
+                return populationCount;
+        }
+        public static synchronized void incPopulation() {
+                populationCount ++;
+        }
+
+}
+
+// hr (humane resource) dept is using objects.
+// Put the hr thread to sleep to keep the reference to objects
+class hr extends Thread {
+        Person pp;
+        int lifetime;
+
+        hr(Person p, int l) {
+                pp = p;
+                lifetime = l;
+        }
+
+        public void run() {
+                // just sleep to emulate the life time of object referenced by p
+                try { sleep(lifetime); }
+                catch (InterruptedException e) {}
+        }
+}
+
+class Memevil extends Thread {
+        int sum;
+        int bufsz = 64;
+        boolean debug = false;
+
+        Memevil(int bufsz) {
+                sum = 0;
+                this.bufsz = bufsz;
+        }
+        /*      Person object is live short, it will be garbage after
+         *      control returns
+         */
+        private boolean doit() {
+                try {
+                        Person p = new Person("Duke", 100, 100, bufsz);
+                        hr useit = new hr(p, (int)(100*LocalRandom.random()));
+                        useit.start();
+                        return true;
+                }
+                catch (PopulationException e) {
+                        return false;
+                }
+                catch (OutOfMemoryError e ) {
+                        System.err.println(getName() + ": Out of Memory");
+                        return false;
+                }
+        }
+        public void run() {
+                while ( doit() ) {
+                        if ( LocalRandom.random() > 0.6668) {
+                                try {
+                                        sleep(10);   // to be nice
+                                }
+                                catch (InterruptedException e) {
+                                }
+                        }
+                        Thread.yield();
+                }
+                //we've reached the population limit, so we're exiting the thread
+                ThreadCount.dec();
+        }
+}
+
+class Escaper extends Thread {
+        public void run() {
+                while ( ThreadCount.get() > 0 ) {
+                        int buf[] = new int[32];
+                        {
+                                                yield();
+                        }
+                }
+        }
+}
+
+public class gctest02 {
+        public static void main(String args[] ) {
+                int bufsz = 8;
+                int peopleLimit = 1000;
+                long randomSeed = System.currentTimeMillis();
+                Memevil me=null;
+                if (args.length > 0)
+                {
+                        try
+                        {
+                                peopleLimit = new Integer(args[0]).intValue();
+                        }
+                        catch (NumberFormatException e)
+                        {
+                                throw new TestBug(
+                                        "Bad input to gctest02. Expected integer, got: ->"
+                                        + args[0] + "<-", e);
+                        }
+                }
+
+                if (args.length == 2)
+                {
+                        try
+                        {
+                                randomSeed = new Long(args[1]).longValue();
+                        }
+                        catch (NumberFormatException e)
+                        {
+                                throw new TestBug(
+                                        "Bad input to gctest02. Expected long, got: ->"
+                                        + args[0] + "<-", e);
+                        }
+                }
+                Person.setPopulationLimit(peopleLimit);
+                System.out.println("Seed value: " + randomSeed);
+                for (int ii=0; ii<40; ii++) {
+                        bufsz = 8;
+                        LocalRandom.rGen = new Random(randomSeed);
+                        Person.populationCount = 0;
+                        Escaper you = new Escaper();
+                        you.setName("Escaper");
+                        ThreadCount.inc();
+                        you.start();
+                        me = new Memevil(bufsz);
+                        me.setName("Memevil" + bufsz);
+                        bufsz = 2*bufsz;
+                        me.start();
+                        Thread.yield();
+                        for (int i=1; i<11; i++) {
+                                ThreadCount.inc();
+                                me = new Memevil(bufsz);
+                                me.setName("Memevil" + bufsz);
+                                bufsz = 2*bufsz;
+                                me.start();
+                                Thread.yield();
+                        }
+                        try {
+                                you.join();
+                        }
+                        catch (InterruptedException e) {
+                                throw new TestFailure("InterruptedException in gctest2.main()");
+                        }
+                        for (int i=1; i<11; i++) {
+                                try { me.join(); }
+                                catch (InterruptedException e) {
+                                        throw new TestFailure("InterruptedException in gctest2.main()");
+                                }
+                        }
+                }
+                System.out.println("Test passed.");
+        }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/gctests/gctest03/Tree.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,404 @@
+/*
+ * Copyright (c) 2002, 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.
+ */
+
+package gc.gctests.gctest03;
+
+class DataNodeException extends Exception
+{
+}
+
+
+class DataNode  {
+  int key;
+  int buf[];
+  static int dataNodeCount = 0;
+  static int dataNodeLimit;
+
+  static synchronized void incDataNodeCount()
+  {
+    dataNodeCount++;
+  }
+
+  static synchronized int getDataNodeCount()
+  {
+    return dataNodeCount;
+  }
+
+  static synchronized void setDataNodeLimit(int newLimit)
+  {
+    dataNodeLimit = newLimit;
+  }
+
+  static synchronized int getDataNodeLimit()
+  {
+    return dataNodeLimit;
+  }
+
+  static synchronized void clearDataNodeCount()
+  {
+        dataNodeCount = 0;
+  }
+  DataNode(int key) throws DataNodeException
+  {
+
+    incDataNodeCount();
+    if (getDataNodeCount() > getDataNodeLimit())
+    {
+        throw (new DataNodeException());
+    }
+
+    this.key = key;
+    try {
+      buf = new int[key];
+    }
+    catch ( OutOfMemoryError e )
+      {
+        System.out.println(Thread.currentThread().getName() + " : outofmemory");
+      }
+  }
+
+  public void print()
+  {
+    System.out.println(key);
+  }
+
+  public boolean equals(DataNode d)
+  {
+    int k = d.getkey();
+
+    return ( key == k);
+  }
+
+  public boolean large(DataNode d)
+  {
+    int k = d.getkey();
+
+    return ( key > k);
+  }
+
+ public boolean less(DataNode d)
+
+  {
+    int k = d.getkey();
+
+    return ( key < k);
+  }
+
+  public int getkey()
+  { return key; }
+}
+
+
+class TreeNode {
+  DataNode  data;
+  TreeNode  parent;
+  TreeNode  left;
+  TreeNode  right;
+
+  TreeNode(DataNode key)
+  {
+    this.data = key;
+    parent = null;
+    left = null;
+    right = null;
+  }
+
+  public void print()
+  {
+    data.print();
+  }
+
+  public TreeNode getleft()
+  {
+    return left;
+  }
+
+  public TreeNode getright()
+  {
+    return right;
+  }
+
+  public TreeNode getparent()
+  {
+    return parent;
+  }
+
+  public synchronized void setleft(TreeNode left)
+  {
+    this.left = left;
+  }
+
+  public synchronized void setright(TreeNode right)
+  {
+    this.right = right;
+  }
+
+  public synchronized void setparent(TreeNode parent)
+  {
+    this.parent = parent;
+  }
+
+  public DataNode getData()
+  {
+    return data;
+  }
+
+  // print it out in order of a large one first
+  public void sprint()
+  {
+    //print itself
+    if ( left != null )  left.sprint();
+    System.out.println(data.getkey());
+    if ( right != null )  right.sprint();
+  }
+
+   // print it out in order of a small one first
+  public void lprint()
+  {
+    if (right != null ) right.lprint();
+    System.out.println(data.getkey());
+    if ( left != null ) left.lprint();
+  }
+
+  public synchronized TreeNode duplicate()
+  {
+    TreeNode tp = new TreeNode(data);
+
+    if ( left != null )
+      {
+        tp.left = left.duplicate();
+      }
+    if ( right != null )
+      {
+        tp.right = right.duplicate();
+      }
+    return tp;
+  }
+
+  public TreeNode search(DataNode d)
+  {
+    TreeNode tp = this;
+    DataNode k;
+
+    while ( tp != null )
+      {
+        k = tp.getData();
+        if ( k.equals(d) )
+          {
+            return tp;
+          }
+        else
+          if ( d.large(k) )
+            tp = tp.getright();
+        else
+          tp = tp.getleft();
+      }
+    return null;
+  }
+
+  public synchronized void insert(TreeNode t)
+  {
+    DataNode d = t.getData();
+
+    TreeNode tp = this;
+    TreeNode tp1 = tp;
+    DataNode d0;
+
+    while ( true )
+      {
+        d0 = tp.getData();
+
+        if ( d.large(d0) )
+          {
+            tp1 = tp;
+            tp = tp.getright();
+            if ( tp == null )
+              {
+                tp1.setright(t);
+                t.setparent(tp1);
+                break;
+              }
+          }
+        else
+          {
+            tp1 = tp;
+            tp = tp.getleft();
+            if (tp == null )
+              {
+                tp1.setleft(t);
+                t.setparent(tp1);
+                break;
+              }
+          }
+      }
+
+  }
+
+
+}
+
+
+class Tree {
+  TreeNode root = null;
+
+  Tree()
+  {
+    root = null;
+  }
+
+  Tree(TreeNode root)
+  {
+    this.root = root;
+  }
+
+  public synchronized void insert(TreeNode t)
+  {
+    if ( root == null )
+      {
+        root = t;
+        return;
+      }
+
+    root.insert(t);
+  }
+
+
+  public void sort1()
+  {
+    root.sprint();
+  }
+
+  public void sort2()
+  {
+    root.lprint();
+  }
+
+  public TreeNode search(DataNode d)
+  {
+    if ( root == null ) return null;
+    else return root.search(d);
+  }
+
+  public synchronized boolean remove(DataNode d)
+  {
+    if ( root == null ) return false;
+
+    TreeNode t = root.search(d);
+
+        // data is not in a heap
+    if ( t == null ) return false;
+
+/*
+    if ( d.equals(t.getData()) == false )
+      {
+        System.out.println("failed");
+        return false;
+      }
+ */
+
+    TreeNode p = t.getparent();
+    TreeNode l = t.getleft();
+    TreeNode r = t.getright();
+
+    // the removed node is a root
+    if ( p == null )
+      {
+        if ( l == null && r != null )
+          {
+            r.setparent(null);
+            root = r;
+            return true;
+          }
+        if ( l != null && r == null )
+          {
+            l.setparent(null);
+            root = l;
+            return true;
+          }
+        if ( l == null && r == null )
+          {
+            root = null;
+            return true;
+          }
+
+        if ( l != null && r != null )
+          {
+            r.setparent(null);
+            r.insert(l);
+            root = r;
+            return true;
+          }
+      }
+
+    // a leaf
+    if ( r == null && l == null )
+      {
+        if ( p.getright() == t )
+          {
+            /* right child */
+            p.setright(null);
+          }
+        else
+          p.setleft(null);
+        return true;
+      }
+
+    // a node without left child
+    if ( r != null &&  l == null )
+      {
+        r.setparent(p);
+        if ( t == p.getright() ) p.setright(r);
+        if ( t == p.getleft() ) p.setleft(r);
+        return true;
+      }
+
+    if ( r == null && l != null )
+      {
+        l.setparent(p);
+        if ( t == p.getright() ) p.setright(l);
+        if ( t == p.getleft() ) p.setleft(l);
+        return true;
+      }
+
+    // a node with two children
+    r.insert(l);
+    r.setparent(p);
+    if ( t == p.getright() ) p.setright(r);
+    if ( t == p.getleft() ) p.setleft(r);
+    return true;
+   }
+
+  public synchronized Tree copy()
+  {
+    if ( root == null ) return null;
+
+    return(new Tree(root.duplicate()));
+  }
+
+  public synchronized boolean isempty()
+  {
+    return ( root == null );
+  }
+
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/gctests/gctest03/appthread.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,180 @@
+/*
+ * Copyright (c) 2002, 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.
+ */
+
+package gc.gctests.gctest03;
+
+import nsk.share.test.*;
+import nsk.share.gc.*;
+
+//import Tree;
+//import LocalRandom;
+
+// remove the nodes whose key is the multiple of key from the tree
+class Redthread extends Thread {
+  Tree optree;
+  int key;
+
+  Redthread(Tree tr, int k)
+  {
+    optree = tr;
+    key = k;
+  }
+
+  public void run() {
+    int maxsz = (1024 * 64); // 64k
+    int i = 1;
+    int sz;
+
+    sz = 1;
+
+    while ( optree.isempty() == false)
+      {
+        DataNode d;
+//      System.out.println(getName() + i);
+//      sz = (key * i) % maxsz;
+            try
+            {
+            d = new DataNode(sz);
+        }
+        catch (DataNodeException e)
+        {
+//System.out.println(getName() + " exiting");
+            return;
+        }
+       if (optree.remove(d))
+//        System.out.println(getName() + " removes " + sz);
+       i++;
+       try
+       {
+          sleep(3);
+       }
+       catch(InterruptedException e) {}
+
+//      optree.sort1();
+        sz++;
+     }
+  }
+}
+
+// add the nodes whose key is the multiple of key from the tree
+class Bluethread extends Thread {
+  Tree optree;
+  int key;
+  private int loopcount = 0;
+
+  Bluethread(Tree tr, int k)
+  {
+    optree = tr;
+    key = k;
+  }
+
+  public void setloop(int n)
+  {
+      loopcount = n;
+  }
+
+  public void run()
+  {
+    int i;
+    int sz;
+    int maxsz = (1024 * 64); // 64k
+
+    i = 1; sz = 0;
+    while ( (loopcount== 0) ? true : (i < loopcount) )
+    {
+            sz = (key * i) % maxsz;
+       DataNode d;
+
+       try
+       {
+            d= new DataNode(sz);
+       }
+       catch (DataNodeException e)
+       {
+//System.out.println(getName() + " exiting");
+            return;
+       }
+
+       TreeNode t = new TreeNode(d);
+ //             System.out.println(getName() + i);
+       if ( optree.search(d) == null )
+         {
+           optree.insert(t);
+//           System.out.println(getName() + " insert " + sz);
+         }
+       //optree.sort1();
+       i++;
+       try
+       {
+          sleep(5);
+       }
+       catch(InterruptedException e) {}
+     }
+  }
+}
+
+class Yellowthread extends Thread {
+  Tree optree;
+  int key;    // data to be moved from the tree
+
+  Yellowthread(Tree tr, int k)
+  {
+    optree = tr;
+    key = k;
+  }
+
+  // remove the nodes whose key is the multiple of key from the tree
+  public void run()
+  {
+    int i = 1;
+    while ( true )
+      {
+        DataNode d;
+        try
+        {
+            d = new DataNode(key*i);
+        }
+        catch (DataNodeException e)
+        {
+//System.out.println(getName() + " exiting");
+            return;
+        }
+       TreeNode t = optree.search(d);
+/*       if ( t != null ) System.out.println(getName() + ": search = " +
+ *                                         (t.getData()).getkey());
+ */
+       i++;
+       if ( LocalRandom.random() < 0.668 )
+       {
+          try
+          {
+             sleep(5);
+          }
+          catch(InterruptedException e) {}
+       }
+     }
+  }
+}
+
+public class appthread {
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/gctests/gctest03/gctest03.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,150 @@
+/*
+ * Copyright (c) 2002, 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.
+ */
+
+/*  stress testing
+ Redthreads keep removing new nodes from a binary sort tree(
+ all nodes of its left subtree is less than itself, all nodes
+ of its right subtree is large than itself).
+ Bluethreads keep adding nodes into the binary sort tree.
+ YellowThreads search the binary sort tree.
+ The nodes removed from the tree will become garbages immediately
+ Create 10 Redthreads and 10 Bluethreads to manipulate the
+ the same binary tree involving excessive memory allocation
+ to test if memory management module and gc() crash.
+ */
+
+
+/*
+ * @test
+ * @key gc
+ *
+ * @summary converted from VM Testbase gc/gctests/gctest03.
+ * VM Testbase keywords: [gc]
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @compile Tree.java appthread.java
+ * @run main/othervm gc.gctests.gctest03.gctest03 10000
+ */
+
+package gc.gctests.gctest03;
+
+import nsk.share.test.*;
+import nsk.share.gc.*;
+import nsk.share.TestFailure;
+import nsk.share.TestBug;
+
+//import Tree;
+//import Redthread;
+//import Bluethread;
+//import LocalRandom;
+import java.util.Random;
+
+public class gctest03 extends TestBase {
+        private String[] args;
+
+        public gctest03(String[] args) {
+                this.args = args;
+        }
+
+        public void run() {
+                int i = 1;
+                int  dataNodeLimit = 100000;
+
+                if (args.length > 0) {
+                        try {
+                                dataNodeLimit = new Integer(args[0]).intValue();
+                        } catch (NumberFormatException e) {
+                                throw new TestBug("Bad input to gctest03. Expected integer, " +
+                                                " got: ->" + args[0] + "<-", e);
+                        }
+                }
+
+                for (int j = 0; j < 10; j++) {
+                        DataNode.setDataNodeLimit(dataNodeLimit);
+                        DataNode.clearDataNodeCount();
+
+                        Tree  tr = new Tree();
+                        for (i =2; i < 100; i++) {
+                                try {
+                                        DataNode d = new DataNode(i);
+                                        TreeNode t = new TreeNode(d);
+                                        tr.insert(t);
+                                } catch (DataNodeException e) {
+                                        throw new TestFailure("DataNodeException caught in gctest03.main()", e);
+                                }
+                        }
+
+                        int sz = 10;
+
+                        //create 10 threads adding data into binary tree.
+                        // each thread only adds the multiple of its key
+                        //(1, 2, 3, 4, 5, 6, 7, 8, 9 , 10). No duplication
+
+                        Redthread rth[] = new Redthread[sz];
+
+                        for(i=0; i < sz; i++) {
+                                rth[i] = new Redthread(tr, i+1);
+                                rth[i].setName("Redthread" + i);
+                                rth[i].start();
+                        }
+
+                        //create 10 threads removing data from the tree.
+
+                        Bluethread bth[] = new Bluethread[sz];
+
+                        for(i=0; i < sz; i++) {
+                                bth[i] = new Bluethread(tr, i+1);
+                                bth[i].setName("Bluethread" + i);
+                                bth[i].start();
+                        }
+
+
+                        //create 10 threads inquiring data from the tree
+
+                        Yellowthread yth[] = new Yellowthread[sz];
+                        for(i=0; i < sz; i++) {
+                                yth[i] = new Yellowthread(tr, i+1);
+                                yth[i].setName("Yellowthread" + i);
+                                yth[i].start();
+                        }
+
+                        for (i = 0; i < sz; i++) {
+                                try {
+                                        rth[i].join();
+                                        bth[i].join();
+                                        yth[i].join();
+                                } catch (InterruptedException e) {
+                                        System.err.println("Error joining with threads in gctest03.main()");
+                                        System.err.println("Loop count: " + i);
+                                }
+                        }
+                }
+
+        }
+
+        public static void main(String args[]) {
+                GC.runTest(new gctest03(args), args);
+        }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/gctests/gctest04/gctest04.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,112 @@
+/*
+ * Copyright (c) 2002, 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
+ * @key gc
+ *
+ * @summary converted from VM Testbase gc/gctests/gctest04.
+ * VM Testbase keywords: [gc]
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @compile reqgen.java
+ * @run main/othervm gc.gctests.gctest04.gctest04
+ */
+
+package gc.gctests.gctest04;
+
+import nsk.share.test.*;
+import nsk.share.TestFailure;
+//gctest04.java
+
+//import queue;
+//import LocalRandom;
+import java.util.Random;
+import nsk.share.TestBug;
+import nsk.share.TestFailure;
+
+
+// small objects ( 8 ~ 32k), short live time ( 5 ~ 10 ms)
+public class gctest04 {
+  public static void main(String args[] )
+  {
+    int queueLimit = 1000;
+    long randomSeed = System.currentTimeMillis();
+
+    if (args.length > 0)
+    {
+        try
+        {
+            queueLimit = new Integer(args[0]).intValue();
+        }
+        catch (NumberFormatException e)
+        {
+            throw new TestBug("Bad input to gctest04. Expected integer, " +
+                            " got: ->" + args[0] + "<-", e);
+        }
+    }
+
+    if (args.length == 2)
+    {
+        try
+        {
+            randomSeed = new Long(args[1]).longValue();
+        }
+        catch (NumberFormatException e)
+        {
+            throw new TestFailure("Bad input to gctest04. Expected long, got: ->" +
+ args[0] + "<-", e);
+        }
+    }
+
+    System.out.println("Seed value: " + randomSeed);
+
+
+
+    queue  requestque = new queue(queueLimit);
+    reqgen  gen = new reqgen(requestque, 5);
+    gen.setsize(8, 32*1024);
+    gen.setlive(5, 10);
+
+
+    reqdisp disp = new reqdisp(requestque);
+    gen.start();
+    disp.start();
+
+    try
+    {
+        gen.join();
+        System.out.println("Joined with gen thread");
+        disp.join();
+        System.out.println("Joined with disp thread");
+    }
+    catch (InterruptedException e)
+    {
+        System.err.println("InterruptedException in gctest04.main()");
+    }
+        System.out.println("Test passed.");
+  }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/gctests/gctest04/reqgen.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,258 @@
+/*
+ * Copyright (c) 2002, 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.
+ */
+
+package gc.gctests.gctest04;
+
+import nsk.share.test.*;
+import nsk.share.gc.*;
+
+//reqgen.java
+
+/*    stress testing
+ reqgen is a subtype of Thread which generates
+ request to allocate small objects ( 8 ~ 32k), short live time ( 5 ~ 10 ms)
+ reqdisp is a subtype of Thread which dispatches request
+ and create a livethread object to allocate the requested memory
+ and simulate its life time.
+ */
+
+class bufreq
+{
+  int bufsz;       // memory size
+  int life;        // live time of the object
+  bufreq next;
+
+  bufreq(int bufsz, int t)
+  {
+    this.bufsz = bufsz;
+        this.life = t;
+        this.next = null;
+  }
+
+  public void setnext(bufreq b)
+  {
+    next = b;
+  }
+
+  public bufreq getnext()
+  {
+    return next;
+  }
+
+  public int getsize()
+  {
+    return bufsz;
+  }
+
+  public int livetime()
+  {
+    return life;
+  }
+}
+
+class queue
+{
+    bufreq head;
+    bufreq tail;
+    int limit;
+    int count;
+
+    queue(int newLimit)
+    {
+        head = null;
+        tail = null;
+        limit = newLimit;
+        count = 0;
+    }
+
+  public boolean okToContinue()
+  {
+        return (count < limit);
+  }
+
+  public synchronized void append(bufreq b)
+  {
+    count++;
+    if ( tail == null ) // head must be null too
+    {
+            head = tail = b;
+        return;
+    }
+    tail.setnext(b);
+    tail = b;
+  }
+
+  public synchronized bufreq remove()
+  {
+    if ( head == null ) return null;
+    bufreq  buf = head;
+    head = head.getnext();
+    if ( head == null )  // only one element in the queue
+    {
+            tail = head = null;
+    }
+    return buf;
+  }
+}
+
+class  reqgen extends Thread {
+  queue    req;
+  int      maxsz;
+  int      minsz;
+  int      maxlive;
+  int      minlive;
+  int     amda;
+
+  reqgen(queue req, int t)
+  {
+    this.req = req;
+    amda = t;
+  }
+
+  public void setsize(int s1, int s2)
+  {
+       maxsz = s2;
+       minsz = s1;
+  }
+
+  public void setlive(int t1, int t2)
+  {
+    maxlive = t2;
+    minlive = t1;
+  }
+
+  public void run()
+  {
+    bufreq  buf;
+    int sz;
+    int t;
+
+    sz = minsz;
+    t =  minlive;
+    while ( req.okToContinue() )
+    {
+        buf = new bufreq(sz, t);
+
+        sz = ( 2*sz);
+
+            if ( sz > maxsz)
+            {
+                sz = minsz;
+        }
+
+        t = ( 2 * t );
+            if ( t >  maxlive)
+            {
+            t = minlive;
+        }
+
+            req.append(buf);
+
+        try
+        {
+                sleep(amda);
+        }
+        catch(InterruptedException e) {}
+      }
+  }
+
+  public bufreq nextreq()
+  {
+    return req.remove();
+  }
+
+}
+
+// buffer request dispatcher and allocator
+class  reqdisp extends Thread {
+  queue req;
+
+  reqdisp(queue q )
+  {
+    req = q;
+  }
+
+  public void run()
+  {
+    bufreq r;
+    livethread lt;
+
+    while ( req.okToContinue() )
+    {
+            r = req.remove();
+        if ( r != null )
+            {
+                lt = new livethread(r);
+            lt.start();
+        }
+      // simulate the interarrival time
+        try
+        {
+            sleep((int)(LocalRandom.random() * 20));
+        }
+        catch (InterruptedException e) {}
+    }
+  }
+
+
+}
+
+class livethread extends Thread {
+  bufreq req;
+
+  livethread(bufreq r)
+  {
+    req = r;
+  }
+
+  public void run()
+  {
+    int buf[];
+
+    buf =  new int[req.getsize()];
+
+    // simulate the life time of the created object
+    // if live time is 0, that means forever
+    if ( req.livetime() == 0 )
+    {
+       while ( true )
+       {
+          try
+          {
+             sleep(10000);
+          }
+          catch (InterruptedException e) {}
+       }
+    }
+    else
+    {
+       try
+       {
+          sleep(req.livetime());
+       }
+       catch (InterruptedException e) {}
+
+    }
+    // live object is outdated, should be GC'ed
+  }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/gctests/mallocWithGC1/libmallocWithGC1.c	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,40 @@
+/*
+ * Copyright (c) 2005, 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 <jni.h>
+#include <stdlib.h>
+#include <time.h>
+
+JNIEXPORT void JNICALL Java_gc_gctests_mallocWithGC1_mallocWithGC1_getMallocLock01
+(JNIEnv *env, jobject obj) {
+        char *c_ptr;
+        time_t current_time, old_time;
+
+        old_time = time(NULL);
+        current_time = 0;
+
+        while (current_time - old_time < 180) {
+                c_ptr = (char *) malloc(1);
+                free(c_ptr);
+                current_time = time(NULL);
+        }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/gctests/mallocWithGC1/mallocWithGC1.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,133 @@
+/*
+ * Copyright (c) 2002, 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
+ * @key gc
+ *
+ * @summary converted from VM Testbase gc/gctests/mallocWithGC1.
+ * VM Testbase keywords: [gc]
+ * VM Testbase readme:
+ * LD_LIBRARY PATH must include "$TESTBASE/src/misc/gc/utils/lib/sparc(or i386)"
+ * while running these tests. The native code for all the mallocWithGC* tests
+ * has been bunched up into a single .so.
+ * In this test, 2 threads are created, one thread(javaHeapEater)
+ * creates garbage by nulling out the elements of a vector, which formerly
+ * held points to circular linked lists. These elements are again repopulated
+ * with new linked lists. The second thread invokes a native function
+ * that continually mallocs and frees one byte of memory for 3 minutes
+ * a hold on a malloc lock.
+ * The idea here is  to see if the vm deadlocks (if it does, it is ofcourse
+ * a failure ). This test was created because of the following problem
+ * that the vm used to have :
+ *  "The malloc/GC deadlock problem is that a gc may suspend a thread (in native
+ * or VM code) that is in the middle of a malloc, so it has the "malloc" lock.
+ * GC may want to do a malloc, but it can't get the lock, so it deadlocks. "
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm/native/timeout=300 gc.gctests.mallocWithGC1.mallocWithGC1
+ */
+
+package gc.gctests.mallocWithGC1;
+
+import nsk.share.test.*;
+import nsk.share.gc.*;
+import nsk.share.TestFailure;
+import java.util.Vector;
+
+public class mallocWithGC1 implements Test {
+        private int objectSize = 100;
+
+        static {
+                System.loadLibrary("mallocWithGC1");
+        }
+
+        public native void getMallocLock01();
+
+        class javaHeapEater extends Thread {
+                private Vector v;
+
+                public javaHeapEater(Vector v) {
+                        this.v = v;
+                }
+
+                public void run() throws OutOfMemoryError {
+                        int  gc_count;
+
+                        for(int i = 0; i < 5 ; i++)
+                                v.addElement(buildCircularLinkedList());
+                        gc_count = 0;
+                        while( gc_count < 10 ) {
+
+                                for(int i = 0; i < 5 ; i++)
+                                        v.setElementAt(null, i);
+
+                                for(int i = 0; i < 5 ; i++)
+                                        v.setElementAt(buildCircularLinkedList(),i);
+
+                                gc_count++;
+                                System.out.println("Finished iteration # " + gc_count);
+                        }
+                }
+        }
+
+        class cHeapEater extends Thread{
+                public void run() {
+                        getMallocLock01();
+                }
+        }
+
+        public void run() {
+                Vector v = new Vector(5);
+                Thread tArray[] = new Thread[2];
+
+                tArray[0] = new javaHeapEater(v);
+                tArray[1] = new cHeapEater();
+
+                try {
+                        for(int i = 0; i < tArray.length ; i++ )
+                                tArray[i].start();
+                        for(int i = 0; i < tArray.length ; i++ )
+                                tArray[i].join();
+                } catch (Exception e) {
+                        throw new TestFailure("Test Failed.", e);
+                }
+                System.out.println("Test Passed.");
+        }
+
+        // build a circular linked list of 0.2 Meg
+
+        private CircularLinkedList  buildCircularLinkedList() {
+                CircularLinkedList cl = new CircularLinkedList(objectSize);
+                for(int i = 0; i < 2000; i++)
+                        cl.grow();
+                return cl;
+        }
+
+        public static void main(String args[]){
+                Tests.runTest(new mallocWithGC1(), args);
+        }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/gctests/mallocWithGC2/libmallocWithGC2.c	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,40 @@
+/*
+ * Copyright (c) 2005, 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 <jni.h>
+#include <stdlib.h>
+#include <time.h>
+
+JNIEXPORT void JNICALL Java_gc_gctests_mallocWithGC2_mallocWithGC2_getMallocLock02
+(JNIEnv *env, jobject obj) {
+        char *c_ptr;
+        time_t current_time, old_time;
+
+        old_time = time(NULL);
+        current_time = 0;
+
+        while (current_time - old_time < 180) {
+                c_ptr = (char *) malloc(1);
+                free(c_ptr);
+                current_time = time(NULL);
+        }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/gctests/mallocWithGC2/mallocWithGC2.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,141 @@
+/*
+ * Copyright (c) 2002, 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
+ * @key gc
+ *
+ * @summary converted from VM Testbase gc/gctests/mallocWithGC2.
+ * VM Testbase keywords: [gc]
+ * VM Testbase readme:
+ * LD_LIBRARY PATH must include "$TESTBASE/src/misc/gc/utils/lib/sparc(or i386)"
+ * while running these tests. The native code for all the mallocWithGC* tests
+ * has been bunched up into a single .so.
+ * In this test, 2 threads are created, one thread(javaHeapEater)
+ * creates garbage by nulling out the elements of a vector, which formerly
+ * held points to circular linked lists. These elements are again repopulated
+ * with new linked lists. The second thread invokes a native function
+ * that continually mallocs and frees one byte of memory for 3 minutes
+ * a hold on a malloc lock.
+ * The difference between mallocWithGC1 mallocWithGC2 is the way the locks
+ * are held. here the "malloc" lock is more efficiently held, not by
+ * the expiration of a timer but as long as the java heap devourer thread
+ * stays alive.
+ * The idea here is  to see if the vm deadlocks (if it does, it is ofcourse
+ * a failure ). This test was created because of the following problem
+ * that the vm used to have :
+ *  "The malloc/GC deadlock problem is that a gc may suspend a thread (in native
+ * or VM code) that is in the middle of a malloc, so it has the "malloc" lock.
+ * GC may want to do a malloc, but it can't get the lock, so it deadlocks. "
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm/native gc.gctests.mallocWithGC2.mallocWithGC2
+ */
+
+package gc.gctests.mallocWithGC2;
+
+import nsk.share.test.*;
+import nsk.share.gc.*;
+import nsk.share.TestFailure;
+import java.util.Vector;
+
+public class mallocWithGC2 extends TestBase {
+        static {
+                System.loadLibrary("mallocWithGC2");
+        }
+
+        public native void getMallocLock02();
+
+        private class javaHeapEater extends Thread {
+                private Vector v;
+
+                javaHeapEater(Vector v) {
+                        this.v = v;
+                }
+
+                public void run() throws OutOfMemoryError {
+                        int  gc_count;
+
+                        for(int i = 0; i < 10 ; i++)
+                                v.addElement(buildCircularLinkedList());
+                        gc_count = 0;
+                        while( gc_count < 10 ) {
+
+                                for(int i = 0; i < 10 ; i++)
+                                        v.setElementAt(null, i);
+
+                                for(int i = 0; i < 10  ; i++)
+                                        v.setElementAt(buildCircularLinkedList(),i);
+
+                                gc_count++;
+                                log.info("Finished iteration # " + gc_count);
+                        }
+                }
+        }
+
+
+        private class cHeapEater extends Thread{
+                public void run() {
+                        getMallocLock02();
+                }
+        }
+
+        public void run() {
+                Vector v = new Vector(10);
+                Thread tArray[] = new Thread[2];
+
+                tArray[0] = new javaHeapEater(v);
+                tArray[1] = new cHeapEater();
+
+                try {
+                        for(int i = 0; i < tArray.length ; i++ )
+                                tArray[i].start();
+
+                        tArray[0].join(); // wait for the javaHeapEater Thread to finish
+                        tArray[1].stop(); // Once javaHeapEater is finished, stop the
+                        // the cHeapEater thread.
+                } catch (Exception e) {
+                        throw new TestFailure("Test Failed.", e);
+                }
+                log.info("Test Passed.");
+        }
+
+        // build a circular linked list of 0.2 Meg
+
+        private CircularLinkedList buildCircularLinkedList() {
+                CircularLinkedList cl;
+
+                cl = new CircularLinkedList(100);
+                for(int i = 0; i < 2000; i++)
+                        cl.grow();
+                return cl;
+        }
+
+        public static void main(String args[]) {
+                Tests.runTest(new mallocWithGC2(), args);
+        }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/gctests/mallocWithGC3/libmallocWithGC3.c	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,41 @@
+/*
+ * Copyright (c) 2005, 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 <jni.h>
+#include <stdlib.h>
+#include <time.h>
+
+JNIEXPORT void JNICALL
+Java_gc_gctests_mallocWithGC3_mallocWithGC3_getMallocLock03
+(JNIEnv *env, jobject obj) {
+        char *c_ptr;
+        time_t current_time, old_time;
+
+        old_time = time(NULL);
+        current_time = 0;
+
+        while (current_time - old_time < 180) {
+                c_ptr = (char *) malloc(1);
+                free(c_ptr);
+                current_time = time(NULL);
+        }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/gctests/mallocWithGC3/mallocWithGC3.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,138 @@
+/*
+ * Copyright (c) 2002, 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
+ * @key gc
+ *
+ * @summary converted from VM Testbase gc/gctests/mallocWithGC3.
+ * VM Testbase keywords: [gc]
+ * VM Testbase readme:
+ * ********************************************************
+ * LD_LIBRARY PATH must include "$TESTBASE/src/misc/gc/utils/lib/sparc(or i386)"
+ * while running these tests. The native code for all the mallocWithGC* tests
+ * has been bunched up into a single .so.
+ * ********************************************************
+ * In this test, 2 threads are created, one thread(javaHeapEater)
+ * creates garbage by nulling out the elements of a vector, which formerly
+ * held points to circular linked lists. These elements are again repopulated
+ * with new linked lists. The second thread invokes a native function
+ * that continually mallocs and frees one byte of memory for 3 minutes
+ * a hold on a malloc lock.
+ * In this test, the GC is called synchronously while another
+ * thread contines to malloc/free in a loop.
+ * The idea here is  to see if the vm deadlocks (if it does, it is ofcourse
+ * a failure ). This test was created because of the following problem
+ * that the vm used to have :
+ *  "The malloc/GC deadlock problem is that a gc may suspend a thread (in native
+ * or VM code) that is in the middle of a malloc, so it has the "malloc" lock.
+ * GC may want to do a malloc, but it can't get the lock, so it deadlocks. "
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm/native/timeout=300 gc.gctests.mallocWithGC3.mallocWithGC3
+ */
+
+package gc.gctests.mallocWithGC3;
+
+import nsk.share.test.*;
+import nsk.share.gc.*;
+import java.util.Vector;
+
+public class mallocWithGC3 extends TestBase {
+        static {
+                System.loadLibrary("mallocWithGC3");
+        }
+
+        public native void getMallocLock03();
+
+        private class javaHeapEater extends Thread {
+                private Vector v;
+
+                public javaHeapEater(Vector v) {
+                        this.v = v;
+                }
+
+                public void run() throws OutOfMemoryError {
+                        int  gc_count;
+
+                        for(int i = 0; i < 5 ; i++)
+                                v.addElement(buildCircularLinkedList());
+                        gc_count = 0;
+
+                        while( gc_count < 10 ) {
+                                for (int i = 0; i < 5 ; i++)
+                                        v.setElementAt(null, i);
+
+                                System.gc(); // Forcibly call GC.
+
+                                for (int i = 0; i < 5 ; i++)
+                                        v.setElementAt(buildCircularLinkedList(),i);
+
+                                gc_count++;
+                                log.info("Finished iteration # " + gc_count);
+                        }
+                }
+        }
+
+        private class cHeapEater extends Thread {
+                public void run() {
+                        getMallocLock03();
+                }
+        }
+
+        public void run() {
+                Vector v = new Vector(5);
+                Thread tArray[] = new Thread[2];
+
+                tArray[0] = new javaHeapEater(v);
+                tArray[1] = new cHeapEater();
+
+
+                try {
+                        for(int i = 0; i < tArray.length ; i++ )
+                                tArray[i].start();
+                        for(int i = 0; i < tArray.length ; i++ )
+                                tArray[i].join();
+                } catch (Exception e) {
+                        setFailed(true);
+                }
+        }
+
+        // build a circular linked list of 0.4 Meg
+        private CircularLinkedList  buildCircularLinkedList() {
+                CircularLinkedList cl;
+
+                cl = new CircularLinkedList(100);
+                for(int i = 0; i < 2000; i++)
+                        cl.grow();
+                return cl;
+        }
+
+        public static void main(String args[]){
+                Tests.runTest(new mallocWithGC3(), args);
+        }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/gctests/nativeGC01/libnativeGC01.c	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,62 @@
+/*
+ * Copyright (c) 2005, 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 <jni.h>
+#include <stdio.h>
+/*
+ * A C function that takes a reference to java Object( a circular Linked list)
+ * and utilizes this reference to do a java method callback to determine the
+ * number of elements in the linked list
+ */
+JNIEXPORT jint JNICALL
+Java_gc_gctests_nativeGC01_nativeGC01_nativeMethod01
+(JNIEnv *env, jobject obj, jobject linked_list) {
+        jclass cls, clss;
+        jmethodID mid, mid2;
+        int elementCount;
+
+        /* Before doing anything force a GC by
+           invoking a callback where System.gc() is called
+           */
+        cls  = (*env)->GetObjectClass(env, obj);
+        mid = (*env)->GetMethodID(env, cls, "callbackGC", "()V");
+        if (mid == 0) {
+                printf("couldnt locate method callbackGC()");
+                return -1;
+        }
+        (*env)->CallVoidMethod(env,obj,mid);
+
+        /* Now that a GC has been done, invoke the callback
+           that counts the number of elements in the
+           circular linked list
+           */
+
+        clss = (*env)->GetObjectClass(env, linked_list);
+        mid2 = (*env)->GetMethodID(env, clss, "getLength", "()I" );
+        if (mid2  == 0) {
+                printf("couldnt locate method getLength()");
+                return -1;
+        }
+        elementCount  = (*env)->CallIntMethod(env, linked_list, mid2);
+        return elementCount;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/gctests/nativeGC01/nativeGC01.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,105 @@
+/*
+ * Copyright (c) 2002, 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
+ * @key gc
+ *
+ * @summary converted from VM Testbase gc/gctests/nativeGC01.
+ * VM Testbase keywords: [gc]
+ * VM Testbase readme:
+ * This test creates a large linked list of 10,000 elements. After creating the
+ * linked list a native function is called. The native function calls a java
+ * method that removes all java references to the linked list and forces a garbage
+ * collection. The only live reference to the linked list if on the C stack . As
+ * there is a live reference on the C stack, the linked list should not be garbage collected.
+ * After forcing a garbage collection, the native code calls another java method
+ * that traverses the linked list to verify that the linked list has not
+ * been garbage collected.
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm/native gc.gctests.nativeGC01.nativeGC01
+ */
+
+package gc.gctests.nativeGC01;
+
+import nsk.share.test.*;
+import nsk.share.gc.*;
+import java.util.Vector;
+
+public class nativeGC01 extends TestBase {
+        private CircularLinkedList cl;
+
+        public native int nativeMethod01(CircularLinkedList cl);
+
+        // This method is a callback that is invoked by a by the native
+        // function "nativeMethod()" before the bowels of the nativeMethod()
+        // function are executed.
+
+        public void callbackGC() {
+                cl = null;
+                System.gc();
+        }
+
+        public void run() {
+                int elementCount;
+                cl = buildBigCircularLinkedList(); // build a 2 meg Circular Linked list.
+                // Determine number of elements in the linked list with a native method
+                // after GC has been done.
+
+                try {
+                        elementCount = nativeMethod01(cl);
+
+                        if (elementCount == 10000) {
+                                log.info("Test Passed");
+                        } else {
+                                log.info("Test Failed");
+                                setFailed(true);
+                        }
+                } catch (Exception e ) {
+                        log.info(e);
+                        log.info("broken test");
+                        setFailed(true);
+                }
+
+        }
+
+        // build a circular linked list of 0.4 Meg
+        private CircularLinkedList  buildBigCircularLinkedList() {
+                CircularLinkedList cl = new CircularLinkedList(100);
+                for(int i = 0; i < 10000; i++)
+                        cl.grow();
+                return cl;
+        }
+
+        static {
+                System.loadLibrary("nativeGC01");
+        }
+
+        public static void main(String args[]){
+                Tests.runTest(new nativeGC01(), args);
+        }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/gctests/nativeGC02/libnativeGC02.c	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,73 @@
+/*
+ * Copyright (c) 2005, 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 <jni.h>
+#include <stdio.h>
+
+/* A C function that takes a reference to java Object( a circular Linked list)
+    and utilizes this reference to do a java method callback to determine the
+    number of elements in the linked list */
+JNIEXPORT jint JNICALL
+Java_gc_gctests_nativeGC02_nativeGC02_nativeMethod02
+(JNIEnv *env, jobject obj, jobject linked_list) {
+        jclass cls, clss;
+        jmethodID mid, mid2;
+        jfieldID fid;
+        jobject llist;
+        int elementCount;
+
+        /* Store a reference to the linked list in the C stack */
+
+        clss = (*env)->GetObjectClass(env, obj);
+        fid = (*env)->GetFieldID(env, clss, "cl", "Lnsk/share/gc/CircularLinkedList;");
+        if (fid == 0) {
+                printf("could not locate field - cl\n");
+                return -1;
+        }
+
+        llist = (*env)->GetObjectField(env, obj, fid);
+
+        /* force a GC by invoking a callback where System.gc() is called
+        */
+
+        cls  = (*env)->GetObjectClass(env, obj);
+        mid = (*env)->GetMethodID(env, cls, "callbackGC", "()V");
+        if (mid  == 0){
+                printf("couldnt locate method callbackGC()\n");
+                return -1;
+        }
+        (*env)->CallVoidMethod(env,obj,mid);
+
+        /* Now that a GC has been done, invoke the callback
+           that counts the number of elements in the
+           circular linked list
+           */
+
+        clss = (*env)->GetObjectClass(env, linked_list);
+        mid2 = (*env)->GetMethodID(env, clss, "getLength", "(Lnsk/share/gc/CircularLinkedList;)I" );
+        if (mid2  == 0 ){
+                printf("couldnt locate method getLength(CircularLinkedList)\n");
+                return -1;
+        }
+        elementCount  = (*env)->CallIntMethod(env, linked_list, mid2, llist);
+        return elementCount;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/gctests/nativeGC02/nativeGC02.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,97 @@
+/*
+ * Copyright (c) 2002, 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
+ * @key gc
+ *
+ * @summary converted from VM Testbase gc/gctests/nativeGC02.
+ * VM Testbase keywords: [gc]
+ * VM Testbase readme:
+ * This test is a variation of nativeGC01.
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm/native gc.gctests.nativeGC02.nativeGC02
+ */
+
+package gc.gctests.nativeGC02;
+
+import nsk.share.test.*;
+import nsk.share.gc.*;
+import java.util.Vector;
+
+public class nativeGC02 extends GCTestBase {
+        private int count = 10000;
+        CircularLinkedList cl;
+
+        public native int nativeMethod02(CircularLinkedList cl);
+
+        // This method is a callback that is invoked by a by the native
+        // function "nativeMethod()" before the bowels of the nativeMethod()
+        // function are executed.
+
+        public void callbackGC() {
+                cl = null;
+                System.gc();
+        }
+
+        public void run() {
+                int elementCount;
+
+                cl = buildBigCircularLinkedList(); // build a 2 meg Circular Linked list.
+                // Determine number of elements in the linked list with a native method
+                // after GC has been done.
+                try {
+                        elementCount = nativeMethod02(cl);
+                        if (elementCount == count) {
+                                log.info("Test Passed");
+                        } else {
+                                log.info("Test Failed");
+                                setFailed(true);
+                        }
+                } catch (Exception e) {
+                        log.info(e.toString());
+                        log.info("broken test");
+                        setFailed(true);
+                }
+        }
+
+        // build a circular linked list of 0.4 Meg
+        private CircularLinkedList buildBigCircularLinkedList() {
+                CircularLinkedList cl = new CircularLinkedList(100);
+                for (int i = 0; i < count; i++)
+                        cl.grow();
+                return cl;
+        }
+
+        static {
+                System.loadLibrary("nativeGC02");
+        }
+
+        public static void main(String args[]){
+                Tests.runTest(new nativeGC02(), args);
+        }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/gctests/nativeGC03/libnativeGC03.c	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,54 @@
+/*
+ * Copyright (c) 2005, 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 <jni.h>
+
+JNIEXPORT void JNICALL
+Java_gc_gctests_nativeGC03_nativeGC03_nativeMethod03
+(JNIEnv *env, jobject obj, jobjectArray listHolder) {
+        jsize len;
+        int i, count;
+        jmethodID mid;
+        jclass clss;
+
+        len = (*env)->GetArrayLength(env, listHolder);
+        i = 0;
+        count = 0;
+        /*Trash all the linked lists */
+        while (count < 10) {
+                while (i < len) {
+                        (*env)->SetObjectArrayElement(env, listHolder, i, NULL);
+                        i++;
+                }
+
+                /* Invoke a callback that will refill the array */
+
+                clss = (*env)->GetObjectClass(env, obj);
+                mid = (*env)->GetMethodID(env, clss, "fillArray", "()V");
+                if (mid == 0) {
+                        return;
+                }
+                (*env)->CallVoidMethod(env, obj, mid);
+                count++;
+        }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/gctests/nativeGC03/nativeGC03.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,101 @@
+/*
+ * Copyright (c) 2002, 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
+ * @key gc
+ *
+ * @summary converted from VM Testbase gc/gctests/nativeGC03.
+ * VM Testbase keywords: [gc]
+ * VM Testbase readme:
+ * The idea behind this test is that an array container pointers
+ * to circular linked lists is created in nativeGC03.java.
+ * Once the linkedlists are all created, a native function is called
+ * that trashes all the linked list by setting the elements of the
+ * array to null. After creating the garbage, a callback function
+ * is invoked that refills the array with new linked lists.
+ * The is goes on 10 times. The test passes if no OutofMemory exception
+ * is thrown.
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm/native gc.gctests.nativeGC03.nativeGC03
+ */
+
+package gc.gctests.nativeGC03;
+
+import nsk.share.TestFailure;
+import nsk.share.test.*;
+import nsk.share.gc.*;
+import java.util.Vector;
+
+public class nativeGC03 extends GCTestBase {
+        private Object[] listHolder;
+
+        public native void nativeMethod03(Object[] listHolder);
+
+        // This method is a callback that is invoked by a by the native
+        // function "nativeMethod()" before the bowels of the nativeMethod()
+        // function are executed.
+        // build an array of 10 circular linked lists
+        private void fillArray() {
+                int i = 0;
+                while (i < 5) {
+                        listHolder[i] = buildBigCircularLinkedList();
+                        i++;
+                }
+        }
+
+        public void run() {
+                listHolder = new Object[5];
+
+                // Build an array of linked lists
+
+                fillArray();
+                try {
+                        nativeMethod03(listHolder);
+                } catch (OutOfMemoryError e) {
+                        throw new TestFailure("Test Failed");
+                }
+                System.out.println("Test Passed");
+        }
+
+        // Builds a circular linked list of 0.4Meg
+
+        private CircularLinkedList buildBigCircularLinkedList() {
+                CircularLinkedList cl = new CircularLinkedList(100);
+                for(int i = 0; i < 10000; i++)
+                        cl.grow();
+                return cl;
+        }
+
+        static {
+                System.loadLibrary("nativeGC03");
+        }
+
+        public static void main(String args[]){
+                Tests.runTest(new nativeGC03(), args);
+        }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/gctests/nativeGC05/libnativeGC05.c	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,88 @@
+/*
+ * Copyright (c) 2005, 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 <jni.h>
+#include <stdio.h>
+
+JNIEXPORT void JNICALL
+Java_gc_gctests_nativeGC05_nativeGC05_kickOffRefillers
+(JNIEnv *env, jobject obj, jobject matrix, jobject stack) {
+        jclass matrixClass, stackClass, pairClass = 0;
+        jmethodID stack_pop_mid, stack_empty_mid, matrix_repopulate_mid, pair_geti_mid, pair_getj_mid;
+        jobject pair;
+        jint i, j;
+        jboolean b;
+
+        /* Get class objects associated with the objects passed in */
+        matrixClass    = (*env)->GetObjectClass(env, matrix);
+        stackClass = (*env)->GetObjectClass(env, stack);
+
+        /* GetMethodID's for the pop() and Repopulate() methods */
+        stack_pop_mid  = (*env)->GetMethodID(env, stackClass, "pop", "()Ljava/lang/Object;");
+        if (stack_pop_mid == 0) {
+                printf("could not get a methodID for Stack::pop()\n");
+                return;
+        }
+        stack_empty_mid = (*env)->GetMethodID(env, stackClass, "empty", "()Z");
+        if (stack_empty_mid == 0) {
+                printf("could not get a methodID for Stack::empty()\n");
+                return;
+        }
+
+        matrix_repopulate_mid = (*env)->GetMethodID(env, matrixClass, "repopulate", "(II)V");
+        if (matrix_repopulate_mid == 0) {
+                printf("could not get a methodID for Matrix::repopulate(int, int)\n");
+                return;
+        }
+
+        /** b = stack.empty(); */
+        b = (*env)->CallBooleanMethod(env, stack, stack_empty_mid);
+        while (b == JNI_FALSE) {
+                /** pair = stack.pop() */
+                pair = (*env)->CallObjectMethod(env, stack, stack_pop_mid);
+
+                if (pairClass == 0) {
+                        pairClass = (*env)->GetObjectClass(env, pair);
+                        pair_geti_mid = (*env)->GetMethodID(env, pairClass, "getI", "()I");
+                        if (pair_geti_mid == 0) {
+                                printf("could not get a methodID for IndexPair::getI()\n");
+                                return;
+                        }
+                        pair_getj_mid = (*env)->GetMethodID(env, pairClass, "getJ", "()I");
+                        if (pair_getj_mid == 0) {
+                                printf("could not get a methodID for IndexPair::getJ()\n");
+                                return;
+                        }
+                }
+
+                /** i = pair.getI(); */
+                i = (*env)->CallIntMethod(env, pair, pair_geti_mid);
+                /** j = pair.getJ(); */
+                j = (*env)->CallIntMethod(env, pair, pair_getj_mid);
+
+                /*  matrix.repopulate(i, j); */
+                (*env)->CallVoidMethod(env, matrix, matrix_repopulate_mid, i, j);
+
+                /** b = stack.empty(); */
+                b = (*env)->CallBooleanMethod(env, stack, stack_empty_mid);
+        }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/gctests/nativeGC05/nativeGC05.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,195 @@
+/*
+ * Copyright (c) 2002, 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
+ * @key gc
+ *
+ * @summary converted from VM Testbase gc/gctests/nativeGC05.
+ * VM Testbase keywords: [gc]
+ * VM Testbase readme:
+ * ********************************
+ * set TIMEOUT = 20
+ * *******************************
+ * This test creates a 2 dimensional matrix of (100X100)10,000 elements.
+ * Each element in this matrix houses the address of a "Cell" that
+ * occupies about 100 bytes. The total memory occupied by this structure is
+ * about 1M.
+ * Once this structure, has been built, 5 threads are let loose that
+ * randomly choose an element in this matrix and set its contents to null
+ * effectively creating 100bytes of garbage. The threads continue to act
+ * until all 5 threads combined have "nulled out" half the cells in the matrix,
+ * which amounts to 0.5Meg of garbage. The indices of each "nulled out"
+ * cell is stored in a stack. This information is later used during
+ * the refilling stage by the native function, kickOffRefiller();
+ * The native function, kickOffRefiller() refills all the lacunae in the
+ * matrix with new cells.
+ * This process of nulling out" and refilling is repeated 50 times.
+ * Every iteration produces  0.5 Meg
+ * of garbage. The maximum amount of live memory at use at any time is 1Meg.
+ * If no garbage collection takes place during any of the ten iterations,
+ * the total amount(live + garbage) of heap space consumed at the end
+ * of the program is 0.5*50 + 1 = 26Meg.
+ * The test fails if an OutOfMemory Exception is thrown.
+ *        -----------------------------        --------
+ *       |     |     |     |     |     |       | 100  |
+ *       |     |     |     |     |  *--|------>| bytes|
+ *       |     |     |     |     |     |       --------
+ *        -----------------------------
+ *       .     .     .     .     .     .
+ *       .     .     .     .     .     .
+ *       .     .     .     .     .     .
+ *       .
+ *       |     |     |     |     |     |
+ *       |     |     |     |     |     |
+ *       |     |     |     |     |     |
+ *        ------------------------------
+ *       |     |     |     |     |     |
+ *       |     |     |     |     |     |
+ *       |     |     |     |     |     |
+ *        ------------------------------
+ *       |     |     |     |     |     |
+ *       |     |     |     |     |     |
+ *       |     |     |     |     |     |
+ *        ------------------------------
+ *       |     |     |     |     |     |
+ *       |     |     |     |     |     |
+ *       |     |     |     |     |     |
+ *        -----------------------------
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm/native gc.gctests.nativeGC05.nativeGC05
+ */
+
+package gc.gctests.nativeGC05;
+
+import nsk.share.TestFailure;
+import nsk.share.test.*;
+import nsk.share.gc.*;
+import java.util.Stack;
+
+public class nativeGC05 extends GCTestBase {
+        private final int threadCount = 5;
+        private Stack<IndexPair> emptiedLocations = new Stack<IndexPair>();
+        private Matrix matrix = new Matrix(100, 100);
+
+        public native void kickOffRefillers(Matrix matrix, Stack s);
+
+        private class CellEmptier extends Thread {
+                public CellEmptier() {
+                }
+
+                boolean keepEmptying(){
+                        int numberOfCells;
+                        int matrixSize;
+
+                        matrixSize = matrix.returnArrayBound();
+                        numberOfCells = (matrixSize + 1) * (matrixSize + 1) ;
+                        if (matrix.getCellCount() < numberOfCells/2)
+                                return true;
+                        else
+                                return false;
+                }
+
+                public void run() {
+                        int i, j, matrixSize,emptyCells;
+
+                        matrixSize = matrix.returnArrayBound();
+                        while (keepEmptying()) {
+                                i = LocalRandom.nextInt(0, matrixSize);
+                                j = LocalRandom.nextInt(0, matrixSize);
+                                emptiedLocations.push(new IndexPair(i,j)); //Register empty node
+                                matrix.clear(i,j);
+                        }
+                }
+        }
+
+
+        private class StackDump extends Thread {
+                public StackDump() {
+                }
+
+                public void run() {
+                        int emptyCells;
+
+                        while (true) {
+                                emptyCells = emptiedLocations.size();
+                                System.out.println("Number of empty cells = " + emptyCells);
+                        }
+                }
+        }
+
+
+        public void run() {
+                Thread emptierArray[] = new Thread[threadCount];
+                int count = 0;
+                int memoryReserve[] = new int[10000];
+
+                //Create 5 CellEmptier Threads. There should be about 1Meg of
+                // created garbage by the times these 5 threads return.
+
+                try {
+                        while (count < 50) {
+                                for (int i = 0; i < threadCount; i++)
+                                        emptierArray[i] = new CellEmptier();
+                                for (int i = 0; i < threadCount; i++)
+                                        emptierArray[i].start();
+
+                                // wait for "emptier" threads to finish their job
+
+                                int i = 0;
+                                while (i < threadCount) {
+                                        try {
+                                                emptierArray[i].join();
+                                        } catch(InterruptedException e) {
+                                        }
+                                        i++;
+                                }
+
+                                // Now start refilling.
+
+                                kickOffRefillers(matrix, emptiedLocations);
+
+                                // reset count of cells emptied out and start again.
+                                matrix.resetCellCount();
+                                count++;
+                        }
+                } catch (OutOfMemoryError e) {
+                        memoryReserve = null;
+                        System.gc();
+                        throw new TestFailure("Test Failed at " + count + "th iteration.");
+                }
+                System.out.println("Test passed.");
+        }
+
+        public static void main(String args[]) {
+                GC.runTest(new nativeGC05(), args);
+        }
+
+        static {
+                System.loadLibrary("nativeGC05");
+        }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/hashcode/ExternalHashingTest/ExternalHashingTest.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,366 @@
+/*
+ * Copyright (c) 2008, 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/hashcode/ExternalHashingTest.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent, jrockit]
+ * VM Testbase readme:
+ * DESCRIPTION
+ * Test the possible interaction of external hashing and locking on object
+ * headers.
+ * The approach is to nearly simultaneously lock/hash a relatively small group
+ * of objects. We do this repeatedly (munging), recording all hash values
+ * collected therein.
+ * After doing this for a large number of groups, we force a garbage collection,
+ * which would change the hashCode of an object if it hasn't previously been
+ * hashed. In our case, we _know_ what the previous hashcode was, so we can
+ * recalculate all of their hashes and compare with the original value.
+ * If any of the hashCodes hash changed, we know we have a problem.
+ *
+ * COMMENTS
+ * This test was ported from JRockit test suite.
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm -XX:-UseGCOverheadLimit gc.hashcode.ExternalHashingTest.ExternalHashingTest
+ */
+
+package gc.hashcode.ExternalHashingTest;
+
+import java.text.SimpleDateFormat;
+import java.util.Date;
+import java.util.Random;
+import java.util.Vector;
+
+/**
+ * Test the possible interaction of external hashing and locking on object
+ * headers.
+ *
+ * The approach is to nearly simultaneously lock/hash a relatively small group
+ * of objects. We do this repeatedly (munging), recording all hash values
+ * collected therein.
+ *
+ * After doing this for a large number of groups, we force a garbage collection,
+ * which would change the hashCode of an object if it hasn't previously been
+ * hashed. In our case, we _know_ what the previous hashcode was, so we can
+ * recalculate all of their hashes and compare with the original value.
+ *
+ * If any of the hashCodes hash changed, we know we have a problem.
+ */
+
+public final class ExternalHashingTest {
+
+    /** Random number generator. */
+    static Random rand = new Random();
+
+    /** Goes to true when the threads should start working. */
+    public static volatile boolean startingGun;
+
+    /** Goes to true when the hashing thread is done. */
+    public static volatile boolean finishHashing;
+
+    /** Goes to true when the locking thread is done. */
+    public static volatile boolean finishLocking;
+
+    /** The number of objects in each batch. */
+    private static final int BATCH_SIZE = 20;
+
+    /** This is the global list of objects that have been hashed. */
+    static Vector allObjects = new Vector();
+
+    /** This is the corresponding list of hashCodes collected. */
+    static Vector allHashes = new Vector();
+
+    /** The default milliseconds to run the program. */
+    private static final long DEFAULT_DURATION = 10000;
+
+    /** All static */
+    private ExternalHashingTest() {}
+
+    /**
+     * This object holds garbage. It is a (probably unnecessary){ embellishment
+     * to increase the amount of garbage created by this benchmark.
+     * <p>
+     * It is global to discourage optimizer from removing it.
+     */
+    public static Object[] garbageMonger;
+
+    /**
+     * We need a fairly short pause, since we're not using a semaphore to
+     * synchronize threads.
+     */
+    public static void pause() {
+        try {
+            // Thread.sleep(100);
+            Thread.yield();
+        } catch (Exception e) {
+            e.printStackTrace();
+            System.exit(1);
+        }
+    }
+
+    /**
+     * Returns System.currentTimeMillis() in the Date format.
+     * @return String
+     */
+    private static String getDateString()   {
+        SimpleDateFormat df = new SimpleDateFormat("MMM dd, yyyy HH:mm:ss z");
+        Date date = new Date();
+        date.setTime(System.currentTimeMillis());
+        return df.format(date);
+    }
+
+    /**
+     * Main driver.
+     * @param args command line arguments aren't used.
+     */
+    public static void main(String[] args) {
+
+        long timeToRun = DEFAULT_DURATION;;
+
+        try {
+            for (int i = 0; i < args.length; i++) {
+                if ("-stressTime".equals(args[i])) {
+                    if (i + 1 == args.length) {
+                        throw new RuntimeException("Test bug: value of -stressTime option absents");
+                    }
+                    timeToRun = Long.parseLong(args[i + 1]);
+                    if (timeToRun <= 0) {
+                        throw new RuntimeException("Test bug: value of -stressTime option is not a positive number");
+                    }
+                    break;
+                }
+            }
+        } catch (NumberFormatException e) {
+            throw new RuntimeException("Test bug: Exception occured while parsing -stressTime option's value", e);
+        }
+
+        long startTime = System.currentTimeMillis();
+
+        System.out.println("[" + getDateString() + "] Test duration is: " + timeToRun + " ms");
+        System.out.println("[" + getDateString() + "] Do munge objects...");
+        while ((System.currentTimeMillis() - startTime) < timeToRun) {
+            for (int i = 0; i < 100; i++) {
+                mungeObjects();
+            }
+            System.out.println("[" + getDateString() + "] The next 100 objects are munged...");
+        }
+
+        // Force a GC (so that objects move their position)
+        System.out.println("[" + getDateString() + "] Force a GC...");
+        garbageMonger = null;
+        System.gc();
+
+        // Now, to check to see if hashes are correct
+        System.out.println("[" + getDateString() + "] Check hash codes...");
+        for (int i = 0; i < allObjects.size(); i++) {
+            Object o = allObjects.elementAt(i);
+            int hash = ((Integer) allHashes.elementAt(i)).intValue();
+
+            if (o.hashCode() != hash) {
+                System.out.println("Inconsistent hash code found (Object "
+                         + i + " out of " + allObjects.size());
+                System.out.println("Object = " + o.toString() + "; hashCode = 0x"
+                         + Integer.toHexString(o.hashCode())
+                         + "; expected = 0x" + Integer.toHexString(hash));
+                System.exit(1);
+            }
+        }
+
+        System.exit(95 /* PASSED */);
+    }
+
+    /**
+     * Add a single batch of objects to the mix.
+     * <p>
+     * It prepares a list of candidate objects, and presents them to a
+     * LockerThread and a HasherThread in randomized orders.
+     * <p>
+     * The two threads are launched, and control is returned to the caller after
+     * they have finished their processing.
+     */
+    private static void mungeObjects() {
+
+        startingGun = false;
+        finishHashing = false;
+        finishLocking = false;
+
+        /* Create the list of victims. */
+        Object[] candidates = new Object[BATCH_SIZE];
+        for (int i = 0; i < candidates.length; i++) {
+            candidates[i] = new Object();
+        }
+
+        Object[] lockedList = randomize(candidates);
+        Object[] hashedList = randomize(candidates);
+        int[] foundHashes = new int[BATCH_SIZE];
+
+        // Launch the child threads
+        LockerThread locker = new LockerThread(lockedList);
+        Thread lockerThread = new Thread(locker);
+        Thread hasherThread = new Thread(new HasherThread(hashedList,
+                foundHashes));
+        lockerThread.start();
+        hasherThread.start();
+        startingGun = true;
+
+        while (!finishLocking || !finishHashing) {
+            pause();
+        }
+
+        garbageMonger = new Object[BATCH_SIZE];
+        for (int i = 0; i < BATCH_SIZE; i++) {
+            /* Add all of the results of this pass to the global list. */
+            allObjects.add(hashedList[i]);
+            allHashes.add(new Integer(foundHashes[i]));
+
+            /* Create even more garbage for the GC to find */
+            garbageMonger[i] = new Object();
+        }
+
+        // just some noise to make sure that do-nothing code is not optimized
+        // away.
+        if (locker.getCount() != BATCH_SIZE) {
+            throw new InternalError("should not get here");
+        }
+    }
+
+    /**
+     * Return the list of objects in random order
+     */
+    private static Object[] randomize(Object[] list) {
+
+        Vector v = new Vector();
+        for (int i = 0; i < list.length; i++) {
+            v.add(list[i]);
+        }
+
+        Object[] result = new Object[list.length];
+        for (int i = 0; i < list.length; i++) {
+            int pos = rand.nextInt(list.length - i);
+            result[i] = v.remove(pos);
+        }
+        return result;
+    }
+}
+
+/**
+ * This helper thread locks all objects in a list in a given order before
+ * returning.
+ */
+
+class LockerThread implements Runnable {
+
+    /** The list of objects to be locked. */
+    Object[] theList;
+
+    /**
+     * This junk counter is an attempt to cause the contents of the synchronized
+     * block not to be completely optimized away.
+     */
+    int count;
+
+    /**
+     * Construct a LockerThread and provide a list of objects to work with.
+     * @param list the objects to lock.
+     */
+    LockerThread(Object[] list) {
+        theList = list;
+        count = 0;
+    }
+
+    /**
+     * Proceed to lock the objects...
+     */
+    public void run() {
+        // Synchronize. Wait for caller to say all is go.
+        while (!ExternalHashingTest.startingGun) {
+            ExternalHashingTest.pause();
+        }
+
+        // Perform the locking
+        for (int i = 0; i < theList.length; i++) {
+            synchronized (theList[i]) {
+                count++;
+            }
+        }
+
+        // Tell the caller we are done.
+        ExternalHashingTest.finishLocking = true;
+    }
+
+    /**
+     * Discourage compiler from removing do-nothing count field.
+     * @return the number of objects locked.
+     */
+    public int getCount() {
+        return count;
+    }
+}
+
+/**
+ * This helper thread hashes all objects in a list in a given order before
+ * returning.
+ */
+
+class HasherThread implements Runnable {
+
+    /** The list of objects to be hashed. */
+    Object[] theList;
+
+    /** The list of hash codes. */
+    int[] theHashes;
+
+    /**
+     * Construct a HasherThread and provide a list of objects to work with.
+     * @param list the objects to hash.
+     * @param hashes for storing the hash values.
+     */
+    HasherThread(Object[] list, int[] hashes) {
+        theList = list;
+        theHashes = hashes;
+    }
+
+    /**
+     * Proceed to hash the objects.
+     */
+    public void run() {
+        // Synchronize. Wait for caller to say all is go.
+        while (!ExternalHashingTest.startingGun) {
+            ExternalHashingTest.pause();
+        }
+
+        // Perform the hashing (collect for the caller)
+        for (int i = 0; i < theList.length; i++) {
+            theHashes[i] = theList[i].hashCode();
+        }
+        // Tell the caller we are done.
+        ExternalHashingTest.finishHashing = true;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/hashcode/ExternalHashingTest/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/hashcode/HCHelper.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,507 @@
+/*
+ * Copyright (c) 2011, 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.
+ */
+package gc.hashcode;
+
+import java.util.ArrayList;
+import java.util.Random;
+
+/**
+ * Helper class for the hash code tests.
+ */
+public final class HCHelper {
+
+    /**
+     * Evacuation list 0 constant.
+     */
+    public static final int EVAC_LIST_0 = 0;
+    /**
+     * Evacuation list 1 constant.
+     */
+    public static final int EVAC_LIST_1 = 1;
+    /**
+     * Evacuation list 2 constant.
+     */
+    public static final int EVAC_LIST_2 = 2;
+    /**
+     * Evacuation list 3 constant.
+     */
+    public static final int EVAC_LIST_3 = 3;
+    /**
+     * Evacuation list 4 constant.
+     */
+    public static final int EVAC_LIST_4 = 4;
+    /**
+     * Evacuation list 5 constant.
+     */
+    public static final int EVAC_LIST_5 = 5;
+    /**
+     * Evacuation list 0 percentage constant.
+     */
+    public static final double EVAC_SIZE_0 = 0.50;
+    /**
+     * Evacuation list 1 percentage constant.
+     */
+    public static final double EVAC_SIZE_1 = 0.14;
+    /**
+     * Evacuation list 2 percentage constant.
+     */
+    public static final double EVAC_SIZE_2 = 0.12;
+    /**
+     * Evacuation list 3 percentage constant.
+     */
+    public static final double EVAC_SIZE_3 = 0.10;
+    /**
+     * Evacuation list 4 percentage constant.
+     */
+    public static final double EVAC_SIZE_4 = 0.07;
+    /**
+     * Evacuation list 5 percentage constant.
+     */
+    public static final double EVAC_SIZE_5 = 0.05;
+
+    /**
+     * Helper class that allocates memory and also tracks the original
+     * as well as current hash code.
+     */
+    final class AllocObject {
+        private byte[] allocatedArray;
+        private int hashValue;
+
+        /**
+         * Create a new allocator object that allocates size bytes.
+         *
+         * @param size Number of bytes to allocate.
+         */
+        AllocObject(int size) {
+            allocatedArray = new byte[size];
+            hashValue = allocatedArray.hashCode();
+        }
+
+        /**
+         * Get the stored hash code value.
+         *
+         * @return Stored hash code.
+         */
+        int getStoredHashValue() {
+            return hashValue;
+        }
+
+        /**
+         * Get the current hash code value.
+         *
+         * @return Current hash code.
+         */
+        int getCurrentHashValue() {
+            return allocatedArray.hashCode();
+        }
+
+        /**
+         * Get the size of the allocated object.
+         *
+         * @return Size of allocated object.
+         */
+        int getAllocatedSize() {
+            return allocatedArray.length;
+        }
+    }
+
+    /**
+     * Helper class that holds all the allocation lists.
+     */
+    final class AllocInfo {
+        private long allocatedSize;
+        private long numOfAllocedObjs;
+        private ArrayList safeList;
+        private ArrayList allocList;
+        private ArrayList evacList0;
+        private ArrayList evacList1;
+        private ArrayList evacList2;
+        private ArrayList evacList3;
+        private ArrayList evacList4;
+        private ArrayList evacList5;
+
+        /**
+         * Create the helper object.
+         */
+        AllocInfo() {
+            allocatedSize = 0;
+            numOfAllocedObjs = 0;
+            safeList = new ArrayList();
+            allocList = new ArrayList();
+            evacList0 = new ArrayList();
+            evacList1 = new ArrayList();
+            evacList2 = new ArrayList();
+            evacList3 = new ArrayList();
+            evacList4 = new ArrayList();
+            evacList5 = new ArrayList();
+        }
+
+        /**
+         * Get the amount of memory allocated in total.
+         *
+         * @return Total allocated size.
+         */
+        public long getAllocatedSize() {
+            return allocatedSize;
+        }
+
+        /**
+         * Set the amount of memory allocated in total.
+         *
+         * @param allocatedSize Total allocated size.
+         */
+        public void setAllocatedSize(long allocatedSize) {
+            this.allocatedSize = allocatedSize;
+        }
+
+        /**
+         * Get total number of objects allocated.
+         *
+         * @return Number of objects allocated.
+         */
+        public long getNumOfAllocedObjs() {
+            return numOfAllocedObjs;
+        }
+
+        /**
+         * Set total number of objects allocated.
+         *
+         * @param numOfAllocedObjs Number of objects allocated.
+         */
+        public void setNumOfAllocedObjs(long numOfAllocedObjs) {
+            this.numOfAllocedObjs = numOfAllocedObjs;
+        }
+
+        /**
+         * Increase the number of objects allocated.
+         */
+        public void incNumOfAllocedObjs() {
+            numOfAllocedObjs++;
+        }
+
+        /**
+         * Decrease the number of objects allocated.
+         */
+        public void decNumOfAllocedObjs() {
+            numOfAllocedObjs--;
+        }
+
+        /**
+         * Get the safe list.
+         *
+         * @return ArrayList that contains the safe list.
+         */
+        public ArrayList getSafeList() {
+            return safeList;
+        }
+
+        /**
+         * Get the alloc list.
+         *
+         * @return ArrayList that contains the alloc list.
+         */
+        public ArrayList getAllocList() {
+            return allocList;
+        }
+
+        /**
+         * Get evacuation list 0.
+         *
+         * @return ArrayList that contains evacuation list 0.
+         */
+        public ArrayList getEvacList0() {
+            return evacList0;
+        }
+
+        /**
+         * Get evacuation list 1.
+         *
+         * @return ArrayList that contains evacuation list 1.
+         */
+        public ArrayList getEvacList1() {
+            return evacList1;
+        }
+
+        /**
+         * Get evacuation list 2.
+         *
+         * @return ArrayList that contains evacuation list 2.
+         */
+        public ArrayList getEvacList2() {
+            return evacList2;
+        }
+
+        /**
+         * Get evacuation list 3.
+         *
+         * @return ArrayList that contains evacuation list 3.
+         */
+        public ArrayList getEvacList3() {
+            return evacList3;
+        }
+
+        /**
+         * Get evacuation list 4.
+         *
+         * @return ArrayList that contains evacuation list 4.
+         */
+        public ArrayList getEvacList4() {
+            return evacList4;
+        }
+
+        /**
+         * Get evacuation list 5.
+         *
+         * @return ArrayList that contains evacuation list 5.
+         */
+        public ArrayList getEvacList5() {
+            return evacList5;
+        }
+    }
+
+
+    private int minSize;
+    private int maxSize;
+    private double percentToFill;
+    private int allocTrigSize;
+    private AllocInfo ai;
+    private Random rnd;
+
+    private long sizeLimit0;
+    private long sizeLimit1;
+    private long sizeLimit2;
+    private long sizeLimit3;
+    private long sizeLimit4;
+    private long sizeLimit5;
+
+    /**
+     * Create the helper class.
+     *
+     * @param minSize Minimum size of objects to allocate.
+     * @param maxSize Maximum size of objects to allocate.
+     * @param seed Random seed to use.
+     * @param percentToFill Percentage of the heap to fill.
+     * @param allocTrigSize Object size to use when triggering a GC.
+     */
+    public HCHelper(int minSize, int maxSize, long seed,
+                    double percentToFill, int allocTrigSize) {
+        this.minSize = minSize;
+        this.maxSize = maxSize;
+        this.percentToFill = percentToFill;
+        this.allocTrigSize = allocTrigSize;
+        ai = new AllocInfo();
+        rnd = new Random(seed);
+
+        sizeLimit0 = 0;
+        sizeLimit1 = 0;
+        sizeLimit2 = 0;
+        sizeLimit3 = 0;
+        sizeLimit4 = 0;
+        sizeLimit5 = 0;
+    }
+
+    /**
+     * Setup all the evacuation lists and fill them with objects.
+     */
+    public void setupLists() {
+        Runtime r = Runtime.getRuntime();
+        long maxMem = r.maxMemory();
+        long safeMaxMem = (long) (maxMem * percentToFill);
+        sizeLimit0 = (long) (safeMaxMem * EVAC_SIZE_0);
+        sizeLimit1 = (long) (safeMaxMem * EVAC_SIZE_1);
+        sizeLimit2 = (long) (safeMaxMem * EVAC_SIZE_2);
+        sizeLimit3 = (long) (safeMaxMem * EVAC_SIZE_3);
+        sizeLimit4 = (long) (safeMaxMem * EVAC_SIZE_4);
+        sizeLimit5 = (long) (safeMaxMem * EVAC_SIZE_5);
+
+        // Fill the memory with objects
+        System.gc();
+        allocObjects(ai.getEvacList0(), sizeLimit0);
+        System.gc();
+        allocObjects(ai.getEvacList1(), sizeLimit1);
+        System.gc();
+        allocObjects(ai.getEvacList2(), sizeLimit2);
+        System.gc();
+        allocObjects(ai.getEvacList3(), sizeLimit3);
+        System.gc();
+        allocObjects(ai.getEvacList4(), sizeLimit4);
+        System.gc();
+        allocObjects(ai.getEvacList5(), sizeLimit5);
+        System.gc();
+    }
+
+    private void allocObjects(ArrayList al, long totalSizeLimit) {
+        long allocedSize = 0;
+        int multiplier = maxSize - minSize;
+
+        while (allocedSize < totalSizeLimit) {
+            int allocSize = minSize + (int) (rnd.nextDouble() * multiplier);
+            if (allocSize >= totalSizeLimit - allocedSize) {
+                allocSize = (int) (totalSizeLimit - allocedSize);
+            }
+
+            al.add(new AllocObject(allocSize));
+            allocedSize += allocSize;
+        }
+    }
+
+    /**
+     * Free all objects in a specific evacuation list.
+     *
+     * @param listNr The evacuation list to clear. Must be between 0 and 5.
+     */
+    public void clearList(int listNr) {
+        if (listNr < EVAC_LIST_0 || listNr > EVAC_LIST_5) {
+            throw new IllegalArgumentException("List to removed bust be "
+                    + "between EVAC_LIST_0 and EVAC_LIST_5");
+        }
+
+        switch (listNr) {
+            case EVAC_LIST_0:
+                ai.getEvacList0().clear();
+                break;
+            case EVAC_LIST_1:
+                ai.getEvacList1().clear();
+                break;
+            case EVAC_LIST_2:
+                ai.getEvacList2().clear();
+                break;
+            case EVAC_LIST_3:
+                ai.getEvacList3().clear();
+                break;
+            case EVAC_LIST_4:
+                ai.getEvacList4().clear();
+                break;
+            case EVAC_LIST_5:
+                ai.getEvacList5().clear();
+                break;
+            default: // Should never occur, since we test the listNr param
+                break;
+        }
+    }
+
+    /**
+     * Verify the hash codes for a list of AllocObject:s.
+     *
+     * @param objList ArrayList containing AllocObject:s
+     * @return true if all hash codes are OK, otherwise false
+     */
+    boolean verifyHashCodes(ArrayList objList) {
+        // Check the hash values
+        for (int i = 0; i < objList.size(); i++) {
+            AllocObject tmp = (AllocObject) objList.get(i);
+            if (tmp.getStoredHashValue() != tmp.getCurrentHashValue()) {
+                // At least one of the hash values mismatch, so the test failed
+                return false;
+            }
+        }
+
+        return true;
+    }
+
+
+    /**
+     * Verify the hash codes for all objects in all the lists.
+     *
+     * @return Success if all hash codes matches the original hash codes.
+     */
+    public boolean verifyHashCodes() {
+        return verifyHashCodes(ai.getAllocList())
+                && verifyHashCodes(ai.getSafeList())
+                && verifyHashCodes(ai.getEvacList0())
+                && verifyHashCodes(ai.getEvacList1())
+                && verifyHashCodes(ai.getEvacList2())
+                && verifyHashCodes(ai.getEvacList3())
+                && verifyHashCodes(ai.getEvacList4())
+                && verifyHashCodes(ai.getEvacList5());
+    }
+
+    /**
+     * Free all allocated objects from all the lists.
+     */
+    public void cleanupLists() {
+        ai.getAllocList().clear();
+        ai.getSafeList().clear();
+
+        ai.getEvacList0().clear();
+        ai.getEvacList1().clear();
+        ai.getEvacList2().clear();
+        ai.getEvacList3().clear();
+        ai.getEvacList4().clear();
+        ai.getEvacList5().clear();
+    }
+
+    /**
+     * Get the size of evacuation list 0.
+     *
+     * @return Size of evacuation list 0.
+     */
+    public long getEvac0Size() {
+        return sizeLimit0;
+    }
+
+    /**
+     * Get the size of evacuation list 1.
+     *
+     * @return Size of evacuation list 1.
+     */
+    public long getEvac1Size() {
+        return sizeLimit1;
+    }
+
+    /**
+     * Get the size of evacuation list 2.
+     *
+     * @return Size of evacuation list 2.
+     */
+    public long getEvac2Size() {
+        return sizeLimit2;
+    }
+
+    /**
+     * Get the size of evacuation list 3.
+     *
+     * @return Size of evacuation list 3.
+     */
+    public long getEvac3Size() {
+        return sizeLimit3;
+    }
+
+    /**
+     * Get the size of evacuation list 4.
+     *
+     * @return Size of evacuation list 4.
+     */
+    public long getEvac4Size() {
+        return sizeLimit4;
+    }
+
+    /**
+     * Get the size of evacuation list 5.
+     *
+     * @return Size of evacuation list 5.
+     */
+    public long getEvac5Size() {
+        return sizeLimit5;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/hashcode/HashCodeSimpleTest/HashCodeSimpleTest.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,94 @@
+/*
+ * Copyright (c) 2011, 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/hashcode/HashCodeSimpleTest.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent, jrockit]
+ * VM Testbase readme:
+ * DESCRIPTION
+ * Hash code regressiontests.
+ *
+ * COMMENTS
+ * This test was ported from JRockit test suite.
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm -XX:-UseGCOverheadLimit gc.hashcode.HashCodeSimpleTest.HashCodeSimpleTest
+ */
+
+package gc.hashcode.HashCodeSimpleTest;
+
+import nsk.share.TestFailure;
+import nsk.share.gc.GC;
+import nsk.share.gc.ThreadedGCTest;
+
+/**
+ * Hash code regressiontests.
+ */
+public class HashCodeSimpleTest extends ThreadedGCTest {
+
+    @Override
+    protected Runnable createRunnable(int i) {
+
+
+
+        /**
+         * Test verifies that VM provided hashcodes are constant over invocations.
+         * @return success if the test passes
+         *          failure if some hashvalue has changed
+         */
+        return new Runnable() {
+            long counter = 0;
+
+
+            @Override
+            public void run() {
+
+                Object object = new Object();
+                int hashCode0 = object.hashCode();
+
+                for (int i = 0; i < 100; i++) {
+                    int hashCode = object.hashCode();
+
+                    if (hashCode != hashCode0) {
+                        throw new TestFailure("Repeated hash code queries broken: "
+                                + hashCode0 + "!=" + hashCode);
+                    }
+                }
+                if (counter++ % 1000000 == 0) {
+                    log.info(counter / 1000000 + " million hashcodes verified");
+                }
+
+
+            }
+        };
+    }
+
+    public static void main(String args[]) {
+        GC.runTest(new HashCodeSimpleTest(), args);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/hashcode/HashCodeSimpleTest/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/hashcode/HashCodeTestC/HashCodeTestC.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,90 @@
+/*
+ * Copyright (c) 2011, 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/hashcode/HashCodeTestC.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent, jrockit]
+ * VM Testbase readme:
+ * DESCRIPTION
+ * Test that verifies external hash codes. This class tests the scenario
+ * with  FullGC (compaction).
+ *
+ * COMMENTS
+ * This test was ported from JRockit test suite.
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm -XX:-UseGCOverheadLimit gc.hashcode.HashCodeTestC.HashCodeTestC
+ */
+
+package gc.hashcode.HashCodeTestC;
+
+import gc.hashcode.HCHelper;
+import nsk.share.TestFailure;
+import nsk.share.gc.GC;
+import nsk.share.gc.GCTestBase;
+import nsk.share.test.Stresser;
+import nsk.share.gc.gp.GarbageUtils;
+
+/**
+ * Test that verifies external hash codes. This class tests the scenario
+ * with compaction.
+ */
+public class HashCodeTestC extends GCTestBase {
+
+
+    /**
+     * Test external hash codes when a compaction have been performed.
+     *
+     * @return Success if all hash codes matches original hash codes
+     */
+    @Override
+    public void run(){
+        Stresser stresser = new Stresser(runParams.getStressOptions());
+        stresser.start(0);
+        HCHelper hch = new HCHelper(512, 3584, runParams.getSeed(),
+                0.7, 10240);
+
+        hch.setupLists();
+        hch.clearList(HCHelper.EVAC_LIST_1);
+        GarbageUtils.eatMemory(stresser);
+        if (!stresser.continueExecution()) {
+            return;// we didn't trigger GC, nothing
+        }
+        boolean testResult = hch.verifyHashCodes();
+        hch.cleanupLists();
+
+        if(!testResult) {
+            throw new TestFailure("Some hash codes didn't match");
+        }
+    }
+
+    public static void main(String[] args) {
+        GC.runTest(new HashCodeTestC(), args);
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/hashcode/HashCodeTestC/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/hashcode/HashCodeTestCC/HashCodeTestCC.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,98 @@
+/*
+ * Copyright (c) 2011, 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/hashcode/HashCodeTestCC.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent, jrockit]
+ * VM Testbase readme:
+ * DESCRIPTION
+ * Test that verifies external hash codes. This class tests the scenario
+ * with double FullGC(compaction).
+ *
+ * COMMENTS
+ * This test was ported from JRockit test suite.
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm -XX:-UseGCOverheadLimit gc.hashcode.HashCodeTestCC.HashCodeTestCC
+ */
+
+package gc.hashcode.HashCodeTestCC;
+
+import gc.hashcode.HCHelper;
+import nsk.share.TestFailure;
+import nsk.share.gc.GC;
+import nsk.share.gc.GCTestBase;
+import nsk.share.gc.gp.GarbageUtils;
+import nsk.share.test.Stresser;
+
+/**
+ * Test that verifies external hash codes. This class tests the scenario
+ * with double compaction.
+ */
+public class HashCodeTestCC extends GCTestBase {
+
+
+    /**
+     * Test external hash codes when two compactions have been performed.
+     *
+     * @return Success if all hash codes matches original hash codes
+     */
+    @Override
+    public final void run() {
+        HCHelper hch = new HCHelper(512, 3584, runParams.getSeed(),
+                0.7, 10240);
+
+        hch.setupLists();
+        // Remove evac list 1 to free some space
+        hch.clearList(HCHelper.EVAC_LIST_1);
+        Stresser stresser = new Stresser(runParams.getStressOptions());
+        stresser.start(0);
+        GarbageUtils.eatMemory(stresser);
+        if (!stresser.continueExecution()) {
+            return;// we didn't trigger GC, nothing
+        }
+
+        // Remove evac list 2 to free some more space
+        hch.clearList(HCHelper.EVAC_LIST_2);
+        GarbageUtils.eatMemory(stresser);
+        if (!stresser.continueExecution()) {
+            return;// we didn't trigger GC, nothing
+        }
+
+        boolean testResult = hch.verifyHashCodes();
+        hch.cleanupLists();
+
+         if(!testResult) {
+            throw new TestFailure("Some hash codes didn't match");
+        }
+    }
+
+    public static void main(String[] args) {
+        GC.runTest(new HashCodeTestCC(), args);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/hashcode/HashCodeTestCC/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/hashcode/HashCodeTestP/HashCodeTestP.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,87 @@
+/*
+ * Copyright (c) 2011, 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/hashcode/HashCodeTestP.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent, jrockit]
+ * VM Testbase readme:
+ * DESCRIPTION
+ * Test that verifies external hash codes.  This class tests the scenario
+ * with promotion.
+ *
+ * COMMENTS
+ * This test was ported from JRockit test suite.
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm -XX:-UseGCOverheadLimit gc.hashcode.HashCodeTestP.HashCodeTestP
+ */
+
+package gc.hashcode.HashCodeTestP;
+
+import gc.hashcode.HCHelper;
+import nsk.share.TestFailure;
+import nsk.share.gc.GC;
+import nsk.share.gc.GCTestBase;
+import nsk.share.gc.gp.GarbageUtils;
+import nsk.share.test.Stresser;
+
+/**
+ * Test that verifies external hash codes. This class tests the scenario
+ * with promotion.
+ */
+public class HashCodeTestP extends GCTestBase {
+
+    /**
+     * Test external hash codes when a promotion have been performed.
+     *
+     * @return Success if all hash codes matches original hash codes
+     */
+    @Override
+    public final void run() {
+        HCHelper hch = new HCHelper(512, 2000, runParams.getSeed(),
+                0.7, 10240);
+
+        hch.setupLists();
+        Stresser stresser = new Stresser(runParams.getStressOptions());
+        stresser.start(0);
+        GarbageUtils.eatMemory(stresser);
+        if (!stresser.continueExecution()) {
+            return;// we didn't trigger GC, nothing
+        }
+        boolean testResult = hch.verifyHashCodes();
+        hch.cleanupLists();
+
+          if(!testResult) {
+            throw new TestFailure("Some hash codes didn't match");
+        }
+    }
+
+    public static void main(String[] args) {
+        GC.runTest(new HashCodeTestP(), args);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/hashcode/HashCodeTestP/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/hashcode/HashCodeTestPC/HashCodeTestPC.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,95 @@
+/*
+ * Copyright (c) 2011, 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/hashcode/HashCodeTestPC.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent, jrockit]
+ * VM Testbase readme:
+ * DESCRIPTION
+ * Test that verifies external hash codes.  This class tests the scenario
+ * with promotion & compaction.
+ *
+ * COMMENTS
+ * This test was ported from JRockit test suite.
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm -XX:-UseGCOverheadLimit gc.hashcode.HashCodeTestPC.HashCodeTestPC
+ */
+
+package gc.hashcode.HashCodeTestPC;
+
+import gc.hashcode.HCHelper;
+import nsk.share.TestFailure;
+import nsk.share.gc.GC;
+import nsk.share.gc.GCTestBase;
+import nsk.share.gc.gp.GarbageUtils;
+import nsk.share.test.Stresser;
+
+
+/**
+ * Test that verifies external hash codes. This class tests the scenario
+ * with promotion followed by compaction.
+ */
+public class HashCodeTestPC extends GCTestBase{
+
+
+    /**
+     * Test external hash codes when a promotion followed by a compaction
+     * have been performed.
+     *
+     * @return Success if all hash codes matches original hash codes
+     */
+    @Override
+    public void run() {
+        HCHelper hch = new HCHelper(512, 2000, runParams.getSeed(),
+                0.7, 10240);
+
+        hch.setupLists();
+        Stresser stresser = new Stresser(runParams.getStressOptions());
+        stresser.start(0);
+        GarbageUtils.eatMemory(stresser);
+        if (!stresser.continueExecution()) {
+            return;// we didn't trigger GC, nothing
+        }
+        hch.clearList(HCHelper.EVAC_LIST_1);
+        GarbageUtils.eatMemory(stresser);
+        if (!stresser.continueExecution()) {
+            return;// we didn't trigger GC, nothing
+        }
+        boolean testResult = hch.verifyHashCodes();
+        hch.cleanupLists();
+
+        if(!testResult) {
+            throw new TestFailure("Some hash codes didn't match");
+        }
+    }
+
+    public static void main(String[] args) {
+        GC.runTest(new HashCodeTestPC(), args);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/hashcode/HashCodeTestPC/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/huge/quicklook/largeheap/Access/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/huge/quicklook/largeheap/Access/access.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,232 @@
+/*
+ * Copyright (c) 2010, 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/huge/quicklook/largeheap/Access.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent]
+ * VM Testbase readme:
+ * DESCRIPTION
+ *     The test is intended to test 64-bit VM for large memory and heap
+ *     functionalities. This test checks that no unexpected exceptions and errors
+ *     are thrown or the JVM is not crashed during allocation of different
+ *     objects within 32-bit address range.
+ *     First of all the test checks that the maximum amount of memory that
+ *     the Java virtual machine will attempt to use (Runtime.maxMemory()) is
+ *     greater than 4G. If that value is less than 4G, the test passes, otherwise
+ *     it starts testing.
+ *     A number of threads is started. That number is set in *.cfg file or is
+ *     calculated by the test itself based on the machine (see
+ *     nsk.share.gc.Algorithms.getThreadsCount() method).
+ *     Each thread creates 9 arrays - one of each of the following types: byte,
+ *     short, char, int, long, boolean, double, float, Object. All arrays have
+ *     the same size, and that size is calculated so that all threads together are
+ *     supposed to eat about 1.3G of the heap (30% of 4G).
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm -XX:-UseGCOverheadLimit gc.huge.quicklook.largeheap.Access.access
+ */
+
+package gc.huge.quicklook.largeheap.Access;
+
+import java.util.concurrent.ThreadLocalRandom;
+import java.util.ArrayList;
+import nsk.share.TestFailure;
+import nsk.share.gc.*;
+
+public class access extends ThreadedGCTest {
+
+    // The test should fill just about 30% of 4G range (32-bit address range)
+    final static double PART_OF_HEAP = 0.3;
+    final static long GIGOBYTE = 1024 * 1024 * 1024;
+    // Approximate number of bytes for one element of each tested type
+    // (byte, short, char, int, long, double, float, Object)
+    final static long TYPES_SIZE =
+            Memory.getByteSize()
+            + Memory.getShortSize()
+            + Memory.getIntSize()
+            + Memory.getCharSize()
+            + Memory.getLongSize()
+            + Memory.getDoubleSize()
+            + Memory.getFloatSize();
+    //+ Memory.getBooleanSize()
+    //+ Memory.getReferenceObjectSize();
+    private final static int STORAGE_SIZE_DIM1 = 65536;
+    private final static int STORAGE_SIZE_DIM2 = (int) (4 * GIGOBYTE / Memory.getLongSize() / STORAGE_SIZE_DIM1);
+    // An array to eat 4G of heap
+    private static long[][] storage = new long[STORAGE_SIZE_DIM1][];
+    private volatile boolean is4GAllocated = false;
+    private final Object lock = new Object();
+
+    private class Worker implements Runnable {
+
+        private int arraySize;
+        private ArrayList<Object> list;
+
+        public Worker(int arraySize) {
+            this.arraySize = arraySize;
+            list = new ArrayList<Object>();
+        }
+
+        public void run() {
+            try {
+                synchronized (lock) {
+                    while (!is4GAllocated && getExecutionController().continueExecution()) {
+                        try {
+                            lock.wait(100);
+                        } catch (InterruptedException ie) {
+                        }
+                    }
+                }
+                while (getExecutionController().continueExecution()) {
+                    byte[] barray = new byte[arraySize];
+                    short[] sarray = new short[arraySize];
+                    char[] carray = new char[arraySize];
+                    int[] iarray = new int[arraySize];
+                    long[] larray = new long[arraySize];
+                    double[] darray = new double[arraySize];
+                    float[] farray = new float[arraySize];
+                    list.add(barray);
+                    list.add(sarray);
+                    list.add(carray);
+                    list.add(iarray);
+                    list.add(larray);
+                    list.add(darray);
+                    list.add(darray);
+                    for (int i = 0; i < arraySize; i++) {
+                        larray[i] = (long) (i + 42);
+                        darray[i] = (double) (42 * i);
+                        farray[i] = (float) (0.6 * i);
+                        if (i % 10000 == 0 &&
+                            getExecutionController().continueExecution()) {
+                            return;
+                        }
+                    }
+
+                    for (int i = arraySize - 1; i > 0; i -= 10) {
+                        if (larray[i] != (long) (i + 42)) {
+                            throw new TestFailure("The value = "
+                                    + larray[i] + " when expected ="
+                                    + (long) (i + 42));
+                        }
+                        if (darray[i] - (double) (42 * i) > 0.001) {
+                            throw new TestFailure("The value = "
+                                    + darray[i] + " when expected ="
+                                    + (double) (i + 42));
+                        }
+                        if (farray[i] - (float) (0.6 * i) > 0.001) {
+                            throw new TestFailure("The value = "
+                                    + farray[i] + " when expected ="
+                                    + (float) (i + 42));
+                        }
+                        if (i % 10000 == 0 &&
+                            getExecutionController().continueExecution()) {
+                            return;
+                        }
+                    }
+                    for (Object obj : list) {
+                        // check hashcode just to avoid optimization
+                        if (obj.hashCode() == -1) {
+                            throw new TestFailure("Unexpected hashcode");
+                        }
+                    }
+                }
+            } finally {
+                list.clear();
+            }
+        }
+    }
+
+    class MainWorker implements Runnable {
+
+        @Override
+        public void run() {
+            synchronized (lock) {
+                for (int i = 0; i < STORAGE_SIZE_DIM1; i++) {
+                    if (!getExecutionController().continueExecution()) {
+                        log.debug("Test run out of time before 4G were allocated");
+                        lock.notifyAll();
+                        return;
+                    }
+                    storage[i] = new long[STORAGE_SIZE_DIM2];
+                }
+                log.debug("The 4G are allocated, starting to test");
+                is4GAllocated = true;
+                lock.notifyAll();
+            }
+            ThreadLocalRandom random = ThreadLocalRandom.current();
+            while (getExecutionController().continueExecution()) {
+                int i = random.nextInt(STORAGE_SIZE_DIM1);
+                int j = random.nextInt(STORAGE_SIZE_DIM2);
+                long value = random.nextLong(Long.MAX_VALUE);
+                storage[i][j] = value;
+                if (storage[i][j] != value) {
+                    throw new TestFailure("The value = "
+                            + storage[i][j] + " when expected ="
+                            + value);
+                }
+            }
+
+        }
+    }
+
+    @Override
+    public void run() {
+        if (testConditions()) {
+            super.run();
+        }
+    }
+
+    @Override
+    protected Runnable createRunnable(int i) {
+        // Size of array for all types
+        long proposedSize = (long) ((Runtime.getRuntime().maxMemory() - 4 * GIGOBYTE * PART_OF_HEAP)
+                / (runParams.getNumberOfThreads() - 1) / TYPES_SIZE);
+        int arraySize = Algorithms.getArraySize(proposedSize);
+        if (i == 0) {
+            return new MainWorker();
+        }
+        return new Worker(arraySize);
+    }
+
+    public boolean testConditions() {
+        long maxMemory = Runtime.getRuntime().maxMemory();
+        // If a machine has less than 4G for heap, there is nothing to test,
+        // so exit peacefully
+        if (maxMemory < 5 * GIGOBYTE) {
+            log.debug("Heap is less than 5G ("
+                    + maxMemory + " bytes), nothing to "
+                    + "test");
+            return false;
+        }
+        return true;
+    }
+
+    public static void main(String[] args) {
+        GC.runTest(new access(), args);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/huge/quicklook/largeheap/MemOptions/MemOptions.sh	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,173 @@
+#!/bin/ksh
+# Copyright (c) 1995, 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.
+
+JAVA:="$TESTJAVA/bin/java"
+JAVA_OPTS:="$TESTJAVAOPTS $TESTVMOPTS -cp $TESTCLASSPATH"
+
+# Test JVM startup with different memory options.
+#
+# This checks that 64-bit VMs can start with huge values of memory
+# options. It is intended to be run on machines with more than 4G
+# available memory
+#
+# Based on InitMaxHeapSize, InitNegativeHeapSize, InitMinHeapSize,
+# InitZeroHeapSize
+#
+# TODO: Actually we need to determine amount of virtual memory available
+
+
+# go to the testDir passed as the first command line argument
+#testDir=$1
+#shift
+#cd $testDir
+
+
+java="$JAVA $JAVA_OPTS"
+
+# Succeed if we are not running 64-bit
+$java nsk.share.PrintProperties sun.arch.data.model | grep 64 >> /dev/null
+if [ $? -ne 0 ]; then
+        echo 'Skipping the test; a 64-bit VM is required.'
+        exit 0
+fi
+
+# Try to determine available memory
+os=`uname`;
+if [ $os = "SunOS" ]; then
+        VMStatSystemMemory=`vmstat 2 2 | awk 'NR == 4 { printf("%d", $5 / 1024); }'`
+        PrtSystemMemory=`/usr/sbin/prtconf 2>&1 | awk '/^Memory size:/ { memsize = $3; }END { printf("%d", memsize); }'`
+
+        if [ $PrtSystemMemory -lt $VMStatSystemMemory ]; then
+                # it's running in solaris zone
+                # vmstat reports free memory available for all kernel not zone
+                SystemMemory=$(($PrtSystemMemory * 3 / 4)) # expectation that free memory greater than 0.75 of total memory
+                Exact=0
+        else
+                SystemMemory=$VMStatSystemMemory
+                Exact=1
+        fi
+
+        Exact=1
+elif [ $os = "Linux" ]; then
+        SystemMemory=`awk '/^(MemFree|SwapFree|Cached):/ { sum += $2; }END { printf("%d", sum / 1024); }' /proc/meminfo`
+        Exact=1
+elif [ $os = "Darwin" ]; then
+        SystemMemory=`vm_stat  | awk 'NR == 2 { printf("%d",$3 * 4 / 1024) }'`
+        Exact=1
+else
+        echo "Unknown arch: $os"
+        SystemMemory=0
+fi
+
+case $m in
+Win*|CYG*)
+        echo "Do not checking ulimit on windows host."
+        ;;
+*)
+        ULimitMemory=`ulimit -a | grep virtual | awk '{printf($5)}'`
+        echo "ulimit is: $ULimitMemory"
+        if [ $ULimitMemory != "unlimited" ]; then
+                ULimitMemory=$(($ULimitMemory / 1024 ))
+                if [ $ULimitMemory -lt $SystemMemory ]; then
+                        echo "ulimit is less then system memory."
+                        SystemMemory=$ULimitMemory
+                fi
+        fi
+        ;;
+esac
+
+echo "Available memory in the system: $SystemMemory (mb)"
+if [ $SystemMemory -eq 0 ]; then
+        echo "Unable to determine available memory"
+        exit 0
+#We required more than 4096m, because there are Metaspace, codecache, stack, and memory fragmentation
+elif [ $Exact -eq 1 -a $SystemMemory -lt 5120 ]; then
+        echo "Not enough memory in the system to test 64bit functionality"
+        exit 0
+elif [ $Exact -eq 0 -a $SystemMemory -lt 6120 ]; then
+        echo "Not enough memory in the system to test 64bit functionality"
+        exit 0
+else
+        echo "Heap memory size beyond a 32 bit address range can be allocated for JVM"
+fi
+
+# Compile the InitMaxHeapSize program
+error=0
+
+test_successful() {
+        message=$1
+        cmd=$2
+        printf "\n$message\n"
+        echo "$cmd"
+        $cmd
+        rc=$?
+        if [ $rc -ne 0 ]; then
+                echo "Exit code: $rc"
+                error=1
+        fi
+}
+
+test_unsuccessful() {
+        message=$1
+        cmd=$2
+        printf "\n$message\n"
+        echo "$cmd"
+        $cmd
+        rc=$?
+        if [ $rc -eq 0 ]; then
+                echo "Exit code: $rc"
+                error=1
+        fi
+}
+
+MemStat="gc.huge.quicklook.largeheap.MemOptions.MemStat"
+
+test_successful "Maximum heap size within 32-bit address range" "$java -Xmx2G $MemStat"
+test_successful "Maximum heap size at 32-bit address range" "$java -Xmx4G $MemStat"
+test_successful "Maximum heap size outside 32-bit address range" "$java -Xmx5G $MemStat"
+test_unsuccessful "Maximum heap size of negative value" "$java -Xmx-1m $MemStat"
+test_unsuccessful "Maximum heap size of zero value" "$java -Xmx0m $MemStat"
+
+#test_unsuccessful "Less than minimum required heap size" "$java -Xms2176k -Xmx2176k $MemStat"
+#test_successful "Minimum required heap size" "$java -Xms2177k -Xmx2177k $MemStat"
+
+test_successful "Initial heap size within 32-bit address range" "$java -Xms2G -Xmx2G $MemStat"
+test_successful "Initial heap size at 32-bit address range" "$java -Xms4G  -Xmx4G $MemStat"
+test_successful "Initial heap size outside 32-bit address range" "$java -Xms4200M  -Xmx5G $MemStat"
+test_unsuccessful "Initial heap size of negative value" "$java -Xms-1m $MemStat"
+test_successful "Initial heap size of zero value" "$java -Xms0m $MemStat"
+
+#test_successful "Initial young generation size within 32-bit range" "$java -Xmx3G -XX:NewSize=2G $MemStat"
+#test_successful "Initial young generation size at 32-bit range" "$java -Xmx5G -XX:NewSize=4G $MemStat"
+#test_successful "Initial young generation size outside 32-bit range" "$java -Xmx5G -XX:NewSize=4G $MemStat"
+
+#test_successful "Initial old generation size within 32-bit range" "$java -Xmx3G -XX:OldSize=2G $MemStat"
+#test_successful "Initial old generation size at 32-bit range" "$java -Xmx5G -XX:OldSize=4G $MemStat"
+#test_successful "Initial old generation size outside 32-bit range" "$java -Xmx5G -XX:OldSize=4G $MemStat"
+
+printf "\n\n"
+if [ $error -eq 0 ]; then
+        echo Test passed
+else
+        echo Test failed
+        exit 1
+fi
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/huge/quicklook/largeheap/MemOptions/MemStat.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,37 @@
+/*
+ * Copyright (c) 2007, 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.
+ */
+
+package gc.huge.quicklook.largeheap.MemOptions;
+
+/**
+ * This program simply prints statistics about JVM memory.
+ */
+public class MemStat {
+        public static void main(String [] args) {
+                Runtime runtime = Runtime.getRuntime();
+                System.out.println("Max memory   : "  + runtime.maxMemory());
+                System.out.println("Total memory : "  + runtime.totalMemory());
+                System.out.println("Free memory  : "  + runtime.freeMemory());
+                System.exit(0);
+        }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/huge/quicklook/largeheap/MemOptions/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/huge/quicklook/largeheap/MemOptions/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,39 @@
+/*
+ * 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
+ * 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
+ * @key gc
+ *
+ * @summary converted from VM Testbase gc/huge/quicklook/largeheap/MemOptions.
+ * VM Testbase keywords: [gc, nonconcurrent]
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @build nsk.share.PrintProperties
+ *        gc.huge.quicklook.largeheap.MemOptions.MemStat
+ * @run shell MemOptions.sh
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/lock/LockerTest.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,79 @@
+/*
+ * Copyright (c) 2010, 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.
+ */
+package gc.lock;
+
+import nsk.share.runner.*;
+import nsk.share.gc.*;
+import nsk.share.gc.gp.*;
+import nsk.share.gc.lock.*;
+import nsk.share.test.ExecutionController;
+
+/**
+ * Test how GC is affected by locking.
+ *
+ * A number of threads is started. Each one locks and eats memory.
+ */
+public class LockerTest extends ThreadedGCTest implements GarbageProducerAware, GarbageProducer1Aware, LockersAware {
+
+    private GarbageProducer garbageProducer;
+    private GarbageProducer garbageProducer1;
+    private Lockers lockers;
+    private long objectSize = 1000;
+
+    private class Worker implements Runnable {
+
+        byte[] rezerve = new byte[1024 * 1024];
+        private Locker locker = lockers.createLocker(garbageProducer1.create(objectSize));
+
+        public Worker() {
+            locker.enable();
+        }
+
+        public void run() {
+            locker.lock();
+            GarbageUtils.eatMemory(getExecutionController(), garbageProducer);
+            locker.unlock();
+        }
+    }
+
+    protected Runnable createRunnable(int i) {
+        return new Worker();
+    }
+
+    public void setGarbageProducer(GarbageProducer garbageProducer) {
+        this.garbageProducer = garbageProducer;
+    }
+
+    public void setGarbageProducer1(GarbageProducer garbageProducer1) {
+        this.garbageProducer1 = garbageProducer1;
+    }
+
+    public void setLockers(Lockers lockers) {
+        this.lockers = lockers;
+    }
+
+    public static void main(String[] args) {
+        RunParams.getInstance().setRunMemDiagThread(false);
+        GC.runTest(new LockerTest(), args);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/lock/README	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,33 @@
+Copyright (c) 2007, 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.
+
+All gc/lock/ tests do approximately the same thing. They verify that GC
+is appropriately synchronized with certain class of functions.
+
+- gc/lock/jni - uses JNI GetPrimitiveArrayCritical and GetStringCritical
+- gc/lock/jniref - uses JNI NewGlobalRef, NewLocalRef, NewWeakGlobalRef
+- gc/lock/malloc - uses malloc()
+- gc/lock/jvmti - uses JVMTI Allocate
+
+A number of threads is started. There are some threads that repeatedly
+enter a critical section of code where functions describe above are
+repeatedly called in a loop. There are also some threads that eat
+memory in a loop. The idea here is to force GC to crash or deadlock.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/lock/jni/jnilock001/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/lock/jni/jnilock001/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,41 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/lock/jni/jnilock001.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent, quick]
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm/native
+ *      -XX:-UseGCOverheadLimit
+ *      gc.lock.LockerTest
+ *      -gp1 randomString
+ *      -lockers jni
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/lock/jni/jnilock002/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/lock/jni/jnilock002/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,41 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/lock/jni/jnilock002.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent]
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm/native
+ *      -XX:-UseGCOverheadLimit
+ *      gc.lock.LockerTest
+ *      -gp1 random(primitiveArrays)
+ *      -lockers jni
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/lock/jni/jnilock003/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/lock/jni/jnilock003/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,41 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/lock/jni/jnilock003.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent]
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm/native
+ *      -XX:-UseGCOverheadLimit
+ *      gc.lock.LockerTest
+ *      -gp1 interned(randomString)
+ *      -lockers jni
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/lock/jniref/jniglobalreflock01/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/lock/jniref/jniglobalreflock01/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,41 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/lock/jniref/jniglobalreflock01.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent]
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm/native
+ *      -XX:-UseGCOverheadLimit
+ *      gc.lock.LockerTest
+ *      -gp1 randomString
+ *      -lockers jniGlobalRef
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/lock/jniref/jniglobalreflock02/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/lock/jniref/jniglobalreflock02/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,41 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/lock/jniref/jniglobalreflock02.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent]
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm/native
+ *      -XX:-UseGCOverheadLimit
+ *      gc.lock.LockerTest
+ *      -gp1 random(primitiveArrays)
+ *      -lockers jniGlobalRef
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/lock/jniref/jniglobalreflock03/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/lock/jniref/jniglobalreflock03/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,41 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/lock/jniref/jniglobalreflock03.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent]
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm/native
+ *      -XX:-UseGCOverheadLimit
+ *      gc.lock.LockerTest
+ *      -gp1 interned(randomString)
+ *      -lockers jniGlobalRef
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/lock/jniref/jniglobalreflock04/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/lock/jniref/jniglobalreflock04/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,41 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/lock/jniref/jniglobalreflock04.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent]
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm/native
+ *      -XX:-UseGCOverheadLimit
+ *      gc.lock.LockerTest
+ *      -gp1 class
+ *      -lockers jniGlobalRef
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/lock/jniref/jnilocalreflock01/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/lock/jniref/jnilocalreflock01/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,41 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/lock/jniref/jnilocalreflock01.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent]
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm/native
+ *      -XX:-UseGCOverheadLimit
+ *      gc.lock.LockerTest
+ *      -gp1 randomString
+ *      -lockers jniLocalRef
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/lock/jniref/jnilocalreflock02/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/lock/jniref/jnilocalreflock02/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,41 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/lock/jniref/jnilocalreflock02.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent]
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm/native
+ *      -XX:-UseGCOverheadLimit
+ *      gc.lock.LockerTest
+ *      -gp1 random(primitiveArrays)
+ *      -lockers jniLocalRef
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/lock/jniref/jnilocalreflock03/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/lock/jniref/jnilocalreflock03/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,41 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/lock/jniref/jnilocalreflock03.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent]
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm/native
+ *      -XX:-UseGCOverheadLimit
+ *      gc.lock.LockerTest
+ *      -gp1 interned(randomString)
+ *      -lockers jniLocalRef
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/lock/jniref/jnilocalreflock04/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/lock/jniref/jnilocalreflock04/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,41 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/lock/jniref/jnilocalreflock04.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent]
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm/native
+ *      -XX:-UseGCOverheadLimit
+ *      gc.lock.LockerTest
+ *      -gp1 class
+ *      -lockers jniLocalRef
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/lock/jniref/jnireflock01/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/lock/jniref/jnireflock01/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,41 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/lock/jniref/jnireflock01.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent]
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm/native
+ *      -XX:-UseGCOverheadLimit
+ *      gc.lock.LockerTest
+ *      -gp1 randomString
+ *      -lockers jniRef
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/lock/jniref/jnireflock02/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/lock/jniref/jnireflock02/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,41 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/lock/jniref/jnireflock02.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent]
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm/native
+ *      -XX:-UseGCOverheadLimit
+ *      gc.lock.LockerTest
+ *      -gp1 random(primitiveArrays)
+ *      -lockers jniRef
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/lock/jniref/jnireflock03/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/lock/jniref/jnireflock03/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,41 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/lock/jniref/jnireflock03.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent]
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm/native
+ *      -XX:-UseGCOverheadLimit
+ *      gc.lock.LockerTest
+ *      -gp1 interned(randomString)
+ *      -lockers jniRef
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/lock/jniref/jnireflock04/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/lock/jniref/jnireflock04/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,37 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/lock/jniref/jnireflock04.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent, quick]
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm/native -XX:-UseGCOverheadLimit gc.lock.LockerTest -gp1 class -lockers jniRef
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/lock/jniref/jniweakglobalreflock01/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/lock/jniref/jniweakglobalreflock01/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,41 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/lock/jniref/jniweakglobalreflock01.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent]
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm/native
+ *      -XX:-UseGCOverheadLimit
+ *      gc.lock.LockerTest
+ *      -gp1 randomString
+ *      -lockers jniWeakGlobalRef
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/lock/jniref/jniweakglobalreflock02/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/lock/jniref/jniweakglobalreflock02/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,41 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/lock/jniref/jniweakglobalreflock02.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent]
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm/native
+ *      -XX:-UseGCOverheadLimit
+ *      gc.lock.LockerTest
+ *      -gp1 random(primitiveArrays)
+ *      -lockers jniWeakGlobalRef
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/lock/jniref/jniweakglobalreflock03/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/lock/jniref/jniweakglobalreflock03/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,41 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/lock/jniref/jniweakglobalreflock03.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent]
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm/native
+ *      -XX:-UseGCOverheadLimit
+ *      gc.lock.LockerTest
+ *      -gp1 interned(randomString)
+ *      -lockers jniWeakGlobalRef
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/lock/jniref/jniweakglobalreflock04/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/lock/jniref/jniweakglobalreflock04/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,41 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/lock/jniref/jniweakglobalreflock04.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent]
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm/native
+ *      -XX:-UseGCOverheadLimit
+ *      gc.lock.LockerTest
+ *      -gp1 class
+ *      -lockers jniWeakGlobalRef
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/lock/jvmti/alloc/jvmtialloclock01/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/lock/jvmti/alloc/jvmtialloclock01/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,42 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/lock/jvmti/alloc/jvmtialloclock01.
+ * VM Testbase keywords: [gc, stress, stressopt, jvmti, nonconcurrent]
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm/native
+ *      -XX:-UseGCOverheadLimit
+ *      -agentlib:JVMTIAllocLocker
+ *      gc.lock.LockerTest
+ *      -gp1 randomString
+ *      -lockers jvmtiAlloc
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/lock/jvmti/alloc/jvmtialloclock02/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/lock/jvmti/alloc/jvmtialloclock02/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,42 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/lock/jvmti/alloc/jvmtialloclock02.
+ * VM Testbase keywords: [gc, stress, stressopt, jvmti, nonconcurrent, quick]
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm/native
+ *      -XX:-UseGCOverheadLimit
+ *      -agentlib:JVMTIAllocLocker
+ *      gc.lock.LockerTest
+ *      -gp1 random(primitiveArrays)
+ *      -lockers jvmtiAlloc
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/lock/jvmti/alloc/jvmtialloclock03/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/lock/jvmti/alloc/jvmtialloclock03/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,42 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/lock/jvmti/alloc/jvmtialloclock03.
+ * VM Testbase keywords: [gc, stress, stressopt, jvmti, nonconcurrent]
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm/native
+ *      -XX:-UseGCOverheadLimit
+ *      -agentlib:JVMTIAllocLocker
+ *      gc.lock.LockerTest
+ *      -gp1 interned(randomString)
+ *      -lockers jvmtiAlloc
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/lock/jvmti/alloc/jvmtialloclock04/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/lock/jvmti/alloc/jvmtialloclock04/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,42 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/lock/jvmti/alloc/jvmtialloclock04.
+ * VM Testbase keywords: [gc, stress, stressopt, jvmti, nonconcurrent]
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm/native
+ *      -XX:-UseGCOverheadLimit
+ *      -agentlib:JVMTIAllocLocker
+ *      gc.lock.LockerTest
+ *      -gp1 class
+ *      -lockers jvmtiAlloc
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/lock/malloc/malloclock01/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/lock/malloc/malloclock01/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,41 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/lock/malloc/malloclock01.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent]
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm/native
+ *      -XX:-UseGCOverheadLimit
+ *      gc.lock.LockerTest
+ *      -gp1 randomString
+ *      -lockers malloc
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/lock/malloc/malloclock02/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/lock/malloc/malloclock02/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,41 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/lock/malloc/malloclock02.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent]
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm/native
+ *      -XX:-UseGCOverheadLimit
+ *      gc.lock.LockerTest
+ *      -gp1 random(primitiveArrays)
+ *      -lockers malloc
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/lock/malloc/malloclock03/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/lock/malloc/malloclock03/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,41 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/lock/malloc/malloclock03.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent, quick]
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm/native
+ *      -XX:-UseGCOverheadLimit
+ *      gc.lock.LockerTest
+ *      -gp1 interned(randomString)
+ *      -lockers malloc
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/lock/malloc/malloclock04/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/lock/malloc/malloclock04/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,37 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/lock/malloc/malloclock04.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent]
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm/native -XX:-UseGCOverheadLimit gc.lock.LockerTest -gp1 class -lockers malloc
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/memory/Array/ArrayJuggle/ArrayJuggle.README	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,95 @@
+Copyright (c) 2002, 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.
+-- These tests run forever at the current time [8/14/97] --
+
+
+
+ArrayJuggle.README
+
+These are a series of tests to exercise the multi-threaded
+GC part of the JVM.
+
+MemoryObjects are objects with a byte array to control their
+size and next and previous pointers for building up links to
+other MemoryObjects. These pointers can be used to make linked
+lists or binary trees or whatever. In these test cases, they are
+used only to build singly-linked lists.
+
+In the main class for each ArrayJuggle test, there is an array of
+MemoryObjects called the mainArray. This array is acted upon
+by various threads.
+
+MainArrayWalker threads randomly pick a cell in the main array
+and allocate a new MemoryObject into it. This means that
+the previous occupant of this cell in the array and anything
+it points to are candidates for GC.
+
+The CopyingThread threads copy parts of the main array into
+a thread-local array. While it resides in the thread-local array,
+a MemoryObject and the objects it points to should not be GC'd.
+
+The LinkMaker threads add new objects at the head of a linked
+list. The head of the list is stored in the main array. These
+links can vary in size.
+
+In Juggle1, a single CopyingThread copies the values of the main array to the
+subarray, a single LinkMaker adds nodes to the main array, and a single
+MainArrayWalker turns over the main array.
+
+Juggle2 is the same as Juggle1, but the CopyingThread puts a reference
+to the main array cell in the thread-local sub-array instead of
+copying it. A small difference.
+
+Juggle3 is the same as Juggle1, but is configurable for how many
+of each type of thread exists.
+
+Juggle4 is the same as Juggle2, but also has arrays of threads which
+operate on the array.
+
+The "gc" versions of these tests all have one or more threads
+which simply sit in a loop calling System.gc() to stress the system.
+
+
+These programs are designed to have their values adjusted to stress
+different parts of the system. A simple command interface can be
+added to adjust these at runtime, or the files can be edited and
+recompiled.
+
+No attempt has been made to synchronize access to the various array
+structures. This means that the arrays at any given moment inside
+any given thread may not necessarily be consistent. This is by
+design.
+
+Because there is no synchronization across array accesses, the
+values given by the dumpStatistics will not be precise, but will
+instead reflect a rolling average.
+
+Currently, all these programs run forever. That is because the
+curernt 1.1E system eventually fails on these tests. Each of
+the threads has a mechanism for stopping. The main program can
+wait for some specified period of time or number of iterations
+and then set runForever = false on all its child threads and
+then join() on them and the program should eventually terminate.
+This will be necessary for adding these to VM Testbase.
+
+Also, it will be interesting to run these tests in multiple
+configurations (varying the number of mutator threads) to
+help check for problems.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/memory/Array/ArrayJuggle/Juggle1/Juggle1.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,144 @@
+/*
+ * Copyright (c) 2002, 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/memory/Array/ArrayJuggle/Juggle1.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent]
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm -Xlog:gc=debug:gc.log gc.memory.Array.ArrayJuggle.Juggle1.Juggle1
+ */
+
+package gc.memory.Array.ArrayJuggle.Juggle1;
+
+import nsk.share.test.*;
+import nsk.share.gc.*;
+
+/**
+ * Test that tries to confuse the GC.
+ *
+ * This program initializes a main array and launches some threads
+ * which modify and copy portions of the array to try to confuse
+ * the GC.
+ */
+public class Juggle1 extends ThreadedGCTest {
+        private int arraySize = 1000;
+        private int objectSize = 1000;
+        private int maxLinkLength = 100;
+        private int maxCopySize = arraySize / 10;
+        private int threadsCount;
+        private LinkedMemoryObject mainArray[];
+
+        private class MainArrayWalker implements Runnable {
+                public void run() {
+                        int index = LocalRandom.nextInt(arraySize);
+                        int cellSize = LocalRandom.nextInt(objectSize);
+                        mainArray[index] = new LinkedMemoryObject(cellSize);
+                        //mainArray[index] = Memory.makeLinearList(maxLinkLength, objectSize);
+                }
+
+                public String toString() {
+                        return "Thread-A";
+                }
+        }
+
+        private class LinkMaker implements Runnable {
+                private int n;
+
+                public void run() {
+                        int index = LocalRandom.nextInt(arraySize);
+                        // Sometimes clear the reference so the lists do not become too large
+                        if (++n == maxLinkLength) {
+                                mainArray[index] = null;
+                                n = 0;
+                        }
+                        mainArray[index] = Memory.makeRandomLinearList(maxLinkLength, objectSize);
+                }
+
+                public String toString() {
+                        return "Thread-B";
+                }
+        }
+
+        private class CopyingThread implements Runnable {
+                private LinkedMemoryObject localArray[];
+                private int currentIndex = 0;
+
+                public CopyingThread() {
+                        localArray = new LinkedMemoryObject[maxCopySize];
+                }
+
+                public void run() {
+                        int toCopy = LocalRandom.nextInt(maxCopySize);
+                        int mainIndex = LocalRandom.nextInt(arraySize);
+                        for (int i = 0; i < toCopy; i++) {
+                                localArray[currentIndex] = mainArray[mainIndex];
+                                currentIndex = (currentIndex + 1) % maxCopySize;
+                                mainIndex = (mainIndex + 1) % arraySize;
+                        }
+                }
+
+                public String toString() {
+                        return "Thread-C";
+                }
+        }
+
+        protected Runnable createRunnable(int i) {
+                switch (i % 3) {
+                case 0:
+                        return new MainArrayWalker();
+                case 1:
+                        return new LinkMaker();
+                case 2:
+                default:
+                        return new CopyingThread();
+                }
+        }
+
+        public void run() {
+                // arraySize * (objectSize + referenceSize) + threadsCount * (referenceSize arraySize/10 * (referenceSize + objectSize)) = memory
+                long referenceSize = Memory.getReferenceSize();
+                long objectExtraSize = Memory.getObjectExtraSize();
+                threadsCount = runParams.getNumberOfThreads();
+                arraySize = Memory.getArrayLength(
+                        runParams.getTestMemory(),
+                        Memory.getListSize(maxLinkLength, objectSize)
+                );
+                maxCopySize = arraySize / 10 - 1;
+                arraySize = arraySize * 9 / 10 - 1;
+                System.out.println("Array size: " + arraySize);
+                mainArray  = new LinkedMemoryObject[arraySize];
+                Memory.fillArrayRandom(mainArray, arraySize, objectSize);
+                super.run();
+        }
+
+        public static void main(String args[]) {
+                GC.runTest(new Juggle1(), args);
+        }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/memory/Array/ArrayJuggle/Juggle1/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/memory/Array/ArrayJuggle/Juggle1_gc/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/memory/Array/ArrayJuggle/Juggle1_gc/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,37 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/memory/Array/ArrayJuggle/Juggle1_gc.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent]
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm -Xlog:gc=debug:gc.log gc.memory.Array.ArrayJuggle.Juggle1.Juggle1 -tg
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/memory/Array/ArrayJuggle/Juggle2/Juggle2.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,148 @@
+/*
+ * Copyright (c) 2002, 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/memory/Array/ArrayJuggle/Juggle2.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent]
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm -Xlog:gc=debug:gc.log gc.memory.Array.ArrayJuggle.Juggle2.Juggle2
+ */
+
+package gc.memory.Array.ArrayJuggle.Juggle2;
+
+import nsk.share.test.*;
+import nsk.share.gc.*;
+
+/**
+ * Test that tries to confuse the GC.
+ *
+ * This program initializes a main array and launches some threads
+ * which modify and copy portions of the array to try to confuse
+ * the GC.
+ */
+public class Juggle2 extends ThreadedGCTest {
+        private int arraySize = 1000;
+        private int objectSize = 1000;
+        private int maxLinkLength = 100;
+        private int maxCopySize = arraySize / 10;
+        private int threadsCount = 30;
+        private LinkedMemoryObject mainArray[];
+
+        private class MainArrayWalker implements Runnable {
+                public void run() {
+                        int index = LocalRandom.nextInt(arraySize);
+                        int cellSize = LocalRandom.nextInt(objectSize);
+                        mainArray[index] = new LinkedMemoryObject(cellSize);
+                        //mainArray[index] = Memory.makeLinearList(maxLinkLength, objectSize);
+                }
+
+                public String toString() {
+                        return "Thread-A";
+                }
+        }
+
+        private class LinkMaker implements Runnable {
+                private int n;
+
+                public void run() {
+                        int index = LocalRandom.nextInt(arraySize);
+                        // Sometimes clear the reference so the lists do not become too large
+                        if (++n == maxLinkLength) {
+                                mainArray[index] = null;
+                                n = 0;
+                        }
+                        //for (int i = 0; i < thisChainLength; ++i)
+                        //      mainArray[index] = new LinkedMemoryObject(cellSize, mainArray[index]);
+                        //Memory.makeLinearList(maxLinkLength, objectSize);
+                        mainArray[index] = Memory.makeRandomLinearList(maxLinkLength, objectSize);
+                }
+
+                public String toString() {
+                        return "Thread-B";
+                }
+        }
+
+        private class CopyingThread implements Runnable {
+                private LinkedMemoryObject localArray[];
+                private int currentIndex = 0;
+
+                public CopyingThread() {
+                        localArray = new LinkedMemoryObject[maxCopySize];
+                        for (int i = 0; i < maxCopySize; ++i)
+                                localArray[i] = new LinkedMemoryObject(0);
+                }
+
+                public void run() {
+                        int toCopy = LocalRandom.nextInt(maxCopySize);
+                        int mainIndex = LocalRandom.nextInt(arraySize);
+                        for (int i = 0; i < toCopy; i++) {
+                                localArray[currentIndex].setNext(mainArray[mainIndex]);
+                                currentIndex = (currentIndex + 1) % maxCopySize;
+                                mainIndex = (mainIndex + 1) % arraySize;
+                        }
+                }
+
+                public String toString() {
+                        return "Thread-C";
+                }
+        }
+
+        protected Runnable createRunnable(int i) {
+                switch (i % 3) {
+                case 0:
+                        return new MainArrayWalker();
+                case 1:
+                        return new LinkMaker();
+                case 2:
+                default:
+                        return new CopyingThread();
+                }
+        }
+
+        public void run() {
+                // arraySize * (objectSize + referenceSize) + threadsCount * (referenceSize arraySize/10 * (referenceSize + objectSize)) = memory
+                long referenceSize = Memory.getReferenceSize();
+                long objectExtraSize = Memory.getObjectExtraSize();
+                arraySize = Memory.getArrayLength(
+                        runParams.getTestMemory(),
+                        Memory.getListSize(maxLinkLength, objectSize)
+                );
+                maxCopySize = arraySize / 10 - 1;
+                arraySize = arraySize * 9 / 10 - 1;
+                System.out.println("Array size: " + arraySize);
+                mainArray  = new LinkedMemoryObject[arraySize];
+                Memory.fillArrayRandom(mainArray, arraySize, objectSize);
+                super.run();
+        }
+
+        public static void main(String args[]) {
+                GC.runTest(new Juggle2(), args);
+        }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/memory/Array/ArrayJuggle/Juggle2/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/memory/Array/ArrayJuggle/Juggle2_gc/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/memory/Array/ArrayJuggle/Juggle2_gc/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,37 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/memory/Array/ArrayJuggle/Juggle2_gc.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent]
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm -Xlog:gc=debug:gc.log gc.memory.Array.ArrayJuggle.Juggle2.Juggle2 -tg
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/memory/Array/SampleMe/SampleClass.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,58 @@
+/*
+ * Copyright (c) 2002, 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.
+ */
+package gc.memory.Array.SampleMe;
+
+//SampleClass.java
+public class SampleClass
+{
+        public void foo()
+        {
+                System.out.println("gronk, gronk, gronk");
+                int i = (int) (Math.random() * 1000);
+                int j = i * 5;
+                System.out.println(i + "" + j);
+        }
+        static int r;
+        int joop;
+        String masto;
+        Judd j;
+
+        public SampleClass()
+        {
+                j = new Judd();
+        }
+}
+
+class Judd
+{
+        Object oo[];
+
+        public Judd()
+        {
+                oo = new Object[100];
+                for (int i = 0; i < 100; i ++)
+                {
+                        oo[i] = new Object();
+                }
+        }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/memory/Array/SampleMe/SampleMe.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,105 @@
+/*
+ * Copyright (c) 2002, 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
+ * @key gc
+ *
+ * @summary converted from VM Testbase gc/memory/Array/SampleMe.
+ * VM Testbase keywords: [gc]
+ * VM Testbase readme:
+ * ## This test is a basic implementation of the thoughts below.
+ * Create an object: Cell
+ * which contains an array of bytes, the size of
+ * which is determined in the ctor call
+ * You could then have varying sizes of these objects.
+ * You could then store them in an array. Then delete
+ * a subset and garbage collect:
+ * Basically, you are looking at the holes and the
+ * remaining cells, their numbers and their locations:
+ * small/medium/large sized chunks
+ * small/medium/large sized holes
+ * contiguous/mixed/discontiguous
+ * none, few, some, many, all
+ * The key here is to provide a broad spectrum of
+ * various GC scenarios. eventually, you will want
+ * to take into account generational effects by making
+ * sure that various portions of the chunks and holes
+ * are created before or after certain generational
+ * boundaries (1 Megabyte of allocs, for example).
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm gc.memory.Array.SampleMe.SampleMe
+ */
+
+package gc.memory.Array.SampleMe;
+
+//SampleMe.java
+// import SampleClass;
+
+public class SampleMe
+{
+        public static void main(String args[])
+        {
+                int arraySize = 2000;
+                long before;
+                long after;
+
+                SampleClass array[] = new SampleClass[arraySize];
+                for (int i= 0; i < arraySize; i++)
+                {
+                        array[i] = new SampleClass();
+                        if ((i % (arraySize / 10)) == 0)
+                        {
+                                System.out.println(i);
+                        }
+                }
+                System.gc();
+                System.out.println("Erasing objects");
+                for (int i = 0; i < arraySize /2; i ++)
+                {
+                        array[i*2] = null;
+                }
+                System.out.println("ready to GC");
+                before = System.currentTimeMillis();
+                System.gc();
+                after = System.currentTimeMillis();
+                System.out.println(after - before);
+
+                for (int i = 0; i < arraySize /3; i ++)
+                {
+                        array[i*2 + 1] = null;
+                }
+                before = System.currentTimeMillis();
+                System.gc();
+                after = System.currentTimeMillis();
+                System.out.println(after - before);
+
+                for (int i = 0; i < arraySize; i ++)
+                {
+                        array[i] = null;
+                }
+        }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/memory/Churn/Churn.README	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,119 @@
+Copyright (c) 2002, 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.
+
+The Churn tests are a series of small programs designed to
+simply churn memory over, mixing in calls to GC and Finalization.
+They are all basically the same program with permutations.
+Each program contains:
+
+LocalRandom class -- used to isloate calls to random generator
+        for reproducibility
+
+MemoryObject class -- simply allocated and reclaimed. contains
+        a byte array
+
+Churn class -- entry point. Allocates threads and counts objects.
+        When loop is done, sets Semaphore to signal threads to cease
+
+ThreadObject class -- allocates and deallocates (by assignment)
+        MemoryObjects
+
+SemaphoreObject class -- static class for signalling threads when
+        to stop running. Perhap poorly named.
+
+CommandLine class -- parses command line args. Static class.
+--------------------------
+Usage:
+
+java Churn [-l numberOfLoops] [-t numberOfThreads] [-a sizeOfArray] [-m multiplier] [-f <run forever>] [-s seed]
+
+NOTE: the options can be passed in any order
+
+
+seed is the seed for the LocalRandom pseudo-random generator
+
+numberOfLoops is the number of iterations a test will go through.
+This defaults to 2000
+
+numberOfThreads is the number of threads activating and deactivating
+MemoryObjects. This deaults to 2.
+
+sizeOfArray is the number of MemoryObjects each thread manipulates.
+This defaults to 1024.
+
+multiplier is a value used to determine how much memory each MemoryObject
+holds. It defaults to 10.
+
+The tests can be configured to run forever by passing -f on the
+command line. This is useful for continued stress testing outside
+of a test harness.
+-----------------------------
+The total amount of needed memory is approximately
+numberOfThreads * (sizeOfArray * sizeOfArray) * (multiplier / 2) bytes
+
+The default is about 10 Megs needed, not couting garbage collection
+overhead.  Garbage collection doubles the memory requirements for
+programs that run out of heap space, so the the true default size
+is 20 Megs.
+
+
+Testname        What it does
+-------------   ---------------------------------------------------------
+Churn1          Simply creates new MemObjects. No finalizers. No user
+                calls to System.gc(). Count of objects simply grows
+                since no method ever decreases the count -- object count
+                equals total objects ever allocated. Memory used is
+                approx = (object count) * (array size) * (multiplier) / 2
+
+Churn2          Same as Churn1, but adds a call to System.gc() every loop.
+                Object Count should simply increase. About half the time,
+                this test will hang before the 100th loop. About 10% of
+                the time this test will SEG FAULT with either a BUS ERROR
+                or ACCESS VIOLATION
+
+Churn3          Same as Churn1, but the MemoryObject class has a
+                finalize() method on it. The method is empty. The objecty
+                count should continue to rise. However, this program
+                runs out of memory after around 35 loops. The threads
+                dies from OutOfMemoryErrors. It looks as if the
+                finalizers are not called fast enough during GC, so
+                enough memory cannot be freed.
+                Additionally, about 10% of the time, this program SEGFAULTS
+
+Churn3a         Same as Churn3, but with an explicit call to
+                System.runFinalization() in each loop.
+                Occasionally, this test will run out of memory
+                early on for one or more of the threads.
+                Also, this test sometimes hangs, even if one or
+                all of the ThreadObjects have died.
+                Even if no threads die, and it doesn't hang, this
+                program will still die with:
+                        java.lang.NullPointerException
+                                at java.lang.String.indexOf(String.java)
+                                at Churn3a.main(Churn3a.java:71)
+                which contains only a call to join()
+
+
+
+Churn4          Same as Churn3, but with code in the finalize method
+                which would decrement a *static* field in the class.
+                This test runs out of memory much more quickly, something
+                like after 3 or 4 loops.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/memory/Churn/Churn1/Churn1.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,84 @@
+/*
+ * Copyright (c) 2002, 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/memory/Churn/Churn1.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent]
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm gc.memory.Churn.Churn1.Churn1
+ */
+
+package gc.memory.Churn.Churn1;
+
+import nsk.share.test.*;
+import nsk.share.gc.*;
+
+/**
+ *  Test that GC works with memory that is churn over.
+ *
+ *  This test starts a number of threads that create objects,
+ *  keep references to them in array and overwrite them. The test
+ *  test checks that GC is able to collect these objects.
+ *
+ *  This test will adjust the size of allocated objects to run
+ *  environment.
+ *
+ *  @see nsk.share.gc.RunParams#getTestMemory()
+ */
+public class Churn1 extends ThreadedGCTest {
+        private int multiplier = 10;
+        private int sizeOfArray;
+
+        class ThreadObject implements Runnable {
+                private AllMemoryObject objectArray[] = new AllMemoryObject[sizeOfArray];
+
+                public ThreadObject() {
+                        for (int i = 0; i < sizeOfArray; i ++)
+                                objectArray[i] = new AllMemoryObject(multiplier * i);
+                }
+
+                public void run() {
+                        int index = LocalRandom.nextInt(sizeOfArray);
+                        objectArray[index] = new AllMemoryObject(multiplier * index);
+                }
+        }
+
+        protected Runnable createRunnable(int i) {
+                return new ThreadObject();
+        }
+        public void run() {
+                sizeOfArray = (int) Math.min(Math.sqrt(runParams.getTestMemory() * 2 / runParams.getNumberOfThreads() / multiplier), Integer.MAX_VALUE);
+                super.run();
+        }
+
+        public static void main(String args[]) {
+                GC.runTest(new Churn1(), args);
+        }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/memory/Churn/Churn1/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/memory/Churn/Churn2/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/memory/Churn/Churn2/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,37 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/memory/Churn/Churn2.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent]
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm gc.memory.Churn.Churn1.Churn1 -l 1000 -tg
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/memory/Churn/Churn3/Churn3.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,85 @@
+/*
+ * Copyright (c) 2002, 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/memory/Churn/Churn3.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent]
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm gc.memory.Churn.Churn3.Churn3
+ */
+
+package gc.memory.Churn.Churn3;
+
+import nsk.share.test.*;
+import nsk.share.gc.*;
+
+/**
+ *  Test that GC works with memory that is churn over.
+ *
+ *  This test starts a number of threads that create objects,
+ *  keep references to them in array and overwrite them.
+ *  The test checks that GC is able to collect these objects.
+ *
+ *  This test is the same as Churn1 except that it creates objects
+ *  that have empty finalizer.
+ *
+ *  @see gc.memory.Churn.Churn1.Churn1
+ */
+public class Churn3 extends ThreadedGCTest {
+        private int multiplier = 10;
+        private int sizeOfArray;
+
+        class ThreadObject implements Runnable {
+                private FinMemoryObject1 objectArray[] = new FinMemoryObject1[sizeOfArray];
+
+                public ThreadObject() {
+                        for (int i = 0; i < sizeOfArray; i ++)
+                                objectArray[i] = new FinMemoryObject1(multiplier * i);
+                }
+
+                public void run() {
+                        int index = LocalRandom.nextInt(sizeOfArray);
+                        objectArray[index] = new FinMemoryObject1(multiplier * index);
+                }
+        }
+
+        protected Runnable createRunnable(int i) {
+                return new ThreadObject();
+        }
+
+        public void run() {
+                sizeOfArray = (int) Math.min(Math.sqrt(runParams.getTestMemory() * 2 / runParams.getNumberOfThreads() / multiplier), Integer.MAX_VALUE);
+                super.run();
+        }
+
+        public static void main(String args[]) {
+                GC.runTest(new Churn3(), args);
+        }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/memory/Churn/Churn3/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/memory/Churn/Churn3a/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/memory/Churn/Churn3a/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,37 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/memory/Churn/Churn3a.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent]
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm gc.memory.Churn.Churn3.Churn3 -tg -tf
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/memory/Churn/Churn4/Churn4.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,96 @@
+/*
+ * Copyright (c) 2002, 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/memory/Churn/Churn4.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent]
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm gc.memory.Churn.Churn4.Churn4
+ */
+
+package gc.memory.Churn.Churn4;
+
+import nsk.share.test.*;
+import nsk.share.gc.*;
+
+/**
+ *  Test that GC works with memory that is churn over.
+ *
+ *  This test starts a number of threads that create objects,
+ *  keep references to them in array and overwrite them.
+ *  The test checks that GC is able to collect these objects.
+ *
+ *  This test is the same as Churn1 except that it creates objects
+ *  1/10 of which will have non-trivial finalizer.
+ *
+ *  @see gc.memory.Churn.Churn1.Churn1
+ */
+public class Churn4 extends ThreadedGCTest {
+        private int multiplier = 10;
+        private int sizeOfArray;
+
+        private class ThreadObject implements Runnable {
+                private MemoryObject[] objectArray = new MemoryObject[sizeOfArray];
+                int allocationMod = 0;
+                int allocationModulus = 10;
+
+                public ThreadObject() {
+                        for (int i = 0; i < sizeOfArray; i ++) {
+                                if (allocationMod == 0)
+                                        objectArray[i] = new FinMemoryObject(multiplier);
+                                else
+                                        objectArray[i] = new FinMemoryObject1(multiplier * i);
+                                allocationMod++;
+                                allocationMod %= allocationModulus;
+                        }
+                }
+
+                public void run() {
+                        int index = LocalRandom.nextInt(sizeOfArray);
+                        objectArray[index] = new FinMemoryObject1(multiplier * index);
+                        allocationMod++;
+                        allocationMod %= allocationModulus;
+                }
+        }
+
+        protected Runnable createRunnable(int i) {
+                return new ThreadObject();
+        }
+
+        public void run() {
+                sizeOfArray = (int) Math.min(Math.sqrt(runParams.getTestMemory() * 2 / runParams.getNumberOfThreads() / multiplier), Integer.MAX_VALUE);
+                System.out.println("Size of array: " + sizeOfArray);
+                super.run();
+        }
+
+        public static void main(String args[]) {
+                GC.runTest(new Churn4(), args);
+        }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/memory/Churn/Churn4/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/memory/FillingStation/FillingStation.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,119 @@
+/*
+ * Copyright (c) 2002, 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/memory/FillingStation.
+ * VM Testbase keywords: [gc, stress, nonconcurrent]
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm gc.memory.FillingStation.FillingStation
+ */
+
+package gc.memory.FillingStation;
+
+public class FillingStation {
+
+    public static final long minObjectSize  = 4;
+    public static final long freeSpaceLimit = 64;
+    public static final long maxObjectSize  = 32*1024;
+
+    public static final boolean debug        = false;
+
+    public static void main(String[] arg) {
+        prologue();
+        fill();
+        epilogue();
+    }
+
+    public static void prologue() {
+        _beforeMillis = System.currentTimeMillis();
+    }
+
+    public static void epilogue() {
+        _afterMillis = System.currentTimeMillis();
+        if (_overflow) {
+            System.out.println("Overflowed!");
+        }
+        final double deltaSecs = (_afterMillis - _beforeMillis) / 1000.0;
+        final double freeMegs = ((double) _freeBytes) / (1024.0 * 1024.0);
+        final double totalMegs = ((double) _totalBytes) / (1024.0 * 1024.0);
+        final double memRatio = freeMegs / totalMegs;
+        System.out.println("Runtime.freeMemory()/Runtime.totalMemory: " +
+                           Long.toString(_freeBytes) +
+                           "/" +
+                           Long.toString(_totalBytes) +
+                           " = " +
+                           Double.toString(memRatio));
+        System.out.println("That took: " +
+                           Double.toString(deltaSecs) +
+                           " seconds");
+    }
+
+    public static void fill() {
+        boolean _overflow = false;
+        Runtime rt = java.lang.Runtime.getRuntime();
+        java.util.Random stream = new java.util.Random();
+        Space next = null;
+        try {
+            for (long available = rt.freeMemory();
+                 available > freeSpaceLimit;
+                 available = rt.freeMemory()) {
+                long request   = (available - freeSpaceLimit) / 2;
+                int maxRequest = (int) Math.min(maxObjectSize, request);
+                int minRequest = (int) Math.max(minObjectSize, maxRequest);
+                int size = stream.nextInt(minRequest);
+                if (debug) {
+                    System.err.println("available: " + Long.toString(available) +
+                                       "  maxRequest: " + Integer.toString(maxRequest) +
+                                       "  minRequest: " + Integer.toString(minRequest) +
+                                       "  size: " + Integer.toString(size));
+                }
+                next = new Space(size, next);
+            }
+        } catch (OutOfMemoryError oome) {
+            _overflow = true;
+        }
+        _freeBytes = rt.freeMemory();
+        _totalBytes = rt.totalMemory();
+    }
+
+    static long    _beforeMillis = 0L;
+    static long    _afterMillis  = 0L;
+    static long    _freeBytes    = 0L;
+    static long    _totalBytes   = 0L;
+    static boolean _overflow     = false;
+}
+
+class Space {
+    public Space(int bytes, Space next) {
+        _next = next;
+        _space = new byte[bytes];
+    }
+    private Space              _next  = null;
+    private byte[]             _space = null;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/memory/FillingStation/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/memory/LargePagesTest/LargePagesTest.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,292 @@
+/*
+ * Copyright (c) 2013, 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/memory/LargePagesTest.
+ * VM Testbase keywords: [gc, stress, stressopt]
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm gc.memory.LargePagesTest.LargePagesTest noThreads=5 duration=60
+ */
+
+package gc.memory.LargePagesTest;
+
+import java.io.PrintStream;
+import java.util.Random;
+
+/*
+ * Allocators purpose is to create pressure on the garbage collector
+ * for a certain amount of time.
+ * Note: this test moved from the "jr", the original name is func.vm.largepages.LargePagesTest
+ */
+
+
+/**
+ * @run main/othervm/timeout=150
+ *      -XX:+UseLargePages
+ *      -Xmx64m
+ *      -Xms16m
+ *      LargePagesTest
+ *      noThreads=5 duration=60
+ * @summary heap shrink/grow test
+ */
+final public class LargePagesTest extends Thread {
+
+    private static int cnt;
+    private static final int SMALL_OBJECT_ALLOCATER = 1;
+    private static final int LARGE_OBJECT_ALLOCATER = 2;
+    private static final int ANY_OBJECT_ALLOCATER = 3;
+    private static final int ANY_NO_MULTIARRAYS_ALLOCATER = 4;
+    private int myType;
+
+    /** Dummy thingies to update. */
+    public LargePagesTest.Dummy[] d0;
+    /** Dummy thingies to update. */
+    public LargePagesTest.Dummy[] d1;
+    /** Dummy thingies to update. */
+    public LargePagesTest.Dummy[][] d2;
+    /** Dummy thingies to update. */
+    public LargePagesTest.Dummy[][] d3;
+    /** Dummy thingies to update. */
+    public LargePagesTest.Dummy[][][] d4;
+    /** Dummy thingies to update. */
+    public LargePagesTest.Dummy d5;
+
+    /** Time to run execute(). */
+    private long duration;
+
+    /** Boolean of progress should be printed. */
+    private boolean verbose;
+
+    private static int noThreads = 5;
+
+    /** Iterations. */
+    public long iterations = 0L;
+
+    /** Result. */
+    public boolean result = false;
+
+    private PrintStream out;
+
+    /**
+     * Creates DurAllocator.
+     * @param name Parameter
+     * @param duration Parameter
+     * @param out Parameter
+     * @param verbose Parameter
+     */
+    LargePagesTest(String name, long duration, PrintStream out, boolean verbose) {
+
+        super(name);
+        this.duration = duration;
+        this.out = out;
+        this.verbose = verbose;
+    }
+
+    /**
+     * Print status.
+     */
+    void describe() {
+        out.println("DurAllocator run: ");
+        out.println("   test duration:     " + duration / 1000 + " seconds");
+        out.println("   number of threads: " + noThreads + " threads");
+    }
+
+    /**
+     * Allocates memory in a loop.
+     */
+    public void run() {
+
+        long startTime = System.currentTimeMillis();
+
+        while (System.currentTimeMillis() - startTime < duration) {
+            try {
+                allocate();
+            } catch (Throwable t) {
+                out.println(getName() + " FAILED: " + t.getClass().getName() + " in iteration " + iterations + ": " + t.getMessage());
+                return;
+            }
+            iterations++;
+            if (verbose && iterations % 1000 == 0) {
+                out.print(".");
+            }
+            if (verbose && iterations % 60000 == 0) {
+                out.println(".");
+            }
+        }
+        if (verbose) {
+            out.println("");
+        }
+
+
+        long endTime = System.currentTimeMillis();
+        long runTime = endTime - startTime;
+        if (duration > runTime) {
+            out.println(getName() + "  FAILED: Execution time < requested execution time.");
+            out.println("                execution time is " + runTime);
+            out.println("                requested time is " + duration);
+        } else if (iterations <= 0) {
+            out.println(getName() + "  FAILED: No executions finished");
+        } else {
+            result = true;
+        }
+    }
+
+    private void allocate() {
+
+        Random r = new Random();
+        for (int j = 0; j < 1000; j++) {
+            r = new Random();
+            int i = 0;
+
+            switch (myType) {
+            case SMALL_OBJECT_ALLOCATER:
+                i = 5;
+                break;
+            case LARGE_OBJECT_ALLOCATER:
+                i = 1;
+                break;
+            case ANY_OBJECT_ALLOCATER:
+                i = r.nextInt(100);
+                break;
+            case ANY_NO_MULTIARRAYS_ALLOCATER:
+                i = r.nextInt(100);
+                if ((i >= 2) && (i <= 4)) {
+                    i = 5;
+                }
+                break;
+            default:
+                break;
+            }
+
+            switch (i) {
+            case 0:
+                d0 = new LargePagesTest.Dummy[10];
+                break;
+            case 1:
+                d1 = new LargePagesTest.Dummy[1000];
+                break;
+            case 2:
+                d2 = new LargePagesTest.Dummy[10][10];
+                break;
+            case 3:
+                d3 = new LargePagesTest.Dummy[100][100];
+                break;
+            case 4:
+                d4 = new LargePagesTest.Dummy[10][10][10];
+                break;
+            default:
+                d5 = new LargePagesTest.Dummy();
+                break;
+            }
+        }
+    }
+
+    /**
+     * A Dummy class.
+     */
+    private class Dummy {
+        /**
+         * Creates a dummy.
+         */
+        Dummy() {
+            cnt++;
+        }
+    }
+
+    /**
+     * @param args Input arguments
+     */
+    public static void main(String[] args) {
+
+        long duration = 30 * 60 * 1000;
+        PrintStream out = System.out;
+        boolean verbose = true;
+
+        for (int i = 0; i < args.length; i++) {
+            String noThreadsArgName = "noThreads=";
+            String executionTimeArgName = "duration=";
+            String verboseArgName = "verbose=";
+            if (args[i].indexOf(noThreadsArgName) != -1) {
+                noThreads = Integer.parseInt(args[i].substring(noThreadsArgName.length(), args[i].length()));
+            } else if (args[i].indexOf(executionTimeArgName) != -1) {
+                duration = 1000 * Long.parseLong(args[i].substring(executionTimeArgName.length(), args[i].length()));
+            } else if (args[i].indexOf(verboseArgName) != -1) {
+                verbose = Boolean.parseBoolean(args[i].substring(verboseArgName.length(), args[i].length()));
+            } else {
+                System.out.println("ERROR: Unknown argument string: " + args[i]);
+                System.exit(-1);
+            }
+        }
+
+        // Please don't...
+        if (noThreads <= 0) {
+            noThreads = 1;
+        }
+
+        LargePagesTest[] runners = new LargePagesTest[noThreads];
+
+        for (int i = 0; i < noThreads; i++) {
+            runners[i] = new LargePagesTest("DurAllocator " + i, duration, out, verbose);
+        }
+
+        runners[0].describe();
+
+        for (int i = 0; i < noThreads; i++) {
+            runners[i].start();
+        }
+
+        for (int i = 0; i < noThreads; i++) {
+            try {
+                runners[i].join(duration + 10 * 60 * 1000);
+            } catch (InterruptedException e) {
+                out.println(runners[i].getName() + " FAILED: " + e.getClass().getName() + " " + e.getMessage());
+                System.exit(-1);
+            }
+        }
+
+        for (int i = 0; i < noThreads; i++) {
+            if (!runners[i].result) {
+                out.println(runners[i].getName() + " FAILED: status=" + runners[i].result);
+                System.exit(-1);
+            }
+        }
+
+        if (verbose) {
+            out.println();
+        }
+
+        out.print("DurAllocator PASSED with (");
+        for (int i = 0; i < noThreads; i++) {
+            out.print("" + runners[i].iterations + (i + 1 < noThreads ? "+" : ""));
+        }
+        out.println(") iterations.");
+        // System.exit(90); // use to return 90 as indication of success
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/memory/Nio/Nio.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,207 @@
+/*
+ * Copyright (c) 2013, 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
+ * @modules java.base/jdk.internal.misc
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/memory/Nio.
+ * VM Testbase keywords: [gc, stress, stressopt, monitoring]
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm -XX:MaxDirectMemorySize=50M gc.memory.Nio.Nio
+ */
+
+package gc.memory.Nio;
+
+import java.lang.management.ManagementFactory;
+import java.nio.ByteBuffer;
+import jdk.internal.misc.VM;
+import com.sun.management.HotSpotDiagnosticMXBean;
+import java.io.File;
+import java.io.IOException;
+
+/**
+ * Test that uses java.nio.ByteBuffer to allocate native memory.
+ * The test allocates all the memory available and checks that
+ * further attempts to allocate more more will fail.
+ * Test also checks that allocating native memory doesn't affect heap.
+ * Test also cheks that GC can find unused native memory.
+ *
+ * @summary Checks that nio.ByteBuffer allocates native memory and doesn't affect heap.
+ * @run main/othervm -XX:MaxDirectMemorySize=50M gc.memory.Nio.Nio
+ */
+public class Nio {
+
+    static final int MAX_SIZE = (int)VM.maxDirectMemory();
+
+    public static void main(String[] args) {
+        System.exit(new Nio().run() + 95 /*STATUS_BASE*/);
+    }
+
+    public Nio() {
+    }
+
+    public int run() {
+        // Step0: init
+        gc();
+        long usedHeap_0 = getUsedHeap();
+        long usedNonHeap_0 = getUsedNonHeap();
+
+        // Step1: allocate the all available direct memory
+        //        no OOME, no heap memory should be used
+        System.out.println("Allocating all the direct memory: " + MAX_SIZE);
+        ByteBuffer bb;
+        try {
+            bb = ByteBuffer.allocateDirect((int)MAX_SIZE);
+            System.out.println("... success");
+        } catch (OutOfMemoryError oom) {
+            throw new Fault("Unexpected OOME during the first allocation " + oom);
+        }
+        long usedHeap_1 = getUsedHeap();
+        long usedNonHeap_1 = getUsedNonHeap();
+        checkHeapIsNotAffected(usedHeap_0, usedHeap_1, usedNonHeap_0, usedNonHeap_1);
+        // Step2: invoke GC, it shouldn't help.
+        System.out.println("Doing gc");
+        gc();
+
+        // Step3: allocate 1 byte in the direct memory
+        //        OOM is expected
+        try {
+            System.out.println("Allocating 1 byte");
+            ByteBuffer.allocateDirect(1);
+            throw new Fault("No OOM, but we already allocated all the memory");
+        } catch (OutOfMemoryError oom) {
+            System.out.println("Expected OOM " + oom);
+        }
+
+        // Step4: read and write into allocated memory
+        double d0 = -3.1415;
+        float  f0 = 41234.6f;
+        bb.putDouble(MAX_SIZE/2, d0);
+        bb.putFloat(MAX_SIZE - 17, f0);
+        double d1 = bb.getDouble(MAX_SIZE/2);
+        float f1 = bb.getFloat(MAX_SIZE - 17);
+        System.out.println("put: " + d0 + ", " + f0);
+        System.out.println("got: " + d1 + ", " + f1);
+        if (d0 != d1 || f0 != f1) {
+            throw new Fault("read/write to buffer check failed");
+        }
+
+        // Step5:
+        //  clean the buffer, use gc, try to allocate again
+        //  no OOM is expected
+        bb = null;
+        gc();
+        try {
+            System.out.println("Allocating 10 bytes");
+            ByteBuffer.allocateDirect(10);
+        } catch (OutOfMemoryError oom) {
+            throw new Fault("Nop, OOM is unexpected again: " + oom);
+        }
+
+
+        System.out.println("The long quest has done! Congratulations");
+
+        return 0;
+    }
+
+
+    public static void gc() {
+        System.gc();
+        try {
+            Thread.currentThread().sleep(200);
+        } catch (Exception ignore) {
+        }
+    }
+
+    /**
+     * @return the size of used heap
+     */
+    public static long getUsedHeap() {
+         return ManagementFactory.getMemoryMXBean().getHeapMemoryUsage().getUsed();
+    }
+
+    /**
+     * @return the size of used non heap
+     */
+    public static long getUsedNonHeap() {
+         return ManagementFactory.getMemoryMXBean().getNonHeapMemoryUsage().getUsed();
+    }
+
+    /**
+     * Check that heap and non-heap memory have NOT changed significantly.
+     * Throws a Fault if check failed.
+     *
+     * @param h_before  used heap before
+     * @param h_after   used heap after
+     * @param nh_before used non heap before
+     * @param nh_after  used non heap after
+     */
+    void checkHeapIsNotAffected(long h_before, long h_after, long nh_before, long nh_after) {
+
+        if (h_after - h_before > MAX_SIZE * 0.75) {
+            System.err.println("Used heap before: " + h_before);
+            System.err.println("Used heap after : " + h_after);
+            dumpHeap();
+            String failed = "Allocating direct memory should not eat the heap!"
+                    + " Heap dumped to heapDump.hprof file.";
+            throw new Fault(failed);
+        }
+        if (nh_after - nh_before > MAX_SIZE * 0.75) {
+            System.err.println("Used heap before: " + nh_before);
+            System.err.println("Used heap after : " + nh_after);
+            dumpHeap();
+            throw new Fault("Allocating direct memory should not eat non the heap!");
+        }
+    }
+
+    /**
+     * Try to make heap dump
+     */
+    void dumpHeap() {
+        HotSpotDiagnosticMXBean mxBean = ManagementFactory
+                .getPlatformMXBean(HotSpotDiagnosticMXBean.class);
+        try {
+            System.out.println("Try to dump heap to heapDump.hprof file..");
+            mxBean.dumpHeap("heapDump.hprof", false);
+            System.out.println("Done");
+        } catch (IOException e) {
+            System.out.println("Failed to dump heap");
+            e.printStackTrace();
+        }
+    }
+
+    /**
+     * RuntimeException signaling a test failure.
+     */
+    public static class Fault extends RuntimeException {
+        public Fault(String message) {
+            super(message);
+        }
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/memory/UniThread/Circular.README	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,43 @@
+Copyright (c) 2002, 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.
+
+The Unithread Circular tests are pretty basic.
+The main program allocates an array of objects and
+the generates a circular linked list from them.
+     A->B->C->A
+The circularity is then removed from the array
+as more objects are allocated. The circularities
+should be garbage collected to make room for the new
+obects.
+
+Circular1 uses 5000 objects of 100 bytes (or so) apiece
+in chains of 5 objects apiece in a singly-linked list.
+
+Circular2 uses 10000 objects of 1000 bytes (or so) apiece
+in chains of 100 objects apiece.
+
+Circular3 is the same as Circular1, but uses a local
+Random Number Generator to access the arrays in a non-linear
+way.
+
+Circular4 is the same as Circular2, but uses a local
+Random Number Generator to access the arrays in a non-linear
+way.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/memory/UniThread/Circular1/Circular1.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,90 @@
+/*
+ * Copyright (c) 2002, 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/memory/UniThread/Circular1.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent]
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm gc.memory.UniThread.Circular1.Circular1 -iterations 5
+ */
+
+package gc.memory.UniThread.Circular1;
+
+import nsk.share.gc.*;
+import nsk.share.test.Stresser;
+
+/**
+ * Test GC collection of circular linked lists.
+ *
+ * This test simply creates a series of circulary
+ * linked memory objects which should be able to be
+ * GC'd.
+ *
+ * In this test the size of one object is small, the number
+ * of objects in one list is small and the number
+ * of lists is large.
+ */
+public class Circular1 extends GCTestBase {
+        private int arraySize;
+        private int objectSize;
+        private int circularitySize;
+        private MemoryObject memoryArray[];
+
+        public Circular1() {
+                this(100, 5);
+        }
+
+        public Circular1(int objectSize, int circularitySize) {
+                this.objectSize = objectSize;
+                this.circularitySize = circularitySize;
+        }
+
+        public void run() {
+                arraySize = Memory.getArrayLength(runParams.getTestMemory(), Memory.getListSize(circularitySize, objectSize));
+                Stresser stresser = new Stresser(runParams.getStressOptions());
+                log.debug("Array size: " + arraySize);
+                memoryArray = new MemoryObject[arraySize];
+                stresser.start(runParams.getIterations());
+                try {
+                        while (stresser.iteration()) {
+                                log.debug(Runtime.getRuntime().freeMemory());
+                                for (int i = 0; i < arraySize && stresser.continueExecution(); i ++)
+                                        memoryArray[i] = Memory.makeCircularList(circularitySize, objectSize);
+                        }
+                } finally {
+                        stresser.finish();
+                }
+                System.out.println("Test passed.");
+        }
+
+        public static void main(String args[]) {
+                GC.runTest(new Circular1(), args);
+        }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/memory/UniThread/Circular1/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/memory/UniThread/Circular2/Circular2.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,60 @@
+/*
+ * Copyright (c) 2002, 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/memory/UniThread/Circular2.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent]
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm gc.memory.UniThread.Circular2.Circular2 -iterations 5
+ */
+
+package gc.memory.UniThread.Circular2;
+
+import nsk.share.gc.*;
+import gc.memory.UniThread.Circular1.Circular1;
+
+/**
+ * Test GC collection of circular linked lists.
+ *
+ * This test simply creates a series of circulary
+ * linked memory objects which should be able to be
+ * GC'd.
+ *
+ * In this test the size of one object is medium, the number
+ * of objects in one list is medium and the number
+ * of lists is large.
+ */
+public class Circular2 {
+        public static void main(String args[]) {
+                int circularitySize = 100;
+                int objectSize = 10000;
+                GC.runTest(new Circular1(objectSize, circularitySize), args);
+        }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/memory/UniThread/Circular2/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/memory/UniThread/Circular3/Circular3.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,92 @@
+/*
+ * Copyright (c) 2002, 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/memory/UniThread/Circular3.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent]
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm gc.memory.UniThread.Circular3.Circular3 -iterations 5
+ */
+
+package gc.memory.UniThread.Circular3;
+
+import nsk.share.test.*;
+import nsk.share.gc.*;
+
+/**
+ * Test GC collection of circular linked lists.
+ *
+ * This test simply creates a series of circulary
+ * linked memory objects which should be able to be
+ * GC'd.
+ *
+ * In this test the size of one object is small, the number
+ * of objects in one list is small and the number
+ * of lists is large. Also, the order in which references
+ * are cleared is randomized.
+ */
+public class Circular3 extends GCTestBase {
+        private int arraySize;
+        private int objectSize;
+        private int circularitySize;
+        private MemoryObject memoryArray[];
+
+        public Circular3() {
+                this(100, 5);
+        }
+
+        public Circular3(int objectSize, int circularitySize) {
+                this.objectSize = objectSize;
+                this.circularitySize = circularitySize;
+        }
+
+        public void run() {
+                arraySize = Memory.getArrayLength(runParams.getTestMemory(), Memory.getListSize(circularitySize, objectSize));
+                log.debug("Array size: " + arraySize);
+                Stresser stresser = new Stresser(runParams.getStressOptions());
+                memoryArray = new MemoryObject[arraySize];
+                stresser.start(runParams.getIterations());
+                try {
+                        while (stresser.iteration()) {
+                                log.debug(Runtime.getRuntime().freeMemory());
+                                for (int i = 0; i < arraySize && stresser.continueExecution(); i ++) {
+                                        int index = LocalRandom.nextInt(arraySize);
+                                        memoryArray[index] = Memory.makeCircularList(circularitySize, objectSize);
+                                }
+                        }
+                } finally {
+                        stresser.finish();
+                }
+                System.out.println("Test passed.");
+        }
+
+        public static void main(String args[]) {
+                GC.runTest(new Circular3(), args);
+        }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/memory/UniThread/Circular3/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/memory/UniThread/Circular4/Circular4.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,61 @@
+/*
+ * Copyright (c) 2002, 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/memory/UniThread/Circular4.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent]
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm gc.memory.UniThread.Circular4.Circular4 -iterations 5
+ */
+
+package gc.memory.UniThread.Circular4;
+
+import nsk.share.gc.*;
+import gc.memory.UniThread.Circular3.Circular3;
+
+/**
+ * Test GC collection of circular linked lists.
+ *
+ * This test simply creates a series of circulary
+ * linked memory objects which should be able to be
+ * GC'd.
+ *
+ * In this test the size of one object is medium, the number
+ * of objects in one list is medium and the number
+ * of lists is large. Also, the order in which references
+ * are cleared is randomized.
+ */
+
+public class Circular4 {
+        public static void main(String args[]) {
+                int circularitySize = 100;
+                int objectSize = 10000;
+                GC.runTest(new Circular3(objectSize, circularitySize), args);
+        }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/memory/UniThread/Circular4/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/memory/UniThread/Linear.README	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,41 @@
+Copyright (c) 2002, 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.
+
+The Unithread Linear tests are pretty basic.
+The main program allocates an array of objects and
+the generates a linked list from them.
+     A->B->C->D
+The list is then removed from the array
+as more objects are allocated. The lists
+should be garbage collected to make room for the new
+obects.
+
+Linear1 uses 5000 objects of 100 bytes (or so) apiece
+in chains of 5 objects apiece in a singly-linked list.o
+
+Linear2 uses 10000 objects of 1000 bytes (or so) apiece
+in chains of 100 objects apiece.
+
+Linear3 is the same as Linear1 but uses a local random number
+generator to access the arrays in a non-linear way;
+
+Linear4 is the same as Linear2 but uses a local random number
+generator to access the arrays in a non-linear way;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/memory/UniThread/Linear1/Linear1.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,91 @@
+/*
+ * Copyright (c) 2002, 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/memory/UniThread/Linear1.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent]
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm gc.memory.UniThread.Linear1.Linear1 -iterations 5
+ */
+
+package gc.memory.UniThread.Linear1;
+
+import nsk.share.test.*;
+import nsk.share.gc.*;
+
+/**
+ * Test GC collection of linked lists.
+ *
+ * The test simply creates a series of singly
+ * linked memory objects which should be able to be
+ * GC'd.
+ *
+ * In this test the size of one object is small, the number
+ * of objects in one list is relatively small and the number
+ * of lists is large.
+ */
+public class Linear1 extends GCTestBase {
+        private int arraySize;
+        private int objectSize;
+        private int circularitySize;
+        private MemoryObject memoryArray[];
+
+        public Linear1() {
+                this(100, 5);
+        }
+
+        public Linear1(int objectSize, int circularitySize) {
+                this.objectSize = objectSize;
+                this.circularitySize = circularitySize;
+        }
+
+        public void run() {
+                arraySize = Memory.getArrayLength(runParams.getTestMemory(), Memory.getListSize(circularitySize, objectSize));
+                log.debug("Array size: " + arraySize);
+                Stresser stresser = new Stresser(runParams.getStressOptions());
+                memoryArray = new MemoryObject[arraySize];
+                stresser.start(runParams.getIterations());
+                try {
+                        while (stresser.iteration()) {
+                                log.debug(Runtime.getRuntime().freeMemory());
+                                for (int i = 0; i < arraySize && stresser.continueExecution(); ++i) {
+                                        memoryArray[i] = Memory.makeLinearList(circularitySize, objectSize);
+                                }
+                        }
+                } finally {
+                        stresser.finish();
+                }
+                System.out.println("Test passed.");
+        }
+
+        public static void main(String args[]) {
+                GC.runTest(new Linear1(), args);
+        }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/memory/UniThread/Linear1/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/memory/UniThread/Linear2/Linear2.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,61 @@
+/*
+ * Copyright (c) 2002, 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/memory/UniThread/Linear2.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent]
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm gc.memory.UniThread.Linear2.Linear2 -iterations 5
+ */
+
+package gc.memory.UniThread.Linear2;
+
+import nsk.share.gc.*;
+import gc.memory.UniThread.Linear1.Linear1;
+
+/**
+ * Test GC collection of linked lists.
+ *
+ * This test simply creates a series of singly
+ * linked memory objects which should be able to be
+ * GC'd.
+ *
+ * In this test the size of one object is medium, the number
+ * of objects in one list is medium and the number
+ * of lists is large.
+ */
+
+public class Linear2 {
+        public static void main(String args[]) {
+                int circularitySize = 100;
+                int objectSize = 1000;
+                GC.runTest(new Linear1(objectSize, circularitySize), args);
+        }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/memory/UniThread/Linear2/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/memory/UniThread/Linear3/Linear3.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,92 @@
+/*
+ * Copyright (c) 2002, 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/memory/UniThread/Linear3.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent]
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm gc.memory.UniThread.Linear3.Linear3 -iterations 5
+ */
+
+package gc.memory.UniThread.Linear3;
+
+import nsk.share.test.*;
+import nsk.share.gc.*;
+
+/**
+ * Test GC collection of linked lists.
+ *
+ * This test simply creates a series of singly
+ * linked memory objects which should be able to be
+ * GC'd.
+ *
+ * In this test the size of one object is small, the number
+ * of objects in one list is medium and the number
+ * of lists is large. Also, the order in which references
+ * are cleared is randomized.
+ */
+public class Linear3 extends GCTestBase {
+        private int arraySize;
+        private int objectSize;
+        private int circularitySize;
+        private MemoryObject memoryArray[];
+
+        public Linear3() {
+                this(100, 5);
+        }
+
+        public Linear3(int objectSize, int circularitySize) {
+                this.objectSize = objectSize;
+                this.circularitySize = circularitySize;
+        }
+
+        public void run() {
+                arraySize = Memory.getArrayLength(runParams.getTestMemory(), Memory.getListSize(circularitySize, objectSize));
+                log.debug("Array size: " + arraySize);
+                Stresser stresser = new Stresser(runParams.getStressOptions());
+                memoryArray = new MemoryObject[arraySize];
+                stresser.start(runParams.getIterations());
+                try {
+                        while (stresser.iteration()) {
+                                log.debug(Runtime.getRuntime().freeMemory());
+                                for (int i = 0; i < arraySize && stresser.continueExecution(); i ++) {
+                                        int index = LocalRandom.nextInt(arraySize);
+                                        memoryArray[index] = Memory.makeCircularList(circularitySize, objectSize);
+                                }
+                        }
+                } finally {
+                        stresser.finish();
+                }
+                System.out.println("Test passed.");
+        }
+
+        public static void main(String args[]) {
+                GC.runTest(new Linear3(), args);
+        }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/memory/UniThread/Linear3/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/memory/UniThread/Linear4/Linear4.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,61 @@
+/*
+ * Copyright (c) 2002, 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/memory/UniThread/Linear4.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent]
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm gc.memory.UniThread.Linear4.Linear4 -iterations 5
+ */
+
+package gc.memory.UniThread.Linear4;
+
+import nsk.share.gc.*;
+import gc.memory.UniThread.Linear3.Linear3;
+
+/**
+ * Test GC collection of linked lists.
+ *
+ * This test simply creates a series of singly
+ * linked memory objects which should be able to be
+ * GC'd.
+ *
+ * In this test the size of one object is medium, the number
+ * of objects in one list is relatively small and the number
+ * of lists is large. Also, the order in which references
+ * are cleared is randomized.
+ */
+
+public class Linear4 {
+        public static void main(String args[]) {
+                int circularitySize = 100;
+                int objectSize = 10000;
+                GC.runTest(new Linear3(objectSize, circularitySize), args);
+        }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/memory/UniThread/Linear4/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/vector/CircularListHigh/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/vector/CircularListHigh/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,37 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/vector/CircularListHigh.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent, monitoring]
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm gc.vector.SimpleGC.SimpleGC -ms high -gp circularList(high)
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/vector/CircularListLow/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/vector/CircularListLow/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,37 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/vector/CircularListLow.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent, monitoring]
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm gc.vector.SimpleGC.SimpleGC -ms low -gp circularList(low)
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/vector/DoubleArrayHigh/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/vector/DoubleArrayHigh/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,37 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/vector/DoubleArrayHigh.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent, monitoring]
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm gc.vector.SimpleGC.SimpleGC -ms high -gp doubleArr
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/vector/DoubleArrayLow/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/vector/DoubleArrayLow/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,37 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/vector/DoubleArrayLow.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent, monitoring]
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm gc.vector.SimpleGC.SimpleGC -ms low -gp doubleArr
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/vector/FloatArrayHigh/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/vector/FloatArrayHigh/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,37 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/vector/FloatArrayHigh.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent, monitoring]
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm gc.vector.SimpleGC.SimpleGC -ms low -gp floatArr
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/vector/FloatArrayLow/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/vector/FloatArrayLow/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,37 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/vector/FloatArrayLow.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent, monitoring]
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm gc.vector.SimpleGC.SimpleGC -ms low -gp floatArr
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/vector/LinearListHigh/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/vector/LinearListHigh/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,37 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/vector/LinearListHigh.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent, monitoring]
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm gc.vector.SimpleGC.SimpleGC -ms high -gp linearList(high)
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/vector/LinearListLow/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/vector/LinearListLow/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,37 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/vector/LinearListLow.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent, monitoring]
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm gc.vector.SimpleGC.SimpleGC -ms low -gp linearList(low)
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/vector/NonbranchyTreeHigh/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/vector/NonbranchyTreeHigh/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,37 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/vector/NonbranchyTreeHigh.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent, monitoring]
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm gc.vector.SimpleGC.SimpleGC -ms high -gp nonbranchyTree(high)
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/vector/NonbranchyTreeLow/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/vector/NonbranchyTreeLow/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,37 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/vector/NonbranchyTreeLow.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent, monitoring]
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm gc.vector.SimpleGC.SimpleGC -ms high -gp nonbranchyTree(low)
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/vector/ObjectArrayHigh/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/vector/ObjectArrayHigh/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,37 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/vector/ObjectArrayHigh.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent, monitoring]
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm gc.vector.SimpleGC.SimpleGC -ms low -gp objectArr
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/vector/ObjectArrayLow/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/vector/ObjectArrayLow/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,37 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/vector/ObjectArrayLow.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent, monitoring]
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm gc.vector.SimpleGC.SimpleGC -ms high -gp objectArr
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/vector/Simple.README	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,29 @@
+Copyright (c) 2007, 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.
+
+Simple garbage collection tests test that GC is able to collect simple objects.
+The test executes the following for several iterations: create array of objects,
+then null all references and refill the array with new objects. The test uses
+notions of garbage producer (nsk.share.gc.gp.GarbageProducer) and memory strategy
+(nsk.share.gc.gp.MemoryStrategy) to alter it's behaviour. The tests automatically
+adjust parameters to memory available to JVM as returned by Runtime.maxMemory().
+Tests with "high" memory strategy (*High) create small number of big objects,
+tests with "low" memory strategy (*Low) create huge number of small objects.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/vector/SimpleGC/SimpleGC.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,119 @@
+/*
+ * Copyright (c) 2007, 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase gc/vector/SimpleGC.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent, monitoring]
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm gc.vector.SimpleGC.SimpleGC -ms high
+ */
+
+package gc.vector.SimpleGC;
+
+import nsk.share.gc.GC;
+import nsk.share.gc.GCTestBase;
+import nsk.share.gc.gp.GarbageProducer;
+import nsk.share.gc.gp.GarbageProducerAware;
+import nsk.share.gc.gp.GarbageUtils;
+import nsk.share.gc.gp.MemoryStrategy;
+import nsk.share.gc.gp.MemoryStrategyAware;
+import nsk.share.runner.RunParams;
+import nsk.share.test.Stresser;
+
+/**
+ * Test that fills out a certain amount of memory with objects of a given type.
+ * The test accepts  MemoryStrategy, type of objects and stress options
+ * as command line args.
+ */
+public class SimpleGC extends GCTestBase implements GarbageProducerAware, MemoryStrategyAware {
+
+    private GarbageProducer garbageProducer;
+    private MemoryStrategy memoryStrategy;
+
+    /**
+     * Garbage link.
+     * The field is static to prevent possible compiler optimizations.
+     */
+    public static Object[] array;
+
+    @Override
+    public void run() {
+
+        long memoryAmount = runParams.getTestMemory();
+        long size = GarbageUtils.getArraySize(memoryAmount, memoryStrategy);
+        int length = GarbageUtils.getArrayCount(memoryAmount, memoryStrategy);
+        Object[] garbage = new Object[length];
+        array = garbage;
+        log.info("Memory to fill out: " + memoryAmount);
+        log.info("Array lenght: " + garbage.length);
+        log.info("Object size: " + size);
+        log.info("Garbage producer: " + garbageProducer.getClass().getCanonicalName());
+        log.info("Memory Strategy: " + memoryStrategy);
+        Stresser stresser = new Stresser(runParams.getStressOptions());
+        stresser.start(10 * garbage.length);
+
+        int iteration = 0;
+        try {
+            while (stresser.iteration()) {
+                for (int i = 0; i < garbage.length && stresser.continueExecution(); ++i) {
+                    garbage[i] = garbageProducer.create(size);
+                }
+                for (int i = 0; i < garbage.length; ++i) {
+                    garbage[i] = null;
+                }
+                iteration++;
+                if (iteration % 1000 == 0) {
+                    log.info("  iteration # " + iteration);
+                }
+            }
+        } catch (OutOfMemoryError oom) {
+            // normally that should never be thrown
+            log.info("OutOfMemory after " + iteration + " iterations");
+            throw oom;
+        } finally {
+            stresser.finish();
+        }
+        log.info("Success. Total iterations: " + iteration);
+    }
+
+    @Override
+    public final void setGarbageProducer(GarbageProducer garbageProducer) {
+        this.garbageProducer = garbageProducer;
+    }
+
+    @Override
+    public final void setMemoryStrategy(MemoryStrategy memoryStrategy) {
+        this.memoryStrategy = memoryStrategy;
+    }
+
+    public static void main(String[] args) {
+        RunParams.getInstance().setRunMemDiagThread(true);
+        GC.runTest(new SimpleGC(), args);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/gc/vector/SimpleGC/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/nsk/share/gc/GenClassesBuilder.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,91 @@
+/*
+ * 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
+ * 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 nsk.share.gc;
+
+import jdk.test.lib.JDKToolLauncher;
+import jdk.test.lib.Utils;
+import jdk.test.lib.process.ProcessTools;
+
+import java.io.IOException;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+import java.util.Arrays;
+import java.util.stream.Stream;
+
+/**
+ * Uses {@link nsk.share.gc.Generator} to genearate {@code nsk.share.gc.newclass}
+ * classes and compile them to 'classes' directory.
+ */
+public class GenClassesBuilder {
+    public static void main(String[] args) {
+        Path srcDst = Paths.get(
+                "genSrc",
+                "nsk",
+                "share",
+                "gc",
+                "newclass").toAbsolutePath();
+        Path classesDir = Paths.get("classes").toAbsolutePath();
+        generateSource(srcDst);
+        compileSource(srcDst, classesDir);
+    }
+
+    private static void compileSource(Path srcDst, Path classesDir) {
+        JDKToolLauncher javac = JDKToolLauncher.create("javac")
+                                               .addToolArg("-d")
+                                               .addToolArg(classesDir.toString())
+                                               .addToolArg("-cp")
+                                               .addToolArg(Utils.TEST_CLASS_PATH);
+        try (Stream<Path> stream = Files.walk(srcDst)) {
+            stream.map(Path::toAbsolutePath)
+                  .map(Path::toString)
+                  .filter(s -> s.endsWith(".java"))
+                  .forEach(javac::addToolArg);
+        } catch (IOException e) {
+            throw new Error("traverse source dir " + srcDst, e);
+        }
+        String[] command = javac.getCommand();
+        try {
+            ProcessTools.executeCommand(command)
+                        .shouldHaveExitValue(0);
+        } catch (Error | RuntimeException e) {
+            throw e;
+        } catch (Throwable e) {
+            throw new Error("execution of javac(" + Arrays.toString(command) + ") failed", e);
+        }
+    }
+
+    private static void generateSource(Path dir) {
+        try {
+            Files.createDirectories(dir);
+        } catch (IOException e) {
+            throw new Error("can't create dirs for" + dir, e);
+        }
+        try {
+            Generator.main(new String[]{dir.toString()});
+        } catch (Exception e) {
+            throw new Error("can't generate classes", e);
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/nsk/share/gc/Generator.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,233 @@
+/*
+ * Copyright (c) 2004, 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.
+ */
+
+package nsk.share.gc;
+
+import java.io.*;
+
+/**
+ * <tt>Generator</tt> creates classes that have huge number of fields
+ * (about 65536). All files are generated into a directory that is passed
+ * as a first argument to method <code>main</code> The classes are intended to
+ * be used used by <code>gc/gctests/LargeObjects/large00*</code> tests.
+ * <p>
+ * The class generates:
+ * <ul>
+ * <li> 8 "simple" parent classes that have 65500 fields of 7 primitive
+ *      types and type Object and have just one modifier;
+ * <li> 8 "simple" child classes that extend correspondent parent class and
+ *      have 46 fileds of the same type (total number of fields in the class
+ *      is over the limitation 65535);
+ * <li> 8 "simple" child classes that extend correspondent parent class and
+ *      have 35 fileds of the same type (total number of fields in the class
+ *      is under the limitation 65535);
+ * <li> 5 "combined" parent classes that have 32616 fields of each primitive
+ *      types, type Object, one and two dimensional arrays of each type with
+ *      one modifier;
+ * <li> 5 "combined" child classes that extend correspondent parent class and
+ *      have 33030 fileds (total number of fields in the class is over the
+ *      limitation 65535);
+ * <li> 5 "combined" child classes that extend correspondent parent class and
+ *      have 33018 fileds (total number of fields in the class is under the
+ *      limitation 65535).
+ * </ul>
+ */
+public class Generator {
+
+    // All tested field types
+    private final static String[] TYPES = {"byte", "int", "long", "short",
+                                           "boolean", "double", "float",
+                                           "Object"};
+
+    // All tested field modifiers
+    private final static String[] SIMPLE_MODIFIERS = {"static", "private",
+                                                      "public", "protected",
+                                                      "transient", "volatile",
+                                                      "static", "public"};
+
+    // All tested field modifiers
+    private final static String[] COMBINED_MODIFIERS = {"static", "public",
+                                                       "protected", "transient",
+                                                       "volatile"};
+
+    // Some constants that are used during generaion of each file
+    private final static String EXT = ".java";
+    private final static String PACKAGE = "package nsk.share.gc.newclass;\n";
+    private final static String CLASS_BEGIN = "public class ";
+
+    private final static String PARENT_SUFFIX = "parent";
+    private final static String PARENT_FIELD_PREFIX = "p";
+    private final static int SIMPLE_PARENT_FIELDS_NUM = 65500;
+    private final static int COMBINED_PARENT_FIELDS_NUM = 32616;
+
+    private final static String FIELD_NAME = "f";
+
+    private final static String LCHILD_SUFFIX = "lchild";
+    private final static int SIMPLE_LCHILD_FIELDS_NUM = 46;
+    private final static int COMBINED_LCHILD_FIELDS_NUM = 33030;
+
+    private final static String SCHILD_SUFFIX = "schild";
+    private final static int SIMPLE_SCHILD_FIELDS_NUM = 35;
+    private final static int COMBINED_SCHILD_FIELDS_NUM = 33018;
+
+    /**
+     * Default constructor.
+     *
+     */
+    public Generator() {}
+
+    /**
+     * Generates classes.
+     *
+     * @param argv array of arguments passed to the class.
+     *
+     * @throws <tt>FileNotFoundException</tt> if directory that.is passed as
+     * the first argument does not exist.
+     *
+     */
+    public static void main(String[] argv) throws FileNotFoundException {
+
+        // Generate classes that have fields of one type and with one
+        // modifier
+        for (int i = 0; i < SIMPLE_MODIFIERS.length; i++)
+            generateSimple(System.out, argv[0], TYPES[i], SIMPLE_MODIFIERS[i]);
+
+        // Generate classes that have fields of different types with one
+        // modifier
+        for (int i = 0; i < COMBINED_MODIFIERS.length; i++)
+            generateCombined(System.out, argv[0], COMBINED_MODIFIERS[i]);
+    }
+
+    // Generate classes that have fields of one type and with one modifier
+    private static void generateSimple(PrintStream out, String dir, String type,
+                                 String modifier) throws FileNotFoundException {
+
+        // Generate parent class
+        String parentName = modifier + "_" + type + "_" + PARENT_SUFFIX;
+        try (PrintWriter pw = getPrintWriter(dir, parentName + EXT)) {
+
+            pw.println(PACKAGE);
+            pw.println(CLASS_BEGIN + parentName + " {");
+
+            // Even if "private" modifier is tested, parent class must have "public"
+            // fields, so that child class could have access to them
+            String m = modifier;
+            if (modifier.equals("private"))
+                m = "public";
+            for (int i = 0; i < SIMPLE_PARENT_FIELDS_NUM; i++)
+                pw.println(m + " " + type + " "
+                         + PARENT_FIELD_PREFIX + FIELD_NAME + (i + 1) + ";");
+            pw.println("public Object objP = null;");
+            pw.println("}");
+        }
+
+        // Generate two children that extend the parent
+        generateSimpleChild(modifier + "_" + type + "_" + LCHILD_SUFFIX,
+                            type, modifier, dir, parentName,
+                            SIMPLE_LCHILD_FIELDS_NUM);
+        generateSimpleChild(modifier + "_" + type + "_" + SCHILD_SUFFIX,
+                            type, modifier, dir, parentName,
+                            SIMPLE_SCHILD_FIELDS_NUM);
+    }
+
+    // Generate a child that extends specified parent class
+    private static void generateSimpleChild(String className, String type,
+                                            String modifier, String dir,
+                                            String parentName, int num)
+                                                  throws FileNotFoundException {
+        try (PrintWriter pw = getPrintWriter(dir, className + EXT)) {
+
+            pw.println(PACKAGE);
+            pw.println(CLASS_BEGIN + className + " extends " + parentName + " {");
+            for (int i = 0; i < num; i++)
+                pw.println(modifier + " " + type + " " + FIELD_NAME + (i + 1)
+                         + ";");
+            pw.println("public Object objC = null;");
+            pw.println("}");
+        }
+    }
+
+    // Generate classes that have fields of different types with one modifier
+    private static void generateCombined(PrintStream out, String dir,
+                                 String modifier) throws FileNotFoundException {
+
+        // Generate parent class
+        String parentName = modifier + "_combination_" + PARENT_SUFFIX;
+        try (PrintWriter pw = getPrintWriter(dir, parentName + EXT)){
+
+            pw.println(PACKAGE);
+            pw.println(CLASS_BEGIN + parentName + " {");
+            String pattern = PARENT_FIELD_PREFIX + FIELD_NAME;
+            for (int i = 0; i < COMBINED_PARENT_FIELDS_NUM; ) {
+                for (int j = 0; j < TYPES.length; j++) {
+                    pw.println(modifier + " " + TYPES[j] + " "
+                             + pattern + (i + 1) + ", "
+                             + pattern + (i + 2) + "[], "
+                             + pattern + (i + 3) + "[][];");
+                    i = i + 3;
+                }
+            }
+            pw.println("public Object objP = null;");
+            pw.println("}");
+        }
+
+        // Generate two children that extend the parent
+        generateCombinedChild(modifier + "_combination_" + LCHILD_SUFFIX,
+                              modifier, dir, parentName,
+                              COMBINED_LCHILD_FIELDS_NUM);
+        generateCombinedChild(modifier + "_combination_" + SCHILD_SUFFIX,
+                              modifier, dir, parentName,
+                              COMBINED_SCHILD_FIELDS_NUM);
+    }
+
+    // Generate a child that extends specified parent class
+    private static void generateCombinedChild(String className, String modifier,
+                                              String dir, String parentName,
+                                              int num)
+                                                  throws FileNotFoundException {
+        try (PrintWriter pw = getPrintWriter(dir, className + EXT)) {
+
+            pw.println(PACKAGE);
+            pw.println(CLASS_BEGIN + className + " extends " + parentName + " {");
+            for (int i = 0; i < num; )
+                for (int j = 0; j < TYPES.length; j++) {
+                    pw.println(modifier + " " + TYPES[j] + " "
+                             + FIELD_NAME + (i + 1) + ", "
+                             + FIELD_NAME + (i + 2) + "[], "
+                             + FIELD_NAME + (i + 3) + "[][];");
+                    i = i + 3;
+                    if (i >= num)
+                        break;
+                }
+            pw.println("public Object objC = null;");
+            pw.println("}");
+        }
+    }
+
+    // Create a new PrintWriter
+    private static PrintWriter getPrintWriter(String dir, String name)
+                                                  throws FileNotFoundException {
+        FileOutputStream stream = new FileOutputStream(new File(dir, name));
+        return new PrintWriter(stream, true);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/nsk/share/gc/lock/jni/libBooleanArrayCriticalLocker.c	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,26 @@
+/*
+ * 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
+ * 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 "BooleanArrayCriticalLocker.c"
+#include "jni_tools.c"
+#include "nsk_tools.c"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/nsk/share/gc/lock/jni/libByteArrayCriticalLocker.c	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,26 @@
+/*
+ * 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
+ * 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 "ByteArrayCriticalLocker.c"
+#include "jni_tools.c"
+#include "nsk_tools.c"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/nsk/share/gc/lock/jni/libCharArrayCriticalLocker.c	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,26 @@
+/*
+ * 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
+ * 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 "CharArrayCriticalLocker.c"
+#include "jni_tools.c"
+#include "nsk_tools.c"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/nsk/share/gc/lock/jni/libDoubleArrayCriticalLocker.c	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,26 @@
+/*
+ * 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
+ * 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 "DoubleArrayCriticalLocker.c"
+#include "jni_tools.c"
+#include "nsk_tools.c"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/nsk/share/gc/lock/jni/libFloatArrayCriticalLocker.c	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,26 @@
+/*
+ * 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
+ * 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 "FloatArrayCriticalLocker.c"
+#include "jni_tools.c"
+#include "nsk_tools.c"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/nsk/share/gc/lock/jni/libIntArrayCriticalLocker.c	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,26 @@
+/*
+ * 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
+ * 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 "IntArrayCriticalLocker.c"
+#include "jni_tools.c"
+#include "nsk_tools.c"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/nsk/share/gc/lock/jni/libLongArrayCriticalLocker.c	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,26 @@
+/*
+ * 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
+ * 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 "LongArrayCriticalLocker.c"
+#include "jni_tools.c"
+#include "nsk_tools.c"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/nsk/share/gc/lock/jni/libShortArrayCriticalLocker.c	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,26 @@
+/*
+ * 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
+ * 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 "ShortArrayCriticalLocker.c"
+#include "jni_tools.c"
+#include "nsk_tools.c"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/nsk/share/gc/lock/jni/libStringCriticalLocker.c	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,26 @@
+/*
+ * 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
+ * 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 "StringCriticalLocker.c"
+#include "jni_tools.c"
+#include "nsk_tools.c"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/nsk/share/gc/lock/jniref/libJNIGlobalRefLocker.c	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,26 @@
+/*
+ * 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
+ * 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 "JNIGlobalRefLocker.c"
+#include "jni_tools.c"
+#include "nsk_tools.c"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/nsk/share/gc/lock/jniref/libJNILocalRefLocker.c	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,26 @@
+/*
+ * 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
+ * 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 "JNILocalRefLocker.c"
+#include "jni_tools.c"
+#include "nsk_tools.c"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/nsk/share/gc/lock/jniref/libJNIRefLocker.c	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,26 @@
+/*
+ * 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
+ * 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 "JNIRefLocker.c"
+#include "jni_tools.c"
+#include "nsk_tools.c"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/nsk/share/gc/lock/jniref/libJNIWeakGlobalRefLocker.c	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,26 @@
+/*
+ * 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
+ * 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 "JNIWeakGlobalRefLocker.c"
+#include "jni_tools.c"
+#include "nsk_tools.c"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/nsk/share/gc/lock/jvmti/libJVMTIAllocLocker.c	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,26 @@
+/*
+ * 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
+ * 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 "JVMTIAllocLocker.c"
+#include "jni_tools.c"
+#include "nsk_tools.c"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/nsk/share/gc/lock/malloc/libMallocLocker.c	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,26 @@
+/*
+ * 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
+ * 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 "MallocLocker.c"
+#include "jni_tools.c"
+#include "nsk_tools.c"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/vm/gc/compact/Compact.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,127 @@
+/*
+ * Copyright (c) 2007, 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.
+ */
+package vm.gc.compact;
+
+import java.util.*;
+
+import java.util.concurrent.atomic.AtomicInteger;
+import nsk.share.test.*;
+import nsk.share.gc.*;
+import nsk.share.gc.gp.*;
+
+/**
+ * Test garbage collector compaction.
+ *
+ * The test starts several threads which create objects using
+ * given garbage producer until OOM. The references are kept
+ * in an array. The references to even elements are cleared
+ * and objects of larger size are created until OOM. The garbage
+ * collector will have to compact free space to free memory for
+ * new objects.
+ *
+ * The size of the second half of created objects could be set explictly.
+ *
+ * This process is repeated.
+ */
+public class Compact extends ThreadedGCTest implements GarbageProducerAware, GarbageProducer1Aware, MemoryStrategyAware {
+
+    private GarbageProducer garbageProducer;
+    private GarbageProducer garbageProducer1;
+    private MemoryStrategy memoryStrategy;
+    private long size;
+    private long size2;
+    private static long customSize = 0;
+    static AtomicInteger allocations = new AtomicInteger();
+
+    private class Worker implements Runnable {
+
+        private List<Object> bricks;
+        private ExecutionController stresser;
+
+        public void run() {
+            if (stresser == null) {
+                stresser = getExecutionController();
+            }
+            try {
+                bricks = new ArrayList<Object>();
+                while (stresser.continueExecution()) {
+                    bricks.add(garbageProducer.create(size));
+                }
+            } catch (OutOfMemoryError e) {
+            }
+            if (bricks == null) {
+                return;
+            }
+            int count = bricks.size();
+            for (int i = 0; stresser.continueExecution() && i < count; i += 2) {
+                bricks.set(i, null);
+            }
+            try {
+                for (int i = 0; stresser.continueExecution() && i < count; i += 2) {
+                    bricks.set(i, garbageProducer1.create(size2));
+                    allocations.incrementAndGet();
+                }
+            } catch (OutOfMemoryError e) {
+            }
+            bricks = null;
+        }
+    }
+
+    public Runnable createRunnable(int i) {
+        return new Worker();
+    }
+
+    public void run() {
+        size = memoryStrategy.getSize(runParams.getTestMemory());
+        size2 = customSize == 0
+                ? size2 = size * 2
+                : customSize;
+        super.run();
+    }
+
+    public final void setGarbageProducer(GarbageProducer garbageProducer) {
+        this.garbageProducer = garbageProducer;
+    }
+
+    public final void setGarbageProducer1(GarbageProducer garbageProducer1) {
+        this.garbageProducer1 = garbageProducer1;
+    }
+
+    public final void setMemoryStrategy(MemoryStrategy memoryStrategy) {
+        this.memoryStrategy = memoryStrategy;
+    }
+
+    static void setHumongousSizeFromParams(String[] args) {
+        for (int i = 0; i < args.length; ++i) {
+            if (args[i].equals("-size2")) {
+                customSize = Long.parseLong(args[i + 1]);
+                return;
+            }
+        }
+    }
+
+    public static void main(String[] args) {
+        setHumongousSizeFromParams(args);
+        GC.runTest(new Compact(), args);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/vm/gc/compact/Compact_Arrays/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/vm/gc/compact/Compact_Arrays/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,47 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase vm/gc/compact/Compact_Arrays.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent, quick]
+ * VM Testbase readme:
+ * Refer to vm/gc/compact/README for more information about the test.
+ * The source for the test can be found in vm/gc/compact/Compact.java.
+ * This testcase uses random arrays for both first and second phases
+ * and multiple threads.
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm
+ *      -XX:-UseGCOverheadLimit
+ *      vm.gc.compact.Compact
+ *      -gp random(arrays)
+ *      -gp1 random(arrays)
+ *      -ms high
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/vm/gc/compact/Compact_Arrays1/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/vm/gc/compact/Compact_Arrays1/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,48 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase vm/gc/compact/Compact_Arrays1.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent]
+ * VM Testbase readme:
+ * Refer to vm/gc/compact/README for more information about the test.
+ * The source for the test can be found in vm/gc/compact/Compact.java.
+ * This testcase uses random arrays for both first and second phases
+ * and single thread.
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm
+ *      -XX:-UseGCOverheadLimit
+ *      vm.gc.compact.Compact
+ *      -t 1
+ *      -gp random(arrays)
+ *      -gp1 random(arrays)
+ *      -ms high
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/vm/gc/compact/Compact_Arrays_ArrayOf/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/vm/gc/compact/Compact_Arrays_ArrayOf/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,47 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase vm/gc/compact/Compact_Arrays_ArrayOf.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent]
+ * VM Testbase readme:
+ * Refer to vm/gc/compact/README for more information about the test.
+ * The source for the test can be found in vm/gc/compact/Compact.java.
+ * This testcase uses random arrays for first phase, array of
+ * random arrays for second phase and multiple threads.
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm
+ *      -XX:-UseGCOverheadLimit
+ *      vm.gc.compact.Compact
+ *      -gp random(arrays)
+ *      -gp1 arrayof(random(arrays))
+ *      -ms high
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/vm/gc/compact/Compact_Arrays_ArrayOf1/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/vm/gc/compact/Compact_Arrays_ArrayOf1/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,48 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase vm/gc/compact/Compact_Arrays_ArrayOf1.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent]
+ * VM Testbase readme:
+ * Refer to vm/gc/compact/README for more information about the test.
+ * The source for the test can be found in vm/gc/compact/Compact.java.
+ * This testcase uses random arrays for first phase, array of
+ * random arrays for second phase and single thread.
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm
+ *      -XX:-UseGCOverheadLimit
+ *      vm.gc.compact.Compact
+ *      -t 1
+ *      -gp random(arrays)
+ *      -gp1 arrayof(random(arrays))
+ *      -ms high
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/vm/gc/compact/Compact_Arrays_TwoFields/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/vm/gc/compact/Compact_Arrays_TwoFields/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,47 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase vm/gc/compact/Compact_Arrays_TwoFields.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent]
+ * VM Testbase readme:
+ * Refer to vm/gc/compact/README for more information about the test.
+ * The source for the test can be found in vm/gc/compact/Compact.java.
+ * This testcase uses random arrays for first phase, object with
+ * two fields of random arrays for second phases and multiple threads.
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm
+ *      -XX:-UseGCOverheadLimit
+ *      vm.gc.compact.Compact
+ *      -gp random(arrays)
+ *      -gp1 twofields(random(arrays))
+ *      -ms high
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/vm/gc/compact/Compact_Arrays_TwoFields1/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/vm/gc/compact/Compact_Arrays_TwoFields1/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,48 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase vm/gc/compact/Compact_Arrays_TwoFields1.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent]
+ * VM Testbase readme:
+ * Refer to vm/gc/compact/README for more information about the test.
+ * The source for the test can be found in vm/gc/compact/Compact.java.
+ * This testcase uses random arrays for first phase, object with
+ * two fields of random arrays for second phases and single thread.
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm
+ *      -XX:-UseGCOverheadLimit
+ *      vm.gc.compact.Compact
+ *      -t 1
+ *      -gp random(arrays)
+ *      -gp1 twofields(random(arrays))
+ *      -ms high
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/vm/gc/compact/Compact_InternedStrings/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/vm/gc/compact/Compact_InternedStrings/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,47 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase vm/gc/compact/Compact_InternedStrings.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent]
+ * VM Testbase readme:
+ * Refer to vm/gc/compact/README for more information about the test.
+ * The source for the test can be found in vm/gc/compact/Compact.java.
+ * This testcase uses interned strings for both first and second phases
+ * and multiple threads.
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm
+ *      -XX:-UseGCOverheadLimit
+ *      vm.gc.compact.Compact
+ *      -gp interned(randomString)
+ *      -gp1 interned(randomString)
+ *      -ms high
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/vm/gc/compact/Compact_InternedStrings1/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/vm/gc/compact/Compact_InternedStrings1/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,48 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase vm/gc/compact/Compact_InternedStrings1.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent]
+ * VM Testbase readme:
+ * Refer to vm/gc/compact/README for more information about the test.
+ * The source for the test can be found in vm/gc/compact/Compact.java.
+ * This testcase uses interned strings for both first and second phases
+ * and single thread.
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm
+ *      -XX:-UseGCOverheadLimit
+ *      vm.gc.compact.Compact
+ *      -t 1
+ *      -gp interned(randomString)
+ *      -gp1 interned(randomString)
+ *      -ms high
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/vm/gc/compact/Compact_InternedStrings_NonbranchyTree/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/vm/gc/compact/Compact_InternedStrings_NonbranchyTree/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,47 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase vm/gc/compact/Compact_InternedStrings_NonbranchyTree.
+ * VM Testbase keywords: [gc, stress, stressopt, feature_perm_removal_jdk7, nonconcurrent]
+ * VM Testbase readme:
+ * Refer to vm/gc/compact/README for more information about the test.
+ * The source for the test can be found in vm/gc/compact/Compact.java.
+ * This testcase uses interned strings for first phase,
+ * random arrays for second phases and multiple threads.
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm
+ *      -XX:-UseGCOverheadLimit
+ *      vm.gc.compact.Compact
+ *      -gp interned(randomString)
+ *      -gp1 nonbranchyTree(high)
+ *      -ms high
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/vm/gc/compact/Compact_InternedStrings_Strings/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/vm/gc/compact/Compact_InternedStrings_Strings/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,47 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase vm/gc/compact/Compact_InternedStrings_Strings.
+ * VM Testbase keywords: [gc, stress, stressopt, feature_perm_removal_jdk7, nonconcurrent, quick]
+ * VM Testbase readme:
+ * Refer to vm/gc/compact/README for more information about the test.
+ * The source for the test can be found in vm/gc/compact/Compact.java.
+ * This testcase uses interned strings for first phase,
+ * random strings for second phases and multiple threads.
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm
+ *      -XX:-UseGCOverheadLimit
+ *      vm.gc.compact.Compact
+ *      -gp interned(randomString)
+ *      -gp1 randomString
+ *      -ms high
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/vm/gc/compact/Compact_NonbranchyTree/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/vm/gc/compact/Compact_NonbranchyTree/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,47 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase vm/gc/compact/Compact_NonbranchyTree.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent]
+ * VM Testbase readme:
+ * Refer to vm/gc/compact/README for more information about the test.
+ * The source for the test can be found in vm/gc/compact/Compact.java.
+ * This testcase uses nonbranchy trees for both first and second phases
+ * and multiple threads.
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm
+ *      -XX:-UseGCOverheadLimit
+ *      vm.gc.compact.Compact
+ *      -gp nonbranchyTree(high)
+ *      -gp1 nonbranchyTree(high)
+ *      -ms high
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/vm/gc/compact/Compact_NonbranchyTree1/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/vm/gc/compact/Compact_NonbranchyTree1/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,48 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase vm/gc/compact/Compact_NonbranchyTree1.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent]
+ * VM Testbase readme:
+ * Refer to vm/gc/compact/README for more information about the test.
+ * The source for the test can be found in vm/gc/compact/Compact.java.
+ * This testcase uses nonbranchy trees for both first and second phases
+ * and single thread.
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm
+ *      -XX:-UseGCOverheadLimit
+ *      vm.gc.compact.Compact
+ *      -t 1
+ *      -gp nonbranchyTree(high)
+ *      -gp1 nonbranchyTree(high)
+ *      -ms high
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/vm/gc/compact/Compact_NonbranchyTree_ArrayOf/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/vm/gc/compact/Compact_NonbranchyTree_ArrayOf/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,47 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase vm/gc/compact/Compact_NonbranchyTree_ArrayOf.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent]
+ * VM Testbase readme:
+ * Refer to vm/gc/compact/README for more information about the test.
+ * The source for the test can be found in vm/gc/compact/Compact.java.
+ * This testcase uses nonbranchy trees for first phase, array of
+ * nonbranchy trees for second phase and multiple threads.
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm
+ *      -XX:-UseGCOverheadLimit
+ *      vm.gc.compact.Compact
+ *      -gp nonbranchyTree(high)
+ *      -gp1 arrayof(nonbranchyTree(high))
+ *      -ms high
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/vm/gc/compact/Compact_NonbranchyTree_ArrayOf1/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/vm/gc/compact/Compact_NonbranchyTree_ArrayOf1/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,48 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase vm/gc/compact/Compact_NonbranchyTree_ArrayOf1.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent]
+ * VM Testbase readme:
+ * Refer to vm/gc/compact/README for more information about the test.
+ * The source for the test can be found in vm/gc/compact/Compact.java.
+ * This testcase uses nonbranchy trees for first phase, array of
+ * nonbranchy trees for second phase and single thread.
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm
+ *      -XX:-UseGCOverheadLimit
+ *      vm.gc.compact.Compact
+ *      -t 1
+ *      -gp nonbranchyTree(high)
+ *      -gp1 arrayof(nonbranchyTree(high))
+ *      -ms high
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/vm/gc/compact/Compact_NonbranchyTree_TwoFields/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/vm/gc/compact/Compact_NonbranchyTree_TwoFields/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,47 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase vm/gc/compact/Compact_NonbranchyTree_TwoFields.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent]
+ * VM Testbase readme:
+ * Refer to vm/gc/compact/README for more information about the test.
+ * The source for the test can be found in vm/gc/compact/Compact.java.
+ * This testcase uses nonbranchy trees for first phase, object with
+ * two fields of nonbranchy trees for second phases and multiple threads.
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm
+ *      -XX:-UseGCOverheadLimit
+ *      vm.gc.compact.Compact
+ *      -gp nonbranchyTree(high)
+ *      -gp1 twofields(nonbranchyTree(high))
+ *      -ms high
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/vm/gc/compact/Compact_NonbranchyTree_TwoFields1/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/vm/gc/compact/Compact_NonbranchyTree_TwoFields1/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,48 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase vm/gc/compact/Compact_NonbranchyTree_TwoFields1.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent]
+ * VM Testbase readme:
+ * Refer to vm/gc/compact/README for more information about the test.
+ * The source for the test can be found in vm/gc/compact/Compact.java.
+ * This testcase uses nonbranchy trees for first phase, object with
+ * two fields of nonbranchy trees for second phases and single thread.
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm
+ *      -XX:-UseGCOverheadLimit
+ *      vm.gc.compact.Compact
+ *      -t 1
+ *      -gp nonbranchyTree(high)
+ *      -gp1 twofields(nonbranchyTree(high))
+ *      -ms high
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/vm/gc/compact/Compact_Strings/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/vm/gc/compact/Compact_Strings/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,47 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase vm/gc/compact/Compact_Strings.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent]
+ * VM Testbase readme:
+ * Refer to vm/gc/compact/README for more information about the test.
+ * The source for the test can be found in vm/gc/compact/Compact.java.
+ * This testcase uses random strings for both first and second phases
+ * and multiple threads.
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm
+ *      -XX:-UseGCOverheadLimit
+ *      vm.gc.compact.Compact
+ *      -gp randomString
+ *      -gp1 randomString
+ *      -ms high
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/vm/gc/compact/Compact_Strings1/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/vm/gc/compact/Compact_Strings1/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,48 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase vm/gc/compact/Compact_Strings1.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent]
+ * VM Testbase readme:
+ * Refer to vm/gc/compact/README for more information about the test.
+ * The source for the test can be found in vm/gc/compact/Compact.java.
+ * This testcase uses random strings for both first and second phases
+ * and single thread.
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm
+ *      -XX:-UseGCOverheadLimit
+ *      vm.gc.compact.Compact
+ *      -t 1
+ *      -gp randomString
+ *      -gp1 randomString
+ *      -ms high
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/vm/gc/compact/Compact_Strings_ArrayOf/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/vm/gc/compact/Compact_Strings_ArrayOf/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,47 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase vm/gc/compact/Compact_Strings_ArrayOf.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent]
+ * VM Testbase readme:
+ * Refer to vm/gc/compact/README for more information about the test.
+ * The source for the test can be found in vm/gc/compact/Compact.java.
+ * This testcase uses random strings for first phase, array of
+ * random strings for second phase and multiple threads.
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm
+ *      -XX:-UseGCOverheadLimit
+ *      vm.gc.compact.Compact
+ *      -gp randomString
+ *      -gp1 arrayof(randomString)
+ *      -ms high
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/vm/gc/compact/Compact_Strings_ArrayOf1/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/vm/gc/compact/Compact_Strings_ArrayOf1/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,48 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase vm/gc/compact/Compact_Strings_ArrayOf1.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent]
+ * VM Testbase readme:
+ * Refer to vm/gc/compact/README for more information about the test.
+ * The source for the test can be found in vm/gc/compact/Compact.java.
+ * This testcase uses random strings for first phase, array of
+ * random strings for second phase and single thread.
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm
+ *      -XX:-UseGCOverheadLimit
+ *      vm.gc.compact.Compact
+ *      -t 1
+ *      -gp randomString
+ *      -gp1 arrayof(randomString)
+ *      -ms high
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/vm/gc/compact/Compact_Strings_InternedStrings/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/vm/gc/compact/Compact_Strings_InternedStrings/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,47 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase vm/gc/compact/Compact_Strings_InternedStrings.
+ * VM Testbase keywords: [gc, stress, stressopt, feature_perm_removal_jdk7, nonconcurrent]
+ * VM Testbase readme:
+ * Refer to vm/gc/compact/README for more information about the test.
+ * The source for the test can be found in vm/gc/compact/Compact.java.
+ * This testcase uses  strings for first phase,
+ * interned strings for second phases and multiple threads.
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm
+ *      -XX:-UseGCOverheadLimit
+ *      vm.gc.compact.Compact
+ *      -gp randomString
+ *      -gp1 interned(randomString)
+ *      -ms high
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/vm/gc/compact/Compact_Strings_TwoFields/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/vm/gc/compact/Compact_Strings_TwoFields/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,47 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase vm/gc/compact/Compact_Strings_TwoFields.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent, quick]
+ * VM Testbase readme:
+ * Refer to vm/gc/compact/README for more information about the test.
+ * The source for the test can be found in vm/gc/compact/Compact.java.
+ * This testcase uses random strings for first phase, object with
+ * two fields of random strings and multiple threads.
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm
+ *      -XX:-UseGCOverheadLimit
+ *      vm.gc.compact.Compact
+ *      -gp randomString
+ *      -gp1 twofields(randomString)
+ *      -ms high
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/vm/gc/compact/Compact_Strings_TwoFields1/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/vm/gc/compact/Compact_Strings_TwoFields1/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,48 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase vm/gc/compact/Compact_Strings_TwoFields1.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent, quick]
+ * VM Testbase readme:
+ * Refer to vm/gc/compact/README for more information about the test.
+ * The source for the test can be found in vm/gc/compact/Compact.java.
+ * This testcase uses random strings for first phase, object with
+ * two fields of random strings and single thread.
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm
+ *      -XX:-UseGCOverheadLimit
+ *      vm.gc.compact.Compact
+ *      -t 1
+ *      -gp randomString
+ *      -gp1 twofields(randomString)
+ *      -ms high
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/vm/gc/compact/Compact_TwoFields_InternedStrings/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/vm/gc/compact/Compact_TwoFields_InternedStrings/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,47 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase vm/gc/compact/Compact_TwoFields_InternedStrings.
+ * VM Testbase keywords: [gc, stress, stressopt, feature_perm_removal_jdk7, nonconcurrent]
+ * VM Testbase readme:
+ * Refer to vm/gc/compact/README for more information about the test.
+ * The source for the test can be found in vm/gc/compact/Compact.java.
+ * This testcase uses interned strings for first phase, object with
+ * two fields of random arrays for second phases and multiple threads.
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm
+ *      -XX:-UseGCOverheadLimit
+ *      vm.gc.compact.Compact
+ *      -gp twofields(random(arrays))
+ *      -gp1 interned(randomString)
+ *      -ms high
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/vm/gc/compact/Humongous_Arrays/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/vm/gc/compact/Humongous_Arrays/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,48 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase vm/gc/compact/Humongous_Arrays.
+ * VM Testbase keywords: [gc, stress, stressopt, feature_g1, nonconcurrent]
+ * VM Testbase readme:
+ * Refer to vm/gc/compact/README for more information about the test.
+ * The source for the test can be found in vm/gc/compact/Compact.java.
+ * This testcase uses random arrays for both first and second phases
+ * and multiple threads.
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm
+ *      -XX:-UseGCOverheadLimit
+ *      vm.gc.compact.Compact
+ *      -gp random(arrays)
+ *      -gp1 random(arrays)
+ *      -ms high
+ *      -size2 1000000
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/vm/gc/compact/Humongous_Arrays1/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/vm/gc/compact/Humongous_Arrays1/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,49 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase vm/gc/compact/Humongous_Arrays1.
+ * VM Testbase keywords: [gc, stress, stressopt, feature_g1, nonconcurrent]
+ * VM Testbase readme:
+ * Refer to vm/gc/compact/README for more information about the test.
+ * The source for the test can be found in vm/gc/compact/Compact.java.
+ * This testcase uses random arrays for both first and second phases
+ * and single thread.
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm
+ *      -XX:-UseGCOverheadLimit
+ *      vm.gc.compact.Compact
+ *      -t 1
+ *      -gp random(arrays)
+ *      -gp1 random(arrays)
+ *      -ms high
+ *      -size2 1000000
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/vm/gc/compact/Humongous_Arrays5M/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/vm/gc/compact/Humongous_Arrays5M/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,48 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase vm/gc/compact/Humongous_Arrays5M.
+ * VM Testbase keywords: [gc, stress, stressopt, feature_g1, nonconcurrent, quick]
+ * VM Testbase readme:
+ * Refer to vm/gc/compact/README for more information about the test.
+ * The source for the test can be found in vm/gc/compact/Compact.java.
+ * This testcase uses random arrays for both first and second phases
+ * and multiple threads.
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm
+ *      -XX:-UseGCOverheadLimit
+ *      vm.gc.compact.Compact
+ *      -gp random(arrays)
+ *      -gp1 random(arrays)
+ *      -ms high
+ *      -size2 5000000
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/vm/gc/compact/Humongous_InternedStrings/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/vm/gc/compact/Humongous_InternedStrings/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,48 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase vm/gc/compact/Humongous_InternedStrings.
+ * VM Testbase keywords: [gc, stress, stressopt, feature_g1, nonconcurrent]
+ * VM Testbase readme:
+ * Refer to vm/gc/compact/README for more information about the test.
+ * The source for the test can be found in vm/gc/compact/Compact.java.
+ * This testcase uses interned strings for both first and second phases
+ * and multiple threads.
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm
+ *      -XX:-UseGCOverheadLimit
+ *      vm.gc.compact.Compact
+ *      -gp interned(randomString)
+ *      -gp1 random(arrays)
+ *      -ms high
+ *      -size2 1000000
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/vm/gc/compact/Humongous_InternedStrings1/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/vm/gc/compact/Humongous_InternedStrings1/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,49 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase vm/gc/compact/Humongous_InternedStrings1.
+ * VM Testbase keywords: [gc, stress, stressopt, feature_g1, nonconcurrent]
+ * VM Testbase readme:
+ * Refer to vm/gc/compact/README for more information about the test.
+ * The source for the test can be found in vm/gc/compact/Compact.java.
+ * This testcase uses interned strings for both first and second phases
+ * and single thread.
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm
+ *      -XX:-UseGCOverheadLimit
+ *      vm.gc.compact.Compact
+ *      -t 1
+ *      -gp interned(randomString)
+ *      -gp1 random(arrays)
+ *      -ms high
+ *      -size2 1000000
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/vm/gc/compact/Humongous_NonbranchyTree/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/vm/gc/compact/Humongous_NonbranchyTree/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,48 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase vm/gc/compact/Humongous_NonbranchyTree.
+ * VM Testbase keywords: [gc, stress, stressopt, feature_g1, nonconcurrent, quick]
+ * VM Testbase readme:
+ * Refer to vm/gc/compact/README for more information about the test.
+ * The source for the test can be found in vm/gc/compact/Compact.java.
+ * This testcase uses nonbranchy trees for both first and second phases
+ * and multiple threads.
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm
+ *      -XX:-UseGCOverheadLimit
+ *      vm.gc.compact.Compact
+ *      -gp nonbranchyTree(high)
+ *      -gp1 random(arrays)
+ *      -ms high
+ *      -size2 1000000
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/vm/gc/compact/Humongous_NonbranchyTree1/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/vm/gc/compact/Humongous_NonbranchyTree1/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,49 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase vm/gc/compact/Humongous_NonbranchyTree1.
+ * VM Testbase keywords: [gc, stress, stressopt, feature_g1, nonconcurrent]
+ * VM Testbase readme:
+ * Refer to vm/gc/compact/README for more information about the test.
+ * The source for the test can be found in vm/gc/compact/Compact.java.
+ * This testcase uses nonbranchy trees for both first and second phases
+ * and single thread.
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm
+ *      -XX:-UseGCOverheadLimit
+ *      vm.gc.compact.Compact
+ *      -t 1
+ *      -gp nonbranchyTree(high)
+ *      -gp1 random(arrays)
+ *      -ms high
+ *      -size2 1000000
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/vm/gc/compact/Humongous_NonbranchyTree5M/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/vm/gc/compact/Humongous_NonbranchyTree5M/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,48 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase vm/gc/compact/Humongous_NonbranchyTree5M.
+ * VM Testbase keywords: [gc, stress, stressopt, feature_g1, nonconcurrent]
+ * VM Testbase readme:
+ * Refer to vm/gc/compact/README for more information about the test.
+ * The source for the test can be found in vm/gc/compact/Compact.java.
+ * This testcase uses nonbranchy trees for both first and second phases
+ * and multiple threads.
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm
+ *      -XX:-UseGCOverheadLimit
+ *      vm.gc.compact.Compact
+ *      -gp nonbranchyTree(high)
+ *      -gp1 random(arrays)
+ *      -ms high
+ *      -size2 1000000
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/vm/gc/compact/Humongous_Strings/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/vm/gc/compact/Humongous_Strings/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,48 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase vm/gc/compact/Humongous_Strings.
+ * VM Testbase keywords: [gc, stress, stressopt, feature_g1, nonconcurrent]
+ * VM Testbase readme:
+ * Refer to vm/gc/compact/README for more information about the test.
+ * The source for the test can be found in vm/gc/compact/Compact.java.
+ * This testcase uses random strings for both first and second phases
+ * and multiple threads.
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm
+ *      -XX:-UseGCOverheadLimit
+ *      vm.gc.compact.Compact
+ *      -gp randomString
+ *      -gp1 random(arrays)
+ *      -ms high
+ *      -size2 1000000
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/vm/gc/compact/Humongous_Strings1/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/vm/gc/compact/Humongous_Strings1/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,49 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase vm/gc/compact/Humongous_Strings1.
+ * VM Testbase keywords: [gc, stress, stressopt, feature_g1, nonconcurrent]
+ * VM Testbase readme:
+ * Refer to vm/gc/compact/README for more information about the test.
+ * The source for the test can be found in vm/gc/compact/Compact.java.
+ * This testcase uses random strings for both first and second phases
+ * and single thread.
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm
+ *      -XX:-UseGCOverheadLimit
+ *      vm.gc.compact.Compact
+ *      -t 1
+ *      -gp randomString
+ *      -gp1 random(arrays)
+ *      -ms high
+ *      -size2 1000000
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/vm/gc/compact/README	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,46 @@
+Copyright (c) 2007, 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 garbage collector compaction.
+
+The test starts several threads which create objects using
+given garbage producer until OOM. The references are kept
+in an array. The references to even elements are cleared
+and objects of double size are created until OOM. The garbage
+collector will have to compact free space to free memory for
+new objects.
+
+The tests differ by object types used for first and second phase:
+- _Arrays tests randomly use arrays of basic types and Object[] arrays.
+- _Strings tests use random strings.
+- _NonbranchyTree tests use nonbranchy trees.
+- _InternedStrings use interned strings.
+- _ArrayOf tests use array with two elements for second phase,
+the elements of which point to objects of same type.
+- _TwoFields tests use object with two fields for second phase,
+which point to objects of same type.
+
+Each *1 test is the single-threaded version of corresponding test.
+
+The Humongous tests are similar to compact tests. However they used
+the fixed size of objects which allocation requre compaction. The
+size is specific for G1 GC (about 1M and 5M) and require humongous
+object creation in G1.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/vm/gc/concurrent/Concurrent.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,442 @@
+/*
+ * Copyright (c) 2010, 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.
+ */
+package vm.gc.concurrent;
+
+import java.lang.management.ManagementFactory;
+import java.lang.management.MemoryMXBean;
+import java.lang.management.MemoryUsage;
+import java.util.Random;
+import java.util.concurrent.atomic.AtomicInteger;
+import java.util.concurrent.locks.Lock;
+import java.util.concurrent.locks.ReentrantLock;
+import nsk.share.TestFailure;
+import nsk.share.gc.GC;
+import nsk.share.gc.Memory;
+import nsk.share.gc.ThreadedGCTest;
+import nsk.share.gc.gp.GarbageProducer;
+import nsk.share.gc.gp.GarbageProducer1Aware;
+import nsk.share.gc.gp.GarbageProducerAware;
+import nsk.share.gc.gp.MemoryStrategy;
+import nsk.share.gc.gp.MemoryStrategyAware;
+import nsk.share.gc.tree.*;
+import nsk.share.log.Log;
+import nsk.share.test.ExecutionController;
+
+
+class Forest {
+
+    // the actual size of TreeNode in bytes in the memory calculated as occupied memory / count of nodes
+    static int nodeSize;
+
+    static long treeSize;
+
+    private static long allNodesCount;
+
+    /* log from test */
+    static Log log;
+
+
+    static int treeHeight;
+
+    static long actuallyMut = 0;
+    private static Forest instance = new Forest();
+    private Tree[] trees;
+    private Lock[] locks;
+    private static Random rnd = new Random();
+
+    private int nodeGarbageSize;
+
+    private GarbageProducer gp;
+    /*
+     * Create array of trees occupyng given percent of heap
+     */
+    static Forest createForest(long percent, int heightToSizeRatio, int nodeGarbageSize, GarbageProducer gp, Log _log) {
+        log = _log;
+
+        long size = Runtime.getRuntime().maxMemory() * percent / 100;
+        treeHeight = Memory.balancedTreeHeightFromMemory(size, (int) new TreeNode(nodeGarbageSize).getTotalSize());
+        int ntrees = 0;
+        while (treeHeight * heightToSizeRatio > ntrees) {
+            ntrees++;
+            treeHeight = Memory.balancedTreeHeightFromMemory(size / ntrees, (int) new TreeNode(nodeGarbageSize).getTotalSize());
+        }
+
+        log.debug("The expected forest paramteres: tree height = " + treeHeight  + " number of trees = " + ntrees
+                + " size = " +  new TreeNode(nodeGarbageSize).getTotalSize());
+        Tree[] localTrees = new Tree[ntrees * 4];
+        Lock[] localLocks = new Lock[ntrees * 4];
+        for (int i = 0; i < ntrees * 4; i++) {
+            localTrees[i] = new Tree(Memory.makeBalancedTreeNode(treeHeight, nodeGarbageSize, gp));
+            localLocks[i] = new ReentrantLock();
+
+            int numOfAttempts = 0;
+            if (Concurrent.getPercentInfoByMBeans() > percent) {
+                log.debug("Attempt to System.gc() before control check. (" + numOfAttempts++ + ")");
+                System.gc();
+                if (Concurrent.getPercentInfoByMBeans() > percent) {
+                    instance.trees = new Tree[i];
+                    instance.locks = new Lock[i];
+                    for (int j = 0; j < i; j++) {
+                        instance.trees[j] = localTrees[j];
+                        instance.locks[j] = localLocks[j];
+                    }
+                    allNodesCount = Memory.balancedTreeNodes(treeHeight) * instance.trees.length;
+                    nodeSize = (int) (ManagementFactory.getMemoryMXBean().getHeapMemoryUsage().getUsed() / allNodesCount);
+                    treeSize = Memory.balancedTreeSize(treeHeight, nodeSize);
+                    instance.where = new AtomicCycleInteger(instance.trees.length);
+                    instance.nodeGarbageSize = nodeGarbageSize;
+
+                    log.debug("The forest real paramteres: tree height = " + treeHeight  + " number of trees = " + instance.trees.length
+                            + " number of nodes = " + allNodesCount);
+                    log.debug("Approximate node size = " + nodeSize + " calc = " + instance.trees[0].getRoot().getSize());
+                    return instance;
+                }
+            }
+        }
+        throw new TestFailure("Should not reach here. The correct exit point is inside cycle");
+    }
+
+
+    int treesCount() {
+        return trees.length;
+    }
+
+    long nodesCount() {
+        return allNodesCount;
+    }
+
+
+
+    // Confirms that all trees are balanced and have the correct height.
+    void checkTrees() {
+        for (int i = 0; i < trees.length; i++) {
+            locks[i].lock();
+            checkTree(trees[i]);
+            locks[i].unlock();
+        }
+    }
+
+    private static void checkTree(Tree tree) {
+        TreeNode root = tree.getRoot();
+        int h1 = root.getHeight();
+        int h2 = root.getShortestPath();
+        if ((h1 != treeHeight) || (h2 != treeHeight)) {
+            throw new TestFailure("The tree is not balanced expected " + treeHeight
+                    + " value = " + h1 + " shortedtPath = " + h2);
+        }
+    }
+
+    // Swap subtrees in 2 trees, the the path is used
+    // as sequence of 1-0 to select subtree (left-reight sequence)
+    static void swapSubtrees(Tree t1, Tree t2, int depth, int path) {
+        TreeNode tn1 = t1.getRoot();
+        TreeNode tn2 = t2.getRoot();
+        for (int i = 0; i < depth; i++) {
+            if ((path & 1) == 0) {
+                tn1 = tn1.getLeft();
+                tn2 = tn2.getLeft();
+            } else {
+                tn1 = tn1.getRight();
+                tn2 = tn2.getRight();
+            }
+            path >>= 1;
+        }
+        TreeNode tmp;
+        if ((path & 1) == 0) {
+            tmp = tn1.getLeft();
+            tn1.setLeft(tn2.getLeft());
+            tn2.setLeft(tmp);
+        } else {
+            tmp = tn1.getRight();
+            tn1.setRight(tn2.getRight());
+            tn2.setLeft(tmp);
+        }
+    }
+
+
+    // Interchanges two randomly selected subtrees (of same size and depth) several times
+    void swapSubtrees(long count) {
+        for (int i = 0; i < count; i++) {
+            int index1 = rnd.nextInt(trees.length);
+            int index2 = rnd.nextInt(trees.length);
+            int depth = rnd.nextInt(treeHeight);
+            int path = rnd.nextInt();
+            locks[index1].lock();
+            // Skip the round to avoid deadlocks
+            if (locks[index2].tryLock()) {
+                swapSubtrees(trees[index1], trees[index2], depth, path);
+                actuallyMut += 2;
+                locks[index2].unlock();
+            }
+            locks[index1].unlock();
+
+        }
+
+    }
+
+
+    static class AtomicCycleInteger extends AtomicInteger {
+        private int max;
+        public AtomicCycleInteger(int cycleLength) {
+            super();
+            this.max = cycleLength - 1;
+        }
+        public int cycleIncrementAndGet() {
+            for (;;) {
+                int current = get();
+                int next = (current == max ? 0 : current + 1);
+                if (compareAndSet(current, next)) {
+                    return next;
+                }
+            }
+        }
+    }
+
+    // the index in tree array which should be chnaged during next regeneration
+    AtomicCycleInteger where = null;
+
+    // generate new full and partial trees in our forest
+    void regenerateTrees(long nodesCount) {
+        int full = (int) (nodesCount / Memory.balancedTreeNodes(treeHeight)) ;
+        int partial = (int) nodesCount % (Memory.balancedTreeNodes(treeHeight));
+        for (int i = 0; i < full; i++) {
+            int idx = where.cycleIncrementAndGet();
+            locks[idx].lock();
+            trees[idx] = new Tree(Memory.makeBalancedTreeNode(treeHeight, nodeGarbageSize));
+            locks[idx].unlock();
+        }
+        while (partial > 0) {
+            int h = Memory.balancedTreeHeightFromNodes(partial);
+            Tree newTree = new Tree(Memory.makeBalancedTreeNode(h, nodeGarbageSize));
+            int idx = where.cycleIncrementAndGet();
+            locks[idx].lock();
+            replaceTree(trees[idx], newTree);
+            locks[idx].unlock();
+            partial = partial - Memory.balancedTreeNodes(h);
+        }
+    }
+
+
+    // Given a balanced tree full and a smaller balanced tree partial,
+    // replaces an appropriate subtree of full by partial, taking care
+    // to preserve the shape of the full tree.
+    private static void replaceTree(Tree full, Tree partial) {
+        boolean dir = (partial.getHeight() % 2) == 0;
+        actuallyMut++;
+        replaceTreeWork(full.getRoot(), partial.getRoot(), dir);
+    }
+
+    // Called only by replaceTree (below) and by itself.
+    static void replaceTreeWork(TreeNode full, TreeNode partial,
+            boolean dir) {
+        boolean canGoLeft = full.getLeft() != null && full.getLeft().getHeight() > partial.getHeight();
+        boolean canGoRight = full.getRight() != null && full.getRight().getHeight() > partial.getHeight();
+        if (canGoLeft && canGoRight) {
+            if (dir) {
+                replaceTreeWork(full.getLeft(), partial, !dir);
+            } else {
+                replaceTreeWork(full.getRight(), partial, !dir);
+            }
+        } else if (!canGoLeft && !canGoRight) {
+            if (dir) {
+                full.setLeft(partial);
+            } else {
+                full.setRight(partial);
+            }
+        } else if (!canGoLeft) {
+            full.setLeft(partial);
+        } else {
+            full.setRight(partial);
+        }
+    }
+
+
+
+}
+public class Concurrent extends ThreadedGCTest implements GarbageProducerAware, GarbageProducer1Aware, MemoryStrategyAware {
+
+    // Heap as tree
+    Forest forest;
+
+    // GP for old gargbage production
+    GarbageProducer gpOld;
+
+    // GP for young gargbage production
+    GarbageProducer gpYoung;
+
+    MemoryStrategy ms;
+
+    private void printStatistics() {
+        log.debug("Actual mutations = " + forest.actuallyMut);
+    }
+
+    private class Worker implements Runnable {
+
+        private ExecutionController stresser;
+
+        @Override
+        public void run() {
+            if (stresser == null) {
+                stresser = getExecutionController();
+            }
+            while (stresser.continueExecution()) {
+                doStep();
+            }
+        }
+    }
+
+    @Override
+    public Runnable createRunnable(int i) {
+        return new Worker();
+    }
+
+    public static int getPercentInfoByMBeans() {
+        MemoryMXBean mbean = ManagementFactory.getMemoryMXBean();
+        return (int) (100 * mbean.getHeapMemoryUsage().getUsed() / mbean.getHeapMemoryUsage().getMax());
+    }
+
+    private void printMem(long used, long max, String source) {
+        log.debug("The Memory after allocation (" + source + "): ");
+        log.debug("Used = " + used + " Max = " + max + " Percent = " + (100 * used / max));
+    }
+
+    // Command-line parameters.
+    // young garbage in percent and absolute
+    private static int youngPercent = 0;
+    long youngGarbageSize;
+    // mutation rate (parcent and absolute trees)
+    private static int ptrMutRate = 50;
+    long mutateTrees;
+    // percent of heap to occupy by forest (long live garbage)
+    private static int livePercent = 60;
+    // the minimum of which should be available for forest
+    // test fails if it is not possible to use 60% of heap
+    private static final int MIN_AVAILABLE_MEM = 60;
+    // percent of forest to reallocate each step
+    private static int reallocatePercent = 30;
+    long reallocateSizeInNodes;
+    // sleep time in ms
+    private static int sleepTime = 100;
+
+    private void init(int longLivePercent) {
+        int numberOfThreads = runParams.getNumberOfThreads();
+        forest = Forest.createForest(longLivePercent, numberOfThreads,
+                (int) Math.sqrt(ms.getSize(Runtime.getRuntime().maxMemory())), gpOld, log);
+
+        youngGarbageSize = Runtime.getRuntime().maxMemory() * youngPercent / 100 / numberOfThreads;
+        reallocateSizeInNodes = forest.nodesCount() * reallocatePercent / 100 / numberOfThreads;
+        mutateTrees = forest.treesCount() * ptrMutRate / 100 / numberOfThreads / 2;
+
+        log.debug("Young Gen = " + youngGarbageSize);
+        log.debug("Forest contains " + forest.treesCount() + " trees and " + forest.nodesCount() + " nodes.");
+        log.debug("Count of nodes to reallocate = " + reallocateSizeInNodes);
+        log.debug("Count of tree pairs to exchange nodes = " + mutateTrees);
+        log.debug("Sleep time = " + sleepTime);
+
+        // print some info
+        MemoryUsage mbean = ManagementFactory.getMemoryMXBean().getHeapMemoryUsage();
+        printMem(mbean.getUsed(), mbean.getMax(), "Beans");
+        printMem(Runtime.getRuntime().maxMemory() - Runtime.getRuntime().freeMemory(),
+                Runtime.getRuntime().maxMemory(), "System");
+    }
+
+    @Override
+    public void run() {
+        try {
+            init(livePercent);
+        } catch (OutOfMemoryError oome) {
+            if (livePercent > MIN_AVAILABLE_MEM) {
+                log.debug("Unable to use " + livePercent + " use only " + MIN_AVAILABLE_MEM);
+                init(MIN_AVAILABLE_MEM);
+            }
+        }
+        super.run();
+        printStatistics();
+    }
+
+
+
+    private void doStep() {
+        // allocate some young garbage
+        if (youngGarbageSize != 0) {
+            gpYoung.create(youngGarbageSize);
+        }
+
+        // allocate some long-live garbage (attached to our trees)
+        forest.regenerateTrees(reallocateSizeInNodes);
+
+        // mutate pointers
+        forest.swapSubtrees(mutateTrees);
+
+        // sleep to give GC time for some concurrent actions
+        try {
+            Thread.sleep(sleepTime);
+        } catch (InterruptedException ie) {
+        }
+
+        // verify trees, also read all pointers
+        forest.checkTrees();
+    }
+
+    public static void main(String[] args) {
+        init(args);
+        GC.runTest(new Concurrent(), args);
+    }
+
+    public static void init(String[] args) {
+        for (int i = 0; i < args.length; ++i) {
+            if (args[i].equals("-lp")) {
+                // percent of long lived objects
+                livePercent = Integer.parseInt(args[++i]);
+            } else if (args[i].equals("-rp")) {
+                // percent of trees to reallocate
+                reallocatePercent = Integer.parseInt(args[++i]);
+            } else if (args[i].equals("-yp")) {
+                // percent of young objects
+                youngPercent = Integer.parseInt(args[++i]);
+            } else if (args[i].equals("-mr")) {
+                // percent of trees to exchange (mutate)
+                ptrMutRate = Integer.parseInt(args[++i]);
+            } else if (args[i].equals("-st")) {
+                // sleep time in ms
+                sleepTime = Integer.parseInt(args[++i]);
+            }
+        }
+    }
+
+    @Override
+    public void setGarbageProducer(GarbageProducer gp) {
+        this.gpOld = gp;
+    }
+
+
+    @Override
+    public void setGarbageProducer1(GarbageProducer gpYoung) {
+        this.gpYoung = gpYoung;
+    }
+
+    @Override
+    public void setMemoryStrategy(MemoryStrategy ms) {
+        this.ms = ms;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/vm/gc/concurrent/lp30yp0rp0mr30st300/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/vm/gc/concurrent/lp30yp0rp0mr30st300/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,47 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase vm/gc/concurrent/lp30yp0rp0mr30st300.
+ * VM Testbase keywords: [gc, stress, stressopt, feature_g1, nonconcurrent, monitoring]
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm
+ *      -XX:-UseGCOverheadLimit
+ *      vm.gc.concurrent.Concurrent
+ *      -lp 30
+ *      -yp 0
+ *      -rp 0
+ *      -mr 30
+ *      -st 300
+ *      -ms high
+ *      -gp randomString
+ *      -gp1 nonbranchyTree(low)
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/vm/gc/concurrent/lp30yp0rp0mr70st300t1/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/vm/gc/concurrent/lp30yp0rp0mr70st300t1/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,48 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase vm/gc/concurrent/lp30yp0rp0mr70st300t1.
+ * VM Testbase keywords: [gc, stress, stressopt, feature_g1, nonconcurrent, monitoring]
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm
+ *      -XX:-UseGCOverheadLimit
+ *      vm.gc.concurrent.Concurrent
+ *      -lp 30
+ *      -yp 0
+ *      -rp 0
+ *      -mr 70
+ *      -st 300
+ *      -ms high
+ *      -gp nonbranchyTree(low)
+ *      -gp1 nonbranchyTree(low)
+ *      -t 1
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/vm/gc/concurrent/lp30yp0rp30mr0st300/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/vm/gc/concurrent/lp30yp0rp30mr0st300/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,47 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase vm/gc/concurrent/lp30yp0rp30mr0st300.
+ * VM Testbase keywords: [gc, stress, stressopt, feature_g1, nonconcurrent, monitoring]
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm
+ *      -XX:-UseGCOverheadLimit
+ *      vm.gc.concurrent.Concurrent
+ *      -lp 30
+ *      -yp 0
+ *      -rp 30
+ *      -mr 0
+ *      -st 300
+ *      -ms high
+ *      -gp circularList(high)
+ *      -gp1 nonbranchyTree(low)
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/vm/gc/concurrent/lp30yp0rp30mr30st0t1/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/vm/gc/concurrent/lp30yp0rp30mr30st0t1/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,48 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase vm/gc/concurrent/lp30yp0rp30mr30st0t1.
+ * VM Testbase keywords: [gc, stress, stressopt, feature_g1, nonconcurrent, monitoring]
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm
+ *      -XX:-UseGCOverheadLimit
+ *      vm.gc.concurrent.Concurrent
+ *      -lp 30
+ *      -yp 0
+ *      -rp 30
+ *      -mr 30
+ *      -st 0
+ *      -ms high
+ *      -gp twofields(randomString)
+ *      -gp1 nonbranchyTree(low)
+ *      -t 1
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/vm/gc/concurrent/lp30yp0rp30mr70st0/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/vm/gc/concurrent/lp30yp0rp30mr70st0/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,47 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase vm/gc/concurrent/lp30yp0rp30mr70st0.
+ * VM Testbase keywords: [gc, stress, stressopt, feature_g1, nonconcurrent, monitoring]
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm
+ *      -XX:-UseGCOverheadLimit
+ *      vm.gc.concurrent.Concurrent
+ *      -lp 30
+ *      -yp 0
+ *      -rp 30
+ *      -mr 70
+ *      -st 0
+ *      -ms high
+ *      -gp circularList(low)
+ *      -gp1 nonbranchyTree(low)
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/vm/gc/concurrent/lp30yp0rp30mr70st300t1/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/vm/gc/concurrent/lp30yp0rp30mr70st300t1/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,48 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase vm/gc/concurrent/lp30yp0rp30mr70st300t1.
+ * VM Testbase keywords: [gc, stress, stressopt, feature_g1, nonconcurrent, monitoring]
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm
+ *      -XX:-UseGCOverheadLimit
+ *      vm.gc.concurrent.Concurrent
+ *      -lp 30
+ *      -yp 0
+ *      -rp 30
+ *      -mr 70
+ *      -st 300
+ *      -ms high
+ *      -gp random(arrays)
+ *      -gp1 nonbranchyTree(low)
+ *      -t 1
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/vm/gc/concurrent/lp30yp0rp70mr30st0/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/vm/gc/concurrent/lp30yp0rp70mr30st0/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,47 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase vm/gc/concurrent/lp30yp0rp70mr30st0.
+ * VM Testbase keywords: [gc, stress, stressopt, feature_g1, nonconcurrent, monitoring]
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm
+ *      -XX:-UseGCOverheadLimit
+ *      vm.gc.concurrent.Concurrent
+ *      -lp 30
+ *      -yp 0
+ *      -rp 70
+ *      -mr 30
+ *      -st 0
+ *      -ms high
+ *      -gp nonbranchyTree(high)
+ *      -gp1 nonbranchyTree(low)
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/vm/gc/concurrent/lp30yp0rp70mr30st300t1/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/vm/gc/concurrent/lp30yp0rp70mr30st300t1/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,48 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase vm/gc/concurrent/lp30yp0rp70mr30st300t1.
+ * VM Testbase keywords: [gc, stress, stressopt, feature_g1, nonconcurrent, monitoring]
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm
+ *      -XX:-UseGCOverheadLimit
+ *      vm.gc.concurrent.Concurrent
+ *      -lp 30
+ *      -yp 0
+ *      -rp 70
+ *      -mr 30
+ *      -st 300
+ *      -ms high
+ *      -gp randomString
+ *      -gp1 nonbranchyTree(low)
+ *      -t 1
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/vm/gc/concurrent/lp30yp10rp0mr30st300/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/vm/gc/concurrent/lp30yp10rp0mr30st300/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,47 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase vm/gc/concurrent/lp30yp10rp0mr30st300.
+ * VM Testbase keywords: [gc, stress, stressopt, feature_g1, nonconcurrent, monitoring]
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm
+ *      -XX:-UseGCOverheadLimit
+ *      vm.gc.concurrent.Concurrent
+ *      -lp 30
+ *      -yp 10
+ *      -rp 0
+ *      -mr 30
+ *      -st 300
+ *      -ms high
+ *      -gp nonbranchyTree(low)
+ *      -gp1 nonbranchyTree(low)
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/vm/gc/concurrent/lp30yp10rp0mr70st300t1/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/vm/gc/concurrent/lp30yp10rp0mr70st300t1/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,48 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase vm/gc/concurrent/lp30yp10rp0mr70st300t1.
+ * VM Testbase keywords: [gc, stress, stressopt, feature_g1, nonconcurrent, monitoring]
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm
+ *      -XX:-UseGCOverheadLimit
+ *      vm.gc.concurrent.Concurrent
+ *      -lp 30
+ *      -yp 10
+ *      -rp 0
+ *      -mr 70
+ *      -st 300
+ *      -ms high
+ *      -gp circularList(high)
+ *      -gp1 nonbranchyTree(low)
+ *      -t 1
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/vm/gc/concurrent/lp30yp10rp30mr0st300/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/vm/gc/concurrent/lp30yp10rp30mr0st300/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,47 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase vm/gc/concurrent/lp30yp10rp30mr0st300.
+ * VM Testbase keywords: [gc, stress, stressopt, feature_g1, nonconcurrent, monitoring]
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm
+ *      -XX:-UseGCOverheadLimit
+ *      vm.gc.concurrent.Concurrent
+ *      -lp 30
+ *      -yp 10
+ *      -rp 30
+ *      -mr 0
+ *      -st 300
+ *      -ms high
+ *      -gp twofields(randomString)
+ *      -gp1 nonbranchyTree(low)
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/vm/gc/concurrent/lp30yp10rp30mr30st0t1/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/vm/gc/concurrent/lp30yp10rp30mr30st0t1/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,48 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase vm/gc/concurrent/lp30yp10rp30mr30st0t1.
+ * VM Testbase keywords: [gc, stress, stressopt, feature_g1, nonconcurrent, monitoring]
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm
+ *      -XX:-UseGCOverheadLimit
+ *      vm.gc.concurrent.Concurrent
+ *      -lp 30
+ *      -yp 10
+ *      -rp 30
+ *      -mr 30
+ *      -st 0
+ *      -ms high
+ *      -gp circularList(low)
+ *      -gp1 nonbranchyTree(low)
+ *      -t 1
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/vm/gc/concurrent/lp30yp10rp30mr70st0/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/vm/gc/concurrent/lp30yp10rp30mr70st0/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,47 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase vm/gc/concurrent/lp30yp10rp30mr70st0.
+ * VM Testbase keywords: [gc, stress, stressopt, feature_g1, nonconcurrent, monitoring]
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm
+ *      -XX:-UseGCOverheadLimit
+ *      vm.gc.concurrent.Concurrent
+ *      -lp 30
+ *      -yp 10
+ *      -rp 30
+ *      -mr 70
+ *      -st 0
+ *      -ms high
+ *      -gp random(arrays)
+ *      -gp1 nonbranchyTree(low)
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/vm/gc/concurrent/lp30yp10rp30mr70st300t1/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/vm/gc/concurrent/lp30yp10rp30mr70st300t1/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,48 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase vm/gc/concurrent/lp30yp10rp30mr70st300t1.
+ * VM Testbase keywords: [gc, stress, stressopt, feature_g1, nonconcurrent, monitoring]
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm
+ *      -XX:-UseGCOverheadLimit
+ *      vm.gc.concurrent.Concurrent
+ *      -lp 30
+ *      -yp 10
+ *      -rp 30
+ *      -mr 70
+ *      -st 300
+ *      -ms high
+ *      -gp nonbranchyTree(high)
+ *      -gp1 nonbranchyTree(low)
+ *      -t 1
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/vm/gc/concurrent/lp30yp10rp70mr30st0/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/vm/gc/concurrent/lp30yp10rp70mr30st0/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,47 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase vm/gc/concurrent/lp30yp10rp70mr30st0.
+ * VM Testbase keywords: [gc, stress, stressopt, feature_g1, nonconcurrent, monitoring]
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm
+ *      -XX:-UseGCOverheadLimit
+ *      vm.gc.concurrent.Concurrent
+ *      -lp 30
+ *      -yp 10
+ *      -rp 70
+ *      -mr 30
+ *      -st 0
+ *      -ms high
+ *      -gp randomString
+ *      -gp1 nonbranchyTree(low)
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/vm/gc/concurrent/lp30yp10rp70mr30st300t1/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/vm/gc/concurrent/lp30yp10rp70mr30st300t1/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,48 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase vm/gc/concurrent/lp30yp10rp70mr30st300t1.
+ * VM Testbase keywords: [gc, stress, stressopt, feature_g1, nonconcurrent, monitoring]
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm
+ *      -XX:-UseGCOverheadLimit
+ *      vm.gc.concurrent.Concurrent
+ *      -lp 30
+ *      -yp 10
+ *      -rp 70
+ *      -mr 30
+ *      -st 300
+ *      -ms high
+ *      -gp nonbranchyTree(low)
+ *      -gp1 nonbranchyTree(low)
+ *      -t 1
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/vm/gc/concurrent/lp30yp25rp0mr30st300/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/vm/gc/concurrent/lp30yp25rp0mr30st300/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,47 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase vm/gc/concurrent/lp30yp25rp0mr30st300.
+ * VM Testbase keywords: [gc, stress, stressopt, feature_g1, nonconcurrent, monitoring]
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm
+ *      -XX:-UseGCOverheadLimit
+ *      vm.gc.concurrent.Concurrent
+ *      -lp 30
+ *      -yp 25
+ *      -rp 0
+ *      -mr 30
+ *      -st 300
+ *      -ms high
+ *      -gp circularList(high)
+ *      -gp1 nonbranchyTree(low)
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/vm/gc/concurrent/lp30yp25rp0mr70st300t1/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/vm/gc/concurrent/lp30yp25rp0mr70st300t1/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,48 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase vm/gc/concurrent/lp30yp25rp0mr70st300t1.
+ * VM Testbase keywords: [gc, stress, stressopt, feature_g1, nonconcurrent, monitoring]
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm
+ *      -XX:-UseGCOverheadLimit
+ *      vm.gc.concurrent.Concurrent
+ *      -lp 30
+ *      -yp 25
+ *      -rp 0
+ *      -mr 70
+ *      -st 300
+ *      -ms high
+ *      -gp twofields(randomString)
+ *      -gp1 nonbranchyTree(low)
+ *      -t 1
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/vm/gc/concurrent/lp30yp25rp30mr0st300/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/vm/gc/concurrent/lp30yp25rp30mr0st300/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,47 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase vm/gc/concurrent/lp30yp25rp30mr0st300.
+ * VM Testbase keywords: [gc, stress, stressopt, feature_g1, nonconcurrent, monitoring]
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm
+ *      -XX:-UseGCOverheadLimit
+ *      vm.gc.concurrent.Concurrent
+ *      -lp 30
+ *      -yp 25
+ *      -rp 30
+ *      -mr 0
+ *      -st 300
+ *      -ms high
+ *      -gp circularList(low)
+ *      -gp1 nonbranchyTree(low)
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/vm/gc/concurrent/lp30yp25rp30mr30st0t1/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/vm/gc/concurrent/lp30yp25rp30mr30st0t1/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,48 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase vm/gc/concurrent/lp30yp25rp30mr30st0t1.
+ * VM Testbase keywords: [gc, stress, stressopt, feature_g1, nonconcurrent, monitoring]
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm
+ *      -XX:-UseGCOverheadLimit
+ *      vm.gc.concurrent.Concurrent
+ *      -lp 30
+ *      -yp 25
+ *      -rp 30
+ *      -mr 30
+ *      -st 0
+ *      -ms high
+ *      -gp random(arrays)
+ *      -gp1 nonbranchyTree(low)
+ *      -t 1
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/vm/gc/concurrent/lp30yp25rp30mr70st0/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/vm/gc/concurrent/lp30yp25rp30mr70st0/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,47 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase vm/gc/concurrent/lp30yp25rp30mr70st0.
+ * VM Testbase keywords: [gc, stress, stressopt, feature_g1, nonconcurrent, monitoring]
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm
+ *      -XX:-UseGCOverheadLimit
+ *      vm.gc.concurrent.Concurrent
+ *      -lp 30
+ *      -yp 25
+ *      -rp 30
+ *      -mr 70
+ *      -st 0
+ *      -ms high
+ *      -gp nonbranchyTree(high)
+ *      -gp1 nonbranchyTree(low)
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/vm/gc/concurrent/lp30yp25rp30mr70st300t1/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/vm/gc/concurrent/lp30yp25rp30mr70st300t1/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,48 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase vm/gc/concurrent/lp30yp25rp30mr70st300t1.
+ * VM Testbase keywords: [gc, stress, stressopt, feature_g1, nonconcurrent, monitoring]
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm
+ *      -XX:-UseGCOverheadLimit
+ *      vm.gc.concurrent.Concurrent
+ *      -lp 30
+ *      -yp 25
+ *      -rp 30
+ *      -mr 70
+ *      -st 300
+ *      -ms high
+ *      -gp randomString
+ *      -gp1 nonbranchyTree(low)
+ *      -t 1
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/vm/gc/concurrent/lp30yp25rp70mr30st0/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/vm/gc/concurrent/lp30yp25rp70mr30st0/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,47 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase vm/gc/concurrent/lp30yp25rp70mr30st0.
+ * VM Testbase keywords: [gc, stress, stressopt, feature_g1, nonconcurrent, monitoring]
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm
+ *      -XX:-UseGCOverheadLimit
+ *      vm.gc.concurrent.Concurrent
+ *      -lp 30
+ *      -yp 25
+ *      -rp 70
+ *      -mr 30
+ *      -st 0
+ *      -ms high
+ *      -gp nonbranchyTree(low)
+ *      -gp1 nonbranchyTree(low)
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/vm/gc/concurrent/lp30yp25rp70mr30st300t1/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/vm/gc/concurrent/lp30yp25rp70mr30st300t1/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,48 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase vm/gc/concurrent/lp30yp25rp70mr30st300t1.
+ * VM Testbase keywords: [gc, stress, stressopt, feature_g1, nonconcurrent, monitoring]
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm
+ *      -XX:-UseGCOverheadLimit
+ *      vm.gc.concurrent.Concurrent
+ *      -lp 30
+ *      -yp 25
+ *      -rp 70
+ *      -mr 30
+ *      -st 300
+ *      -ms high
+ *      -gp circularList(high)
+ *      -gp1 nonbranchyTree(low)
+ *      -t 1
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/vm/gc/concurrent/lp50yp0rp0mr30st300/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/vm/gc/concurrent/lp50yp0rp0mr30st300/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,47 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase vm/gc/concurrent/lp50yp0rp0mr30st300.
+ * VM Testbase keywords: [gc, stress, stressopt, feature_g1, nonconcurrent, monitoring]
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm
+ *      -XX:-UseGCOverheadLimit
+ *      vm.gc.concurrent.Concurrent
+ *      -lp 50
+ *      -yp 0
+ *      -rp 0
+ *      -mr 30
+ *      -st 300
+ *      -ms high
+ *      -gp twofields(randomString)
+ *      -gp1 nonbranchyTree(low)
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/vm/gc/concurrent/lp50yp0rp0mr70st300t1/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/vm/gc/concurrent/lp50yp0rp0mr70st300t1/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,48 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase vm/gc/concurrent/lp50yp0rp0mr70st300t1.
+ * VM Testbase keywords: [gc, stress, stressopt, feature_g1, nonconcurrent, monitoring]
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm
+ *      -XX:-UseGCOverheadLimit
+ *      vm.gc.concurrent.Concurrent
+ *      -lp 50
+ *      -yp 0
+ *      -rp 0
+ *      -mr 70
+ *      -st 300
+ *      -ms high
+ *      -gp circularList(low)
+ *      -gp1 nonbranchyTree(low)
+ *      -t 1
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/vm/gc/concurrent/lp50yp0rp30mr0st300/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/vm/gc/concurrent/lp50yp0rp30mr0st300/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,47 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase vm/gc/concurrent/lp50yp0rp30mr0st300.
+ * VM Testbase keywords: [gc, stress, stressopt, feature_g1, nonconcurrent, monitoring]
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm
+ *      -XX:-UseGCOverheadLimit
+ *      vm.gc.concurrent.Concurrent
+ *      -lp 50
+ *      -yp 0
+ *      -rp 30
+ *      -mr 0
+ *      -st 300
+ *      -ms high
+ *      -gp random(arrays)
+ *      -gp1 nonbranchyTree(low)
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/vm/gc/concurrent/lp50yp0rp30mr30st0t1/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/vm/gc/concurrent/lp50yp0rp30mr30st0t1/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,48 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase vm/gc/concurrent/lp50yp0rp30mr30st0t1.
+ * VM Testbase keywords: [gc, stress, stressopt, feature_g1, nonconcurrent, monitoring]
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm
+ *      -XX:-UseGCOverheadLimit
+ *      vm.gc.concurrent.Concurrent
+ *      -lp 50
+ *      -yp 0
+ *      -rp 30
+ *      -mr 30
+ *      -st 0
+ *      -ms high
+ *      -gp nonbranchyTree(high)
+ *      -gp1 nonbranchyTree(low)
+ *      -t 1
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/vm/gc/concurrent/lp50yp0rp30mr70st0/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/vm/gc/concurrent/lp50yp0rp30mr70st0/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,47 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase vm/gc/concurrent/lp50yp0rp30mr70st0.
+ * VM Testbase keywords: [gc, stress, stressopt, feature_g1, nonconcurrent, monitoring]
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm
+ *      -XX:-UseGCOverheadLimit
+ *      vm.gc.concurrent.Concurrent
+ *      -lp 50
+ *      -yp 0
+ *      -rp 30
+ *      -mr 70
+ *      -st 0
+ *      -ms high
+ *      -gp randomString
+ *      -gp1 nonbranchyTree(low)
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/vm/gc/concurrent/lp50yp0rp30mr70st300t1/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/vm/gc/concurrent/lp50yp0rp30mr70st300t1/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,48 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase vm/gc/concurrent/lp50yp0rp30mr70st300t1.
+ * VM Testbase keywords: [gc, stress, stressopt, feature_g1, nonconcurrent, monitoring]
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm
+ *      -XX:-UseGCOverheadLimit
+ *      vm.gc.concurrent.Concurrent
+ *      -lp 50
+ *      -yp 0
+ *      -rp 30
+ *      -mr 70
+ *      -st 300
+ *      -ms high
+ *      -gp nonbranchyTree(low)
+ *      -gp1 nonbranchyTree(low)
+ *      -t 1
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/vm/gc/concurrent/lp50yp0rp70mr30st0/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/vm/gc/concurrent/lp50yp0rp70mr30st0/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,47 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase vm/gc/concurrent/lp50yp0rp70mr30st0.
+ * VM Testbase keywords: [gc, stress, stressopt, feature_g1, nonconcurrent, monitoring]
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm
+ *      -XX:-UseGCOverheadLimit
+ *      vm.gc.concurrent.Concurrent
+ *      -lp 50
+ *      -yp 0
+ *      -rp 70
+ *      -mr 30
+ *      -st 0
+ *      -ms high
+ *      -gp circularList(high)
+ *      -gp1 nonbranchyTree(low)
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/vm/gc/concurrent/lp50yp0rp70mr30st300t1/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/vm/gc/concurrent/lp50yp0rp70mr30st300t1/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,48 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase vm/gc/concurrent/lp50yp0rp70mr30st300t1.
+ * VM Testbase keywords: [gc, stress, stressopt, feature_g1, nonconcurrent, monitoring]
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm
+ *      -XX:-UseGCOverheadLimit
+ *      vm.gc.concurrent.Concurrent
+ *      -lp 50
+ *      -yp 0
+ *      -rp 70
+ *      -mr 30
+ *      -st 300
+ *      -ms high
+ *      -gp twofields(randomString)
+ *      -gp1 nonbranchyTree(low)
+ *      -t 1
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/vm/gc/concurrent/lp50yp10rp0mr30st300/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/vm/gc/concurrent/lp50yp10rp0mr30st300/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,47 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase vm/gc/concurrent/lp50yp10rp0mr30st300.
+ * VM Testbase keywords: [gc, stress, stressopt, feature_g1, nonconcurrent, monitoring]
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm
+ *      -XX:-UseGCOverheadLimit
+ *      vm.gc.concurrent.Concurrent
+ *      -lp 50
+ *      -yp 10
+ *      -rp 0
+ *      -mr 30
+ *      -st 300
+ *      -ms high
+ *      -gp circularList(low)
+ *      -gp1 nonbranchyTree(low)
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/vm/gc/concurrent/lp50yp10rp0mr70st300t1/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/vm/gc/concurrent/lp50yp10rp0mr70st300t1/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,48 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase vm/gc/concurrent/lp50yp10rp0mr70st300t1.
+ * VM Testbase keywords: [gc, stress, stressopt, feature_g1, nonconcurrent, monitoring]
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm
+ *      -XX:-UseGCOverheadLimit
+ *      vm.gc.concurrent.Concurrent
+ *      -lp 50
+ *      -yp 10
+ *      -rp 0
+ *      -mr 70
+ *      -st 300
+ *      -ms high
+ *      -gp random(arrays)
+ *      -gp1 nonbranchyTree(low)
+ *      -t 1
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/vm/gc/concurrent/lp50yp10rp30mr0st300/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/vm/gc/concurrent/lp50yp10rp30mr0st300/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,47 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase vm/gc/concurrent/lp50yp10rp30mr0st300.
+ * VM Testbase keywords: [gc, stress, stressopt, feature_g1, nonconcurrent, monitoring]
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm
+ *      -XX:-UseGCOverheadLimit
+ *      vm.gc.concurrent.Concurrent
+ *      -lp 50
+ *      -yp 10
+ *      -rp 30
+ *      -mr 0
+ *      -st 300
+ *      -ms high
+ *      -gp nonbranchyTree(high)
+ *      -gp1 nonbranchyTree(low)
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/vm/gc/concurrent/lp50yp10rp30mr30st0t1/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/vm/gc/concurrent/lp50yp10rp30mr30st0t1/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,48 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase vm/gc/concurrent/lp50yp10rp30mr30st0t1.
+ * VM Testbase keywords: [gc, stress, stressopt, feature_g1, nonconcurrent, monitoring]
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm
+ *      -XX:-UseGCOverheadLimit
+ *      vm.gc.concurrent.Concurrent
+ *      -lp 50
+ *      -yp 10
+ *      -rp 30
+ *      -mr 30
+ *      -st 0
+ *      -ms high
+ *      -gp randomString
+ *      -gp1 nonbranchyTree(low)
+ *      -t 1
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/vm/gc/concurrent/lp50yp10rp30mr70st0/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/vm/gc/concurrent/lp50yp10rp30mr70st0/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,47 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase vm/gc/concurrent/lp50yp10rp30mr70st0.
+ * VM Testbase keywords: [gc, stress, stressopt, feature_g1, nonconcurrent, monitoring]
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm
+ *      -XX:-UseGCOverheadLimit
+ *      vm.gc.concurrent.Concurrent
+ *      -lp 50
+ *      -yp 10
+ *      -rp 30
+ *      -mr 70
+ *      -st 0
+ *      -ms high
+ *      -gp nonbranchyTree(low)
+ *      -gp1 nonbranchyTree(low)
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/vm/gc/concurrent/lp50yp10rp30mr70st300t1/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/vm/gc/concurrent/lp50yp10rp30mr70st300t1/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,48 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase vm/gc/concurrent/lp50yp10rp30mr70st300t1.
+ * VM Testbase keywords: [gc, stress, stressopt, feature_g1, nonconcurrent, monitoring]
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm
+ *      -XX:-UseGCOverheadLimit
+ *      vm.gc.concurrent.Concurrent
+ *      -lp 50
+ *      -yp 10
+ *      -rp 30
+ *      -mr 70
+ *      -st 300
+ *      -ms high
+ *      -gp circularList(high)
+ *      -gp1 nonbranchyTree(low)
+ *      -t 1
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/vm/gc/concurrent/lp50yp10rp70mr30st0/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/vm/gc/concurrent/lp50yp10rp70mr30st0/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,47 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase vm/gc/concurrent/lp50yp10rp70mr30st0.
+ * VM Testbase keywords: [gc, stress, stressopt, feature_g1, nonconcurrent, monitoring]
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm
+ *      -XX:-UseGCOverheadLimit
+ *      vm.gc.concurrent.Concurrent
+ *      -lp 50
+ *      -yp 10
+ *      -rp 70
+ *      -mr 30
+ *      -st 0
+ *      -ms high
+ *      -gp twofields(randomString)
+ *      -gp1 nonbranchyTree(low)
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/vm/gc/concurrent/lp50yp10rp70mr30st300t1/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/vm/gc/concurrent/lp50yp10rp70mr30st300t1/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,48 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase vm/gc/concurrent/lp50yp10rp70mr30st300t1.
+ * VM Testbase keywords: [gc, stress, stressopt, feature_g1, nonconcurrent, monitoring]
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm
+ *      -XX:-UseGCOverheadLimit
+ *      vm.gc.concurrent.Concurrent
+ *      -lp 50
+ *      -yp 10
+ *      -rp 70
+ *      -mr 30
+ *      -st 300
+ *      -ms high
+ *      -gp circularList(low)
+ *      -gp1 nonbranchyTree(low)
+ *      -t 1
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/vm/gc/concurrent/lp60yp0rp30mr0st300/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/vm/gc/concurrent/lp60yp0rp30mr0st300/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,47 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase vm/gc/concurrent/lp60yp0rp30mr0st300.
+ * VM Testbase keywords: [gc, stress, stressopt, feature_g1, nonconcurrent, monitoring]
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm
+ *      -XX:-UseGCOverheadLimit
+ *      vm.gc.concurrent.Concurrent
+ *      -lp 60
+ *      -yp 0
+ *      -rp 30
+ *      -mr 0
+ *      -st 300
+ *      -ms high
+ *      -gp random(arrays)
+ *      -gp1 nonbranchyTree(low)
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/vm/gc/containers/CollectionContainer.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,78 @@
+/*
+ * Copyright (c) 2010, 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.
+ */
+package vm.gc.containers;
+
+import java.util.Collection;
+import java.util.Iterator;
+import nsk.share.gc.gp.GarbageProducer;
+import nsk.share.gc.gp.MemoryStrategy;
+
+
+/*
+ * This class updates collection by removal of random elements
+ * via iterator and adding the same number of elements.
+ */
+class CollectionContainer extends TypicalContainer {
+
+    Collection collection;
+
+    public CollectionContainer(Collection collection, long maximumSize,
+            GarbageProducer garbageProducer, MemoryStrategy memoryStrategy, Speed speed) {
+        super(maximumSize, garbageProducer, memoryStrategy, speed);
+        this.collection = collection;
+    }
+
+    @Override
+    public void initialize() {
+        for (int i = 0; i < count; i++) {
+            if (!stresser.continueExecution()) {
+                return;
+            }
+            collection.add(garbageProducer.create(size));
+        }
+    }
+
+    @Override
+    public void update() {
+        Iterator iter = collection.iterator();
+        int i = 0;
+        while (iter.hasNext()) {
+            Object obj = iter.next();
+            if (i++ / 100 < speed.getValue()) {
+                if (!stresser.continueExecution()) {
+                    return;
+                }
+                iter.remove();
+                garbageProducer.validate(obj);
+            }
+        }
+        while (i != 0) {
+            if (i-- / 100 < speed.getValue()) {
+                if (!stresser.continueExecution()) {
+                    return;
+                }
+                collection.add(garbageProducer.create(size));
+            }
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/vm/gc/containers/Combination01/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/vm/gc/containers/Combination01/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,43 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase vm/gc/containers/Combination01.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent, vm6, monitoring]
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm
+ *      -XX:-UseGCOverheadLimit
+ *      vm.gc.containers.ContainersTest
+ *      -ms low
+ *      -ct TreeMap(random(arrays))
+ *      -ct LinkedList(random(arrays))
+ *      -ct HashSet(random(arrays))
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/vm/gc/containers/Combination02/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/vm/gc/containers/Combination02/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,43 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase vm/gc/containers/Combination02.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent, vm6, monitoring]
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm
+ *      -XX:-UseGCOverheadLimit
+ *      vm.gc.containers.ContainersTest
+ *      -ms high
+ *      -ct TreeMap(circularList(high))
+ *      -ct LinkedList(twofields(nonbranchyTree(high)))
+ *      -ct HashSet(nonbranchyTree(high))
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/vm/gc/containers/Combination03/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/vm/gc/containers/Combination03/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,43 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase vm/gc/containers/Combination03.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent, vm6, monitoring]
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm
+ *      -XX:-UseGCOverheadLimit
+ *      vm.gc.containers.ContainersTest
+ *      -ms low
+ *      -ct ConcurrentHashMap(twofields(nonbranchyTree(high)),4,low,medium)
+ *      -ct HashSet(random(arrays))
+ *      -ct TreeSet(randomString)
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/vm/gc/containers/Combination04/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/vm/gc/containers/Combination04/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,42 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase vm/gc/containers/Combination04.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent, vm6, monitoring]
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm
+ *      -XX:-UseGCOverheadLimit
+ *      vm.gc.containers.ContainersTest
+ *      -ms low
+ *      -ct TreeMap(random(arrays),1,high,low)
+ *      -ct LinkedList(random(arrays),1,low,low)
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/vm/gc/containers/Combination05/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/vm/gc/containers/Combination05/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,42 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase vm/gc/containers/Combination05.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent, quick, vm6, monitoring]
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm
+ *      -XX:-UseGCOverheadLimit
+ *      vm.gc.containers.ContainersTest
+ *      -ms low
+ *      -ct TreeSet(randomString)
+ *      -ct LinkedHashSet(random(arrays))
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/vm/gc/containers/ConcurrentHashMap_Arrays/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/vm/gc/containers/ConcurrentHashMap_Arrays/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,41 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase vm/gc/containers/ConcurrentHashMap_Arrays.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent, monitoring]
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm
+ *      -XX:-UseGCOverheadLimit
+ *      vm.gc.containers.ContainersTest
+ *      -ms low
+ *      -ct ConcurrentHashMap(random(arrays),256)
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/vm/gc/containers/Container.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,65 @@
+/*
+ * Copyright (c) 2010, 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.
+ */
+package vm.gc.containers;
+
+import nsk.share.gc.Memory;
+import nsk.share.gc.gp.GarbageProducer;
+import nsk.share.gc.gp.MemoryStrategy;
+import nsk.share.test.ExecutionController;
+
+public interface Container {
+    public void setExecutionController(ExecutionController stresser);
+    public void initialize();
+    public void update();
+}
+
+abstract class TypicalContainer implements Container {
+
+    protected ExecutionController stresser;
+    protected long count;
+    protected long size;
+    protected GarbageProducer garbageProducer;
+    protected Speed speed;
+
+    public TypicalContainer(long maximumSize, GarbageProducer garbageProducer,
+            MemoryStrategy memoryStrategy, Speed speed) {
+        this.count = memoryStrategy.getCount(maximumSize);
+        this.size = memoryStrategy.getSize(maximumSize);
+        // typical container have at least reference to other element
+        // and to data which is really size of "size" really for 100 bytes
+        // overhead is about 50%
+        final int structureOverHead = 6 * Memory.getReferenceSize();
+        if (this.size < structureOverHead * 100) {
+            this.count = this.count * (this.size - structureOverHead) / this.size;
+        }
+        this.garbageProducer = garbageProducer;
+        this.speed = speed;
+        System.err.format("Creating container: size = %s count = %s\n", size, count);
+    }
+
+    public void setExecutionController(ExecutionController stresser) {
+        this.stresser = stresser;
+    }
+
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/vm/gc/containers/ContainerDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,178 @@
+/*
+ * Copyright (c) 2010, 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.
+ */
+package vm.gc.containers;
+
+import nsk.share.TestBug;
+import nsk.share.gc.gp.GarbageProducer;
+import nsk.share.gc.gp.GarbageUtils;
+import nsk.share.gc.gp.MemoryStrategy;
+
+/**
+ *  This is a description which is parsed from command-line string.
+ *  It contains the container type, garbage producer, memory strategy,
+ *  speed of objects renovations and count of threads to work with
+ * container. The conatainer should be MT safe if threadsCount more then 1.
+ */
+public class ContainerDescription {
+
+    /*
+     * The container description is next:
+     * containerName(garbageProucer,numberOfThreads,speed,MemoryStrategy)
+     * all parameters except containerName are optional
+     * containerName is the Name of class from java.util or java.util.concurrent
+     */
+    static ContainerDescription parseFromString(String string) {
+        int params = string.indexOf('(');
+        String gp;
+        Speed speed = Speed.MEDIUM;
+        MemoryStrategy ms = null;
+        int count = 1;
+
+        if (params == -1) {
+            ContainerDescription descr = new ContainerDescription(string);
+            descr.setSpeed(speed);
+            descr.setThreadsCount(count);
+            return descr;
+        }
+        if (!string.endsWith(")")) {
+            throw new TestBug("Incorrect syntax of container description.");
+        }
+        String name = string.substring(0, string.indexOf('('));
+        String parameters = string.substring(string.indexOf("(") + 1, string.length() - 1);
+        final int closedBracket = parameters.lastIndexOf(')');
+        int del = parameters.indexOf(',', closedBracket + 1);
+        if (del == -1) {
+            gp = parameters;
+        } else {
+            gp = parameters.substring(0, del).trim();
+            String[] other = parameters.substring(del + 1).split(",");
+            switch (other.length) {
+                case 3:
+                    ms = MemoryStrategy.fromString(other[2].trim());
+                case 2:
+                    speed = Speed.fromString(other[1].trim());
+                case 1:
+                    count = Integer.parseInt(other[0].trim());
+                    break;
+                default:
+                    throw new TestBug("Unexpected size of parameters: " + other.length + 1);
+            }
+        }
+        ContainerDescription descr = new ContainerDescription(name);
+        descr.setGarbageProducer(GarbageUtils.getGarbageProducer(gp));
+        descr.setSpeed(speed);
+        descr.setThreadsCount(count);
+        descr.setMemoryStrategy(ms);
+        return descr;
+    }
+
+    protected ContainerDescription(String name) {
+        this.name = name;
+    }
+    protected GarbageProducer garbageProducer;
+
+    /**
+     * Get the value of garbageProducer
+     *
+     * @return the value of garbageProducer
+     */
+    public GarbageProducer getGarbageProducer() {
+        return garbageProducer;
+    }
+
+    /**
+     * Set the value of garbageProducer
+     *
+     * @param garbageProducer new value of garbageProducer
+     */
+    public void setGarbageProducer(GarbageProducer garbageProducer) {
+        this.garbageProducer = garbageProducer;
+    }
+    protected MemoryStrategy memoryStrategy;
+
+    /**
+     * Get the value of memoryStrategy
+     *
+     * @return the value of memoryStrategy
+     */
+    public MemoryStrategy getMemoryStrategy() {
+        return memoryStrategy;
+    }
+
+    /**
+     * Set the value of memoryStrategy
+     *
+     * @param memoryStrategy new value of memoryStrategy
+     */
+    public void setMemoryStrategy(MemoryStrategy memoryStrategy) {
+        this.memoryStrategy = memoryStrategy;
+    }
+    protected String name;
+
+    /**
+     * Get the value of Type
+     *
+     * @return the value of Type
+     */
+    public String getName() {
+        return name;
+    }
+    protected Speed speed = Speed.MEDIUM;
+
+    /**
+     * Get the value of speed
+     *
+     * @return the value of speed
+     */
+    public Speed getSpeed() {
+        return speed;
+    }
+
+    /**
+     * Set the value of speed
+     *
+     * @param speed new value of speed
+     */
+    public void setSpeed(Speed speed) {
+        this.speed = speed;
+    }
+    protected int threadsCount;
+
+    /**
+     * Get the value of threadsCount
+     *
+     * @return the value of threadsCount
+     */
+    public int getThreadsCount() {
+        return threadsCount;
+    }
+
+    /**
+     * Set the value of threadsCount
+     *
+     * @param threadsCount new value of threadsCount
+     */
+    public void setThreadsCount(int threadsCount) {
+        this.threadsCount = threadsCount;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/vm/gc/containers/ContainersTest.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,159 @@
+/*
+ * Copyright (c) 2010, 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.
+ */
+package vm.gc.containers;
+
+import java.lang.management.ManagementFactory;
+import java.lang.management.MemoryUsage;
+import java.util.*;
+import nsk.share.TestBug;
+import nsk.share.gc.*;
+import nsk.share.gc.gp.GarbageProducer;
+import nsk.share.gc.gp.GarbageProducerAware;
+import nsk.share.gc.gp.MemoryStrategy;
+import nsk.share.gc.gp.MemoryStrategyAware;
+import nsk.share.test.ExecutionController;
+
+/*
+ * The main class and launcher for all containers tests.
+ * Allow to set containers via set -ct parameters. See parseFromString decription.
+ */
+public class ContainersTest extends ThreadedGCTest implements MemoryStrategyAware, GarbageProducerAware {
+
+    private GarbageProducer garbageProducer;
+    private MemoryStrategy memoryStrategy;
+    MemoryUsage mbean = ManagementFactory.getMemoryMXBean().getHeapMemoryUsage();
+
+    public ContainersTest(String[] args) {
+        for (int i = 0; i < args.length; i++) {
+            if (args[i].equals("-ct")) {
+                descrs.add(ContainerDescription.parseFromString(args[i + 1]));
+            }
+        }
+        if (descrs.size() == 0) {
+            throw new TestBug("No containers were given");
+        }
+    }
+
+    @Override
+    public void setMemoryStrategy(MemoryStrategy memoryStrategy) {
+        this.memoryStrategy = memoryStrategy;
+    }
+
+    @Override
+    public void setGarbageProducer(GarbageProducer gp) {
+        this.garbageProducer = gp;
+    }
+
+    private class Mutator implements Runnable {
+
+        Container container;
+
+        public Mutator(Container container) {
+            this.container = container;
+        }
+
+        @Override
+        public void run() {
+            ExecutionController stresser = getExecutionController();
+            container.setExecutionController(stresser);
+            try {
+                container.initialize();
+                while (stresser.continueExecution()) {
+                    container.update();
+                }
+            } catch (OutOfMemoryError oome) {
+                // The OOME is teoretically possible in the case
+                // if data structure has a large overhead
+            }
+        }
+    }
+    List<ContainerDescription> descrs = new ArrayList<ContainerDescription>();
+    List<Container> containers = new ArrayList<Container>();
+
+    @Override
+    protected Runnable createRunnable(int i) {
+        return new Mutator(containers.get(i));
+    }
+
+    public Container createContainter(long maxMemory, ContainerDescription descr) {
+        String[] prefixes = {"java.util", "java.util.concurrent", "vm.gc.containers"};
+        String name = descr.getName();
+        Class clz = null;
+        for (String prefix : prefixes) {
+            try {
+                clz = Class.forName(prefix + "." + name);
+            } catch (ClassNotFoundException ex) {
+                // no such class, contiue
+            }
+        }
+        Object container;
+        try {
+            container = clz.newInstance();
+        } catch (Exception ex) {
+            throw new TestBug("Not able to create a container", ex);
+        }
+        // Deques are also collections...
+        if (container instanceof Map) {
+            return new MapContainer((Map) container, maxMemory,
+                    descr.getGarbageProducer() != null ? descr.getGarbageProducer() : garbageProducer,
+                    descr.getMemoryStrategy() != null ? descr.getMemoryStrategy() : memoryStrategy,
+                    descr.getSpeed());
+        } else if (container instanceof Deque) {
+            return new DequeueContainer((Deque) container, maxMemory,
+                    descr.getGarbageProducer() != null ? descr.getGarbageProducer() : garbageProducer,
+                    descr.getMemoryStrategy() != null ? descr.getMemoryStrategy() : memoryStrategy,
+                    descr.getSpeed(), runParams.getNumberOfThreads());
+        } else if (container instanceof Collection) {
+            return new CollectionContainer((Collection) container, maxMemory,
+                    descr.getGarbageProducer() != null ? descr.getGarbageProducer() : garbageProducer,
+                    descr.getMemoryStrategy() != null ? descr.getMemoryStrategy() : memoryStrategy,
+                    descr.getSpeed());
+        }
+        throw new TestBug("Not able to create a container");
+    }
+
+    void createEmptyContainers(long maxMemory) {
+        containers = new ArrayList<Container>();
+        for (int i = 0; containers.size() < runParams.getNumberOfThreads(); i++) {
+            Container container = createContainter(maxMemory / runParams.getNumberOfThreads(),
+                    descrs.get(i % descrs.size()));
+            // we share container between workers if threadsCount > 1
+            for (int cnt = descrs.get(i % descrs.size()).getThreadsCount();
+                    cnt != 0 && containers.size() < runParams.getNumberOfThreads();
+                    cnt--) {
+                containers.add(container);
+            }
+        }
+    }
+
+    @Override
+    public void run() {
+        long maxMemory = runParams.getTestMemory();
+        createEmptyContainers(maxMemory);
+        super.run();
+    }
+
+    public static void main(String args[]) {
+        GC.runTest(new ContainersTest(args), args);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/vm/gc/containers/DequeueContainer.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,79 @@
+/*
+ * Copyright (c) 2010, 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.
+ */
+package vm.gc.containers;
+
+import java.util.Deque;
+import nsk.share.gc.gp.GarbageProducer;
+import nsk.share.gc.gp.MemoryStrategy;
+
+/*
+ * The dequeue container update remove a first or last
+ * elements from queue and add the same number of elements.
+ *
+ */
+class DequeueContainer extends TypicalContainer {
+
+    Deque queue;
+    boolean isLIFO;
+    int threadsCount;
+
+    public DequeueContainer(Deque queue, long maximumSize,
+            GarbageProducer garbageProducer, MemoryStrategy memoryStrategy, Speed speed,
+            int threadsCount) {
+        super(maximumSize, garbageProducer, memoryStrategy, speed);
+        this.threadsCount = threadsCount;
+        this.queue = queue;
+    }
+
+    public void initialize() {
+        for (int i = 0; i < count; i++) {
+            if (!stresser.continueExecution()) {
+                return;
+            }
+            queue.add(garbageProducer.create(size));
+        }
+    }
+
+    @Override
+    public void update() {
+        for (int i = 0; i < count * speed.getValue() / (threadsCount * 100); i++) {
+            if (!stresser.continueExecution()) {
+                return;
+            }
+            Object obj = null;
+            if (isLIFO) {
+                obj = queue.removeFirst();
+            } else {
+                obj = queue.removeLast();
+            }
+            garbageProducer.validate(obj);
+        }
+        for (int i = 0; i < count * speed.getValue() / (threadsCount * 100); i++) {
+            if (!stresser.continueExecution()) {
+                return;
+            }
+            queue.addFirst(garbageProducer.create(size));
+        }
+        isLIFO = !isLIFO;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/vm/gc/containers/HashMap_Arrays/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/vm/gc/containers/HashMap_Arrays/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,41 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase vm/gc/containers/HashMap_Arrays.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent, monitoring]
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm
+ *      -XX:-UseGCOverheadLimit
+ *      vm.gc.containers.ContainersTest
+ *      -ms low
+ *      -ct HashMap(random(arrays))
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/vm/gc/containers/LinkedBlockingDeque_Arrays/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/vm/gc/containers/LinkedBlockingDeque_Arrays/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,41 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase vm/gc/containers/LinkedBlockingDeque_Arrays.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent, quick, vm6, monitoring]
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm
+ *      -XX:-UseGCOverheadLimit
+ *      vm.gc.containers.ContainersTest
+ *      -ms low
+ *      -ct LinkedBlockingDeque(random(arrays),256)
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/vm/gc/containers/LinkedHashMap_Arrays/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/vm/gc/containers/LinkedHashMap_Arrays/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,41 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase vm/gc/containers/LinkedHashMap_Arrays.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent, quick, monitoring]
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm
+ *      -XX:-UseGCOverheadLimit
+ *      vm.gc.containers.ContainersTest
+ *      -ms low
+ *      -ct LinkedHashMap(random(arrays))
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/vm/gc/containers/LinkedList_Arrays/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/vm/gc/containers/LinkedList_Arrays/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,41 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase vm/gc/containers/LinkedList_Arrays.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent, vm6, monitoring]
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm
+ *      -XX:-UseGCOverheadLimit
+ *      vm.gc.containers.ContainersTest
+ *      -ms low
+ *      -ct LinkedList(random(arrays))
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/vm/gc/containers/MapContainer.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,78 @@
+/*
+ * Copyright (c) 2010, 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.
+ */
+package vm.gc.containers;
+
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Set;
+import nsk.share.gc.gp.GarbageProducer;
+import nsk.share.gc.gp.MemoryStrategy;
+import nsk.share.test.LocalRandom;
+
+/*
+ * The MapContainer select a certain amout of random elements and remove
+ * them. After this it put the same number of elements with random keys.
+ */
+class MapContainer extends TypicalContainer {
+
+    Map map;
+
+    public MapContainer(Map map, long maximumSize, GarbageProducer garbageProducer,
+            MemoryStrategy memoryStrategy, Speed speed) {
+        super(maximumSize, garbageProducer, memoryStrategy, speed);
+        this.map = map;
+    }
+
+    @Override
+    public void initialize() {
+        for (int i = 0; i < count; i++) {
+            if (!stresser.continueExecution()) {
+                return;
+            }
+            map.put(i, garbageProducer.create(size));
+        }
+    }
+
+    @Override
+    public void update() {
+        Set<Integer> updated = new HashSet();
+        for (int i = 0; i < count * speed.getValue() / 100; i++) {
+            updated.add(LocalRandom.nextInt((int) count));
+        }
+        for (Integer i : updated) {
+            if (!stresser.continueExecution()) {
+                return;
+            }
+            Object obj = map.remove(i);
+            if (obj != null) {
+                garbageProducer.validate(obj);
+            }
+        }
+        for (Integer i : updated) {
+            if (!stresser.continueExecution()) {
+                return;
+            }
+            map.put(i, garbageProducer.create(size));
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/vm/gc/containers/Speed.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,51 @@
+/*
+ * Copyright (c) 2010, 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.
+ */
+package vm.gc.containers;
+
+import nsk.share.TestBug;
+
+public enum Speed {
+
+    LOW(25), HIGH(75), MEDIUM(50);
+    int value;
+
+    Speed(int value) {
+        this.value = value;
+    }
+
+    int getValue() {
+        return value;
+    }
+
+    public static Speed fromString(String id) {
+        if (id.equalsIgnoreCase("low")) {
+            return LOW;
+        } else if (id.equalsIgnoreCase("medium")) {
+            return MEDIUM;
+        } else if (id.equalsIgnoreCase("high")) {
+            return HIGH;
+        } else {
+            throw new TestBug("Unknown speed identifier: " + id);
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/vm/gc/containers/TreeMap_Arrays/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/vm/gc/containers/TreeMap_Arrays/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,42 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase vm/gc/containers/TreeMap_Arrays.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent, monitoring, quarantine]
+ * VM Testbase comments: JDK-8014075
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm
+ *      -XX:-UseGCOverheadLimit
+ *      vm.gc.containers.ContainersTest
+ *      -ms low
+ *      -ct TreeMap(random(arrays))
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/vm/gc/containers/TreeSet_String/TEST.properties	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,23 @@
+#
+# 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
+# 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.
+#
+exclusiveAccess.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/vm/gc/containers/TreeSet_String/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,41 @@
+/*
+ * 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
+ * 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
+ * @key stress gc
+ *
+ * @summary converted from VM Testbase vm/gc/containers/TreeSet_String.
+ * VM Testbase keywords: [gc, stress, stressopt, nonconcurrent, monitoring]
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm
+ *      -XX:-UseGCOverheadLimit
+ *      vm.gc.containers.ContainersTest
+ *      -ms low
+ *      -ct TreeMap(randomString)
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/vm/gc/containers/readme	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,33 @@
+Copyright (c) 2010, 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.
+
+These tests stress GC using standard data structures such as:
+  -- maps( HashMap, TreeMap, Synchronized HashMap)
+  -- collections (TreeSet, HashSet)
+  -- deques (DoubleLinkedList)
+and their combinations. These tests uses GC Stress Framework.
+
+
+The tests are the next generation of some old tests like:
+gc/gctests/HashTable
+gc/gctests/TreeGC
+gc/gctests/StackGC
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/vm/gc/kind/parOld/TestDescription.java	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,41 @@
+/*
+ * 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
+ * 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
+ * @key gc
+ *
+ * @summary converted from VM Testbase vm/gc/kind/parOld.
+ * VM Testbase keywords: [quick, gc]
+ * VM Testbase readme:
+ * DESCRIPTION
+ *     The test verifies that ParallelOldGC is used for the old generation by default when ParallelGC is selected by VM.
+ *     (previously the Parallel Scavenger + PS MarkSweep pair was used)
+ *
+ * @library /vmTestbase
+ *          /test/lib
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run shell test.sh
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/vmTestbase/vm/gc/kind/parOld/test.sh	Thu May 17 14:52:47 2018 -0700
@@ -0,0 +1,45 @@
+#!/bin/bash
+# Copyright (c) 2012, 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.
+
+JAVA="$TESTJAVA/bin/java"
+JAVA_OPTS="$TESTJAVAOPTS $TESTVMOPTS"
+
+if echo $JAVA_OPTS $_JAVA_OPTIONS | egrep '\-XX:\+Use[a-zA-Z0-9]+GC'; then
+    echo Particular GC is enabled via flags. The test is useless.
+    exit 0
+fi
+
+log=gcDetails.out
+$JAVA $JAVA_OPTS -XX:+UseParallelGC -Xlog:gc* -version >$log
+
+if ! grep PSYoungGen $log; then
+    echo Default GC is not Parallel, the test is useless
+    exit 0
+fi
+
+if grep ParOld $log; then
+    echo ParallelOldGC was used by default. Test passed.
+    exit 0
+else
+    echo "ParallelOldGC wasn't used by default. TEST FAILED"
+    exit 2
+fi