RFR: Fix full gc with class unloading [v2]

Roman Kennke rkennke at openjdk.java.net
Wed Sep 15 11:58:43 UTC 2021


On Tue, 14 Sep 2021 23:43:27 GMT, Kelvin Nilsen <kdnilsen at openjdk.org> wrote:

>> This pull request fixes incompatibilities between Full GC and class unloading.  In particular, when degenerated GC upgrades to Full GC, it is important to change the generation to GLOBAL.  Otherwise, certain assertions related to class unloading fail.
>
> Kelvin Nilsen has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Respond to feedback: remove unneeded code
>   
>   Replaced with an assertion.

Looks good. Only one small question.

src/hotspot/share/gc/shenandoah/shenandoahControlThread.cpp line 315:

> 313:       if (heap->unload_classes()) {
> 314:         // HEY! Should we do this if the cycle was cancelled/degenerated?
> 315:         assert(generation == GLOBAL, "Only unload classes during GLOBAL cycle");

Is the comment still valid? Also, maybe change 'HEY!' to TODO so that IDE would flag it.

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

Marked as reviewed by rkennke (Lead).

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


More information about the shenandoah-dev mailing list