RFR: 8315149: Add hsperf counters for CPU time of internal GC threads [v37]
Stefan Johansson
sjohanss at openjdk.org
Mon Nov 6 12:20:21 UTC 2023
On Wed, 1 Nov 2023 23:56:25 GMT, Jonathan Joo <jjoo at openjdk.org> wrote:
>> 8315149: Add hsperf counters for CPU time of internal GC threads
>
> Jonathan Joo has updated the pull request incrementally with two additional commits since the last revision:
>
> - revert gitignore change
> - Attempt to fix broken test
> The existing sun.management:type=HotspotThreading MBean approach (discussed [here](https://mail.openjdk.org/pipermail/core-libs-dev/2023-September/111397.html)) could be another general way to track CPU. However, the discussion concludes that it is an internal API, and discourages users from using it.
> @kstefanj , it is a pity that the `sun.management:type=HotspotThreading` MBean is not exported any more. If we move that or a similar functionality to a new MBean under `com.sun.management` (as proposed in the [cited discussion](https://mail.openjdk.org/pipermail/core-libs-dev/2023-September/111397.html)) then we might reuse these new hsperf counters in the same way this is already done by some other MBeans which already use hsperf counters as their information source. I think logging or JFR functionality could also easily be implemented on top of the new hsperf counters.
I haven't looked at the details around this, but extracting some useful information from the internal bean and making it public sound reasonable to me.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/15082#issuecomment-1794693970
More information about the serviceability-dev
mailing list