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

Expose code cache statistics via perfdata counters

    Details

    • Type: Enhancement
    • Status: Open
    • Priority: P4
    • Resolution: Unresolved
    • Affects Version/s: 8, 9, 10
    • Fix Version/s: tbd
    • Component/s: hotspot
    • Subcomponent:
    • CPU:
      generic
    • OS:
      generic

      Description

      The size of the code cache, its usage and the activity of the code cache sweeper would be useful information to export and track via perf data counters.

      I am attaching a patch (based on jdk 8uXX version of hotspot) which exposes a few new counters, viz, the top few lines in the display below:

      $ jcmd <pid> PerfCounter.print | grep -i "sun\.ci\."
      sun.ci.codeCacheCapacity=6291456
      sun.ci.codeCacheMaxCapacity=6291456
      sun.ci.codeCacheMethodsReclaimedNum=1030
      sun.ci.codeCacheSweepsTotalNum=93
      sun.ci.codeCacheSweepsTotalTimeMillis=63
      sun.ci.codeCacheUsed=3386880
      ...


      These counters are useful to quickly assess code cache churn and sweeper activity.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                ysr Y. Ramakrishna
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated: