< prev index next >

test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/instances/instances003/instances003.java

Print this page

        

*** 39,48 **** --- 39,49 ---- * - initiate GarbageCollection in Debuggee VM * - check the number of instances is 0 * done * Test is executed for following sublcasses of ObjectReference: StringReference, ThreadReference, ClassLoaderReference * + * @requires vm.gc != "Z" * @library /vmTestbase * /test/lib * @run driver jdk.test.lib.FileInstaller . . * @build nsk.jdi.ReferenceType.instances.instances003.instances003 * @run main/othervm/native PropertyResolvingWrapper
*** 123,132 **** --- 124,138 ---- // during the time between creating them and disabling collection on them pipe.println(HeapwalkingDebuggee.COMMAND_CREATE_INSTANCES + ":" + className + ":" + createInstanceCount + ":" + referrerCount + ":" + referrerType + (referrerType.equals(ObjectInstancesManager.WEAK_REFERENCE) ? "|" + ObjectInstancesManager.STRONG_REFERENCE : "")); + // Note! + // Test broken - assumes that no GC is run before heap walk. + // G1 fails, just like ZGC, if en explicitly GC is done here. + // forceGC(); + // the instance counts should not be affected by creating multiple references checkDebugeeAnswer_instanceCounts(className, createInstanceCount, objectsToFilter); ReferenceType referenceType = debuggee.classByName(className); List<ObjectReference> instances = HeapwalkingDebugger.filterObjectReferrence(objectsToFilter, referenceType.instances(0));
< prev index next >