RFR: 8149650: Create a trace event for G1 heap region type transitions

Thomas Schatzl thomas.schatzl at oracle.com
Fri Feb 12 08:49:38 UTC 2016


Hi David,

On Thu, 2016-02-11 at 17:16 +0100, David Lindholm wrote:
> Hi Jesper,
> 
> Thanks for looking at this!
> 
> On 2016-02-11 14:35, Jesper Wilhelmsson wrote:
> > Hi,
> > 
> > heapRegion.hpp, set_*() - I don't really like that we have code in 
> > .hpp files. Since these functions now do more than just set stuff I
> > would prefer if they moved into the .cpp file.
> 
> Absolutely. New webrev:
> 
> http://cr.openjdk.java.net/~david/JDK-8149650/webrev.01/

  - please change get_trace_type() to a private method. It's not used
anywhere else but in HeapRegion::report_region_type_change(), once.

  - another big issue is that sending region type changes region by
region by default will definitely be a performance bottleneck. Without
some buffering this mechanism just does not scale. Consider (common)
multi-GB heaps where at each GC thousands of regions change their type
(eg. the entire collection set gets freed) at once.

Now maybe JFR is something magic, but I can't believe that thousands of
messages vs. one bulk message won't make a difference.

I do know that this is some kind of trace message, so some performance
degradation will be expected but still it seems a waste of resources.
Did you do some measurements?

Thanks,
  Thomas





More information about the hotspot-gc-dev mailing list