RFR: 8242316: Shenandoah: Turn NULL-check into assert in SATB slow-path entry
Aleksey Shipilev
shade at redhat.com
Wed Apr 8 06:36:41 UTC 2020
On 4/7/20 10:41 PM, Roman Kennke wrote:
> In ShenandoahRuntime, we do an explicit NULL-check with return, that has
> otherwise only an assert(false). We can turn that into a simple assert.
>
> We might have left the check there as a safety-net, but it never
> triggered anywhere. Also, we better make sure we never send NULL to the
> SATB-slowpath to begin with.
This check copies what G1 does in its own slowpath.
That said, I cannot see where Shenandoah code is called with NULL obj.
> Issue:
> https://bugs.openjdk.java.net/browse/JDK-8242316
> Webrev:
> http://cr.openjdk.java.net/~rkennke/JDK-8242316/webrev.00/
Looks good.
I think you can even drop the assert wholesale, because the subsequent shenandoah_assert_correct
implicitly checks for NULL by doing heap->is_in(...). The only reason to keep the assert is to get
the "should be optimized out" message.
--
Thanks,
-Aleksey
More information about the shenandoah-dev
mailing list