RFR (M): 8141141: Young and Old gen PLAB stats are similar in output with -XX:+PrintPLAB

Bengt Rutisson bengt.rutisson at oracle.com
Wed Mar 2 09:37:52 UTC 2016


Hi Thomas,

Looks good. Nice improvement to the logging!

The code duplication between G1EvacStats and PLABStats is a bit 
unfortunate, but it is probably outside the scope of your change to do 
anything about that.

Thanks,
Bengt

On 2016-03-01 18:35, Thomas Schatzl wrote:
> Hi all,
>
>    can I get reviews for the following change that tries to improve PLAB
> logging output.
>
> In particular, instead of:
>
> [2,245s][debug  ][gc,plab] GC(33)  (allocated = 1 wasted = 0 unused = 0
> used = 1 undo_waste = 0 region_end_waste = 0 regions filled = 0
> direct_allocated = 0 failure_used = 0 failure_waste = 0)  (plab_sz = 0
> desired_plab_sz = 258)
> [2,245s][debug  ][gc,plab] GC(33)  (allocated = 1 wasted = 0 unused = 0
> used = 1 undo_waste = 0 region_end_waste = 0 regions filled = 0
> direct_allocated = 0 failure_used = 0 failure_waste = 0)  (plab_sz = 0
> desired_plab_sz = 258)
>
> The logging looks like:
>
> [0.330s][debug][gc,plab  ] GC(0) Young PLAB allocation: allocated:
> 1825632B, wasted: 29424B, unused: 2320B, used: 1793888B, undo waste:
> 0B,
> [0.330s][debug][gc,plab  ] GC(0) Young other allocation: region end
> waste: 0B, regions filled: 2, direct allocated: 271520B, failure used:
> 0B, failure wasted: 0B
> [0.330s][debug][gc,plab  ] GC(0) Young sizing: calculated: 358776B,
> actual: 358776B
> [0.330s][debug][gc,plab  ] GC(0) Old PLAB allocation: allocated:
> 427248B, wasted: 592B, unused: 368584B, used: 58072B, undo waste: 0B,
> [0.330s][debug][gc,plab  ] GC(0) Old other allocation: region end
> waste: 0B, regions filled: 1, direct allocated: 41704B, failure used:
> 0B, failure wasted: 0B
> [0.330s][debug][gc,plab  ] GC(0) Old sizing: calculated: 11608B,
> actual: 11608B
>
> I.e. with the following changes:
> - add "Young"/"Old" identifier to show "generation"
> - split information into multiple lines; the "other allocation" and
> "sizing" are optional. "other allocation" is only printed when using
> G1, "sizing" only when ResizePLAB is enabled
> - values are in bytes now (with units), not heapwords
>
> I think it is a big improvement.
>
> CR:
> https://bugs.openjdk.java.net/browse/JDK-8141141
> Webrev:
> http://cr.openjdk.java.net/~tschatzl/8141141/webrev/
> Testing:
> jprt, existing plab logging test cases



More information about the hotspot-gc-dev mailing list