Code review request: 6855834: G1: minimize the output when -XX:+PrintHeapAtGC is set (S)

John Coomes John.Coomes at sun.com
Tue Jul 7 13:43:58 PDT 2009


Tony Printezis (Antonios.Printezis at Sun.COM) wrote:
> One more spin:
> 
> http://cr.openjdk.java.net/~tonyp/6855834/webrev.2/
> 
> All the recent changes are in g1CollectedHeap.cpp, in the print_on() 
> method (which reflect the updated output that John Coomes suggested). 
> One more review and I'll push it...

Looks good ... except for some whitespace nits in g1CollectedHeap.cpp
(sorry):

1.  if (PrintHeapAtGC){    <---- no space before the '{' 

	This occurs 4 times (I think).

2.  No blank line between methods print(), print_on(outputStream*) and
print_on(outputStream*, bool) (lines 2336, 2339).

3.  No space between the double quote and INTPTR_FORMAT or
SIZE_FORMAT in the new print_on() code.  AFAICT, most of hotspot uses
this:

	print("count = " SIZE_FORMAT "K", count);

instead of

	print("count = "SIZE_FORMAT"K", count);

I find the latter harder to parse.  I see some existing examples of
the latter in the same file, but haven't seen it outside of G1.

-John

> Tony Printezis wrote:
> > Thanks to Ramki for the speedy code review. I applied a couple of 
> > minor changes, here's the second attempt:
> >
> > http://cr.openjdk.java.net/~tonyp/6855834/webrev.1/
> >
> > Tony
> >
> > Tony Printezis wrote:
> >> http://cr.openjdk.java.net/~tonyp/6855834/webrev.0/
> >>
> >> The CR has more information on the new format:
> >>
> >> Tony
> >>
> >
> 
> -- 
> ---------------------------------------------------------------------
> | Tony Printezis, Staff Engineer   | Sun Microsystems Inc.          |
> |                                  | MS UBUR02-311                  |
> | e-mail: tony.printezis at sun.com   | 35 Network Drive               |
> | office: +1 781 442 0998 (x20998) | Burlington, MA 01803-2756, USA |
> ---------------------------------------------------------------------
> e-mail client: Thunderbird (Linux)
> 
> 




More information about the hotspot-gc-dev mailing list