mirror of
https://github.com/openjdk/jdk.git
synced 2026-01-28 03:58:21 +00:00
8373945: Use WB.fullGC() in ClassUnloader.unloadClass to force GC for vmTestbase tests
Reviewed-by: cjplummer, lmesnik
This commit is contained in:
parent
d8f45faf58
commit
ce5e0d8a48
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2004, 2025, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2004, 2026, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -46,9 +46,8 @@
|
||||
* generated by nsk.share.gc.Generator (see its javadoc for more details).
|
||||
* Each class has a huge number of fields, but this number is less than the JVM
|
||||
* limitation.
|
||||
* The test loads the classes with nsk.share.gc.GCClassUnloader class that
|
||||
* extends nsk.share.ClassUnloader and has a bit different algorith of eating
|
||||
* heap. As soon as a class is loaded, the test creates an instance of
|
||||
* The test loads the classes with nsk.share.gc.GCClassUnloader class.
|
||||
* As soon as a class is loaded, the test creates an instance of
|
||||
* it - allocates an object of that type. Then it drops references to the
|
||||
* class and to the instance and tries to unload the class. The test does not
|
||||
* expect any exceptions to be thrown.
|
||||
@ -57,10 +56,13 @@
|
||||
* /test/lib
|
||||
*
|
||||
* @comment generate and compile nsk.share.gc.newclass.* classes
|
||||
* @build jdk.test.whitebox.WhiteBox
|
||||
* @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox
|
||||
* @run driver nsk.share.gc.GenClassesBuilder
|
||||
*
|
||||
* @run main/othervm/timeout=1200
|
||||
* -XX:-UseGCOverheadLimit
|
||||
* -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
|
||||
* -Xlog:gc*
|
||||
* gc.gctests.LargeObjects.large001.large001
|
||||
* -largeClassesPath classes
|
||||
@ -79,6 +81,7 @@ import nsk.share.TestFailure;
|
||||
|
||||
import nsk.share.gc.*;
|
||||
import nsk.share.*;
|
||||
import jdk.test.whitebox.WhiteBox;
|
||||
|
||||
public class large001 extends ThreadedGCTest {
|
||||
|
||||
@ -146,8 +149,8 @@ public class large001 extends ThreadedGCTest {
|
||||
List<WeakReference> refs = new ArrayList<WeakReference>(depth);
|
||||
addObjRef(loadedClassInstance, loadedClass, depth, refs);
|
||||
|
||||
// Drop all references to the class and try to unload it
|
||||
Algorithms.eatMemory(getExecutionController());
|
||||
// Keep all references to the class and try to unload it
|
||||
WhiteBox.getWhiteBox().fullGC();
|
||||
log.debug(id + ": Testing non-null after GC force for: " + name);
|
||||
if (loadedClass == null || loadedClassInstance == null) {
|
||||
throw new Exception("Null class");
|
||||
@ -158,21 +161,14 @@ public class large001 extends ThreadedGCTest {
|
||||
throw new Exception("Unexpected null reference");
|
||||
}
|
||||
}
|
||||
// Drop all references to the class and try to unload it
|
||||
refs = null;
|
||||
loadedClass = null;
|
||||
loadedClassInstance = null;
|
||||
|
||||
log.debug(id + ": Unloading class: "
|
||||
+ name);
|
||||
boolean result = unloader.unloadClass(getExecutionController());
|
||||
log.debug(id + ": Result of uloading "
|
||||
+ "class " + name + ": " + result);
|
||||
}
|
||||
} catch (OutOfMemoryError oome) {
|
||||
// just skip if we eat memory in several threads...
|
||||
// rethrow in the case of one thread
|
||||
if (runParams.getNumberOfThreads() == 1) {
|
||||
throw oome;
|
||||
WhiteBox.getWhiteBox().fullGC();
|
||||
}
|
||||
} catch (Throwable t) {
|
||||
throw new TestFailure("Unexpected exception: ", t);
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2017, 2025, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2017, 2026, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -47,9 +47,8 @@
|
||||
* generated by nsk.share.gc.Generator (see its javadoc for more details).
|
||||
* Each class has a huge number of fields, and the number of fields is more than
|
||||
* the JVM limitation.
|
||||
* The test loads the classes with nsk.share.gc.GCClassUnloader class that
|
||||
* extends nsk.share.ClassUnloader and has a bit different algorith of eating
|
||||
* heap. As soon as a class is loaded, the test creates an instance of
|
||||
* The test loads the classes with nsk.share.gc.GCClassUnloader class.
|
||||
* As soon as a class is loaded, the test creates an instance of
|
||||
* it - allocates an object of that type. Then it drops references to the
|
||||
* class and to the instance and tries to unload the class. The test does not
|
||||
* expect any exceptions to be thrown.
|
||||
@ -58,10 +57,13 @@
|
||||
* /test/lib
|
||||
*
|
||||
* @comment generate and compile nsk.share.gc.newclass.* classes
|
||||
* @build jdk.test.whitebox.WhiteBox
|
||||
* @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox
|
||||
* @run driver nsk.share.gc.GenClassesBuilder
|
||||
*
|
||||
* @run main/othervm/timeout=1200
|
||||
* -XX:-UseGCOverheadLimit
|
||||
* -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
|
||||
* gc.gctests.LargeObjects.large001.large001
|
||||
* -largeClassesPath classes
|
||||
* -isOverLimitFields true
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2017, 2025, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2017, 2026, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -47,9 +47,8 @@
|
||||
* generated by nsk.share.gc.Generator (see its javadoc for more details).
|
||||
* Each class has a huge number of fields, but this number is less than the JVM
|
||||
* limitation.
|
||||
* The test loads the classes with nsk.share.gc.GCClassUnloader class that
|
||||
* extends nsk.share.ClassUnloader and has a bit different algorith of eating
|
||||
* heap. As soon as a class is loaded, the test creates an instance of
|
||||
* The test loads the classes with nsk.share.gc.GCClassUnloader class.
|
||||
* As soon as a class is loaded, the test creates an instance of
|
||||
* it - allocates an object of that type. Then it drops references to the
|
||||
* class and to the instance and tries to unload the class. The test does not
|
||||
* expect any exceptions to be thrown.
|
||||
@ -62,10 +61,13 @@
|
||||
* /test/lib
|
||||
*
|
||||
* @comment generate and compile nsk.share.gc.newclass.* classes
|
||||
* @build jdk.test.whitebox.WhiteBox
|
||||
* @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox
|
||||
* @run driver nsk.share.gc.GenClassesBuilder
|
||||
*
|
||||
* @run main/othervm/timeout=1200
|
||||
* -XX:-UseGCOverheadLimit
|
||||
* -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
|
||||
* gc.gctests.LargeObjects.large001.large001
|
||||
* -largeClassesPath classes
|
||||
* -isOverLimitFields false
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2017, 2025, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2017, 2026, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -47,9 +47,8 @@
|
||||
* generated by nsk.share.gc.Generator (see its javadoc for more details).
|
||||
* Each class has a huge number of fields, but this number is less than the JVM
|
||||
* limitation.
|
||||
* The test loads the classes with nsk.share.gc.GCClassUnloader class that
|
||||
* extends nsk.share.ClassUnloader and has a bit different algorith of eating
|
||||
* heap. As soon as a class is loaded, the test creates an instance of
|
||||
* The test loads the classes with nsk.share.gc.GCClassUnloader class.
|
||||
* As soon as a class is loaded, the test creates an instance of
|
||||
* it - allocates an object of that type. Then it drops references to the
|
||||
* class and to the instance and tries to unload the class. The test does not
|
||||
* expect any exceptions to be thrown.
|
||||
@ -62,10 +61,13 @@
|
||||
* /test/lib
|
||||
*
|
||||
* @comment generate and compile nsk.share.gc.newclass.* classes
|
||||
* @build jdk.test.whitebox.WhiteBox
|
||||
* @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox
|
||||
* @run driver nsk.share.gc.GenClassesBuilder
|
||||
*
|
||||
* @run main/othervm/timeout=1200
|
||||
* -XX:-UseGCOverheadLimit
|
||||
* -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
|
||||
* gc.gctests.LargeObjects.large001.large001
|
||||
* -largeClassesPath classes
|
||||
* -isOverLimitFields true
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2017, 2025, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2017, 2026, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -47,9 +47,8 @@
|
||||
* generated by nsk.share.gc.Generator (see its javadoc for more details).
|
||||
* Each class has a huge number of fields, but this number is less than the JVM
|
||||
* limitation.
|
||||
* The test loads the classes with nsk.share.gc.GCClassUnloader class that
|
||||
* extends nsk.share.ClassUnloader and has a bit different algorith of eating
|
||||
* heap. As soon as a class is loaded, the test creates an instance of
|
||||
* The test loads the classes with nsk.share.gc.GCClassUnloader class.
|
||||
* As soon as a class is loaded, the test creates an instance of
|
||||
* it - allocates an object of that type. Then it drops references to the
|
||||
* class and to the instance and tries to unload the class. The test does not
|
||||
* expect any exceptions to be thrown.
|
||||
@ -62,10 +61,13 @@
|
||||
* /test/lib
|
||||
*
|
||||
* @comment generate and compile nsk.share.gc.newclass.* classes
|
||||
* @build jdk.test.whitebox.WhiteBox
|
||||
* @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox
|
||||
* @run driver nsk.share.gc.GenClassesBuilder
|
||||
*
|
||||
* @run main/othervm/timeout=1200
|
||||
* -XX:-UseGCOverheadLimit
|
||||
* -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
|
||||
* gc.gctests.LargeObjects.large001.large001
|
||||
* -largeClassesPath classes
|
||||
* -isOverLimitFields true
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2018, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2018, 2026, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -55,6 +55,8 @@
|
||||
* nsk.jdi.ClassObjectReference.reflectedType.reflectype002a
|
||||
*
|
||||
* @comment compile loadclassXX to bin/loadclassXX
|
||||
* @build jdk.test.whitebox.WhiteBox
|
||||
* @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox
|
||||
* @run driver nsk.share.ExtraClassesBuilder
|
||||
* loadclass
|
||||
*
|
||||
@ -65,6 +67,7 @@
|
||||
* -waittime=5
|
||||
* -debugee.vmkind=java
|
||||
* -transport.address=dynamic
|
||||
* -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" ./bin
|
||||
* -debugee.vmkeys="${test.vm.opts} ${test.java.opts} -Xbootclasspath/a:.
|
||||
* -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI"
|
||||
* ./bin
|
||||
*/
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2018, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2018, 2026, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -42,7 +42,7 @@
|
||||
* debugger and debugee communicates with special commands.
|
||||
* The debugger forces debuggee to load checked class, creates and
|
||||
* enables ClassUnloadRequest. Next, debugger forces debuggee to
|
||||
* unload class, using memory stressing techique, and waits for
|
||||
* unload class, using whitebox full GC techique, and waits for
|
||||
* ClassUnloadEvent.
|
||||
* If expected ClassUnloadEvent occurs, debugger tests method
|
||||
* ClassUnloadEvent.className() and verifies that this event
|
||||
@ -81,6 +81,8 @@
|
||||
* nsk.jdi.ClassUnloadEvent.className.classname001a
|
||||
*
|
||||
* @comment compile loadclassXX to bin/loadclassXX
|
||||
* @build jdk.test.whitebox.WhiteBox
|
||||
* @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox
|
||||
* @run driver nsk.share.ExtraClassesBuilder
|
||||
* loadclass
|
||||
*
|
||||
@ -92,6 +94,6 @@
|
||||
* -waittime=5
|
||||
* -debugee.vmkind=java
|
||||
* -transport.address=dynamic
|
||||
* -debugee.vmkeys="${test.vm.opts} ${test.java.opts}"
|
||||
* -debugee.vmkeys="${test.vm.opts} ${test.java.opts} -Xbootclasspath/a:.
|
||||
* -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI"
|
||||
*/
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2018, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2018, 2026, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -44,7 +44,7 @@
|
||||
* debugger and debugee communicates with special commands.
|
||||
* The debugger forces debugge to load checked classes, creates and
|
||||
* enables ClassUnloadRequest. Next, debugger forces debuggee to
|
||||
* unload classes, using memory stressing techique, and waits for
|
||||
* unload classes, using whitebox full GC techique, and waits for
|
||||
* ClassUnloadEvent.
|
||||
* If each expected ClassUnloadEvent occurs, debugger tests method
|
||||
* ClassUnloadEvent.classSignature() and verifies that this event
|
||||
@ -87,6 +87,8 @@
|
||||
* nsk.jdi.ClassUnloadEvent.classSignature.signature001a
|
||||
*
|
||||
* @comment compile loadclassXX to bin/loadclassXX
|
||||
* @build jdk.test.whitebox.WhiteBox
|
||||
* @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox
|
||||
* @run driver nsk.share.ExtraClassesBuilder
|
||||
* loadclass
|
||||
*
|
||||
@ -98,6 +100,6 @@
|
||||
* -waittime=5
|
||||
* -debugee.vmkind=java
|
||||
* -transport.address=dynamic
|
||||
* -debugee.vmkeys="${test.vm.opts} ${test.java.opts}"
|
||||
* -debugee.vmkeys="${test.vm.opts} ${test.java.opts} -Xbootclasspath/a:.
|
||||
* -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI"
|
||||
*/
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2018, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2018, 2026, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -67,6 +67,8 @@
|
||||
* nsk.jdi.ClassUnloadRequest.addClassExclusionFilter.exclfilter001a
|
||||
*
|
||||
* @comment compile loadclassXX to bin/loadclassXX
|
||||
* @build jdk.test.whitebox.WhiteBox
|
||||
* @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox
|
||||
* @run driver nsk.share.ExtraClassesBuilder
|
||||
* loadclass
|
||||
*
|
||||
@ -77,6 +79,7 @@
|
||||
* -waittime=5
|
||||
* -debugee.vmkind=java
|
||||
* -transport.address=dynamic
|
||||
* -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" ./bin
|
||||
* -debugee.vmkeys="${test.vm.opts} ${test.java.opts} -Xbootclasspath/a:.
|
||||
* -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI"
|
||||
* ./bin
|
||||
*/
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2018, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2018, 2026, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -65,6 +65,8 @@
|
||||
* nsk.jdi.ClassUnloadRequest.addClassFilter.filter001a
|
||||
*
|
||||
* @comment compile loadclassXX to bin/loadclassXX
|
||||
* @build jdk.test.whitebox.WhiteBox
|
||||
* @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox
|
||||
* @run driver nsk.share.ExtraClassesBuilder
|
||||
* loadclass
|
||||
*
|
||||
@ -75,6 +77,7 @@
|
||||
* -waittime=5
|
||||
* -debugee.vmkind=java
|
||||
* -transport.address=dynamic
|
||||
* -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" ./bin
|
||||
* -debugee.vmkeys="${test.vm.opts} ${test.java.opts} -Xbootclasspath/a:.
|
||||
* -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI"
|
||||
* ./bin
|
||||
*/
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2018, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2018, 2026, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -55,6 +55,8 @@
|
||||
* nsk.jdi.ReferenceType.allFields.allfields003a
|
||||
*
|
||||
* @comment compile loadclassXX to bin/loadclassXX
|
||||
* @build jdk.test.whitebox.WhiteBox
|
||||
* @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox
|
||||
* @run driver nsk.share.ExtraClassesBuilder
|
||||
* loadclass
|
||||
*
|
||||
@ -65,6 +67,7 @@
|
||||
* -waittime=5
|
||||
* -debugee.vmkind=java
|
||||
* -transport.address=dynamic
|
||||
* -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" ./bin
|
||||
* -debugee.vmkeys="${test.vm.opts} ${test.java.opts} -Xbootclasspath/a:.
|
||||
* -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI"
|
||||
* ./bin
|
||||
*/
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2018, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2018, 2026, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -55,6 +55,8 @@
|
||||
* nsk.jdi.ReferenceType.allMethods.allmethods003a
|
||||
*
|
||||
* @comment compile loadclassXX to bin/loadclassXX
|
||||
* @build jdk.test.whitebox.WhiteBox
|
||||
* @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox
|
||||
* @run driver nsk.share.ExtraClassesBuilder
|
||||
* loadclass
|
||||
*
|
||||
@ -65,6 +67,7 @@
|
||||
* -waittime=5
|
||||
* -debugee.vmkind=java
|
||||
* -transport.address=dynamic
|
||||
* -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" ./bin
|
||||
* -debugee.vmkeys="${test.vm.opts} ${test.java.opts} -Xbootclasspath/a:.
|
||||
* -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI"
|
||||
* ./bin
|
||||
*/
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2018, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2018, 2026, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -55,6 +55,8 @@
|
||||
* nsk.jdi.ReferenceType.classObject.classobj002a
|
||||
*
|
||||
* @comment compile loadclassXX to bin/loadclassXX
|
||||
* @build jdk.test.whitebox.WhiteBox
|
||||
* @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox
|
||||
* @run driver nsk.share.ExtraClassesBuilder
|
||||
* loadclass
|
||||
*
|
||||
@ -65,6 +67,7 @@
|
||||
* -waittime=5
|
||||
* -debugee.vmkind=java
|
||||
* -transport.address=dynamic
|
||||
* -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" ./bin
|
||||
* -debugee.vmkeys="${test.vm.opts} ${test.java.opts} -Xbootclasspath/a:.
|
||||
* -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI"
|
||||
* ./bin
|
||||
*/
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2018, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2018, 2026, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -55,6 +55,8 @@
|
||||
* nsk.jdi.ReferenceType.equals.equals002a
|
||||
*
|
||||
* @comment compile loadclassXX to bin/loadclassXX
|
||||
* @build jdk.test.whitebox.WhiteBox
|
||||
* @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox
|
||||
* @run driver nsk.share.ExtraClassesBuilder
|
||||
* loadclass
|
||||
*
|
||||
@ -65,6 +67,7 @@
|
||||
* -waittime=5
|
||||
* -debugee.vmkind=java
|
||||
* -transport.address=dynamic
|
||||
* -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" ./bin
|
||||
* -debugee.vmkeys="${test.vm.opts} ${test.java.opts} -Xbootclasspath/a:.
|
||||
* -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI"
|
||||
* ./bin
|
||||
*/
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2018, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2018, 2026, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -55,6 +55,8 @@
|
||||
* nsk.jdi.ReferenceType.failedToInitialize.failedtoinit002a
|
||||
*
|
||||
* @comment compile loadclassXX to bin/loadclassXX
|
||||
* @build jdk.test.whitebox.WhiteBox
|
||||
* @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox
|
||||
* @run driver nsk.share.ExtraClassesBuilder
|
||||
* loadclass
|
||||
*
|
||||
@ -65,6 +67,7 @@
|
||||
* -waittime=5
|
||||
* -debugee.vmkind=java
|
||||
* -transport.address=dynamic
|
||||
* -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" ./bin
|
||||
* -debugee.vmkeys="${test.vm.opts} ${test.java.opts} -Xbootclasspath/a:.
|
||||
* -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI"
|
||||
* ./bin
|
||||
*/
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2018, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2018, 2026, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -55,6 +55,8 @@
|
||||
* nsk.jdi.ReferenceType.fieldByName.fieldbyname003a
|
||||
*
|
||||
* @comment compile loadclassXX to bin/loadclassXX
|
||||
* @build jdk.test.whitebox.WhiteBox
|
||||
* @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox
|
||||
* @run driver nsk.share.ExtraClassesBuilder
|
||||
* loadclass
|
||||
*
|
||||
@ -65,6 +67,7 @@
|
||||
* -waittime=5
|
||||
* -debugee.vmkind=java
|
||||
* -transport.address=dynamic
|
||||
* -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" ./bin
|
||||
* -debugee.vmkeys="${test.vm.opts} ${test.java.opts} -Xbootclasspath/a:.
|
||||
* -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI"
|
||||
* ./bin
|
||||
*/
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2018, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2018, 2026, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -55,6 +55,8 @@
|
||||
* nsk.jdi.ReferenceType.fields.fields003a
|
||||
*
|
||||
* @comment compile loadclassXX to bin/loadclassXX
|
||||
* @build jdk.test.whitebox.WhiteBox
|
||||
* @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox
|
||||
* @run driver nsk.share.ExtraClassesBuilder
|
||||
* loadclass
|
||||
*
|
||||
@ -65,6 +67,7 @@
|
||||
* -waittime=5
|
||||
* -debugee.vmkind=java
|
||||
* -transport.address=dynamic
|
||||
* -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" ./bin
|
||||
* -debugee.vmkeys="${test.vm.opts} ${test.java.opts} -Xbootclasspath/a:.
|
||||
* -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI"
|
||||
* ./bin
|
||||
*/
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2018, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2018, 2026, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -55,6 +55,8 @@
|
||||
* nsk.jdi.ReferenceType.hashCode.hashcode002a
|
||||
*
|
||||
* @comment compile loadclassXX to bin/loadclassXX
|
||||
* @build jdk.test.whitebox.WhiteBox
|
||||
* @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox
|
||||
* @run driver nsk.share.ExtraClassesBuilder
|
||||
* loadclass
|
||||
*
|
||||
@ -65,6 +67,7 @@
|
||||
* -waittime=5
|
||||
* -debugee.vmkind=java
|
||||
* -transport.address=dynamic
|
||||
* -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" ./bin
|
||||
* -debugee.vmkeys="${test.vm.opts} ${test.java.opts} -Xbootclasspath/a:.
|
||||
* -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI"
|
||||
* ./bin
|
||||
*/
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2018, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2018, 2026, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -55,6 +55,8 @@
|
||||
* nsk.jdi.ReferenceType.isAbstract.isabstract002a
|
||||
*
|
||||
* @comment compile loadclassXX to bin/loadclassXX
|
||||
* @build jdk.test.whitebox.WhiteBox
|
||||
* @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox
|
||||
* @run driver nsk.share.ExtraClassesBuilder
|
||||
* loadclass
|
||||
*
|
||||
@ -65,6 +67,7 @@
|
||||
* -waittime=5
|
||||
* -debugee.vmkind=java
|
||||
* -transport.address=dynamic
|
||||
* -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" ./bin
|
||||
* -debugee.vmkeys="${test.vm.opts} ${test.java.opts} -Xbootclasspath/a:.
|
||||
* -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI"
|
||||
* ./bin
|
||||
*/
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2018, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2018, 2026, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -55,6 +55,8 @@
|
||||
* nsk.jdi.ReferenceType.isInitialized.isinit002a
|
||||
*
|
||||
* @comment compile loadclassXX to bin/loadclassXX
|
||||
* @build jdk.test.whitebox.WhiteBox
|
||||
* @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox
|
||||
* @run driver nsk.share.ExtraClassesBuilder
|
||||
* loadclass
|
||||
*
|
||||
@ -65,6 +67,7 @@
|
||||
* -waittime=5
|
||||
* -debugee.vmkind=java
|
||||
* -transport.address=dynamic
|
||||
* -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" ./bin
|
||||
* -debugee.vmkeys="${test.vm.opts} ${test.java.opts} -Xbootclasspath/a:.
|
||||
* -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI"
|
||||
* ./bin
|
||||
*/
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2018, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2018, 2026, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -55,6 +55,8 @@
|
||||
* nsk.jdi.ReferenceType.isPrepared.isprepared002a
|
||||
*
|
||||
* @comment compile loadclassXX to bin/loadclassXX
|
||||
* @build jdk.test.whitebox.WhiteBox
|
||||
* @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox
|
||||
* @run driver nsk.share.ExtraClassesBuilder
|
||||
* loadclass
|
||||
*
|
||||
@ -65,6 +67,7 @@
|
||||
* -waittime=5
|
||||
* -debugee.vmkind=java
|
||||
* -transport.address=dynamic
|
||||
* -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" ./bin
|
||||
* -debugee.vmkeys="${test.vm.opts} ${test.java.opts} -Xbootclasspath/a:.
|
||||
* -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI"
|
||||
* ./bin
|
||||
*/
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2018, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2018, 2026, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -57,6 +57,8 @@
|
||||
* nsk.jdi.ReferenceType.isVerified.isverified002a
|
||||
*
|
||||
* @comment compile loadclassXX to bin/loadclassXX
|
||||
* @build jdk.test.whitebox.WhiteBox
|
||||
* @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox
|
||||
* @run driver nsk.share.ExtraClassesBuilder
|
||||
* loadclass
|
||||
*
|
||||
@ -67,6 +69,7 @@
|
||||
* -waittime=5
|
||||
* -debugee.vmkind=java
|
||||
* -transport.address=dynamic
|
||||
* -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" ./bin
|
||||
* -debugee.vmkeys="${test.vm.opts} ${test.java.opts} -Xbootclasspath/a:.
|
||||
* -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI"
|
||||
* ./bin
|
||||
*/
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2018, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2018, 2026, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -57,7 +57,8 @@
|
||||
* @comment compile loadclassXX to bin/loadclassXX
|
||||
* @run driver nsk.share.ExtraClassesBuilder
|
||||
* loadclass
|
||||
*
|
||||
* @build jdk.test.whitebox.WhiteBox
|
||||
* @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox
|
||||
* @run driver
|
||||
* nsk.jdi.ReferenceType.methods.methods003
|
||||
* -verbose
|
||||
@ -65,6 +66,7 @@
|
||||
* -waittime=5
|
||||
* -debugee.vmkind=java
|
||||
* -transport.address=dynamic
|
||||
* -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" ./bin
|
||||
* -debugee.vmkeys="${test.vm.opts} ${test.java.opts} -Xbootclasspath/a:.
|
||||
* -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI"
|
||||
* ./bin
|
||||
*/
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2018, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2018, 2026, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -55,6 +55,8 @@
|
||||
* nsk.jdi.ReferenceType.methodsByName_s.methbyname_s003a
|
||||
*
|
||||
* @comment compile loadclassXX to bin/loadclassXX
|
||||
* @build jdk.test.whitebox.WhiteBox
|
||||
* @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox
|
||||
* @run driver nsk.share.ExtraClassesBuilder
|
||||
* loadclass
|
||||
*
|
||||
@ -65,6 +67,7 @@
|
||||
* -waittime=5
|
||||
* -debugee.vmkind=java
|
||||
* -transport.address=dynamic
|
||||
* -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" ./bin
|
||||
* -debugee.vmkeys="${test.vm.opts} ${test.java.opts} -Xbootclasspath/a:.
|
||||
* -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI"
|
||||
* ./bin
|
||||
*/
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2018, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2018, 2026, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -57,6 +57,8 @@
|
||||
* @comment compile loadclassXX to bin/loadclassXX
|
||||
* @run driver nsk.share.ExtraClassesBuilder
|
||||
* loadclass
|
||||
* @build jdk.test.whitebox.WhiteBox
|
||||
* @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox
|
||||
*
|
||||
* @run driver
|
||||
* nsk.jdi.ReferenceType.methodsByName_ss.methbyname_ss003
|
||||
@ -65,6 +67,7 @@
|
||||
* -waittime=5
|
||||
* -debugee.vmkind=java
|
||||
* -transport.address=dynamic
|
||||
* -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" ./bin
|
||||
* -debugee.vmkeys="${test.vm.opts} ${test.java.opts} -Xbootclasspath/a:.
|
||||
* -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI"
|
||||
* ./bin
|
||||
*/
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2018, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2018, 2026, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -55,6 +55,8 @@
|
||||
* nsk.jdi.ReferenceType.name.name002a
|
||||
*
|
||||
* @comment compile loadclassXX to bin/loadclassXX
|
||||
* @build jdk.test.whitebox.WhiteBox
|
||||
* @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox
|
||||
* @run driver nsk.share.ExtraClassesBuilder
|
||||
* loadclass
|
||||
*
|
||||
@ -65,6 +67,7 @@
|
||||
* -waittime=5
|
||||
* -debugee.vmkind=java
|
||||
* -transport.address=dynamic
|
||||
* -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" ./bin
|
||||
* -debugee.vmkeys="${test.vm.opts} ${test.java.opts} -Xbootclasspath/a:.
|
||||
* -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI"
|
||||
* ./bin
|
||||
*/
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2018, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2018, 2026, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -55,6 +55,8 @@
|
||||
* nsk.jdi.ReferenceType.sourceName.sourcename002a
|
||||
*
|
||||
* @comment compile loadclassXX to bin/loadclassXX
|
||||
* @build jdk.test.whitebox.WhiteBox
|
||||
* @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox
|
||||
* @run driver nsk.share.ExtraClassesBuilder
|
||||
* loadclass
|
||||
*
|
||||
@ -65,6 +67,7 @@
|
||||
* -waittime=5
|
||||
* -debugee.vmkind=java
|
||||
* -transport.address=dynamic
|
||||
* -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" ./bin
|
||||
* -debugee.vmkeys="${test.vm.opts} ${test.java.opts} -Xbootclasspath/a:.
|
||||
* -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI"
|
||||
* ./bin
|
||||
*/
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2018, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2018, 2026, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -55,6 +55,8 @@
|
||||
* nsk.jdi.ReferenceType.visibleFields.visibfield003a
|
||||
*
|
||||
* @comment compile loadclassXX to bin/loadclassXX
|
||||
* @build jdk.test.whitebox.WhiteBox
|
||||
* @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox
|
||||
* @run driver nsk.share.ExtraClassesBuilder
|
||||
* loadclass
|
||||
*
|
||||
@ -65,6 +67,7 @@
|
||||
* -waittime=5
|
||||
* -debugee.vmkind=java
|
||||
* -transport.address=dynamic
|
||||
* -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" ./bin
|
||||
* -debugee.vmkeys="${test.vm.opts} ${test.java.opts} -Xbootclasspath/a:.
|
||||
* -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI"
|
||||
* ./bin
|
||||
*/
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2018, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2018, 2026, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -55,6 +55,8 @@
|
||||
* nsk.jdi.ReferenceType.visibleMethods.visibmethod003a
|
||||
*
|
||||
* @comment compile loadclassXX to bin/loadclassXX
|
||||
* @build jdk.test.whitebox.WhiteBox
|
||||
* @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox
|
||||
* @run driver nsk.share.ExtraClassesBuilder
|
||||
* loadclass
|
||||
*
|
||||
@ -65,6 +67,7 @@
|
||||
* -waittime=5
|
||||
* -debugee.vmkind=java
|
||||
* -transport.address=dynamic
|
||||
* -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" ./bin
|
||||
* -debugee.vmkeys="${test.vm.opts} ${test.java.opts} -Xbootclasspath/a:.
|
||||
* -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI"
|
||||
* ./bin
|
||||
*/
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2007, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2007, 2026, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -48,6 +48,8 @@
|
||||
* @build nsk.jdi.VirtualMachine.instanceCounts.instancecounts003.instancecounts003
|
||||
* nsk.share.jdi.TestClass1
|
||||
* nsk.share.jdi.TestInterfaceImplementer1
|
||||
* @build jdk.test.whitebox.WhiteBox
|
||||
* @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox
|
||||
* @run driver
|
||||
* nsk.jdi.VirtualMachine.instanceCounts.instancecounts003.instancecounts003
|
||||
* -verbose
|
||||
@ -55,7 +57,9 @@
|
||||
* -waittime=5
|
||||
* -debugee.vmkind=java
|
||||
* -transport.address=dynamic
|
||||
* -debugee.vmkeys="-Xmx256M ${test.vm.opts} ${test.java.opts}"
|
||||
* -debugee.vmkeys="-Xmx256M ${test.vm.opts} ${test.java.opts}
|
||||
* -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
|
||||
* -XX:+WhiteBoxAPI"
|
||||
* -testClassPath ${test.class.path}
|
||||
*/
|
||||
|
||||
|
||||
@ -47,7 +47,7 @@ public class compmethunload001 {
|
||||
private final static String CLS_TO_BE_UNLOADED =
|
||||
"nsk.jvmti.CompiledMethodUnload.compmethunload001u";
|
||||
|
||||
private final static int MAX_ITERATIONS = 5;
|
||||
private final static int MAX_ITERATIONS = 10;
|
||||
|
||||
static {
|
||||
try {
|
||||
@ -95,7 +95,6 @@ public class compmethunload001 {
|
||||
|
||||
boolean clsUnloaded = clsUnLoader.unloadClass();
|
||||
clsUnLoader = null;
|
||||
System.gc();
|
||||
}
|
||||
|
||||
private int runThis(String argv[], PrintStream out) throws Exception {
|
||||
@ -110,12 +109,13 @@ public class compmethunload001 {
|
||||
int num = unloaded();
|
||||
int iter = 0;
|
||||
while (num == 0) {
|
||||
System.gc();
|
||||
num = unloaded();
|
||||
iter++;
|
||||
if (iter > MAX_ITERATIONS) {
|
||||
throw new Failure("PRODUCT BUG: class was not unloaded in " + MAX_ITERATIONS);
|
||||
}
|
||||
// The unload is delayed because it happens async
|
||||
Thread.sleep(1000);
|
||||
num = unloaded();
|
||||
iter++;
|
||||
if (iter > MAX_ITERATIONS) {
|
||||
throw new Failure("PRODUCT BUG: class was not unloaded in " + MAX_ITERATIONS);
|
||||
}
|
||||
}
|
||||
System.out.println("Number of unloaded events " + num + " number of iterations " + iter);
|
||||
return check();
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2018, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2018, 2026, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -46,12 +46,14 @@
|
||||
* @build nsk.jvmti.CompiledMethodUnload.compmethunload001
|
||||
*
|
||||
* @comment compile loadclassXX to bin/loadclassXX
|
||||
* @build jdk.test.whitebox.WhiteBox
|
||||
* @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox
|
||||
* @run driver nsk.share.ExtraClassesBuilder
|
||||
* loadclass
|
||||
*
|
||||
* @run main/othervm/native
|
||||
* -agentlib:compmethunload001=-waittime=5
|
||||
* -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
|
||||
* nsk.jvmti.CompiledMethodUnload.compmethunload001
|
||||
* ./bin
|
||||
*/
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2018, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2018, 2026, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -51,12 +51,15 @@
|
||||
* @build nsk.jvmti.ObjectFree.objfree001
|
||||
*
|
||||
* @comment compile loadclassXX to bin/loadclassXX
|
||||
* @build jdk.test.whitebox.WhiteBox
|
||||
* @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox
|
||||
* @run driver nsk.share.ExtraClassesBuilder
|
||||
* loadclass
|
||||
*
|
||||
* @run main/othervm/native
|
||||
* -agentlib:objfree001=-waittime=5
|
||||
* -XX:-UseGCOverheadLimit
|
||||
* -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
|
||||
* nsk.jvmti.ObjectFree.objfree001
|
||||
* ./bin 5 ./bin
|
||||
*/
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2018, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2018, 2026, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -71,13 +71,15 @@
|
||||
* @build nsk.jvmti.scenarios.events.EM02.em02t003
|
||||
*
|
||||
* @comment compile loadclassXX to bin/loadclassXX
|
||||
* @build jdk.test.whitebox.WhiteBox
|
||||
* @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox
|
||||
* @run driver nsk.share.ExtraClassesBuilder
|
||||
* loadclass
|
||||
*
|
||||
* @run main/othervm/native
|
||||
* -agentlib:em02t003=-waittime=5
|
||||
* -XX:-UseGCOverheadLimit
|
||||
* -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
|
||||
* nsk.jvmti.scenarios.events.EM02.em02t003
|
||||
* ./bin/loadclass
|
||||
*/
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2018, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2018, 2026, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -64,13 +64,15 @@
|
||||
* @build nsk.jvmti.scenarios.events.EM02.em02t005
|
||||
*
|
||||
* @comment compile loadclassXX to bin/loadclassXX
|
||||
* @build jdk.test.whitebox.WhiteBox
|
||||
* @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox
|
||||
* @run driver nsk.share.ExtraClassesBuilder
|
||||
* loadclass
|
||||
*
|
||||
* @run main/othervm/native
|
||||
* -agentlib:em02t005=-waittime=5
|
||||
* -XX:-UseGCOverheadLimit
|
||||
* -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
|
||||
* nsk.jvmti.scenarios.events.EM02.em02t005
|
||||
* ./bin/loadclass
|
||||
*/
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2018, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2018, 2026, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -57,13 +57,15 @@
|
||||
* @build nsk.jvmti.scenarios.events.EM07.em07t002
|
||||
*
|
||||
* @comment compile loadclassXX to bin/loadclassXX
|
||||
* @build jdk.test.whitebox.WhiteBox
|
||||
* @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox
|
||||
* @run driver nsk.share.ExtraClassesBuilder
|
||||
* loadclass
|
||||
*
|
||||
* @run main/othervm/native
|
||||
* -agentlib:em07t002=attempts=2,-waittime=5
|
||||
* -XX:-UseGCOverheadLimit
|
||||
* -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
|
||||
* nsk.jvmti.scenarios.events.EM07.em07t002
|
||||
* ./bin/loadclass
|
||||
*/
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2018, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2018, 2026, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -55,13 +55,15 @@
|
||||
* @build nsk.jvmti.scenarios.extension.EX03.ex03t001
|
||||
*
|
||||
* @comment compile loadclassXX to bin/loadclassXX
|
||||
* @build jdk.test.whitebox.WhiteBox
|
||||
* @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox
|
||||
* @run driver nsk.share.ExtraClassesBuilder
|
||||
* loadclass
|
||||
*
|
||||
* @run main/othervm/native
|
||||
* -agentlib:ex03t001=-waittime=5
|
||||
* -XX:-UseGCOverheadLimit
|
||||
* -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
|
||||
* nsk.jvmti.scenarios.extension.EX03.ex03t001
|
||||
* ./bin/loadclass
|
||||
*/
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2017, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2017, 2026, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -43,12 +43,14 @@
|
||||
* @library /vmTestbase
|
||||
* /test/lib
|
||||
* @comment generate and compile LoadableClassXXX classes
|
||||
* @build jdk.test.whitebox.WhiteBox
|
||||
* @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox
|
||||
* @run driver nsk.monitoring.stress.classload.GenClassesBuilder
|
||||
* @run main/othervm
|
||||
* -XX:-UseGCOverheadLimit
|
||||
* -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
|
||||
* nsk.monitoring.stress.classload.load001
|
||||
* classes
|
||||
* -loadableClassCount=1
|
||||
* -loadersCount=100
|
||||
*/
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2017, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2017, 2026, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -46,13 +46,15 @@
|
||||
* @library /vmTestbase
|
||||
* /test/lib
|
||||
* @comment generate and compile LoadableClassXXX classes
|
||||
* @build jdk.test.whitebox.WhiteBox
|
||||
* @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox
|
||||
* @run driver nsk.monitoring.stress.classload.GenClassesBuilder
|
||||
* @run main/othervm/timeout=180
|
||||
* -XX:-UseGCOverheadLimit
|
||||
* -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
|
||||
* nsk.monitoring.stress.classload.load001
|
||||
* classes
|
||||
* -testMode=server
|
||||
* -loadableClassCount=1
|
||||
* -loadersCount=100
|
||||
*/
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2017, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2017, 2026, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -46,9 +46,12 @@
|
||||
* @library /vmTestbase
|
||||
* /test/lib
|
||||
* @comment generate and compile LoadableClassXXX classes
|
||||
* @build jdk.test.whitebox.WhiteBox
|
||||
* @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox
|
||||
* @run driver nsk.monitoring.stress.classload.GenClassesBuilder
|
||||
* @run main/othervm/timeout=180
|
||||
* -XX:-UseGCOverheadLimit
|
||||
* -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
|
||||
* nsk.monitoring.stress.classload.load001
|
||||
* classes
|
||||
* -testMode=server
|
||||
@ -56,4 +59,3 @@
|
||||
* -loadableClassCount=1
|
||||
* -loadersCount=100
|
||||
*/
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2017, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2017, 2026, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -47,13 +47,15 @@
|
||||
* @library /vmTestbase
|
||||
* /test/lib
|
||||
* @comment generate and compile LoadableClassXXX classes
|
||||
* @build jdk.test.whitebox.WhiteBox
|
||||
* @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox
|
||||
* @run driver nsk.monitoring.stress.classload.GenClassesBuilder
|
||||
* @run main/othervm
|
||||
* -XX:-UseGCOverheadLimit
|
||||
* -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
|
||||
* nsk.monitoring.stress.classload.load001
|
||||
* classes
|
||||
* -singleClassloaderClass
|
||||
* -loadableClassCount=1
|
||||
* -loadersCount=100
|
||||
*/
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2017, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2017, 2026, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -44,9 +44,12 @@
|
||||
* @library /vmTestbase
|
||||
* /test/lib
|
||||
* @comment generate and compile LoadableClassXXX classes
|
||||
* @build jdk.test.whitebox.WhiteBox
|
||||
* @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox
|
||||
* @run driver nsk.monitoring.stress.classload.GenClassesBuilder
|
||||
* @run main/othervm
|
||||
* -XX:-UseGCOverheadLimit
|
||||
* -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
|
||||
* nsk.monitoring.stress.classload.load001
|
||||
* classes
|
||||
* -testMode=server
|
||||
@ -54,4 +57,3 @@
|
||||
* -loadableClassCount=1
|
||||
* -loadersCount=100
|
||||
*/
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2017, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2017, 2026, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -44,9 +44,12 @@
|
||||
* @library /vmTestbase
|
||||
* /test/lib
|
||||
* @comment generate and compile LoadableClassXXX classes
|
||||
* @build jdk.test.whitebox.WhiteBox
|
||||
* @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox
|
||||
* @run driver nsk.monitoring.stress.classload.GenClassesBuilder
|
||||
* @run main/othervm
|
||||
* -XX:-UseGCOverheadLimit
|
||||
* -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
|
||||
* nsk.monitoring.stress.classload.load001
|
||||
* classes
|
||||
* -testMode=server
|
||||
@ -55,4 +58,3 @@
|
||||
* -loadableClassCount=1
|
||||
* -loadersCount=100
|
||||
*/
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2017, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2017, 2026, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -46,12 +46,14 @@
|
||||
* @library /vmTestbase
|
||||
* /test/lib
|
||||
* @comment generate and compile LoadableClassXXX classes
|
||||
* @build jdk.test.whitebox.WhiteBox
|
||||
* @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox
|
||||
* @run driver nsk.monitoring.stress.classload.GenClassesBuilder
|
||||
* @run main/othervm/timeout=360
|
||||
* -XX:-UseGCOverheadLimit
|
||||
* -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
|
||||
* nsk.monitoring.stress.classload.load001
|
||||
* classes
|
||||
* -loadableClassCount=100
|
||||
* -loadersCount=100
|
||||
*/
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2017, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2017, 2026, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -44,13 +44,15 @@
|
||||
* @library /vmTestbase
|
||||
* /test/lib
|
||||
* @comment generate and compile LoadableClassXXX classes
|
||||
* @build jdk.test.whitebox.WhiteBox
|
||||
* @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox
|
||||
* @run driver nsk.monitoring.stress.classload.GenClassesBuilder
|
||||
* @run main/othervm/timeout=420
|
||||
* -XX:-UseGCOverheadLimit
|
||||
* -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
|
||||
* nsk.monitoring.stress.classload.load001
|
||||
* classes
|
||||
* -testMode=server
|
||||
* -loadableClassCount=100
|
||||
* -loadersCount=100
|
||||
*/
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2017, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2017, 2026, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -44,9 +44,12 @@
|
||||
* @library /vmTestbase
|
||||
* /test/lib
|
||||
* @comment generate and compile LoadableClassXXX classes
|
||||
* @build jdk.test.whitebox.WhiteBox
|
||||
* @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox
|
||||
* @run driver nsk.monitoring.stress.classload.GenClassesBuilder
|
||||
* @run main/othervm/timeout=420
|
||||
* -XX:-UseGCOverheadLimit
|
||||
* -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
|
||||
* nsk.monitoring.stress.classload.load001
|
||||
* classes
|
||||
* -testMode=server
|
||||
@ -54,4 +57,3 @@
|
||||
* -loadableClassCount=100
|
||||
* -loadersCount=100
|
||||
*/
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2017, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2017, 2026, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -46,13 +46,15 @@
|
||||
* @library /vmTestbase
|
||||
* /test/lib
|
||||
* @comment generate and compile LoadableClassXXX classes
|
||||
* @build jdk.test.whitebox.WhiteBox
|
||||
* @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox
|
||||
* @run driver nsk.monitoring.stress.classload.GenClassesBuilder
|
||||
* @run main/othervm/timeout=300
|
||||
* -XX:-UseGCOverheadLimit
|
||||
* -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
|
||||
* nsk.monitoring.stress.classload.load001
|
||||
* classes
|
||||
* -singleClassloaderClass
|
||||
* -loadableClassCount=100
|
||||
* -loadersCount=100
|
||||
*/
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2017, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2017, 2026, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -44,9 +44,12 @@
|
||||
* @library /vmTestbase
|
||||
* /test/lib
|
||||
* @comment generate and compile LoadableClassXXX classes
|
||||
* @build jdk.test.whitebox.WhiteBox
|
||||
* @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox
|
||||
* @run driver nsk.monitoring.stress.classload.GenClassesBuilder
|
||||
* @run main/othervm/timeout=360
|
||||
* -XX:-UseGCOverheadLimit
|
||||
* -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
|
||||
* nsk.monitoring.stress.classload.load001
|
||||
* classes
|
||||
* -testMode=server
|
||||
@ -54,4 +57,3 @@
|
||||
* -loadableClassCount=100
|
||||
* -loadersCount=100
|
||||
*/
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2017, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2017, 2026, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -44,9 +44,12 @@
|
||||
* @library /vmTestbase
|
||||
* /test/lib
|
||||
* @comment generate and compile LoadableClassXXX classes
|
||||
* @build jdk.test.whitebox.WhiteBox
|
||||
* @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox
|
||||
* @run driver nsk.monitoring.stress.classload.GenClassesBuilder
|
||||
* @run main/othervm/timeout=300
|
||||
* -XX:-UseGCOverheadLimit
|
||||
* -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
|
||||
* nsk.monitoring.stress.classload.load001
|
||||
* classes
|
||||
* -testMode=server
|
||||
@ -55,4 +58,3 @@
|
||||
* -loadableClassCount=100
|
||||
* -loadersCount=100
|
||||
*/
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2017, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2017, 2026, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -46,11 +46,13 @@
|
||||
* /test/lib
|
||||
* @comment generate and compile LoadableClassXXX classes
|
||||
* @run driver nsk.monitoring.stress.classload.GenClassesBuilder
|
||||
* @build jdk.test.whitebox.WhiteBox
|
||||
* @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox
|
||||
* @run main/othervm
|
||||
* -XX:-UseGCOverheadLimit
|
||||
* -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
|
||||
* nsk.monitoring.stress.classload.unload001
|
||||
* classes
|
||||
* -loadableClassCount=1
|
||||
* -loadersCount=100
|
||||
*/
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2017, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2017, 2026, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -46,13 +46,15 @@
|
||||
* @library /vmTestbase
|
||||
* /test/lib
|
||||
* @comment generate and compile LoadableClassXXX classes
|
||||
* @build jdk.test.whitebox.WhiteBox
|
||||
* @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox
|
||||
* @run driver nsk.monitoring.stress.classload.GenClassesBuilder
|
||||
* @run main/othervm/timeout=180
|
||||
* -XX:-UseGCOverheadLimit
|
||||
* -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
|
||||
* nsk.monitoring.stress.classload.unload001
|
||||
* classes
|
||||
* -testMode=server
|
||||
* -loadableClassCount=1
|
||||
* -loadersCount=100
|
||||
*/
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2017, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2017, 2026, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -46,9 +46,12 @@
|
||||
* @library /vmTestbase
|
||||
* /test/lib
|
||||
* @comment generate and compile LoadableClassXXX classes
|
||||
* @build jdk.test.whitebox.WhiteBox
|
||||
* @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox
|
||||
* @run driver nsk.monitoring.stress.classload.GenClassesBuilder
|
||||
* @run main/othervm/timeout=180
|
||||
* -XX:-UseGCOverheadLimit
|
||||
* -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
|
||||
* nsk.monitoring.stress.classload.unload001
|
||||
* classes
|
||||
* -testMode=server
|
||||
@ -56,4 +59,3 @@
|
||||
* -loadableClassCount=1
|
||||
* -loadersCount=100
|
||||
*/
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2017, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2017, 2026, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -47,13 +47,15 @@
|
||||
* @library /vmTestbase
|
||||
* /test/lib
|
||||
* @comment generate and compile LoadableClassXXX classes
|
||||
* @build jdk.test.whitebox.WhiteBox
|
||||
* @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox
|
||||
* @run driver nsk.monitoring.stress.classload.GenClassesBuilder
|
||||
* @run main/othervm
|
||||
* -XX:-UseGCOverheadLimit
|
||||
* -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
|
||||
* nsk.monitoring.stress.classload.unload001
|
||||
* classes
|
||||
* -singleClassloaderClass
|
||||
* -loadableClassCount=1
|
||||
* -loadersCount=100
|
||||
*/
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2017, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2017, 2026, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -44,9 +44,12 @@
|
||||
* @library /vmTestbase
|
||||
* /test/lib
|
||||
* @comment generate and compile LoadableClassXXX classes
|
||||
* @build jdk.test.whitebox.WhiteBox
|
||||
* @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox
|
||||
* @run driver nsk.monitoring.stress.classload.GenClassesBuilder
|
||||
* @run main/othervm
|
||||
* -XX:-UseGCOverheadLimit
|
||||
* -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
|
||||
* nsk.monitoring.stress.classload.unload001
|
||||
* classes
|
||||
* -testMode=server
|
||||
@ -54,4 +57,3 @@
|
||||
* -loadableClassCount=1
|
||||
* -loadersCount=100
|
||||
*/
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2017, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2017, 2026, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -44,9 +44,12 @@
|
||||
* @library /vmTestbase
|
||||
* /test/lib
|
||||
* @comment generate and compile LoadableClassXXX classes
|
||||
* @build jdk.test.whitebox.WhiteBox
|
||||
* @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox
|
||||
* @run driver nsk.monitoring.stress.classload.GenClassesBuilder
|
||||
* @run main/othervm
|
||||
* -XX:-UseGCOverheadLimit
|
||||
* -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
|
||||
* nsk.monitoring.stress.classload.unload001
|
||||
* classes
|
||||
* -testMode=server
|
||||
@ -55,4 +58,3 @@
|
||||
* -loadableClassCount=1
|
||||
* -loadersCount=100
|
||||
*/
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2017, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2017, 2026, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -48,12 +48,14 @@
|
||||
* @library /vmTestbase
|
||||
* /test/lib
|
||||
* @comment generate and compile LoadableClassXXX classes
|
||||
* @build jdk.test.whitebox.WhiteBox
|
||||
* @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox
|
||||
* @run driver nsk.monitoring.stress.classload.GenClassesBuilder
|
||||
* @run main/othervm/timeout=180
|
||||
* -XX:-UseGCOverheadLimit
|
||||
* -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
|
||||
* nsk.monitoring.stress.classload.unload001
|
||||
* classes
|
||||
* -loadableClassCount=100
|
||||
* -loadersCount=12
|
||||
*/
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2017, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2017, 2026, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -46,13 +46,15 @@
|
||||
* @library /vmTestbase
|
||||
* /test/lib
|
||||
* @comment generate and compile LoadableClassXXX classes
|
||||
* @build jdk.test.whitebox.WhiteBox
|
||||
* @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox
|
||||
* @run driver nsk.monitoring.stress.classload.GenClassesBuilder
|
||||
* @run main/othervm/timeout=180
|
||||
* -XX:-UseGCOverheadLimit
|
||||
* -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
|
||||
* nsk.monitoring.stress.classload.unload001
|
||||
* classes
|
||||
* -testMode=server
|
||||
* -loadableClassCount=100
|
||||
* -loadersCount=12
|
||||
*/
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2017, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2017, 2026, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -46,9 +46,12 @@
|
||||
* @library /vmTestbase
|
||||
* /test/lib
|
||||
* @comment generate and compile LoadableClassXXX classes
|
||||
* @build jdk.test.whitebox.WhiteBox
|
||||
* @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox
|
||||
* @run driver nsk.monitoring.stress.classload.GenClassesBuilder
|
||||
* @run main/othervm/timeout=180
|
||||
* -XX:-UseGCOverheadLimit
|
||||
* -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
|
||||
* nsk.monitoring.stress.classload.unload001
|
||||
* classes
|
||||
* -testMode=server
|
||||
@ -56,4 +59,3 @@
|
||||
* -loadableClassCount=100
|
||||
* -loadersCount=12
|
||||
*/
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2017, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2017, 2026, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -48,13 +48,15 @@
|
||||
* @library /vmTestbase
|
||||
* /test/lib
|
||||
* @comment generate and compile LoadableClassXXX classes
|
||||
* @build jdk.test.whitebox.WhiteBox
|
||||
* @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox
|
||||
* @run driver nsk.monitoring.stress.classload.GenClassesBuilder
|
||||
* @run main/othervm
|
||||
* -XX:-UseGCOverheadLimit
|
||||
* -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
|
||||
* nsk.monitoring.stress.classload.unload001
|
||||
* classes
|
||||
* -singleClassloaderClass
|
||||
* -loadableClassCount=100
|
||||
* -loadersCount=12
|
||||
*/
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2017, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2017, 2026, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -46,9 +46,12 @@
|
||||
* @library /vmTestbase
|
||||
* /test/lib
|
||||
* @comment generate and compile LoadableClassXXX classes
|
||||
* @build jdk.test.whitebox.WhiteBox
|
||||
* @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox
|
||||
* @run driver nsk.monitoring.stress.classload.GenClassesBuilder
|
||||
* @run main/othervm
|
||||
* -XX:-UseGCOverheadLimit
|
||||
* -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
|
||||
* nsk.monitoring.stress.classload.unload001
|
||||
* classes
|
||||
* -testMode=server
|
||||
@ -56,4 +59,3 @@
|
||||
* -loadableClassCount=100
|
||||
* -loadersCount=12
|
||||
*/
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2017, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2017, 2026, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -46,9 +46,12 @@
|
||||
* @library /vmTestbase
|
||||
* /test/lib
|
||||
* @comment generate and compile LoadableClassXXX classes
|
||||
* @build jdk.test.whitebox.WhiteBox
|
||||
* @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox
|
||||
* @run driver nsk.monitoring.stress.classload.GenClassesBuilder
|
||||
* @run main/othervm
|
||||
* -XX:-UseGCOverheadLimit
|
||||
* -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
|
||||
* nsk.monitoring.stress.classload.unload001
|
||||
* classes
|
||||
* -testMode=server
|
||||
@ -57,4 +60,3 @@
|
||||
* -loadableClassCount=100
|
||||
* -loadersCount=12
|
||||
*/
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2001, 2025, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2001, 2026, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -33,13 +33,14 @@ import java.util.*;
|
||||
import nsk.share.gc.gp.*;
|
||||
import nsk.share.test.ExecutionController;
|
||||
import nsk.share.test.Stresser;
|
||||
import jdk.test.whitebox.WhiteBox;
|
||||
|
||||
/**
|
||||
* The <code>ClassUnloader</code> class allows to force VM to unload class(es)
|
||||
* using memory stressing technique.
|
||||
* using WhiteBox.fullGC technique.
|
||||
*
|
||||
* <p>The method <code>unloadClass()</code> is provided which eats memory
|
||||
* to enforce GC to cleanup the heap. So, if all references to a class
|
||||
* <p>The method <code>unloadClass()</code> is provided which calls
|
||||
* WhiteBox.fullGC to cleanup the heap. So, if all references to a class
|
||||
* and its loader are canceled, this may result in unloading the class.
|
||||
*
|
||||
* <p>ClassUnloader mainly intends to unload a class which was loaded
|
||||
@ -228,24 +229,24 @@ public class ClassUnloader {
|
||||
|
||||
/**
|
||||
* Forces GC to unload previously loaded classes by cleaning all references
|
||||
* to class loader with its loaded classes and eating memory.
|
||||
* to class loader with its loaded classes.
|
||||
*
|
||||
* @return <i>true</i> if classes unloading has been detected
|
||||
or <i>false</i> otherwise
|
||||
*
|
||||
* @throws Failure if exception other than OutOfMemoryError
|
||||
* is thrown while eating memory
|
||||
* is thrown while triggering full GC
|
||||
*
|
||||
* @see #eatMemory()
|
||||
* @see WhiteBox.getWhiteBox().fullGC()
|
||||
*/
|
||||
public boolean unloadClass(ExecutionController stresser) {
|
||||
public boolean unloadClass() {
|
||||
|
||||
// free references to class and class loader to be able for collecting by GC
|
||||
classObjects.removeAllElements();
|
||||
customClassLoader = null;
|
||||
|
||||
// force class unloading by eating memory pool
|
||||
eatMemory(stresser);
|
||||
// force class unloading by triggering full GC
|
||||
WhiteBox.getWhiteBox().fullGC();
|
||||
|
||||
// force GC to unload marked class loader and its classes
|
||||
if (isClassLoaderReclaimed()) {
|
||||
@ -256,34 +257,4 @@ public class ClassUnloader {
|
||||
// class loader has not been reclaimed
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean unloadClass() {
|
||||
Stresser stresser = new Stresser() {
|
||||
|
||||
@Override
|
||||
public boolean continueExecution() {
|
||||
return true;
|
||||
}
|
||||
|
||||
};
|
||||
return unloadClass(stresser);
|
||||
}
|
||||
|
||||
// Stresses memory by allocating arrays of bytes.
|
||||
public static void eatMemory(ExecutionController stresser) {
|
||||
GarbageUtils.eatMemory(stresser, 50, 1024, 2);
|
||||
}
|
||||
|
||||
// Stresses memory by allocating arrays of bytes.
|
||||
public static void eatMemory() {
|
||||
Stresser stresser = new Stresser() {
|
||||
|
||||
@Override
|
||||
public boolean continueExecution() {
|
||||
return true;
|
||||
}
|
||||
|
||||
};
|
||||
eatMemory(stresser);
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user