RFR: 8290025: Remove the Sweeper [v3]

Erik Österlund eosterlund at openjdk.org
Thu Aug 4 20:58:46 UTC 2022


On Thu, 4 Aug 2022 20:01:22 GMT, Vladimir Kozlov <kvn at openjdk.org> wrote:

>> Erik Österlund has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Feedback v2
>
> src/hotspot/share/ci/ciEnv.cpp line 1212:
> 
>> 1210:   }
>> 1211: 
>> 1212:   NoSafepointVerifier nsv;
> 
> There is window after releasing all previous locks and here when nmethod could become dead. I don't see `post_compiled_method()` checking for that.
> Also I don't see such `NoSafepointVerifier` in `JVMCIRuntime::register_method()`.

The nmethod can only get unloaded at safepoint polls. There aren't any when unlocking. The reason the NSV isn't just crossing the entire scope, is because some locks like Compile_lock will block when we take the lock, just not when we unlock it.
Unfortunately I can't put a similar NSV in the JVMCI installer, because when you run JVMCI with native image, there is a setter that uses JNI, which will check for safepoints. However, that only happens if the nmethod failed to install, which doesn't really matter, but it does prevent the NSV from being in the same corresponding location there.

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

PR: https://git.openjdk.org/jdk/pull/9741


More information about the hotspot-dev mailing list