RFR: JDK-8221751: Shenandoah: Improve SATB enqueueing

Aleksey Shipilev shade at redhat.com
Tue Apr 2 08:50:23 UTC 2019


On 4/1/19 3:41 PM, Roman Kennke wrote:
> In some paths, we currently check GC state 3 times before enqueueing an oop in SATB buffer: 1.
> conc-mark in progress (global or local), 2. SATB active (global) 3. SATB active (local). This should
> be streamlined to only do one check, and consistently check conc-mark-in-progress only.
> 
> This can be taken even further for arraycopy pre-barriers and arraycopy-loops, where the check can
> be done once for the whole operation. In arraycopy barriers code, we can also 'inline' the current
> thread and marking context objects, instead of fetching them for every array element.
> 
> Bug:
> https://bugs.openjdk.java.net/browse/JDK-8221751
> Webrev:
> http://cr.openjdk.java.net/~rkennke/JDK-8221751/webrev.00/

Looks okay.

*) In ShenandoahBarrierSet::write_ref_array_pre_work, shouldn't all new code go under the
_heap->is_concurrent_mark_in_progress branch?


*) Indenting nit in shenandoahRuntime.cpp.

  52   shenandoah_assert_correct(NULL, orig);
  53   // store the original value that was in the field reference
  54 assert(ShenandoahThreadLocalData::satb_mark_queue(thread).is_active(), "Shouldn't be here
otherwise");
  55   ShenandoahThreadLocalData::satb_mark_queue(thread).enqueue_known_active(orig);
-- 
Thanks,
-Aleksey


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <https://mail.openjdk.org/pipermail/hotspot-gc-dev/attachments/20190402/981ca56a/signature.asc>


More information about the hotspot-gc-dev mailing list