<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
<title></title>
</head>
<body text="#000000" bgcolor="#ffffff">
Thanks John!<br>
<br>
On 01/17/2012 04:58 PM, John Cuthbertson wrote:
<blockquote cite="mid:4F15EF0D.1060300@oracle.com" type="cite">
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
Hi Tony,<br>
<br>
This looks good to me.<br>
<br>
JohnC<br>
<br>
On 01/12/12 10:32, Tony Printezis wrote:
<blockquote cite="mid:4F0F2741.4090705@oracle.com" type="cite">
<meta http-equiv="content-type" content="text/html;
charset=ISO-8859-1">
Hi all,<br>
<br>
I'd like a couple of code reviews for this change that enhances
the
heap summary information generated by the SA (which is used for
the
jmap -heap output):<br>
<br>
<a moz-do-not-send="true" class="moz-txt-link-freetext"
href="http://cr.openjdk.java.net/%7Etonyp/7097586/webrev.0/">http://cr.openjdk.java.net/~tonyp/7097586/webrev.0/</a><br>
<br>
Currently, the heap summary generated for G1 is as close as
possible to
what's generated for the other GCs. Bengt made a good suggestion
that
it'd be helpful to enhance the output with some G1-specific
information
in order to make it more informative. The important changes are
the 15
lines or so that were changed in HeapSummary.java, the rest is
boilerplate to be able to access specific fields and objects
from the
SA. I included before / after jmap -heap output below.<br>
<br>
Note that we actually had a small bug in the code which caused
the
sizing information in the G1MonitoringSupport object to become
inconsistent between a cleanup and the subsequent GC: the old
space
information was not updated to reflect any old region
reclamation
during cleanup. I fixed this as part of this change too (I'll
add a
note to the CR).<br>
<br>
Tony<br>
<br>
BEFORE:<br>
<br>
<tt>using thread-local object allocation.<br>
Garbage-First (G1) GC with 8 thread(s)<br>
<br>
Heap Configuration:<br>
MinHeapFreeRatio = 40<br>
MaxHeapFreeRatio = 70<br>
MaxHeapSize = 1073741824 (1024.0MB)<br>
NewSize = 1048576 (1.0MB)<br>
MaxNewSize = 4294967295 (4095.9999990463257MB)<br>
OldSize = 4194304 (4.0MB)<br>
NewRatio = 2<br>
SurvivorRatio = 8<br>
PermSize = 16777216 (16.0MB)<br>
MaxPermSize = 67108864 (64.0MB)<br>
<br>
Heap Usage:<br>
G1 Young Generation<br>
Eden Space:<br>
capacity = 19922944 (19.0MB)<br>
used = 3145728 (3.0MB)<br>
free = 16777216 (16.0MB)<br>
15.789473684210526% used<br>
>From Space:<br>
capacity = 2097152 (2.0MB)<br>
used = 2097152 (2.0MB)<br>
free = 0 (0.0MB)<br>
100.0% used<br>
To Space:<br>
capacity = 0 (0.0MB)<br>
used = 0 (0.0MB)<br>
free = 0 (0.0MB)<br>
0.0% used<br>
G1 Old Generation<br>
capacity = 19922944 (19.0MB)<br>
used = 5849192 (5.578224182128906MB)<br>
free = 14073752 (13.421775817871094MB)<br>
29.359074642783717% used<br>
Perm Generation:<br>
capacity = 16777216 (16.0MB)<br>
used = 2749208 (2.6218490600585938MB)<br>
free = 14028008 (13.378150939941406MB)<br>
16.38655662536621% used<br>
<br>
1719 interned Strings occupying 137520 bytes.<br>
</tt><br>
<br>
AFTER (I marked the changes with bold; note that now there's
only one
Survivor section, as G1 does not have the concept of two
survivors that
are always allocated):<br>
<br>
<tt>using thread-local object allocation.<br>
Garbage-First (G1) GC with 8 thread(s)<br>
<br>
Heap Configuration:<br>
MinHeapFreeRatio = 40<br>
MaxHeapFreeRatio = 70<br>
MaxHeapSize = 67108864 (64.0MB)<br>
NewSize = 1048576 (1.0MB)<br>
MaxNewSize = 4294967295 (4095.9999990463257MB)<br>
OldSize = 4194304 (4.0MB)<br>
NewRatio = 2<br>
SurvivorRatio = 8<br>
PermSize = 16777216 (16.0MB)<br>
MaxPermSize = 67108864 (64.0MB)<br>
<b> G1HeapRegionSize = 1048576 (1.0MB)<br>
</b><br>
Heap Usage:<br>
<b>G1 Heap:<br>
regions = 57<br>
capacity = 59768832 (57.0MB)<br>
used = 18018304 (17.18359375MB)<br>
free = 41750528 (39.81640625MB)<br>
30.146655701754387% used<br>
</b>G1 Young Generation:<br>
Eden Space:<br>
<b> regions = 3<br>
</b> capacity = 30408704 (29.0MB)<br>
used = 3145728 (3.0MB)<br>
free = 27262976 (26.0MB)<br>
10.344827586206897% used<br>
<b>Survivor Space:<br>
regions = 2<br>
</b> capacity = 2097152 (2.0MB)<br>
used = 2097152 (2.0MB)<br>
free = 0 (0.0MB)<br>
100.0% used<br>
G1 Old Generation:<br>
<b> regions = 13<br>
</b> capacity = 27262976 (26.0MB)<br>
used = 12775424 (12.18359375MB)<br>
free = 14487552 (13.81640625MB)<br>
46.85997596153846% used<br>
Perm Generation:<br>
capacity = 16777216 (16.0MB)<br>
used = 2741840 (2.6148223876953125MB)<br>
free = 14035376 (13.385177612304688MB)<br>
16.342639923095703% used<br>
<br>
1710 interned Strings occupying 136904 bytes.</tt><br>
<br>
<br>
<br>
</blockquote>
<br>
</blockquote>
</body>
</html>