Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8072725 Provide more granular levels for GC verification
  3. JDK-8156870

Release Note: Providing more granular levels for GC verification

    XMLWordPrintable

    Details

    • Type: Sub-task
    • Status: Closed
    • Priority: P4
    • Resolution: Delivered
    • Affects Version/s: 7u111, 8u102
    • Fix Version/s: None
    • Component/s: hotspot
    • Subcomponent:
      gc
    • Verification:
      Verified

      Backports

        Description

        This enhancement provides a way to specify more granular levels for the GC verification enabled using the "VerifyBeforeGC", "VerifyAfterGC" and "VerifyDuringGC" diagnostic options. It introduces a new diagnostic option VerifySubSet using which one can specify the subset of the memory system that should be verified.

        With this new option, one or more sub-systems can be specified in a comma separated string. Valid memory sub-systems are: threads, heap, symbol_table, string_table, codecache, dictionary, classloader_data_graph, metaspace, jni_handles, c-heap and codecache_oops.
         
        During the GC verification, only the sub-systems specified using VerifySubSet get verified:
         ```
        D:\tests>java -XX:+UnlockDiagnosticVMOptions -XX:+VerifyBeforeGC -XX:VerifySubSet="threads,c-heap" -Xlog:gc+verify=debug Test
        [0.095s][debug ][gc,verify] Threads
        [0.099s][debug ][gc,verify] C-heap
        [0.105s][info ][gc,verify] Verifying Before GC (0.095s, 0.105s) 10.751ms
        [0.120s][debug ][gc,verify] Threads
        [0.124s][debug ][gc,verify] C-heap
        [0.130s][info ][gc,verify] Verifying Before GC (0.120s, 0.130s) 9.951ms
        [0.148s][debug ][gc,verify] Threads
        [0.152s][debug ][gc,verify] C-heap
        ```
        If any invalid memory sub-systems are specified with VerifySubSet, Java process exits with the following error message:
        ```
        D:\tests>java -XX:+UnlockDiagnosticVMOptions -XX:+VerifyBeforeGC -XX:VerifySubSet="threads,c-heap,hello" -Xlog:gc+verify=debug oom
        Error occurred during initialization of VM
        VerifySubSet: 'hello' memory sub-system is unknown, please correct it
        ```

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                poonam Poonam Bajaj Parhar
                Reporter:
                rcalnan Roger Calnan
                Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved: