Re: RFR: 8238665: Add JFR event for direct memory statistics

Denghui Dong denghui.ddh at
Sun Mar 8 15:42:56 UTC 2020

Hi Alan and Erik,

Thanks for the review.

Webrev has been updated in

Testing: jdk/jfr, java/lang/management/ all passed

Summary: add a method in jdk.internal.misc.VM to get an unmodifiable buffer pool list.

Denghui Dong

From:Alan Bateman <Alan.Bateman at>
Send Time:2020年3月8日(星期日) 22:13
To:董登辉(卓昂) <denghui.ddh at>; Erik Gahlin <erik.gahlin at>
Cc:hotspot-jfr-dev <hotspot-jfr-dev at>; core-libs-dev <core-libs-dev at>
Subject:Re: RFR: 8238665: Add JFR event for direct memory statistics

 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 and jdk.jfr.


More information about the core-libs-dev mailing list