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

Some MXBeans rely on UsePerfData being enabled

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Unresolved
    • Icon: P4 P4
    • tbd
    • 9
    • core-svc
    • None

      A lot of the internal MXBeans get the data they need from the equivalent perf counters (which is good given that the data is consistent across both APIs!). However, the perf counters used by the runtime service (safepoint stats and a few other things) are only created if UsePerfData is enabled and any code that relies on said counters gets a value of -1 if UsePerfData is disabled.

      Comparing the code in the thread and runtime services, the former always creates the counters (and they are malloced if UsePerfData is disabled) whereas the latter creates the counters conditionally. The patch to fix this and bring the runtime service code in line with the rest is quite small and straightforward (remove the 'if (UsePerfData) ...' conditions).

      Is there any interest in this patch? Also: Is there maybe a good reason why the runtime service is been implemented the way it is?

            Unassigned Unassigned
            tonyp Tony Printezis
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated: