Expose code cache statistics via perfdata counters

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Unresolved
    • Priority: P4
    • tbd
    • Affects Version/s: 8, 9, 10
    • Component/s: 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.

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

              Created:
              Updated: