<div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr">Hi Thomas et al,<br><div><br></div><div>Thanks for moving this thread to a RFR. Here is the webrev and bug:</div><div>Webrev: <a href="http://cr.openjdk.java.net/~jcbeyler/8211123/webrev.00/">http://cr.openjdk.java.net/~jcbeyler/8211123/webrev.00/</a></div><div>Bug: <a href="https://bugs.openjdk.java.net/browse/JDK-8211123">https://bugs.openjdk.java.net/browse/JDK-8211123</a></div><div><br></div><div>For the test, I inspired myself of a few different tests to get this up and running. I didn't find a means to use only the WhiteBox to get the metaspace filled. I did not want to use the .jar that the original reproducer was using since it was using a library. So I used the testcases.jar from the runtime<span style="color:rgb(0,0,0)">/7116786 test.</span></div><div><span style="color:rgb(0,0,0)"><br></span></div><div><span style="color:rgb(0,0,0)">I also use a separate process to test the various GCs and ensure it works for all.</span></div><div><span style="color:rgb(0,0,0)"><br></span></div><div><span style="color:rgb(0,0,0)">Btw, I've put </span><font color="#000000">nijiaben as the contributor for the webrev.</font></div><div><font color="#000000"><br></font></div><div><span style="color:rgb(0,0,0)">Let me know what you think, I imagine I've made the test a bit more complicated than need be,</span></div><div><span style="color:rgb(0,0,0)">Jc</span></div><div><span style="color:rgb(0,0,0)"><br></span></div></div></div></div></div><br><div class="gmail_quote"><div dir="ltr">On Wed, Sep 26, 2018 at 1:11 AM Thomas Schatzl <<a href="mailto:thomas.schatzl@oracle.com">thomas.schatzl@oracle.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
On Tue, 2018-09-25 at 13:22 -0700, JC Beyler wrote:<br>
> I did say I was not a GC expert :-)<br>
> <br>
> So the question would be: is the patch I showed based on Nijiaben's<br>
> patch worth fixing and is it right? It seems like the right thing to<br>
> do for at least fixing SerialGC printouts, no?<br>
<br>
Yes. Serial GC is fully supported.<br>
<br>
I am not sure what release this is reported for, probably 8. Not sure<br>
if it is worth backporting (then again, on 8u both CMS and Serial are<br>
supported).<br>
<br>
> Ps: here is the patch for simplifying things for everyone then:<br>
> diff -r 8f66a57054b7 src/hotspot/share/gc/shared/genCollectedHeap.cpp<br>
> --- a/src/hotspot/share/gc/shared/genCollectedHeap.cpp Tue Sep 25<br>
> 10:30:32 2018 -0700<br>
> +++ b/src/hotspot/share/gc/shared/genCollectedHeap.cpp Tue Sep 25<br>
> 12:50:54 2018 -0700<br>
> @@ -649,7 +649,6 @@<br>
> complete = complete || collected_old;<br>
> <br>
> print_heap_change(young_prev_used, old_prev_used);<br>
> - MetaspaceUtils::print_metaspace_change(metadata_prev_used);<br>
> <br>
> // Adjust generation sizes.<br>
> if (collected_old) {<br>
> @@ -665,6 +664,7 @@<br>
> MetaspaceGC::compute_new_size();<br>
> update_full_collections_completed();<br>
> }<br>
> + MetaspaceUtils::print_metaspace_change(metadata_prev_used);<br>
> <br>
> // Track memory usage and detect low memory after GC finishes<br>
> MemoryService::track_memory_usage();<br>
> <br>
<br>
Looks good. Would it be possible to write a small junit test that<br>
checks that metaspace usage decreased after full gc?<br>
<br>
That should be true for all collectors assuming they do not have class<br>
unloading disabled.<br>
<br>
Thanks,<br>
Thomas<br>
<br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><br></div>Thanks,<div>Jc</div></div></div>