Duplicate :
|
|
Relates :
|
|
Relates :
|
GarbageCollectorMXBean.getCollectionCount for the ConcurrentMarkSweep garbage collector doesn't return the same value as VisualGC and the sun.gc.collector.1.invocations jvmstat performance counter. The collection count for the minor GC collections is correct. The problem showed on Windows XP with JDK 6 b105. However, I couldn't reproduce it on Solaris/SPARC. Steps to reproduce this problem on Windows XP: 1/ Start NetBeans 6 2/ Install the VisualGC plugin 3/ Connect VisualGC to the NetBeans target VM 4/ Check the number of Old Gen collections 5/ Start JConsole and connect it to the NetBeans target VM 6/ Go to the Memory tab 7/ Check the number of ConcurrentMarkSweep collections There should be a mismatch between 4/ and 7/. Explicitly calling System.gc (use the PerformGC button in Memory tab in JConsole) increments the number of ConcurrentMarkSweep collections by one but it doesn't compute the real value for total collections.
|