On 05/03/2020 09:54, Denghui Dong wrote:
Hi Alan,
If I use ManagementFactoryHelper to get memory pools, I still need to
modify src/java.management/share/classes/module-info.java
to export sun.management, right?
I should have been clearer in my comment. I think it should be possible
to put a helper in somewhere like jdk.internal.misc to replace
ManagementFactoryHelper.getBufferPoolMXBeans(). It can return an
unmodifable list of the MXBeans for the buffer pools. This should allow
periodic stats/events for buffer pools other than the direct buffer pool.
-Alan.