RFR: JEP 359-Records: hotspot runtime and serviceability code
Ioi Lam
ioi.lam at oracle.com
Tue Oct 22 04:42:08 UTC 2019
On 10/21/19 11:40 AM, Lois Foltan wrote:
> On 10/18/2019 2:44 PM, Vicente Romero wrote:
>> Hi,
>>
>> Please review the hotspot runtime and serviceability code for JEP 359
>> (Records).
>>
>> Thanks in advance for the feedback,
>> Vicente
>>
>> PS, Thanks to Harold for the development
>>
>>
>> [1]
>> http://cr.openjdk.java.net/~vromero/records.review/hotspot_runtime/webrev.00/
>
> Harold, Vicente,
>
> src/hotspot/share/oops/recordComponent.hpp
> - line #95 - determination of TBD comment needed before committing.
This code is correct and the TBD can be removed.
void collect_statistics(KlassSizeStats *sz) const {
// TBD is this right?
if (_annotations != NULL) {
sz->_annotations_bytes += sz->count(_annotations);
sz->_ro_bytes += sz->count(_annotations);
}
if (_type_annotations != NULL) {
sz->_annotations_bytes += sz->count(_type_annotations);
sz->_ro_bytes += sz->count(_type_annotations);
}
}
You can test this by running a JVM with something like:
jcmd <pid> Wait GC.class_stats
IK_inner_classes,IK_nest_members,IK_record_components
Note that this will print out "WARNING: Ran out of C-heap; undercounted
368 total instances in data below". This is JDK-8232758, which you can
safely ignore for now.
BTW, all the collect_statistics() functions are pretty complicated and
it's unclear whether GC.class_stats is still useful (I implemented it
but I don't use it anymore). I have filed JDK-8232759.
Thanks
- Ioi
More information about the hotspot-runtime-dev
mailing list