RFR: 8330181: Move PcDesc cache from nmethod header

Vladimir Kozlov kvn at openjdk.org
Tue Apr 23 04:01:28 UTC 2024


On Tue, 23 Apr 2024 03:54:24 GMT, Vladimir Kozlov <kvn at openjdk.org> wrote:

>> src/hotspot/share/code/nmethod.cpp line 2738:
>> 
>>> 2736:       // which is typically called in a signal handler
>>> 2737:       _pc_desc_cache.add_pc_desc(upper);
>>> 2738:     }
>> 
>> The special case for ASGCT, along with ThreadWXEnable changes here:
>> https://github.com/openjdk/jdk/blob/master/src/hotspot/share/runtime/sharedRuntime.cpp#L484
>> https://github.com/openjdk/jdk/blob/master/src/hotspot/share/runtime/sharedRuntime.cpp#L1755
>> https://github.com/openjdk/jdk/blob/master/src/hotspot/os/posix/signals_posix.cpp#L617
>> look like they will no longer be needed.  I suggest filing a follow-up RFE for an ASGCT expert to take.
>
> Thank you, @dean-long, for pointing this. 
> 
> [JDK-8302736](https://bugs.openjdk.org/browse/JDK-8302736) added 2 ThreadWXEnable in sharedRuntime.cpp
> And later [JDK-8316392](https://bugs.openjdk.org/browse/JDK-8316392) added it to `PcDescCache::add_pc_desc()`
> What a mess ...
> 
> We can now safely remove (after testing) all ThreadWXEnable which guards calls to `add_pc_desc()`
> And file separate RFE for runtime to look on `!Thread::current_in_asgct()`
> 
> Is this what you are suggesting? I will do it.

ASGCT code was added by [JDK-8304725](https://github.com/openjdk/jdk/commit/d8af7a6014055295355a1242db6c2872299c6398) before [JDK-8316392](https://bugs.openjdk.org/browse/JDK-8316392) added ThreadWXEnable to PcDescCache::add_pc_desc().

As you suggested I will file follow up RFE to remove that code.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/18895#discussion_r1575609815


More information about the hotspot-compiler-dev mailing list