<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Hi Tony,<br>
<br>
Looks good! Thanks for making these serviceability changes..<br>
<br>
regards,<br>
Poonam<br>
<br>
On 1/13/2012 12:02 AM, 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>
<p> <!-- This signature was generated by the MyDesktop Oracle Business Signature utility version 3.8.8 -->
</p>
</blockquote>
</body>
</html>