RFR: 8231269: CompileTask::is_unloaded is slow due to JNIHandles type checks [v6]

Aleksey Shipilev shade at openjdk.org
Fri Apr 25 09:47:01 UTC 2025


On Thu, 24 Apr 2025 00:16:25 GMT, Vladimir Ivanov <vlivanov at openjdk.org> wrote:

>> Aleksey Shipilev has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Allow UMH::_method access from VMStructs
>
> src/hotspot/share/runtime/unloadableMethodHandle.inline.hpp line 93:
> 
>> 91: 
>> 92: inline Method* UnloadableMethodHandle::method() const {
>> 93:   assert(!is_unloaded(), "Should not be unloaded");
> 
> Assert that `block_unloading()` was called before?

Cannot do, since lifecycle allows accessing `method()` shortly after initialization. See the new lifecycle docs. `CompilerBroker` does it now, checking that `block_unloading()` was called here would fail.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/24018#discussion_r2059916538


More information about the hotspot-gc-dev mailing list