RFR (M) 8234510: Remove file seeking requirement for writing a heap dump
Langer, Christoph
christoph.langer at sap.com
Fri Dec 20 14:54:53 UTC 2019
Hi Ralf,
I've spent some time with your change now as well.
Overall, looks good. I only have some minor findings:
There are 3 new methods:
void DumpWriter::finish_dump_segment()
void DumpWriter::start_sub_record()
void DumpWriter::end_sub_record()
I think it would ease understanding of the code if you would also create a method DumpWriter::start_dump_segment(). The work that should be done in there is currently done implicitly in DumpWriter::start_sub_record().
Also, all that DumpWriter::end_sub_record() does is asserting and debug only. So, maybe the whole method and its calls could be enclosed in debug_only?
Then, I've spotted a little spelling error: line 623 - segement should be segment.
Then, _sub_record_ended could be changed to _in_sub_record and the according semantics be adapted. I found that to be more understandable - but maybe it's just a personal taste thing.
And a last point is that there are many places where sizes are calculated, e.g. lines 1002, 1032-1036, 1081, 1116, 1174, 1175. Here, I think code comments could be added/improved to facilitate quicker understanding for the folks that are ingenuous to this code.
Cheers
Christoph
> -----Original Message-----
> From: serviceability-dev <serviceability-dev-bounces at openjdk.java.net> On
> Behalf Of Schmelter, Ralf
> Sent: Montag, 16. Dezember 2019 13:28
> To: Schmelter, Ralf <ralf.schmelter at sap.com>; Thomas Stüfe
> <thomas.stuefe at gmail.com>
> Cc: OpenJDK Serviceability <serviceability-dev at openjdk.java.net>; hotspot-
> runtime-dev at openjdk.java.net
> Subject: [CAUTION] RE: RFR (M) 8234510: Remove file seeking requirement
> for writing a heap dump
>
> I forgot to post the updated webrev:
> http://cr.openjdk.java.net/~rschmelter/webrevs/8234510/webrev.2/
>
> In addition to the changes requested by Thomas, I also renamed the entries
> in the heap dump segment from entries to sub-records, since that is what
> they are called in the comment describing the format.
>
> Best regards,
> Ralf
More information about the serviceability-dev
mailing list