RFR: Simplify JNI critical support

Roman Kennke rkennke at redhat.com
Wed Sep 21 13:51:17 UTC 2016


Am Mittwoch, den 21.09.2016, 07:56 -0400 schrieb Zhengyu Gu:
> On 09/21/2016 07:50 AM, Aleksey Shipilev wrote:
> > 
> > On 09/21/2016 01:10 PM, Roman Kennke wrote:
> > > 
> > > http://cr.openjdk.java.net/~rkennke/jni_critical/webrev.00/
> > Impressive.
> > 
> > Minor comments:
> > 
> >   *) The test/gc/shenandoah are better be "hotspot_gc_shenandoah".
> > We
> > will select "fast" subset later, as our test count grows.

Renamed.

> >  *) I am fuzzy on the synchronization details here, but shouldn't
> > _critical_pins be volatile and/or read through Atomic::<something>
> > as well?

In that case, it most likely doesn't matter. is_pinned() is only called
at safepoints, and enter_critical()/exit_critical() only outside
safepoints, and safepoint guarantees a fence() in between. I made
_critical_pins volatile nevertheless, for the sake of total exactness
;-) and I also added asserts to check the above mentioned safepoint
assumptions.

http://cr.openjdk.java.net/~rkennke/jni_critical/webrev.03/

Ok now?

Roman


More information about the shenandoah-dev mailing list