How to find fragmented space in G1 regions

Amit Balode amit.balode at gmail.com
Wed Feb 8 15:45:59 UTC 2017


Thanks Thomas, do you know if there is overhead of those flags? I think
trace would be expensive but what about others? Will they add anything to
pause time?

On Wed, Feb 8, 2017 at 9:01 PM, Thomas Schatzl <thomas.schatzl at oracle.com>
wrote:

> Hi,
>
> On Tue, 2017-02-07 at 19:06 +0530, Amit Balode wrote:
> > Any thoughts on how we could find how much space is fragmented in G1
> > regions?
>
>   -XX:+G1PrintRegionLivenessInfo prints region information containing
> its type after every marking (use gc+liveness=trace for jdk9) twice.
> The first "post-marking" output is what you want. The "post-sorting"
> one is only interesting for getting details about the collection set
> (and this one does not contain free regions).
>
> The first column contains information about the type of the region:
>
> FREE -> free region
> SURV -> survivor region
> EDEN -> eden region
> HUMS -> humongous (start)
> HUMC -> humongous (continuation)
> OLD -> old region
> ARC -> archive regions (jdk9 only I think, not sure, maybe also jdk8)
>
> From that you can deduce the size and how many contiguous free regions
> are available at the moment.
>
> There is also -XX:+PrintHeapAtGC and -XX:+PrintHeapAtGCExtended which
> print the region layout at every GC.
>
> Thanks,
>   Thomas
>
>


-- 
Thanks & Regards,
Amit.Balode
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/hotspot-gc-use/attachments/20170208/bb5840c3/attachment.html>


More information about the hotspot-gc-use mailing list