FULL PRODUCT VERSION :
6u14-b01
A DESCRIPTION OF THE PROBLEM :
With -XX:+UnlockExperimentalVMOptions -XX:+UseG1GC , ManagementFactory.getMemoryPoolMXBeans() does not return MXBeans with type MemoryType.HEAP
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Run the provided class with "-XX:+UnlockExperimentalVMOptions -XX:+UseG1GC" and without them.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
(without -XX:+UnlockExperimentalVMOptions -XX:+UseG1GC)
name = Code Cache type: NON-HEAP
name = Eden Space type: HEAP
name = Survivor Space type: HEAP
name = Tenured Gen type: HEAP
name = Perm Gen type: NON-HEAP
name = Perm Gen [shared-ro] type: NON-HEAP
name = Perm Gen [shared-rw] type: NON-HEAP
ACTUAL -
(with -XX:+UnlockExperimentalVMOptions -XX:+UseG1GC)
name = Code Cache type: NON-HEAP
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
public class A {
public static void main(String[] args) {
for (final MemoryPoolMXBean pool : ManagementFactory.getMemoryPoolMXBeans()) {
final String name = pool.getName();
System.out.println("name = " + name + " type: " + (pool.getType() == MemoryType.HEAP ? "HEAP" : "NON-HEAP"));
}
}
}
---------- END SOURCE ----------