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

Rename and improve hsperfdata counter sun.gc.policy.gcTimeLimitExceeded

    Details

    • Type: Enhancement
    • Status: Open
    • Priority: P4
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: tbd
    • Component/s: hotspot
    • Labels:
      None
    • Subcomponent:
      gc

      Description

      This was brought up in the review thread for JDK-8212206, see https://mail.openjdk.java.net/pipermail/hotspot-gc-dev/2018-December/024310.html

      Summary
      -------
      Rename hsperfdata counter `sun.gc.policy.gcTimeLimitExceeded` to `sun.gc.policy.gcOverheadLimitExceeded` and change its runtime behavior from a boolean value to a cumulative counter.

      Problem
      -------
      The name `gcTimeLimitExceeded` is a misnomer, as its implementation takes into account both GC time limit and space limit. The counter currently holds a boolean value that is updated at every garbage collection, making it difficult for monitoring tools to catch the moment when it is set to `true`, as the next collection could reset it to `false` before the monitoring tools read the counter.

      Solution
      --------
      Rename the counter to `sun.gc.policy.gcOverheadLimitExceeded`, and change its runtime behavior to a cumulative integer, which denotes the total number of collections that have triggered the "GC overhead limit exceeded" event. In this way monitoring tools can periodically poll the counter, without worrying about missing any update to the counter. When a Java process OOMs and terminates due to "GC overhead limit exceeded", the counter is guaranteed to hold a non-zero value.

      Specification
      -------------
      `sun.gc.policy.gcTimeLimitExceeded` will be removed.
      `sun.gc.policy.gcOverheadLimitExceeded` will be added, denoting the total number of collections that have triggered the "GC overhead limit exceeded" event.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                manc Man Cao
                Reporter:
                manc Man Cao
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated: