8199370: [TESTBUG] Open source vm testbase GC tests
Reviewed-by: erikj, ihse, ehelin
This commit is contained in:
parent
7c66a1d6a2
commit
072459a055
@ -89,6 +89,26 @@ MLVM_STRESS_INCLUDES := \
|
||||
-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_libIndyRedefineClass := $(MLVM_JVMTI_INCLUD
|
||||
|
||||
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
|
||||
|
@ -123,6 +123,8 @@ vmTestbase/nsk/jdi/VirtualMachine/redefineClasses/redefineclasses023/TestDescrip
|
||||
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
|
||||
|
@ -1157,6 +1157,100 @@ vmTestbase_nsk_jdi_quick = \
|
||||
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
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
@ -0,0 +1,23 @@
|
||||
#
|
||||
# Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License version 2 only, as
|
||||
# published by the Free Software Foundation.
|
||||
#
|
||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# version 2 for more details (a copy is included in the LICENSE file that
|
||||
# accompanied this code).
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License version
|
||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
# or visit www.oracle.com if you need additional information or have any
|
||||
# questions.
|
||||
#
|
||||
exclusiveAccess.dirs=.
|
@ -0,0 +1,23 @@
|
||||
#
|
||||
# Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License version 2 only, as
|
||||
# published by the Free Software Foundation.
|
||||
#
|
||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# version 2 for more details (a copy is included in the LICENSE file that
|
||||
# accompanied this code).
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License version
|
||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
# or visit www.oracle.com if you need additional information or have any
|
||||
# questions.
|
||||
#
|
||||
exclusiveAccess.dirs=.
|
@ -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
|
||||
*/
|
||||
|
@ -0,0 +1,23 @@
|
||||
#
|
||||
# Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License version 2 only, as
|
||||
# published by the Free Software Foundation.
|
||||
#
|
||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# version 2 for more details (a copy is included in the LICENSE file that
|
||||
# accompanied this code).
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License version
|
||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
# or visit www.oracle.com if you need additional information or have any
|
||||
# questions.
|
||||
#
|
||||
exclusiveAccess.dirs=.
|
@ -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
|
||||
*/
|
||||
|
@ -0,0 +1,23 @@
|
||||
#
|
||||
# Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License version 2 only, as
|
||||
# published by the Free Software Foundation.
|
||||
#
|
||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# version 2 for more details (a copy is included in the LICENSE file that
|
||||
# accompanied this code).
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License version
|
||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
# or visit www.oracle.com if you need additional information or have any
|
||||
# questions.
|
||||
#
|
||||
exclusiveAccess.dirs=.
|
@ -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
|
||||
*/
|
||||
|
@ -0,0 +1,23 @@
|
||||
#
|
||||
# Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License version 2 only, as
|
||||
# published by the Free Software Foundation.
|
||||
#
|
||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# version 2 for more details (a copy is included in the LICENSE file that
|
||||
# accompanied this code).
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License version
|
||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
# or visit www.oracle.com if you need additional information or have any
|
||||
# questions.
|
||||
#
|
||||
exclusiveAccess.dirs=.
|
@ -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
|
||||
*/
|
||||
|
@ -0,0 +1,23 @@
|
||||
#
|
||||
# Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License version 2 only, as
|
||||
# published by the Free Software Foundation.
|
||||
#
|
||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# version 2 for more details (a copy is included in the LICENSE file that
|
||||
# accompanied this code).
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License version
|
||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
# or visit www.oracle.com if you need additional information or have any
|
||||
# questions.
|
||||
#
|
||||
exclusiveAccess.dirs=.
|
@ -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
|
||||
*/
|
||||
|
@ -0,0 +1,23 @@
|
||||
#
|
||||
# Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License version 2 only, as
|
||||
# published by the Free Software Foundation.
|
||||
#
|
||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# version 2 for more details (a copy is included in the LICENSE file that
|
||||
# accompanied this code).
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License version
|
||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
# or visit www.oracle.com if you need additional information or have any
|
||||
# questions.
|
||||
#
|
||||
exclusiveAccess.dirs=.
|
@ -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
|
||||
*/
|
||||
|
@ -0,0 +1,23 @@
|
||||
#
|
||||
# Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License version 2 only, as
|
||||
# published by the Free Software Foundation.
|
||||
#
|
||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# version 2 for more details (a copy is included in the LICENSE file that
|
||||
# accompanied this code).
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License version
|
||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
# or visit www.oracle.com if you need additional information or have any
|
||||
# questions.
|
||||
#
|
||||
exclusiveAccess.dirs=.
|
@ -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
|
||||
*/
|
||||
|
@ -0,0 +1,23 @@
|
||||
#
|
||||
# Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License version 2 only, as
|
||||
# published by the Free Software Foundation.
|
||||
#
|
||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# version 2 for more details (a copy is included in the LICENSE file that
|
||||
# accompanied this code).
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License version
|
||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
# or visit www.oracle.com if you need additional information or have any
|
||||
# questions.
|
||||
#
|
||||
exclusiveAccess.dirs=.
|
@ -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
|
||||
*/
|
||||
|
@ -0,0 +1,23 @@
|
||||
#
|
||||
# Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License version 2 only, as
|
||||
# published by the Free Software Foundation.
|
||||
#
|
||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# version 2 for more details (a copy is included in the LICENSE file that
|
||||
# accompanied this code).
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License version
|
||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
# or visit www.oracle.com if you need additional information or have any
|
||||
# questions.
|
||||
#
|
||||
exclusiveAccess.dirs=.
|
@ -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
|
||||
*/
|
||||
|
@ -0,0 +1,23 @@
|
||||
#
|
||||
# Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License version 2 only, as
|
||||
# published by the Free Software Foundation.
|
||||
#
|
||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# version 2 for more details (a copy is included in the LICENSE file that
|
||||
# accompanied this code).
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License version
|
||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
# or visit www.oracle.com if you need additional information or have any
|
||||
# questions.
|
||||
#
|
||||
exclusiveAccess.dirs=.
|
@ -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
|
||||
*/
|
||||
|
@ -0,0 +1,23 @@
|
||||
#
|
||||
# Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License version 2 only, as
|
||||
# published by the Free Software Foundation.
|
||||
#
|
||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# version 2 for more details (a copy is included in the LICENSE file that
|
||||
# accompanied this code).
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License version
|
||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
# or visit www.oracle.com if you need additional information or have any
|
||||
# questions.
|
||||
#
|
||||
exclusiveAccess.dirs=.
|
@ -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
|
||||
*/
|
||||
|
@ -0,0 +1,23 @@
|
||||
#
|
||||
# Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License version 2 only, as
|
||||
# published by the Free Software Foundation.
|
||||
#
|
||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# version 2 for more details (a copy is included in the LICENSE file that
|
||||
# accompanied this code).
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License version
|
||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
# or visit www.oracle.com if you need additional information or have any
|
||||
# questions.
|
||||
#
|
||||
exclusiveAccess.dirs=.
|
@ -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
|
||||
*/
|
||||
|
@ -0,0 +1,23 @@
|
||||
#
|
||||
# Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License version 2 only, as
|
||||
# published by the Free Software Foundation.
|
||||
#
|
||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# version 2 for more details (a copy is included in the LICENSE file that
|
||||
# accompanied this code).
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License version
|
||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
# or visit www.oracle.com if you need additional information or have any
|
||||
# questions.
|
||||
#
|
||||
exclusiveAccess.dirs=.
|
@ -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
|
||||
*/
|
||||
|
@ -0,0 +1,23 @@
|
||||
#
|
||||
# Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License version 2 only, as
|
||||
# published by the Free Software Foundation.
|
||||
#
|
||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# version 2 for more details (a copy is included in the LICENSE file that
|
||||
# accompanied this code).
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License version
|
||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
# or visit www.oracle.com if you need additional information or have any
|
||||
# questions.
|
||||
#
|
||||
exclusiveAccess.dirs=.
|
@ -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
|
||||
*/
|
||||
|
@ -0,0 +1,23 @@
|
||||
#
|
||||
# Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License version 2 only, as
|
||||
# published by the Free Software Foundation.
|
||||
#
|
||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# version 2 for more details (a copy is included in the LICENSE file that
|
||||
# accompanied this code).
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License version
|
||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
# or visit www.oracle.com if you need additional information or have any
|
||||
# questions.
|
||||
#
|
||||
exclusiveAccess.dirs=.
|
@ -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
|
||||
*/
|
||||
|
@ -0,0 +1,23 @@
|
||||
#
|
||||
# Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License version 2 only, as
|
||||
# published by the Free Software Foundation.
|
||||
#
|
||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# version 2 for more details (a copy is included in the LICENSE file that
|
||||
# accompanied this code).
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License version
|
||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
# or visit www.oracle.com if you need additional information or have any
|
||||
# questions.
|
||||
#
|
||||
exclusiveAccess.dirs=.
|
@ -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
|
||||
*/
|
||||
|
@ -0,0 +1,23 @@
|
||||
#
|
||||
# Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License version 2 only, as
|
||||
# published by the Free Software Foundation.
|
||||
#
|
||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# version 2 for more details (a copy is included in the LICENSE file that
|
||||
# accompanied this code).
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License version
|
||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
# or visit www.oracle.com if you need additional information or have any
|
||||
# questions.
|
||||
#
|
||||
exclusiveAccess.dirs=.
|
@ -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
|
||||
*/
|
||||
|
@ -0,0 +1,23 @@
|
||||
#
|
||||
# Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License version 2 only, as
|
||||
# published by the Free Software Foundation.
|
||||
#
|
||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# version 2 for more details (a copy is included in the LICENSE file that
|
||||
# accompanied this code).
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License version
|
||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
# or visit www.oracle.com if you need additional information or have any
|
||||
# questions.
|
||||
#
|
||||
exclusiveAccess.dirs=.
|
@ -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
|
||||
*/
|
||||
|
@ -0,0 +1,23 @@
|
||||
#
|
||||
# Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License version 2 only, as
|
||||
# published by the Free Software Foundation.
|
||||
#
|
||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# version 2 for more details (a copy is included in the LICENSE file that
|
||||
# accompanied this code).
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License version
|
||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
# or visit www.oracle.com if you need additional information or have any
|
||||
# questions.
|
||||
#
|
||||
exclusiveAccess.dirs=.
|
@ -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
|
||||
*/
|
||||
|
@ -0,0 +1,23 @@
|
||||
#
|
||||
# Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License version 2 only, as
|
||||
# published by the Free Software Foundation.
|
||||
#
|
||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# version 2 for more details (a copy is included in the LICENSE file that
|
||||
# accompanied this code).
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License version
|
||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
# or visit www.oracle.com if you need additional information or have any
|
||||
# questions.
|
||||
#
|
||||
exclusiveAccess.dirs=.
|
@ -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
|
||||
*/
|
||||
|
@ -0,0 +1,23 @@
|
||||
#
|
||||
# Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License version 2 only, as
|
||||
# published by the Free Software Foundation.
|
||||
#
|
||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# version 2 for more details (a copy is included in the LICENSE file that
|
||||
# accompanied this code).
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License version
|
||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
# or visit www.oracle.com if you need additional information or have any
|
||||
# questions.
|
||||
#
|
||||
exclusiveAccess.dirs=.
|
@ -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
|
||||
*/
|
||||
|
@ -0,0 +1,23 @@
|
||||
#
|
||||
# Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License version 2 only, as
|
||||
# published by the Free Software Foundation.
|
||||
#
|
||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# version 2 for more details (a copy is included in the LICENSE file that
|
||||
# accompanied this code).
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License version
|
||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
# or visit www.oracle.com if you need additional information or have any
|
||||
# questions.
|
||||
#
|
||||
exclusiveAccess.dirs=.
|
@ -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
|
||||
*/
|
||||
|
@ -0,0 +1,23 @@
|
||||
#
|
||||
# Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License version 2 only, as
|
||||
# published by the Free Software Foundation.
|
||||
#
|
||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# version 2 for more details (a copy is included in the LICENSE file that
|
||||
# accompanied this code).
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License version
|
||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
# or visit www.oracle.com if you need additional information or have any
|
||||
# questions.
|
||||
#
|
||||
exclusiveAccess.dirs=.
|
@ -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
|
||||
*/
|
||||
|
@ -0,0 +1,23 @@
|
||||
#
|
||||
# Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License version 2 only, as
|
||||
# published by the Free Software Foundation.
|
||||
#
|
||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# version 2 for more details (a copy is included in the LICENSE file that
|
||||
# accompanied this code).
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License version
|
||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
# or visit www.oracle.com if you need additional information or have any
|
||||
# questions.
|
||||
#
|
||||
exclusiveAccess.dirs=.
|
@ -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
|
||||
*/
|
||||
|
@ -0,0 +1,23 @@
|
||||
#
|
||||
# Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License version 2 only, as
|
||||
# published by the Free Software Foundation.
|
||||
#
|
||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# version 2 for more details (a copy is included in the LICENSE file that
|
||||
# accompanied this code).
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License version
|
||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
# or visit www.oracle.com if you need additional information or have any
|
||||
# questions.
|
||||
#
|
||||
exclusiveAccess.dirs=.
|
@ -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
|
||||
*/
|
||||
|
@ -0,0 +1,23 @@
|
||||
#
|
||||
# Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License version 2 only, as
|
||||
# published by the Free Software Foundation.
|
||||
#
|
||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# version 2 for more details (a copy is included in the LICENSE file that
|
||||
# accompanied this code).
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License version
|
||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
# or visit www.oracle.com if you need additional information or have any
|
||||
# questions.
|
||||
#
|
||||
exclusiveAccess.dirs=.
|
@ -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
|
||||
*/
|
||||
|
@ -0,0 +1,23 @@
|
||||
#
|
||||
# Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License version 2 only, as
|
||||
# published by the Free Software Foundation.
|
||||
#
|
||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# version 2 for more details (a copy is included in the LICENSE file that
|
||||
# accompanied this code).
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License version
|
||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
# or visit www.oracle.com if you need additional information or have any
|
||||
# questions.
|
||||
#
|
||||
exclusiveAccess.dirs=.
|
@ -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
|
||||
*/
|
||||
|
@ -0,0 +1,23 @@
|
||||
#
|
||||
# Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License version 2 only, as
|
||||
# published by the Free Software Foundation.
|
||||
#
|
||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# version 2 for more details (a copy is included in the LICENSE file that
|
||||
# accompanied this code).
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License version
|
||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
# or visit www.oracle.com if you need additional information or have any
|
||||
# questions.
|
||||
#
|
||||
exclusiveAccess.dirs=.
|
@ -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
|
||||
*/
|
||||
|
@ -0,0 +1,23 @@
|
||||
#
|
||||
# Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License version 2 only, as
|
||||
# published by the Free Software Foundation.
|
||||
#
|
||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# version 2 for more details (a copy is included in the LICENSE file that
|
||||
# accompanied this code).
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License version
|
||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
# or visit www.oracle.com if you need additional information or have any
|
||||
# questions.
|
||||
#
|
||||
exclusiveAccess.dirs=.
|
@ -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
|
||||
*/
|
||||
|
@ -0,0 +1,23 @@
|
||||
#
|
||||
# Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License version 2 only, as
|
||||
# published by the Free Software Foundation.
|
||||
#
|
||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# version 2 for more details (a copy is included in the LICENSE file that
|
||||
# accompanied this code).
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License version
|
||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
# or visit www.oracle.com if you need additional information or have any
|
||||
# questions.
|
||||
#
|
||||
exclusiveAccess.dirs=.
|
@ -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
|
||||
*/
|
||||
|
@ -0,0 +1,23 @@
|
||||
#
|
||||
# Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License version 2 only, as
|
||||
# published by the Free Software Foundation.
|
||||
#
|
||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# version 2 for more details (a copy is included in the LICENSE file that
|
||||
# accompanied this code).
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License version
|
||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
# or visit www.oracle.com if you need additional information or have any
|
||||
# questions.
|
||||
#
|
||||
exclusiveAccess.dirs=.
|
@ -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
|
||||
*/
|
||||
|
@ -0,0 +1,23 @@
|
||||
#
|
||||
# Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License version 2 only, as
|
||||
# published by the Free Software Foundation.
|
||||
#
|
||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# version 2 for more details (a copy is included in the LICENSE file that
|
||||
# accompanied this code).
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License version
|
||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
# or visit www.oracle.com if you need additional information or have any
|
||||
# questions.
|
||||
#
|
||||
exclusiveAccess.dirs=.
|
@ -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
|
||||
*/
|
||||
|
@ -0,0 +1,23 @@
|
||||
#
|
||||
# Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License version 2 only, as
|
||||
# published by the Free Software Foundation.
|
||||
#
|
||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# version 2 for more details (a copy is included in the LICENSE file that
|
||||
# accompanied this code).
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License version
|
||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
# or visit www.oracle.com if you need additional information or have any
|
||||
# questions.
|
||||
#
|
||||
exclusiveAccess.dirs=.
|
@ -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
|
||||
*/
|
||||
|
1030
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/ClassNNN.java.template
Normal file
1030
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/ClassNNN.java.template
Normal file
File diff suppressed because it is too large
Load Diff
@ -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");
|
||||
}
|
||||
}
|
||||
}
|
@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
123
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/README
Normal file
123
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/README
Normal file
@ -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.
|
||||
|
||||
|
185
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/UnloadingTest.java
Normal file
185
test/hotspot/jtreg/vmTestbase/gc/g1/unloading/UnloadingTest.java
Normal file
@ -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");
|
||||
}
|
||||
|
||||
}
|
@ -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;
|
||||
}
|
||||
|
||||
}
|
@ -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);
|
||||
|
||||
}
|
@ -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);
|
||||
}
|
||||
|
||||
}
|
@ -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);
|
||||
}
|
||||
|
||||
}
|
@ -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];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -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;
|
||||
}
|
||||
|
||||
}
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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");
|
||||
}
|
||||
}
|
@ -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)];
|
||||
}
|
||||
}
|
@ -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;
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -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;
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -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;
|
||||
}
|
||||
|
||||
}
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -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.");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -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!");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -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;
|
||||
|
||||
}
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -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[] {}));
|
||||
}
|
||||
|
||||
}
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -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);
|
||||
}
|
||||
|
||||
}
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user