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

java/lang/management/MemoryMXBean/ResetPeakMemoryUsage.java fails

    Details

      Description

      ----------messages:(3/223)----------
      command: main -XX:+UseG1GC -Xmn8m -XX:G1HeapRegionSize=1m ResetPeakMemoryUsage
      reason: User specified action: run main/othervm -XX:+UseG1GC -Xmn8m -XX:G1HeapRegionSize=1m ResetPeakMemoryUsage
      elapsed time (seconds): 0.204
      ----------System.out:(39/1341)----------
      Selected memory pool:
          Memory Pool name: G1 Old Gen
          Type: Heap memory
          Memory Usage: init = 57671680(56320K) used = 0(0K) committed = 57671680(56320K) max = 536870912(524288K)
          Threshold: 0
          Manager = [G1 Old Generation]
      Before big object array (of size 9000000) is allocated:
      Current Usage:
          Initial size = 57671680 (56320K)
          Used size = 0
          Committd size = 57671680 (56320K)
          Max size = 536870912 (524288K)
      Peak Usage:
          Initial size = 57671680 (56320K)
          Used size = 0
          Committd size = 57671680 (56320K)
          Max size = 536870912 (524288K)
      After the object is allocated:
      Current Usage:
          Initial size = 57671680 (56320K)
          Used size = 34400384 (33594K)
          Committd size = 57671680 (56320K)
          Max size = 536870912 (524288K)
      Peak Usage:
          Initial size = 57671680 (56320K)
          Used size = 34400384 (33594K)
          Committd size = 57671680 (56320K)
          Max size = 536870912 (524288K)
      After GC:
      Current Usage:
          Initial size = 57671680 (56320K)
          Used size = 34400384 (33594K)
          Committd size = 57671680 (56320K)
          Max size = 536870912 (524288K)
      Peak Usage:
          Initial size = 57671680 (56320K)
          Used size = 34400384 (33594K)
          Committd size = 57671680 (56320K)
          Max size = 536870912 (524288K)
      ----------System.err:(14/1000)----------
      java.lang.RuntimeException: Before GC: used = 34400384 (33594K) expected to be > After GC: used = 34400384 (33594K)
      at ResetPeakMemoryUsage.testPool(ResetPeakMemoryUsage.java:121)
      at ResetPeakMemoryUsage.main(ResetPeakMemoryUsage.java:63)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:491)
      at com.sun.javatest.regtest.MainWrapper$MainThread.run(MainWrapper.java:94)
      at java.lang.Thread.run(Thread.java:724)

        Attachments

          Activity

            People

            • Assignee:
              sla Staffan Larsen (Inactive)
              Reporter:
              sla Staffan Larsen (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: