RFR (XS): 8183397: Ensure consistent closure filtering during evacuation

Erik Helin erik.helin at oracle.com
Thu Jul 6 08:20:42 UTC 2017

On 07/03/2017 01:24 PM, Thomas Schatzl wrote:
> Hi all,

Hi Thomas,

>   can I have reviews for this change that fixes an observation that has
> been made recently by Erik, i.e. that the "else" part of several
> evacuation closures inconsistently filters out non-cross-region
> references before checking whether the referenced object is a humongous
> or ext region.
> This causes somewhat hard to diagnose performance issues, and earlier
> filtering does not hurt if done anyway.
> (Note that the current way of checking in all but the UpdateRS closure
> using HeapRegion::is_in_same_region() seems optimal. The only reason
> why the other way in the UpdateRS closure is better because the code
> needs the "to" HeapRegion pointer anyway)
> CR:
> https://bugs.openjdk.java.net/browse/JDK-8183397
> Webrev:
> http://cr.openjdk.java.net/~tschatzl/8183397/webrev/

-  } else if (in_cset_state.is_humongous()) {
+  } else {
+    if (in_cset_state.is_humongous()) {

Why change `else if` to `else { if (...) {` here? Does it result in the
compiler generating faster code for this case?


> Testing:
> jprt, performance regression analysis
> Thanks,
>   Thomas

More information about the hotspot-gc-dev mailing list