-
Enhancement
-
Resolution: Unresolved
-
P4
-
9
-
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?
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?
- relates to
-
JDK-8246020 -XX:+UsePerfData is enabled by default and slows down VM bootstrap by 6%
-
- Closed
-