RFR: 8256020: Shenandoah: Don't resurrect objects during evacuation on AS_NO_KEEPALIVE [v4]

Roman Kennke rkennke at openjdk.java.net
Wed Nov 11 17:49:57 UTC 2020


On Wed, 11 Nov 2020 17:02:13 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:

>> Roman Kennke has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains five additional commits since the last revision:
>> 
>>  - Merge branch 'master' into JDK-8256020
>>  - Merge branch 'master' into JDK-8256020
>>  - Merge branch 'master' into JDK-8256020
>>  - Revert original fix; Prevent resurrection of unreachable objects during evacuation on AS_NO_KEEPALIVE
>>  - 8256020: Don't resurrect objects on argument-dependency access
>
> src/hotspot/share/gc/shenandoah/shenandoahBarrierSet.inline.hpp line 115:
> 
>> 113:   // concurrent class-unloading.
>> 114:   if (HasDecorator<decorators, AS_NO_KEEPALIVE>::value && obj != NULL &&
>> 115:       _heap->has_forwarded_objects() &&
> 
> Why `has_forwarded_objects()` check here? It seems to me that without forwarded objects, the `load_reference_barrier` below would return the same `obj` anyway?

Mostly because we check if the object is (un-)marked and that would be unreliable outside of has_forwarded. Also, secondarily, because this block is intended to prevent resurrection-by-evacuation, which would not happen outside of has_forwarded. We could, infact, narrow it to is_evacuation_in_progress() I guess.

-------------

PR: https://git.openjdk.java.net/jdk/pull/1113


More information about the shenandoah-dev mailing list