RFR: 8257641: Shenandoah: Query is_at_shenandoah_safepoint() from control thread should return false
Aleksey Shipilev
shade at openjdk.java.net
Thu Dec 3 15:25:57 UTC 2020
On Thu, 3 Dec 2020 15:05:33 GMT, Zhengyu Gu <zgu at openjdk.org> wrote:
> Since Shenandoah GC safepoints are scheduled by control thread, so that, if querying comes from control thread, the answer should be false.
>
> is_at_shenandoah_safepoint() is still not reliable, even after JDK-8253778, we may consider to scratch it.
>
> - [x] hotspot_gc_shenandoah x86_64 and x86_32
This looks good, consider fixing a few nits below.
src/hotspot/share/gc/shenandoah/shenandoahHeap.hpp line 458:
> 456: public:
> 457: ShenandoahControlThread* control_thread() const { return _control_thread; }
> 458:
Maybe it is easier to `friend` the class that wants it, instead of exposing the control thread for everyone?
src/hotspot/share/gc/shenandoah/shenandoahUtils.hpp line 153:
> 151: // Shenandoah GC specific safepoints are scheduled by control thread,
> 152: // so that, querying from control thread can not happen during those
> 153: // safepoints.
Consider this wording:
// Shenandoah GC specific safepoints are scheduled by control thread.
// So if we are enter here from control thread, then we are definitely not
// at Shenandoah safepoint, but at something else.
-------------
Marked as reviewed by shade (Reviewer).
PR: https://git.openjdk.java.net/jdk/pull/1600
More information about the shenandoah-dev
mailing list