RFR: 8319955: Improve dependencies removal during class unloading

Thomas Schatzl tschatzl at openjdk.org
Wed Nov 15 08:36:41 UTC 2023


On Tue, 14 Nov 2023 11:58:10 GMT, David Holmes <dholmes at openjdk.org> wrote:

>> Sorry forgot to answer this:
>> 
>>> Who/what will process the purge list and when?
>> 
>> There is a call to `ClassLoaderDataGraph::purge` which does that, executed later at the garbage collector's convenience. This change does not change the amount of elements (apart from the order of the elements) too, so no difference here.
>> 
>> (During class unloading `DependencyContext::delete_on_release()` is and has always been false, and the existing code always moves entries to the purge list - there is an appropriate assert in the new code).
>
>> (During class unloading DependencyContext::delete_on_release() is and has always been false, and the existing code always moves entries to the purge list - there is an appropriate assert in the new code).
> 
> Thanks I can see that now. So all this does is move a chunk of elements to the purge-list instead of doing it one at a time. Makes me wonder why this wasn't noticed sooner. :)

Thanks @dholmes-ora @fisk for your reviews

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

PR Comment: https://git.openjdk.org/jdk/pull/16639#issuecomment-1812010732


More information about the hotspot-runtime-dev mailing list