RFR: Use PLAB for evacuations instead of TLAB

Aleksey Shipilev shade at redhat.com
Thu May 10 14:28:49 UTC 2018


On 05/09/2018 11:19 PM, Roman Kennke wrote:
> Diff:
> http://cr.openjdk.java.net/~rkennke/plab-gclab/webrev.02.diff/
> Full:
> http://cr.openjdk.java.net/~rkennke/plab-gclab/webrev.02/

Looks like a nice cleanup.

*) Seems that plab.* files exist only starting JDK 9. This would pose some problems with
backporting, but it looks resolvable.

*) Break this line, and use template parameter instead of cast?

  47   AlignmentReserve = oopDesc::header_size() > MinObjAlignment ?
             align_object_size(MAX2<size_t>(arrayOopDesc::header_size(T_INT), min_align_reserve)) :
             0;

*) There is a commented block, do we need it?

 671   PLAB* gclab = ShenandoahThreadLocalData::gclab(thread);
 672   /*
 673    * TODO: We used to do that with TLABs, how to do it with PLABs?
 674
 675   if (gclab->free() > thread->gclab().refill_waste_limit()) {
 676     thread->gclab().record_slow_allocation(size);
 677     return NULL;
 678   }
 679   */

*) What is the reason for moving this block out of mark-compact?

 229     if (UseTLAB) {
 230       ShenandoahGCPhase phase(ShenandoahPhaseTimings::full_gc_resize_tlabs);
 231       heap->resize_all_tlabs();
 232     }

-Aleksey



More information about the shenandoah-dev mailing list