Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6815790

G1: Missing MemoryPoolMXBeans with -XX:+UseG1GC

XMLWordPrintable

    • gc
    • b06
    • x86
    • windows_xp
    • Verified

        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 ----------

              tonyp Tony Printezis
              ndcosta Nelson Dcosta (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: