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

Incorrect value of 'used' jvmstat counter

    XMLWordPrintable

Details

    • gc
    • 17
    • b03
    • generic
    • generic

    Backports

      Description

        While investigating the following VisualVM bug https://github.com/oracle/visualvm/issues/494 that this problem is caused by fix for JDK-8268265.

        Looking at jvmstat counters I see the following values for 'used' jvmstat counters:
        INFO [org.graalvm.visualvm.tools.jvmstat.JvmJvmstatModel]: sun.gc.generation.0.space.0.used = 88202184
        INFO [org.graalvm.visualvm.tools.jvmstat.JvmJvmstatModel]: sun.gc.generation.0.space.1.used = 88202184
        INFO [org.graalvm.visualvm.tools.jvmstat.JvmJvmstatModel]: sun.gc.generation.0.space.2.used = 88202184
        INFO [org.graalvm.visualvm.tools.jvmstat.JvmJvmstatModel]: sun.gc.generation.1.space.0.used = 88202184
        INFO [org.graalvm.visualvm.tools.jvmstat.JvmJvmstatModel]: Sum 352808736
        - note all 'used' counters have the same value.

        Normal case looks similar to this:
        INFO [org.graalvm.visualvm.tools.jvmstat.JvmJvmstatModel]: sun.gc.generation.0.space.0.used = 9069768
        INFO [org.graalvm.visualvm.tools.jvmstat.JvmJvmstatModel]: sun.gc.generation.0.space.1.used = 0
        INFO [org.graalvm.visualvm.tools.jvmstat.JvmJvmstatModel]: sun.gc.generation.0.space.2.used = 1062200
        INFO [org.graalvm.visualvm.tools.jvmstat.JvmJvmstatModel]: sun.gc.generation.1.space.0.used = 80296096
        INFO [org.graalvm.visualvm.tools.jvmstat.JvmJvmstatModel]: Sum 90428064

        It looks to me that last_used_in_bytes should be instance variable of SpaceCounters , since there are four instances of SpaceCounters and all those instances need to remember last_used_in_bytes.

        Attachments

          Issue Links

            Activity

              People

                kbarrett Kim Barrett
                thurka Tomáš Hůrka
                Votes:
                0 Vote for this issue
                Watchers:
                7 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved: