RFR: 8229278: Improve hs_err location printing to assume less about GC internals

Stefan Karlsson stefan.karlsson at oracle.com
Tue Aug 27 13:20:51 UTC 2019


Hi Erik,

On 2019-08-08 11:46, Erik Österlund wrote:
> Hi,
> 
> Today when we crash and print hs_err files, the printing utility for 
> describing heap locations assumes:
> 1) That the Java heap memory reservation is contiguous
> 2) That the Java heap is parseable
> We should let the GC describe a location instead, opting in to such 
> concepts.
> 
> This patch adds a print_location pure virtual function on CollectedHeap
> allowing the GC to choose printing strategy. A new LocationPrinter 
> utility was added, allowing GCs to implement the functionality easily 
> without much code duplication.
> 
> Webrev:
> http://cr.openjdk.java.net/~eosterlund/8229278/webrev.00/

This looks good, but I have some cleanups I'd like to make. If you agree 
we can either fold this into your patch, or I can create a separate RFE 
for it:

http://cr.openjdk.java.net/~stefank/8229278/webrev.01.delta/

1) Fixed some includes.

2) Replaced address with void*. I'd like to no propagate the usage of 
'address' into GC code.

3) Fixed the usage of is_readable_range to actually include check that 
the address of the klass field is readable.

4) Changed/removed some casts.

5) Removed redundant is_in check in ZGC's print_location.

Thanks,
StefanK

> 
> Bug:
> https://bugs.openjdk.java.net/browse/JDK-8229278
> 
> Thanks,
> /Erik



More information about the hotspot-gc-dev mailing list