<html><head><style>body{font-family:Helvetica,Arial;font-size:13px}</style></head><body style="word-wrap:break-word;line-break:after-white-space"><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px;color:rgba(0,0,0,1.0);margin:0px;line-height:auto">Thanks Thomas, still need to get clarification re: adding Twitter copyright notice to the new files. I’ll report back when I have an answer.</div><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px;color:rgba(0,0,0,1.0);margin:0px;line-height:auto"><br></div><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px;color:rgba(0,0,0,1.0);margin:0px;line-height:auto">Tony</div> <br> <div id="bloop_sign_1559755463066846720" class="bloop_sign"><div><br></div><div><div>—————</div><div>Tony Printezis | @TonyPrintezis | <a href="mailto:tprintezis@twitter.com">tprintezis@twitter.com</a></div></div><div><br></div></div> <br><p class="airmail_on">On June 5, 2019 at 11:58:59 AM, Thomas Stüfe (<a href="mailto:thomas.stuefe@gmail.com">thomas.stuefe@gmail.com</a>) wrote:</p> <blockquote type="cite" class="clean_bq"><span><div><div></div><div>
<title></title>
<div dir="ltr">Hi Tony,
<div><br></div>
<div>I keep it short, this variant looks good to me. Thanks for
taking (most :) of my suggestions, and thanks for your
perseverance!</div>
<div><br></div>
<div>..Thomas</div>
<div><br></div>
<div><br></div>
<div><br></div>
<div><br></div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Wed, Jun 5, 2019 at 5:16 PM
Tony Printezis <<a href="mailto:tprintezis@twitter.com">tprintezis@twitter.com</a>>
wrote:<br></div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div style="overflow-wrap: break-word;">
<div id="gmail-m_3528187862338706872bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px;color:rgb(0,0,0);margin:0px">
Thomas,</div>
<div id="gmail-m_3528187862338706872bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px;color:rgb(0,0,0);margin:0px">
<br></div>
<div id="gmail-m_3528187862338706872bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px;color:rgb(0,0,0);margin:0px">
Latest webrev based on (most!) of your suggestions:</div>
<div id="gmail-m_3528187862338706872bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px;color:rgb(0,0,0);margin:0px">
<br></div>
<div id="gmail-m_3528187862338706872bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px;color:rgb(0,0,0);margin:0px">
<a href="http://cr.openjdk.java.net/~tonyp/8223575/webrev.3/" target="_blank">http://cr.openjdk.java.net/~tonyp/8223575/webrev.3/</a></div>
<div id="gmail-m_3528187862338706872bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px;color:rgb(0,0,0);margin:0px">
<br></div>
<div id="gmail-m_3528187862338706872bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px;color:rgb(0,0,0);margin:0px">
See inline.</div>
<br>
<div id="gmail-m_3528187862338706872bloop_sign_1559746729382584064" class="gmail-m_3528187862338706872bloop_sign">
<div><br></div>
<div>
<div>—————</div>
<div>Tony Printezis | @TonyPrintezis | <a href="mailto:tprintezis@twitter.com" target="_blank">tprintezis@twitter.com</a></div>
</div>
<div><br></div>
</div>
<br>
<p class="gmail-m_3528187862338706872airmail_on">On June 5, 2019 at
1:58:17 AM, Thomas Stüfe (<a href="mailto:thomas.stuefe@gmail.com" target="_blank">thomas.stuefe@gmail.com</a>) wrote:</p>
<div>
<blockquote type="cite" class="gmail-m_3528187862338706872clean_bq" style="font-family:Helvetica,Arial;font-size:13px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none">
<div>
<div>
<div dir="ltr"><span>Hi Tony,</span>
<div><span><br></span></div>
<div><span>looks good overall. Minor nits:</span></div>
<div><span><br></span></div>
<div><span>I do not like the getting-values-in-ctor for
MetaspaceSizesSnapshot - it conflicts with how the rest of the data
are queried in G1HeapTransition::Data::Data.</span></div>
</div>
</div>
</div>
</blockquote>
</div>
<p><br></p>
<p>Not sure why you think it’s different. I just get the values
directly from MetaspaceUtils the same way G1HeapTransition::Data
gets the values from the G1 heap:</p>
<div><br></div>
<div>
<div>G1HeapTransition::Data::Data(G1CollectedHeap* g1_heap) {</div>
<div> _eden_length = g1_heap->eden_regions_count();</div>
<div> _survivor_length =
g1_heap->survivor_regions_count();</div>
<div> _old_length = g1_heap->old_regions_count();</div>
<div> _archive_length =
g1_heap->archive_regions_count();</div>
<div> _humongous_length =
g1_heap->humongous_regions_count();</div>
<div>}</div>
</div>
<div><br></div>
<div>and also how PreGCValues (in ParallelGC) gets the values from
the PS heap:</div>
<div><br></div>
<div>
<div> PreGCValues(ParallelScavengeHeap* heap) :</div>
<div> _heap_used(heap->used()),</div>
<div>
_young_gen_used(heap->young_gen()->used_in_bytes()),</div>
<div>
_old_gen_used(heap->old_gen()->used_in_bytes()) { }</div>
</div>
<div><br></div>
<div>The only difference is that in the metaspace case the methods
are static and in the other two cases the methods are on the heap
object.</div>
<p><br></p>
<div>
<div>
<blockquote type="cite" class="gmail-m_3528187862338706872clean_bq" style="font-family:Helvetica,Arial;font-size:13px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none">
<div>
<div>
<div dir="ltr">
<div><span><br>
One has to examine the ctor for MetaspaceSizesSnapshot to realize
that we did not just simply forget querying the
sizes. </span></div>
</div>
</div>
</div>
</blockquote>
</div>
<p><br></p>
<p>Sure, the *_used fields of PreGCValues are explicitly set (and
similar for G1HeapTransition::Data) whereas _meta_sizes is
constructed implicitly. But MetaspaceSizesSnapshot is also used
outside PreGCValues and G1HeapTransition::Data and it behaves the
same as those two. So IMHO I think it’s OK to leave it as is, as it
is consistent with the other two. The only difference is that
MetaspaceSizesSnapshot is also embedded in the other two (but also
used stand-alone) and the other two are not embedded anywhere else
but only used stand-alone.</p>
<p><br></p>
<div>
<div>
<blockquote type="cite" class="gmail-m_3528187862338706872clean_bq" style="font-family:Helvetica,Arial;font-size:13px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none">
<div>
<div>
<div dir="ltr">
<div><span><br class="gmail-m_3528187862338706872Apple-interchange-newline">
I would prefer a dumb structure getting filled by a metaspace
function. Or, give MetaspaceSizesSnapshot a "::fill()" or
"::query_with_current_values()" function which can be called
explicitly from within G1HeapTransition::Data::Data().</span></div>
<div><span><br></span></div>
<div><span>This is aesthetics. I leave it up to you resp. wait for
the second reviewers opinion.</span></div>
<div><span><br></span></div>
<div><span>--<br>
<br>
MetaspaceSizesSnapshot:<br>
<br>
Can you rename all members named "capacity" to "committed"? In
Metaspace, capacity refers to the sum of in-use chunks and does not
contain the free chunks.<br>
<br>
(capacity = used + free + waste/overhead for in-use chunks.
Committed = capacity + free chunks + some other small
overheads.)</span></div>
</div>
</div>
</div>
</blockquote>
</div>
<p><br></p>
<p>I renamed it as capacity (which I think is more generic) so we
can set it to anything else we want (in case someone is not happy
with committed!) while keeping code changes to a minimum. But, I
changed it to committed (in case we want to add reserved in the
future).</p>
<p><br></p>
<div>
<div>
<blockquote type="cite" class="gmail-m_3528187862338706872clean_bq" style="font-family:Helvetica,Arial;font-size:13px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none">
<div>
<div>
<div dir="ltr">
<div><span><br>
<br>
--<br>
<br>
While you are at it, could you please rename
MetaspaceUtils::print_metaspace_change to
MetaspaceUtils::log_metaspace_change since print_.. is usually the
name of printing functions which take an outputStream*. log_.. ()
is usually used for functions printing to UL or EventLog, so that
would be a clearer name.</span></div>
</div>
</div>
</div>
</blockquote>
</div>
<p><br></p>
<p>Good suggestion, done.</p>
<p><br></p>
<div>
<div>
<blockquote type="cite" class="gmail-m_3528187862338706872clean_bq" style="font-family:Helvetica,Arial;font-size:13px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none">
<div>
<div>
<div dir="ltr">
<div><span><br>
Also could you please make a small addition to the comment in
metaspace.hpp:<br>
<br>
- // Print change in used metadata.<br>
+ // Print change in used metadata (for GC
logging).</span></div>
</div>
</div>
</div>
</blockquote>
</div>
<p><br></p>
<p>I slightly rephrased the comment.</p>
<p><br></p>
<div><br class="gmail-m_3528187862338706872Apple-interchange-newline"></div>
<div>
<blockquote type="cite" class="gmail-m_3528187862338706872clean_bq" style="font-family:Helvetica,Arial;font-size:13px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none">
<div>
<div>
<div dir="ltr">
<div><span>--<br></span></div>
<div><span><br></span></div>
<div><span>I am not sure if this needs a CSR and/or a Release Note
since we change the format of the Metaspace entgc log entries and
that may confuse people. If it does, I can review the CSR for you
and hopefully it goes fast. I wait for the second reviewers opinion
on this (preferably someone from Oracles GC group).</span></div>
</div>
</div>
</div>
</blockquote>
</div>
<p><br></p>
<p>I have no idea if a CSR is needed. Was there a CSR for the
-Xlog:safepoint* changes? I’ll assume one is not needed unless I’m
told otherwise. ;-) </p>
<p><br></p>
<p>Tony</p>
<p><br></p>
<div>
<blockquote type="cite" class="gmail-m_3528187862338706872clean_bq" style="font-family:Helvetica,Arial;font-size:13px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none">
<div>
<div>
<div dir="ltr">
<div><span><br class="gmail-m_3528187862338706872Apple-interchange-newline">
Cheers, Thomas</span></div>
</div>
<span><br></span>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr"><span>On Tue, Jun 4, 2019 at 9:37
PM Tony Printezis <<a href="mailto:tprintezis@twitter.com" target="_blank">tprintezis@twitter.com</a>>
wrote:<br></span></div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div>
<div id="gmail-m_3528187862338706872gmail-m_-2801227829881931873bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px;color:rgb(0,0,0);margin:0px">
<span>Hi Thomas,</span></div>
<div id="gmail-m_3528187862338706872gmail-m_-2801227829881931873bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px;color:rgb(0,0,0);margin:0px">
<span><br></span></div>
<div id="gmail-m_3528187862338706872gmail-m_-2801227829881931873bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px;color:rgb(0,0,0);margin:0px">
<span>Thanks for the suggestions. Here’s a new webrev:</span></div>
<div id="gmail-m_3528187862338706872gmail-m_-2801227829881931873bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px;color:rgb(0,0,0);margin:0px">
<span><br></span></div>
<div id="gmail-m_3528187862338706872gmail-m_-2801227829881931873bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px;color:rgb(0,0,0);margin:0px">
<span><a href="http://cr.openjdk.java.net/~tonyp/8223575/webrev.2/" target="_blank">http://cr.openjdk.java.net/~tonyp/8223575/webrev.2/</a></span></div>
<div id="gmail-m_3528187862338706872gmail-m_-2801227829881931873bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px;color:rgb(0,0,0);margin:0px">
<span><br></span></div>
<div id="gmail-m_3528187862338706872gmail-m_-2801227829881931873bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px;color:rgb(0,0,0);margin:0px">
<span>I renamed the spaces as discussed, added the before capacity
to the output, and use the committed size, instead of the reserved
size, for capacity. The output now looks like this:</span></div>
<div id="gmail-m_3528187862338706872gmail-m_-2801227829881931873bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px;color:rgb(0,0,0);margin:0px">
<span><br></span></div>
<div id="gmail-m_3528187862338706872gmail-m_-2801227829881931873bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px;color:rgb(0,0,0);margin:0px">
<p style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo">
<span><span style="font-variant-ligatures:no-common-ligatures">[31.167s][info][gc,metaspace
] GC(27) Metaspace: 2120K(5504K)->2120K(5504K) NonClass:
1898K(4864K)->1898K(4864K) Class:
221K(640K)->221K(640K)</span></span></p>
</div>
<div id="gmail-m_3528187862338706872gmail-m_-2801227829881931873bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px;color:rgb(0,0,0);margin:0px">
<br></div>
<div id="gmail-m_3528187862338706872gmail-m_-2801227829881931873bloop_sign_1559676468291408128" class="gmail-m_3528187862338706872gmail-m_-2801227829881931873bloop_sign">
<div>One more minor change:
MetaspaceUtils::print_metaspace_change(…) now gets the “after”
values using a MetaspaceSizesSnapshot object instead of calling
methods directly (which I think is a bit nicer).</div>
<div><br></div>
<div>I'd like to add a Twitter copyright to the two new files. But
I’m waiting to hear from the “higher ups” about that. I left two
TODOs about that in the metaspaceSizesSnapshot.{hpp,cpp} files so I
don’t forget. Please ignore those for now… I’ll remove them before
pushing.</div>
<div><br></div>
<div>Tony</div>
<div><br></div>
<div>
<div>—————</div>
<div>Tony Printezis | @TonyPrintezis |<span class="gmail-m_3528187862338706872Apple-converted-space"> </span><a href="mailto:tprintezis@twitter.com" target="_blank">tprintezis@twitter.com</a></div>
</div>
<div><br></div>
</div>
<br>
<p class="gmail-m_3528187862338706872gmail-m_-2801227829881931873airmail_on">
On May 15, 2019 at 4:26:17 AM, Thomas Stüfe (<a href="mailto:thomas.stuefe@gmail.com" target="_blank">thomas.stuefe@gmail.com</a>) wrote:</p>
<blockquote type="cite" class="gmail-m_3528187862338706872gmail-m_-2801227829881931873clean_bq">
<div>
<div>
<div dir="ltr">
<div dir="ltr"><span>Hi Tony,</span>
<div><span><br></span></div>
<div><span>I combine my answer to both your mails up into this one
mail:</span></div>
<div><span><br></span></div>
<div><span>- I am fine with printing "used" and "committed" and
leaving out "reserved".</span></div>
<div><span>- Choose whatever format you like, I like them all
:)</span></div>
<div><span><br></span></div>
<div><span>more inline:</span></div>
</div>
<span><br></span>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr"><span>On Wed, May 15, 2019 at
10:15 AM Tony Printezis <<a href="mailto:tprintezis@twitter.com" target="_blank">tprintezis@twitter.com</a>>
wrote:<br></span></div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div>
<div id="gmail-m_3528187862338706872gmail-m_-2801227829881931873gmail-m_-2896868114653338673bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px;color:rgb(0,0,0);margin:0px">
<span>Thomas,</span></div>
<div id="gmail-m_3528187862338706872gmail-m_-2801227829881931873gmail-m_-2896868114653338673bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px;color:rgb(0,0,0);margin:0px">
<span><br></span></div>
<div id="gmail-m_3528187862338706872gmail-m_-2801227829881931873gmail-m_-2896868114653338673bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px;color:rgb(0,0,0);margin:0px">
<span>Yeah, I’ll update the space names as discussed in the
previous e-mail and rework the size transition format (unless I
hear otherwise!).</span></div>
<div id="gmail-m_3528187862338706872gmail-m_-2801227829881931873gmail-m_-2896868114653338673bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px;color:rgb(0,0,0);margin:0px">
<span><br></span></div>
<div id="gmail-m_3528187862338706872gmail-m_-2801227829881931873gmail-m_-2896868114653338673bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px;color:rgb(0,0,0);margin:0px">
<span>Re: I generally use references for const arguments and
pointers for arguments the method modifies (to make it a bit
clearer what will be modified and what it will not).</span></div>
</div>
</blockquote>
<div><span><br></span></div>
<div><span>Yes, I prefer that too.</span></div>
<div><span> </span></div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div>
<div id="gmail-m_3528187862338706872gmail-m_-2801227829881931873gmail-m_-2896868114653338673bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px;color:rgb(0,0,0);margin:0px">
<span><br></span></div>
<div id="gmail-m_3528187862338706872gmail-m_-2801227829881931873gmail-m_-2896868114653338673bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px;color:rgb(0,0,0);margin:0px">
<span>Quick related question: I saw that some files seem to have
SAP (and also RedHat?) copyright notices in addition to the usual
Oracle ones. So, I can add a Twitter copyright line for any new
files we add?</span></div>
</div>
</blockquote>
<div><span><br></span></div>
<div><span>I usually add SAP copyrights for files I introduce and
which have a reasonable large original content made by
us.</span></div>
<div><span> </span></div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div>
<div id="gmail-m_3528187862338706872gmail-m_-2801227829881931873gmail-m_-2896868114653338673bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px;color:rgb(0,0,0);margin:0px">
<span><br></span></div>
<div id="gmail-m_3528187862338706872gmail-m_-2801227829881931873gmail-m_-2896868114653338673bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px;color:rgb(0,0,0);margin:0px">
<span>I’m on vacation this week and next, so it might be a few days
before I post a new webrev. Thanks again for the
comments!</span></div>
</div>
</blockquote>
<div><span><br></span></div>
<div><span>Np. Enjoy your time off.</span></div>
<div><span><br></span></div>
<div><span>Cheers, Thomas</span></div>
<div><span> </span></div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div>
<div id="gmail-m_3528187862338706872gmail-m_-2801227829881931873gmail-m_-2896868114653338673bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px;color:rgb(0,0,0);margin:0px">
<span><br></span></div>
<div id="gmail-m_3528187862338706872gmail-m_-2801227829881931873gmail-m_-2896868114653338673bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px;color:rgb(0,0,0);margin:0px">
<span>Tony</span></div>
<span><br></span>
<div id="gmail-m_3528187862338706872gmail-m_-2801227829881931873gmail-m_-2896868114653338673bloop_sign_1557907893971663104" class="gmail-m_3528187862338706872gmail-m_-2801227829881931873gmail-m_-2896868114653338673bloop_sign">
<div><span><br></span></div>
<div>
<div><span>—————</span></div>
<div><span>Tony Printezis | @TonyPrintezis |<span class="gmail-m_3528187862338706872Apple-converted-space"> </span><a href="mailto:tprintezis@twitter.com" target="_blank">tprintezis@twitter.com</a></span></div>
</div>
<div><span><br></span></div>
</div>
<span><br></span>
<p class="gmail-m_3528187862338706872gmail-m_-2801227829881931873gmail-m_-2896868114653338673airmail_on">
<span>On May 13, 2019 at 7:50:44 PM, Thomas Stüfe (<a href="mailto:thomas.stuefe@gmail.com" target="_blank">thomas.stuefe@gmail.com</a>) wrote:</span></p>
<blockquote type="cite" class="gmail-m_3528187862338706872gmail-m_-2801227829881931873gmail-m_-2896868114653338673clean_bq">
<div>
<div>
<div dir="ltr"><span><span>Hi Tony,</span></span>
<div><span><br></span></div>
<div><span>had a look at your second webrev. Seems fine, modulo the
discussion points from my mail from earlier
today. </span></div>
<div><span><br></span></div>
<div><span>Small nit, I personally prefer pointers vs references
for output structures, but I leave it up to you whether you want to
change it.</span></div>
<div><span><br></span></div>
<div><span>Cheers, Thomas</span></div>
</div>
<span><br></span>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr"><span>On Thu, May 9, 2019 at
10:00 PM Tony Printezis <<a href="mailto:tprintezis@twitter.com" target="_blank">tprintezis@twitter.com</a>>
wrote:<br></span></div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div>
<div id="gmail-m_3528187862338706872gmail-m_-2801227829881931873gmail-m_-2896868114653338673gmail-m_8541300307760744773bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px;color:rgb(0,0,0);margin:0px">
<span>Thomas,</span></div>
<div id="gmail-m_3528187862338706872gmail-m_-2801227829881931873gmail-m_-2896868114653338673gmail-m_8541300307760744773bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px;color:rgb(0,0,0);margin:0px">
<span><br></span></div>
<div id="gmail-m_3528187862338706872gmail-m_-2801227829881931873gmail-m_-2896868114653338673gmail-m_8541300307760744773bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px;color:rgb(0,0,0);margin:0px">
<span>Updated webrev:</span></div>
<div id="gmail-m_3528187862338706872gmail-m_-2801227829881931873gmail-m_-2896868114653338673gmail-m_8541300307760744773bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px;color:rgb(0,0,0);margin:0px">
<span><br></span></div>
<div id="gmail-m_3528187862338706872gmail-m_-2801227829881931873gmail-m_-2896868114653338673gmail-m_8541300307760744773bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px;color:rgb(0,0,0);margin:0px">
<span><a href="http://cr.openjdk.java.net/~tonyp/8223575/webrev.1/" target="_blank">http://cr.openjdk.java.net/~tonyp/8223575/webrev.1/</a></span></div>
<div id="gmail-m_3528187862338706872gmail-m_-2801227829881931873gmail-m_-2896868114653338673gmail-m_8541300307760744773bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px;color:rgb(0,0,0);margin:0px">
<span><br></span></div>
<div id="gmail-m_3528187862338706872gmail-m_-2801227829881931873gmail-m_-2896868114653338673gmail-m_8541300307760744773bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px;color:rgb(0,0,0);margin:0px">
<span>with some of the suggested changes:</span></div>
<div id="gmail-m_3528187862338706872gmail-m_-2801227829881931873gmail-m_-2896868114653338673gmail-m_8541300307760744773bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px;color:rgb(0,0,0);margin:0px">
<span><br></span></div>
<div id="gmail-m_3528187862338706872gmail-m_-2801227829881931873gmail-m_-2896868114653338673gmail-m_8541300307760744773bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px;color:rgb(0,0,0);margin:0px">
<span>* did some renaming</span></div>
<div id="gmail-m_3528187862338706872gmail-m_-2801227829881931873gmail-m_-2896868114653338673gmail-m_8541300307760744773bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px;color:rgb(0,0,0);margin:0px">
<span>* created hpp / cpp files for the new class (now called
MetaspaceSizesSnapshot)</span></div>
<div id="gmail-m_3528187862338706872gmail-m_-2801227829881931873gmail-m_-2896868114653338673gmail-m_8541300307760744773bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px;color:rgb(0,0,0);margin:0px">
<span>* moved the formatting macros to
globalDefinitions.hpp</span></div>
<div id="gmail-m_3528187862338706872gmail-m_-2801227829881931873gmail-m_-2896868114653338673gmail-m_8541300307760744773bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px;color:rgb(0,0,0);margin:0px">
<span><br></span></div>
<div id="gmail-m_3528187862338706872gmail-m_-2801227829881931873gmail-m_-2896868114653338673gmail-m_8541300307760744773bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px;color:rgb(0,0,0);margin:0px">
<span>Still pending:</span></div>
<div id="gmail-m_3528187862338706872gmail-m_-2801227829881931873gmail-m_-2896868114653338673gmail-m_8541300307760744773bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px;color:rgb(0,0,0);margin:0px">
<span><br></span></div>
<div id="gmail-m_3528187862338706872gmail-m_-2801227829881931873gmail-m_-2896868114653338673gmail-m_8541300307760744773bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px;color:rgb(0,0,0);margin:0px">
<span>* What should we call the spaces?</span></div>
<div id="gmail-m_3528187862338706872gmail-m_-2801227829881931873gmail-m_-2896868114653338673gmail-m_8541300307760744773bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px;color:rgb(0,0,0);margin:0px">
<span>* Should we add the before capacity in the
output?</span></div>
<div id="gmail-m_3528187862338706872gmail-m_-2801227829881931873gmail-m_-2896868114653338673gmail-m_8541300307760744773bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px;color:rgb(0,0,0);margin:0px">
<span><br></span></div>
<div id="gmail-m_3528187862338706872gmail-m_-2801227829881931873gmail-m_-2896868114653338673gmail-m_8541300307760744773bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px;color:rgb(0,0,0);margin:0px">
<span>(let me know if I missed anything…)</span></div>
<div id="gmail-m_3528187862338706872gmail-m_-2801227829881931873gmail-m_-2896868114653338673gmail-m_8541300307760744773bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px;color:rgb(0,0,0);margin:0px">
<span><br></span></div>
<div id="gmail-m_3528187862338706872gmail-m_-2801227829881931873gmail-m_-2896868114653338673gmail-m_8541300307760744773bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px;color:rgb(0,0,0);margin:0px">
<span>Tony</span></div>
<span><br></span>
<div id="gmail-m_3528187862338706872gmail-m_-2801227829881931873gmail-m_-2896868114653338673gmail-m_8541300307760744773bloop_sign_1557431846559721984" class="gmail-m_3528187862338706872gmail-m_-2801227829881931873gmail-m_-2896868114653338673gmail-m_8541300307760744773bloop_sign">
<div><span><br></span></div>
<div>
<div><span>—————</span></div>
<div><span>Tony Printezis | @TonyPrintezis |<span class="gmail-m_3528187862338706872Apple-converted-space"> </span><a href="mailto:tprintezis@twitter.com" target="_blank">tprintezis@twitter.com</a></span></div>
</div>
<div><span><br></span></div>
</div>
<span><br></span>
<p class="gmail-m_3528187862338706872gmail-m_-2801227829881931873gmail-m_-2896868114653338673gmail-m_8541300307760744773airmail_on">
<span>On May 9, 2019 at 12:38:35 PM, Tony Printezis (<a href="mailto:tprintezis@twitter.com" target="_blank">tprintezis@twitter.com</a>) wrote:</span></p>
<blockquote type="cite" class="gmail-m_3528187862338706872gmail-m_-2801227829881931873gmail-m_-2896868114653338673gmail-m_8541300307760744773clean_bq">
<div>
<div>
<div id="gmail-m_3528187862338706872gmail-m_-2801227829881931873gmail-m_-2896868114653338673gmail-m_8541300307760744773bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px;color:rgb(0,0,0);margin:0px">
<span><span>Hi Thomas,</span></span></div>
<div id="gmail-m_3528187862338706872gmail-m_-2801227829881931873gmail-m_-2896868114653338673gmail-m_8541300307760744773bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px;color:rgb(0,0,0);margin:0px">
<span><br></span></div>
<div id="gmail-m_3528187862338706872gmail-m_-2801227829881931873gmail-m_-2896868114653338673gmail-m_8541300307760744773bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px;color:rgb(0,0,0);margin:0px">
<span>Thanks for the detailed feedback and suggestions. Please see
inline….</span></div>
<span><br></span>
<div id="gmail-m_3528187862338706872gmail-m_-2801227829881931873gmail-m_-2896868114653338673gmail-m_8541300307760744773bloop_sign_1557410557946105088" class="gmail-m_3528187862338706872gmail-m_-2801227829881931873gmail-m_-2896868114653338673gmail-m_8541300307760744773bloop_sign">
<div><span><br></span></div>
<div>
<div><span>—————</span></div>
<div><span>Tony Printezis | @TonyPrintezis |<span class="gmail-m_3528187862338706872Apple-converted-space"> </span><a href="mailto:tprintezis@twitter.com" target="_blank">tprintezis@twitter.com</a></span></div>
</div>
<div><span><br></span></div>
</div>
<span><br></span>
<p class="gmail-m_3528187862338706872gmail-m_-2801227829881931873gmail-m_-2896868114653338673gmail-m_8541300307760744773airmail_on">
<span>On May 8, 2019 at 4:07:49 PM, Thomas Stüfe (<a href="mailto:thomas.stuefe@gmail.com" target="_blank">thomas.stuefe@gmail.com</a>) wrote:</span></p>
<div>
<blockquote type="cite" class="gmail-m_3528187862338706872gmail-m_-2801227829881931873gmail-m_-2896868114653338673gmail-m_8541300307760744773clean_bq" style="font-family:Helvetica,Arial;font-size:13px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none">
<div>
<div>
<div dir="ltr">
<div dir="ltr">
<div><span><span><br class="gmail-m_3528187862338706872gmail-m_-2801227829881931873gmail-m_-2896868114653338673gmail-m_8541300307760744773Apple-interchange-newline">
Hi Tony,</span></span></div>
<div><span><br></span></div>
<div><span>I think this makes sense. I agree, the output as it is
now can be confusing. Note that users can still be confused since
users may simply not be aware that the default ClassSpace reserved
size is 1G.</span></div>
</div>
</div>
</div>
</div>
</blockquote>
</div>
<p><br></p>
<p>Yes. What a user wants to size is (what I call - more below) the
class metadata space. But, in the log, this is hidden in the total
size. So, this creates confusion. FWIW, the older +PrintHeapAtGC
output had the same issue:</p>
<p style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo">
<span style="font-variant-ligatures:no-common-ligatures"> Metaspace
used 5660K, capacity 5996K, committed 6144K, reserved
1056768K</span></p>
<p style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo">
class space used 630K, capacity 734K,
committed 768K, reserved 1048576K</p>
<p>It shows the total size and the class space size (which the user
might not know what it is) but doesn’t explicitly show the space
the user actually wants to size.</p>
<p>I think we can make it a bit easier for them.</p>
<p><br></p>
<div>
<div>
<blockquote type="cite" class="gmail-m_3528187862338706872gmail-m_-2801227829881931873gmail-m_-2896868114653338673gmail-m_8541300307760744773clean_bq" style="font-family:Helvetica,Arial;font-size:13px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none">
<div>
<div>
<div dir="ltr">
<div dir="ltr">
<div><span><br class="gmail-m_3528187862338706872gmail-m_-2801227829881931873gmail-m_-2896868114653338673gmail-m_8541300307760744773Apple-interchange-newline">
Can your change break scripts for folks parsing GC logs? I see that
you only appended content and did not change the existing text, so
I guess this is okay.</span></div>
</div>
</div>
</div>
</div>
</blockquote>
</div>
<p><br></p>
<p>Of course the change can break a GC log parsing script, if it
assumes there’s only one size transition on gc,metaspace lines (but
if it just parses the size transition and ignores that rest it will
still work). But is there a hard requirement that we cannot change
any log output? That’d be unfortunate, IMHO. In fact, the
safepoint=info output changed almost totally between 11 and
now.</p>
<p>11:</p>
<p style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo">
<span style="font-variant-ligatures:no-common-ligatures">[49.768s][info
][safepoint ] Entering safepoint region:
Cleanup</span></p>
<p style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo">
<span style="font-variant-ligatures:no-common-ligatures">...</span></p>
<p style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo">
[49.769s][info ][safepoint ] Total time
for which application threads were stopped: 0.0005466 seconds,
Stopping threads took: 0.0001931 seconds</p>
<div><span style="font-variant-ligatures:no-common-ligatures"><br></span></div>
<p>now:</p>
<p style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo">
<span style="font-variant-ligatures:no-common-ligatures">[880.754s][info
][safepoint ] Safepoint
"GenCollectForAllocation", Time since last: 990253904 ns, Reaching
safepoint: 440316 ns, At safepoint: 3761268 ns, Total: 4201584
ns</span></p>
<p><br></p>
<div>
<div>
<blockquote type="cite" class="gmail-m_3528187862338706872gmail-m_-2801227829881931873gmail-m_-2896868114653338673gmail-m_8541300307760744773clean_bq" style="font-family:Helvetica,Arial;font-size:13px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none">
<div>
<div>
<div dir="ltr">
<div dir="ltr">
<div><span><br class="gmail-m_3528187862338706872gmail-m_-2801227829881931873gmail-m_-2896868114653338673gmail-m_8541300307760744773Apple-interchange-newline">
---</span></div>
<div><span><br></span></div>
<div>
<div><span>Format and naming: Different forms are used in different
places. In hs-err files, we print "Metaspace" and "Class Space",
with the former being the total sum and the latter the class space
part.</span></div>
<div><span><br></span></div>
<div><span>But in other corners, eg. in the jcmd VM.metaspace
command, we print non-class space and class space and maybe the sum
in addition. Usually non-class space is called
"Non-Class".</span></div>
<div><span><br></span></div>
<div><span>I personally would prefer, in this case, the latter
names: "Class Space" and "Non-Class Space"</span></div>
</div>
</div>
</div>
</div>
</div>
</blockquote>
</div>
<p><br></p>
<p>Here’s another pet-peeve of mine (and I’m probably overthinking
this) :-) : Users know that the metaspace holds class metadata. So,
calling the area that actually holds the class metadata “Non-Class
Space” and the area that holds some internal JVM data structure
“Class Space” is counter-productive and confusing (IMHO). We don’t
have to use the names I used. But any chance of coming up with
something less confusing?</p>
<p><br></p>
<div>
<div>
<blockquote type="cite" class="gmail-m_3528187862338706872gmail-m_-2801227829881931873gmail-m_-2896868114653338673gmail-m_8541300307760744773clean_bq" style="font-family:Helvetica,Arial;font-size:13px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none">
<div>
<div>
<div dir="ltr">
<div dir="ltr">
<div>
<div><span><br class="gmail-m_3528187862338706872gmail-m_-2801227829881931873gmail-m_-2896868114653338673gmail-m_8541300307760744773Apple-interchange-newline">
---<br></span></div>
</div>
<div><span><br></span></div>
<div><span>Note that for non-class space, reserved size can
actually change when allocating and releasing metaspace, if
VirtualSpaceNodes get purged or newly allocated. Hence total
reserved size can change too. So we may want to print out reserved
before and reserved after sizes. I guess that was also missing from
the output before.</span></div>
</div>
</div>
</div>
</div>
</blockquote>
</div>
<p><br></p>
<p>I’ll be very happy to add the before capacity to the output. You
mean something like this, right?</p>
<p>2300K(4192K)->2100K(4192K)</p>
<p>And we should also add it to the heap size transitions too, as
they have the same issue (the heap can be resized during a GC). Of
course, this will definitely require GC log parser changes. :-) But
I think the change is worthwhile. Any objections?</p>
<p><br></p>
<div>
<div>
<blockquote type="cite" class="gmail-m_3528187862338706872gmail-m_-2801227829881931873gmail-m_-2896868114653338673gmail-m_8541300307760744773clean_bq" style="font-family:Helvetica,Arial;font-size:13px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none">
<div>
<div>
<div dir="ltr">
<div dir="ltr">
<div><span><br class="gmail-m_3528187862338706872gmail-m_-2801227829881931873gmail-m_-2896868114653338673gmail-m_8541300307760744773Apple-interchange-newline">
----</span></div>
<div><span><br></span></div>
<div><span>Since used = class used + nonclass used, I would
simplify PreMetaspaceValues to _non_class_used and _class_used and
calculate the sum on the fly.</span></div>
</div>
</div>
</div>
</div>
</blockquote>
</div>
<p><br></p>
<p>Yeah, I thought about that. I just decided to just store the
total used to avoid replicating the logic of how that’s calculated
in that class too.</p>
<p><br></p>
<div>
<div>
<blockquote type="cite" class="gmail-m_3528187862338706872gmail-m_-2801227829881931873gmail-m_-2896868114653338673gmail-m_8541300307760744773clean_bq" style="font-family:Helvetica,Arial;font-size:13px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none">
<div>
<div>
<div dir="ltr">
<div dir="ltr">
<div><span><br class="gmail-m_3528187862338706872gmail-m_-2801227829881931873gmail-m_-2896868114653338673gmail-m_8541300307760744773Apple-interchange-newline">
---</span></div>
<div><span><br></span></div>
<div><span>You added a new dependency to heap.hpp into
metaspace.cpp for the format string. Is this really necessary? Can
you move this define to metaspace.cpp?</span></div>
<div><span><br></span></div>
<div><span>If not, you need at least add include heap.hpp (did it
build this way without precompiled headers?)</span></div>
</div>
</div>
</div>
</div>
</blockquote>
</div>
<p><br></p>
<p>I didn’t try to explicitly compile without precompiled headers.
jdk submit job was successful. Is that usually evidence enough? If
not, I’ll need to add the extra step to my workflow.</p>
<p>As I eluded to earlier, if this change is accepted I’m going to
suggest to also expand the gc,heap output with sub-space
information for the young gen (eden / survivors). So I wanted
to move the FORMAT macros to somewhere that can also be shared by
GC files. I was not sure if heap.hpp was the best place for them.
Maybe I can just put them in globalDefinitions.hpp, as there’s
already some size formatting utilities there
(proper_unit_for_byte_size(…), etc.)?</p>
<p><br></p>
<div>
<div>
<blockquote type="cite" class="gmail-m_3528187862338706872gmail-m_-2801227829881931873gmail-m_-2896868114653338673gmail-m_8541300307760744773clean_bq" style="font-family:Helvetica,Arial;font-size:13px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none">
<div>
<div>
<div dir="ltr">
<div dir="ltr">
<div><span><br class="gmail-m_3528187862338706872gmail-m_-2801227829881931873gmail-m_-2896868114653338673gmail-m_8541300307760744773Apple-interchange-newline">
----</span></div>
<div><span><br></span></div>
<div><span>The following issues are matters of taste, and I leave
it up to you whether you want to change something:</span></div>
<div><span><br></span></div>
<div>
<div><span>-> I wince a bit at yet another
metaspace-sizes-structure - we have already
ClassLoaderMetaspaceStatistics and MetaspaceCounters, and maybe
others. JFR may also do something similar. Would it be possible to
reuse one of those? (I guess ClassLoaderMetaspaceStatistics is too
fine granular and too expensive to collect.)</span></div>
</div>
</div>
</div>
</div>
</div>
</blockquote>
</div>
<p><br></p>
<p>I was not aware of the two you mentioned. Aren’t
MetaspaceCounters only available when UsePerfData is enabled? I’d
rather decouple this from UsePerfData.
ClassLoaderMetaspaceStatistics does seem too fine-grain for what I
want. And I modeled PreMetaspaceValues on PreGCValues used in
ParallelGC, as it’s a nice way to package up what’s needed in an
object and easily re-use it in the few places where it’s needed.
The way is done now, i.e., just store the metaspace used size and
pass it to the print method, is a bit ad-hoc (IMHO).</p>
<p><br></p>
<div>
<div>
<blockquote type="cite" class="gmail-m_3528187862338706872gmail-m_-2801227829881931873gmail-m_-2896868114653338673gmail-m_8541300307760744773clean_bq" style="font-family:Helvetica,Arial;font-size:13px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none">
<div>
<div>
<div dir="ltr">
<div dir="ltr">
<div><span><br class="gmail-m_3528187862338706872gmail-m_-2801227829881931873gmail-m_-2896868114653338673gmail-m_8541300307760744773Apple-interchange-newline">
-> I would prefer the class PreMetaspaceValues to live inside an
own header in metaspace folder, and in the metaspace namespace like
we did for similar helpers.</span></div>
</div>
</div>
</div>
</div>
</blockquote>
</div>
<p><br></p>
<p>I can definitely do that.</p>
<p><br></p>
<div>
<div>
<blockquote type="cite" class="gmail-m_3528187862338706872gmail-m_-2801227829881931873gmail-m_-2896868114653338673gmail-m_8541300307760744773clean_bq" style="font-family:Helvetica,Arial;font-size:13px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none">
<div>
<div>
<div dir="ltr">
<div dir="ltr">
<div><span><br class="gmail-m_3528187862338706872gmail-m_-2801227829881931873gmail-m_-2896868114653338673gmail-m_8541300307760744773Apple-interchange-newline">
-> I would take the "Pre" out of the name and the member names
and just name it "Snapshot" and the members "used" and "class
used".</span></div>
</div>
</div>
</div>
</div>
</blockquote>
</div>
<p><br></p>
<p>Again, I modeled it based on ParallelGC's PreGCValues class. But
I can rename it to Snapshot to generalize its use.</p>
<p><br></p>
<div>
<div>
<blockquote type="cite" class="gmail-m_3528187862338706872gmail-m_-2801227829881931873gmail-m_-2896868114653338673gmail-m_8541300307760744773clean_bq" style="font-family:Helvetica,Arial;font-size:13px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none">
<div>
<div>
<div dir="ltr">
<div dir="ltr">
<div><span><br class="gmail-m_3528187862338706872gmail-m_-2801227829881931873gmail-m_-2896868114653338673gmail-m_8541300307760744773Apple-interchange-newline">
-> I would probably have made PreMetaspaceValues a dumb
structure and added a function "MetaspaceAux::get_dimensions()"
instead of adding the implementation to the constructor and to the
header file. At least I would prefer the ctor implementation to the
cpp file.</span></div>
</div>
</div>
</div>
</div>
</blockquote>
</div>
<p><br></p>
<p>I can move it to a cpp file. This will also eliminate a cyclic
dependency I had to address by the class forward declaration.</p>
<p><br></p>
<p>Tony</p>
<p><br></p>
<div>
<blockquote type="cite" class="gmail-m_3528187862338706872gmail-m_-2801227829881931873gmail-m_-2896868114653338673gmail-m_8541300307760744773clean_bq" style="font-family:Helvetica,Arial;font-size:13px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none">
<div>
<div>
<div dir="ltr">
<div dir="ltr">
<div><span><br class="gmail-m_3528187862338706872gmail-m_-2801227829881931873gmail-m_-2896868114653338673gmail-m_8541300307760744773Apple-interchange-newline">
<br></span></div>
<div><span>Cheers, Thomas</span></div>
</div>
</div>
<span><br></span>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr"><span>On Wed, May 8, 2019 at 4:20
PM Tony Printezis <<a href="mailto:tprintezis@twitter.com" target="_blank">tprintezis@twitter.com</a>>
wrote:<br></span></div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div>
<div id="gmail-m_3528187862338706872gmail-m_-2801227829881931873gmail-m_-2896868114653338673gmail-m_8541300307760744773gmail-m_2409837340603532282bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px;color:rgb(0,0,0);margin:0px">
<span>Any chance of someone taking a look at this?</span></div>
<div id="gmail-m_3528187862338706872gmail-m_-2801227829881931873gmail-m_-2896868114653338673gmail-m_8541300307760744773gmail-m_2409837340603532282bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px;color:rgb(0,0,0);margin:0px">
<span><br></span></div>
<div id="gmail-m_3528187862338706872gmail-m_-2801227829881931873gmail-m_-2896868114653338673gmail-m_8541300307760744773gmail-m_2409837340603532282bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px;color:rgb(0,0,0);margin:0px">
<span><a href="http://cr.openjdk.java.net/~tonyp/8223575/webrev.0/" target="_blank">http://cr.openjdk.java.net/~tonyp/8223575/webrev.0/</a></span></div>
<div id="gmail-m_3528187862338706872gmail-m_-2801227829881931873gmail-m_-2896868114653338673gmail-m_8541300307760744773gmail-m_2409837340603532282bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px;color:rgb(0,0,0);margin:0px">
<span><br></span></div>
<div id="gmail-m_3528187862338706872gmail-m_-2801227829881931873gmail-m_-2896868114653338673gmail-m_8541300307760744773gmail-m_2409837340603532282bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px;color:rgb(0,0,0);margin:0px">
<span>As I said on the JIRA, users can be confused when they
metaspace capacity shows as over 1G even though they asked for
128M. Breaking down the spaces, when coops are enabled, can address
this confusion (and having the actual occupancy of each space
separately is also a lot more informative and avoids guesswork).
The output looks like this when coops are enabled:</span></div>
<div id="gmail-m_3528187862338706872gmail-m_-2801227829881931873gmail-m_-2896868114653338673gmail-m_8541300307760744773gmail-m_2409837340603532282bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px;color:rgb(0,0,0);margin:0px">
<span><br></span></div>
<div id="gmail-m_3528187862338706872gmail-m_-2801227829881931873gmail-m_-2896868114653338673gmail-m_8541300307760744773gmail-m_2409837340603532282bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px;color:rgb(0,0,0);margin:0px">
<p style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo">
<span><span style="font-variant-ligatures:no-common-ligatures">[10.090s][info][gc,metaspace
] GC(8) Metaspace: 2130K->2130K(1056768K)
ClassMetadata: 1906K->1906K(8192K) ClassSpace:
223K->223K(1048576K)</span></span></p>
</div>
<div><br></div>
and like this (i.e., what it was before the change) when coops are
not enabled:
<div><br></div>
<div>
<p style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo">
<span style="font-variant-ligatures:no-common-ligatures">[25.767s][info][gc,metaspace
] GC(28) Metaspace:
8107K->8107K(10240K)</span></p>
</div>
<div><br></div>
<div>A couple of notes on the changes:</div>
<div><br></div>
<div>- I’m open to different suggestions for what to call
ClassMetadata and ClassSpace. :-)</div>
<div>- I didn’t know where to put the HEAP_CHANGE_FORMAT and
HEAP_CHANGE_FORMAT_ARGS macros, so that they can be easily shared,
and I ended up putting them in heap.hpp. Let me know if there’s a
better place for them.</div>
<div><br></div>
<div>Tony</div>
<div><br>
<div id="gmail-m_3528187862338706872gmail-m_-2801227829881931873gmail-m_-2896868114653338673gmail-m_8541300307760744773gmail-m_2409837340603532282bloop_sign_1557324722471365888" class="gmail-m_3528187862338706872gmail-m_-2801227829881931873gmail-m_-2896868114653338673gmail-m_8541300307760744773gmail-m_2409837340603532282bloop_sign">
<div><br></div>
<div>
<div>—————</div>
<div>Tony Printezis | @TonyPrintezis |<span class="gmail-m_3528187862338706872gmail-m_-2801227829881931873gmail-m_-2896868114653338673gmail-m_8541300307760744773Apple-converted-space"> </span><a href="mailto:tprintezis@twitter.com" target="_blank">tprintezis@twitter.com</a></div>
</div>
<div><br></div>
</div>
</div>
</div>
</blockquote>
</div>
</div>
</div>
</blockquote>
<br class="gmail-m_3528187862338706872gmail-m_-2801227829881931873gmail-m_-2896868114653338673gmail-m_8541300307760744773Apple-interchange-newline">
</div>
<br class="gmail-m_3528187862338706872gmail-m_-2801227829881931873gmail-m_-2896868114653338673gmail-m_8541300307760744773Apple-interchange-newline">
</div>
<br class="gmail-m_3528187862338706872gmail-m_-2801227829881931873gmail-m_-2896868114653338673gmail-m_8541300307760744773Apple-interchange-newline">
</div>
<br class="gmail-m_3528187862338706872gmail-m_-2801227829881931873gmail-m_-2896868114653338673gmail-m_8541300307760744773Apple-interchange-newline">
</div>
<br class="gmail-m_3528187862338706872gmail-m_-2801227829881931873gmail-m_-2896868114653338673gmail-m_8541300307760744773Apple-interchange-newline">
</div>
<br class="gmail-m_3528187862338706872gmail-m_-2801227829881931873gmail-m_-2896868114653338673gmail-m_8541300307760744773Apple-interchange-newline">
</div>
<br class="gmail-m_3528187862338706872gmail-m_-2801227829881931873gmail-m_-2896868114653338673gmail-m_8541300307760744773Apple-interchange-newline">
</div>
<br class="gmail-m_3528187862338706872gmail-m_-2801227829881931873gmail-m_-2896868114653338673gmail-m_8541300307760744773Apple-interchange-newline">
</div>
<br class="gmail-m_3528187862338706872gmail-m_-2801227829881931873gmail-m_-2896868114653338673gmail-m_8541300307760744773Apple-interchange-newline">
</div>
<br class="gmail-m_3528187862338706872gmail-m_-2801227829881931873gmail-m_-2896868114653338673gmail-m_8541300307760744773Apple-interchange-newline">
</div>
</div>
</div>
</blockquote>
</div>
</blockquote>
</div>
</div>
</div>
</blockquote>
</div>
</blockquote>
</div>
</div>
</div>
</div>
</blockquote>
</div>
</blockquote>
</div>
</div>
</div>
</blockquote>
<br class="gmail-m_3528187862338706872Apple-interchange-newline"></div>
<br class="gmail-m_3528187862338706872Apple-interchange-newline"></div>
<br class="gmail-m_3528187862338706872Apple-interchange-newline"></div>
<br class="gmail-m_3528187862338706872Apple-interchange-newline"></div>
<br class="gmail-m_3528187862338706872Apple-interchange-newline"></div>
</div>
</blockquote>
</div>
</div></div></span></blockquote></body></html>