RFR (S): JDK-8077841: G1: Remove PrintReachable support

Stefan Karlsson stefan.karlsson at oracle.com
Wed Apr 15 12:04:54 UTC 2015

On 2015-04-15 13:52, Bengt Rutisson wrote:
> Hi everyone,
> Could I have a couple of reviews for this change to remove the 
> PrintReachable support in G1?
> https://bugs.openjdk.java.net/browse/JDK-8077841
> http://cr.openjdk.java.net/~brutisso/8077841/webrev.00/


-      gclog_or_tty->cr();
-#ifndef PRODUCT

The removal of cr() affects the product build and should probably not be 


> There are three develop flags that allow G1 to dump all objects on the 
> heap to a text format:
> G1PrintReachableAtInitialMark
> G1VerifyDuringGCPrintReachable
> G1PrintReachableBaseFile
> Turning on this dumping code will dump all objects in all regions to 
> the file specified by G1PrintReachableBaseFile,
> Several things are disturbing with this code:
> - The way the code opens a separate file and writes to it is pretty 
> uncommon for our logging code
> - The flags are develop flags, so not usable in product code - even 
> druring verification
> - The format the heap is dumped in is not a standard format so there 
> is no tool support for it
> - There is already standard ways of dumping the heap, using hprof for 
> example.
> - It is pretty unclear when the information logged by PrintReachable 
> is useful.
> I've asked around a bit and as far as I can tell no one has been using 
> this feature for a long time. So, rather than trying to fix the code I 
> propose that we remove it.
> Thanks,
> Bengt

More information about the hotspot-gc-dev mailing list