Enable optimization of arraycopy as loads/stores with Shenandoah
Roman Kennke
rkennke at redhat.com
Thu Dec 8 16:52:05 UTC 2016
Am Donnerstag, den 08.12.2016, 17:41 +0100 schrieb Roland Westrelin:
> > Ok. And what happens when ReduceInitialCardMarks is false? Because
> > this
> > might be what we need.
>
> For instance clone:
>
> post_barrier(control(),
> memory(raw_adr_type),
> alloc_obj,
> no_particular_field,
> raw_adr_idx,
> no_particular_value,
> T_OBJECT,
> false);
>
> void GraphKit::post_barrier(Node* ctl,
> Node* store,
> Node* obj,
> Node* adr,
> uint adr_idx,
> Node* val,
> BasicType bt,
> bool use_precise) {
> BarrierSet* bs = Universe::heap()->barrier_set();
> set_control(ctl);
> switch (bs->kind()) {
> case BarrierSet::G1SATBCTLogging:
> g1_write_barrier_post(store, obj, adr, adr_idx, val, bt,
> use_precise);
> break;
>
> case BarrierSet::CardTableForRS:
> case BarrierSet::CardTableExtension:
> write_barrier_post(store, obj, adr, adr_idx, val, use_precise);
> break;
>
> case BarrierSet::ModRef:
> case BarrierSet::ShenandoahBarrierSet:
> break;
>
> default :
> ShouldNotReachHere();
>
> }
> }
>
> For array clone, if I follow the logic correctly
> arrayof_oop_disjoint_arraycopy stub.
>
> The shenandoah clone barrier is a no-op unless
> ShenandoahBarrierSet::need_update_refs_barrier() is true. If it's
> false
> often enough, then it seems a reasonable trade off to do the bulk
> copy
> and have an extra call.
Ok. I know I went through this a while ago, but needed a refresher ;-)
Thanks, Roman
More information about the shenandoah-dev
mailing list