RFR: Traversal: Don't traverse new objects

Aleksey Shipilev shade at redhat.com
Wed Feb 21 18:09:56 UTC 2018


On 02/21/2018 06:34 PM, Roman Kennke wrote:
> I removed the is_alloc_region() stuff in favour of checking r->tams()
> < r->top() which tells me which region is an alloc region, so that we
> can exclude them when trashing empty regions (alloc regions look empty
> because no liveness data is accounted for). Notice that evac-regions
> are not affected by this, because we *do* count evacuated objects/tlab
> as live in evac regions.
> 
> http://cr.openjdk.java.net/~rkennke/traversal-no-traverse-new/webrev.02

*) Some terse comment is still needed aroudn next TAMS modification in FreeSet:
  http://mail.openjdk.java.net/pipermail/shenandoah-dev/2018-February/005095.html

*) I would probably gave the name to the property:

  bool not_allocated = _heap->next_top_at_mark_start(r->bottom()) == r->top();
  if (r->is_humongous_start() && !r->has_live() && not_allocated) {
    // purge humongous
  } else if (!r->is_empty() && !r->has_live() && not_allocated) {
    // trash regular
  } else if (r->is_alloc_allowed()) {
    // add to free set
  }

...and optionally rephrased this as:

  bool not_allocated = _heap->next_top_at_mark_start(r->bottom()) == r->top();
  if (!r->has_live() && not_allocated) {
    if (r->is_humongous_start()) {
      // trash humongous
    } else {
      // trash regular
    }
  } else if (r->is_alloc_allowed()) {
    // add to free set
  }


*) Stray newline in shenandoahHeapRegion.hpp

 239

Otherwise good.

-Aleksey




More information about the shenandoah-dev mailing list