Request for review (M): 7178361: G1: Make sure that PrintGC and PrintGCDetails use the same timing for the GC pause

Bengt Rutisson bengt.rutisson at oracle.com
Wed Jun 20 13:15:49 UTC 2012


Hi everyone,

Could I please have some reviews for this change:
http://cr.openjdk.java.net/~brutisso/7178361/webrev.00/

Background
As part of the PrintGC and PrintGCDetails logging there is information 
about how long the GC pause was. The timing of the pause was done 
differently in G1 depending on whether PrintGC or PrintGCDetails were 
enabled. It turns out that PrintGCDetails was just timing part of the pause.

This change will make both PrintGC and PrintGCDetails use the same 
timing. To achieve this I had to refactor the code a bit. I moved all 
the timing data out of G1CollectorPolicy into a new class called 
G1GCPhaseTimes.

My intention is that this change should not alter the format of the 
output of PrintGC or PrintGCDetails. It should just correct the timing data.

However, I did find that we are collecting timing information about card 
counts, under an #ifdef. I moved this to the finest log level instead. 
This does not change the existing format for normal usage of PrintGC or 
PrintGCDetails.

Also, I had to update how the TraceGen0Time data is logged. I will have 
another look at this, but my idea was to leave the format exactly as it 
was. However, I think the format has decayed over time so maybe I'll try 
to clean it up.

I intend to follow this change up with a change to remove the special 
treatment of the single threaded case for PrintGCDetails (tracked in CR 
7178363).

Finally, this work revealed an issue with how the ergonomics in G1 
measure the collection pauses. I did not want to change this behavior 
now so I filed a separate RFE for that (7178365: G1: Ergonomics only 
count part of the collection pause).

Bengt



More information about the hotspot-gc-dev mailing list