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

Expose code cache statistics via perfdata counters

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Unresolved
    • Icon: P4 P4
    • tbd
    • 8, 9, 10
    • hotspot
    • generic
    • generic

      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.

            Unassigned Unassigned
            ysr Y. Ramakrishna
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated: