On 05/03/2020 15:19, Denghui Dong wrote:
Hi Alan and Erik,
Sorry, I'm not sure if I fully understand what you mean.
For this feature, I still think exporting jdk.internal.access to jdk.jfr is a
good solutionsince there are
some other packages has already exported to jdk.jfr in this module.
I think it would be cleaner to put a helper in jdk.internal.misc so that
JFR has access to the counters for each of the buffer pools. That would
avoid additional plumbing when you extend it to mapped buffers. As I
mentioned in one of the other mails,
ManagementFactoryHelper.getBufferPoolMXBeans() could be changed to use
it too. From the perspective of java.base then it's a lot nicer as
anyone touching the buffer code doesn't need to have to concerned with
direct access from code in java.management and jdk.jfr.
-Alan