Increase buffer size for ring-buffer events in CollectedHeap

XMLWordPrintable

    • gc
    • master

      In JDK-8356848, Metaspace and GC printing code was separated. In this separation, the ring-buffer logs for the GC was separated into one for Metaspace and one for the GC, which is inside collectedHeap.cpp.

      The original buffer-size per message was 1024 bytes (1KB), and when we split this we resized the buffer to 512 bytes. However, in Parallel and Serial, the commonly printed information is often ~610 characters (bytes), which is well above the 512 byte buffer-size. This causes the print to not look as good since there is no place for new-line characters in the buffer, as well as potentially missing valuable information.

      The buffer-size should be expanded to make room for Parallel, Serial and potential variations like extra long timing numbers or GC numbers.

      GC Heap Usage History (18 events):
      Event: 5.690 {heap Before GC invocations=1 (full 1):
       PSYoungGen total 2752512K, used 519078K [0x0000000740000000, 0x0000000800000000, 0x0000000800000000)
        eden space 2359296K, 22% used [0x0000000740000000,0x000000075fae9998,0x00000007d0000000)
        from space 393216K, 0% used [0x00000007e8000000,0x00000007e8000000,0x0000000800000000)
        to space 393216K, 0% used [0x00000007d0000000,0x00000007d0000000,0x00000007e8000000)
       ParOldGen total 6291456K, used 955K [0x00000005c0000000, 0x0000000740000000, 0x000000074Event: 5.767 {heap After GC invocations=1 (full 1):
       PSYoungGen total 2752512K, used 457696K [0x0000000740000000, 0x0000000800000000, 0x0000000800000000)
        eden space 2359296K, 19% used [0x0000000740000000,0x000000075bef8090,0x00000007d0000000)
        from space 393216K, 0% used [0x00000007e8000000,0x00000007e8000000,0x0000000800000000)
        to space 393216K, 0% used [0x00000007d0000000,0x00000007d0000000,0x00000007e8000000)
       ParOldGen total 6291456K, used 60672K [0x00000005c0000000, 0x0000000740000000, 0x00000007Event: 11.520 {heap Before GC invocations=2 (full 2):
       PSYoungGen total 2752512K, used 835183K [0x0000000740000000, 0x0000000800000000, 0x0000000800000000)
        eden space 2359296K, 35% used [0x0000000740000000,0x0000000772f9bea0,0x00000007d0000000)
        from space 393216K, 0% used [0x00000007e8000000,0x00000007e8000000,0x0000000800000000)

            Assignee:
            Joel Sikström
            Reporter:
            Joel Sikström
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: