RFR: 8317007: Add bulk removal of dead nmethods during class unloading [v4]

Thomas Schatzl tschatzl at openjdk.org
Wed Dec 13 11:33:43 UTC 2023


On Wed, 13 Dec 2023 11:29:44 GMT, Thomas Schatzl <tschatzl at openjdk.org> wrote:

>> src/hotspot/share/gc/shared/scavengableNMethods.hpp line 52:
>> 
>>> 50:   static void prune_nmethods_not_into_young();
>>> 51:   // Remvoe unlinked (dead) nmethods.
>>> 52:   static void prune_unlinked_nmethods();
>> 
>> Can they be merged into one API, pruning nmethods that are either unlinked or doesn't point into young-gen?
>
> I left this out because at the time we unlink nmethods we have not moved the objects yet, only marked them. If we moved the class unloading to where `prune_nmethods_not_into_young` is, it might be possible. Going to file a CR to investigate this.

Fwiw, I did not move the class unloading because in one of the last changes you seemed fairly insistent on keeping ordering and location of class unloading consistent across stw collectors too.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/16767#discussion_r1425224801


More information about the hotspot-gc-dev mailing list