RFR: Scan remembered [v2]

earthling-amzn github.com+71722661+earthling-amzn at openjdk.java.net
Wed Jan 13 19:49:27 UTC 2021


On Wed, 13 Jan 2021 12:17:34 GMT, Roman Kennke <rkennke at openjdk.org> wrote:

>> Kelvin Nilsen has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Improvements requested during initial review
>>   
>>   These changes are cosmetic and/or related to comments.
>
> src/hotspot/share/gc/shenandoah/shenandoahHeap.cpp line 2755:
> 
>> 2753:           // ShenandoahHeap::marked_object_iterate(), which is called by _heap->marked_object_oop_iterate().
>> 2754:           objs.do_object(obj);
>> 2755:           p += obj->size();
> 
> As noted before, this might crash, if the Klass* that an unreachable object points to has been unloaded. The problem, as far as I can tell, arises because we don't have up-to-date marking information anymore, because we clean the whole bitmap, and subsequent young-gen collection doesn't establish old-gen reachability. Could we solve this by preserving the most-recent old-gen marking in the bitmap, and only clean the young-gen-parts? For now, it can probably be worked around by turning off ClassUnloading altogether.

We've experimented with a preserved bitmap on a branch. It works until we hit a full collection, at which point things go sideways. The compaction phase specifically needed to be modified to maintain the correctness of the bitmap we wanted to preserve. It needs a bit more debugging, but it's been tabled for now.

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

PR: https://git.openjdk.java.net/shenandoah/pull/12


More information about the shenandoah-dev mailing list