RFR: 8330181: Move PcDesc cache from nmethod header

Dean Long dlong at openjdk.org
Tue Apr 23 01:19:29 UTC 2024


On Mon, 22 Apr 2024 16:54:40 GMT, Vladimir Kozlov <kvn at openjdk.org> wrote:

> Currently PcDescCache (32 bytes in 64-bit VM: PcDesc* _pc_descs[4]) is allocated in `nmethod` header.
> 
> Moved PcDescContainer (which includes cache) to C heap similar to ExceptionCache to reduce size of `nmethod` header and to remove WXWrite transition when we update the cache in `PcDescCache::add_pc_desc()`.
> 
> Removed `PcDescSearch` class which was leftover from `CompiledMethod` days.
> 
> Tested tier1-4,stress,xcomp and performance.

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.

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

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


More information about the hotspot-compiler-dev mailing list