< prev index next >
test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/instances/instances003/instances003.java
Print this page
@@ -124,14 +124,14 @@
// 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();
+ // Note! This test is broken, in the sense that it incorrectly assumes
+ // that no GC can happen before it walks the heap. In practice, it seems
+ // to only affect this test when using ZGC. However, this test will also
+ // fail when using other GCs if an explicit GC is done here.
// the instance counts should not be affected by creating multiple references
checkDebugeeAnswer_instanceCounts(className, createInstanceCount, objectsToFilter);
ReferenceType referenceType = debuggee.classByName(className);
< prev index next >