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

Thomas Schatzl tschatzl at openjdk.org
Fri Dec 15 09:48:40 UTC 2023


On Wed, 13 Dec 2023 20:25:30 GMT, Albert Mingkun Yang <ayang at openjdk.org> wrote:

>> The compiler eagerly allocates code blobs, so it can give them back if not needed any more (e.g. compiler thread stops due to dynamic adjustment, when shutting down the compilers, when the compiler fails to install an nmethod, ...).
>> 
>> Only when code unloading we always delay freeing (as this code shows).
>
> Do those take this path? AFAICS, they are subclasses of `RuntimeBlob`. I added `assert(!free_code_cache_data)` at the beginning of this method and it didn't crash right away.

I ran tier 1-4 with no issues with `ShouldNotReachHere` sprinkled in, and did the same source code analysis, with the same result. Modified the change accordingly.

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

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


More information about the hotspot-gc-dev mailing list