JDK-8311248 : Refactor CodeCache::initialize_heaps to simplify adding new CodeCache segments
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 22
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2023-07-03
  • Updated: 2025-06-11
  • Resolved: 2024-04-10
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 23
23 b18Fixed
Related Reports
Causes :  
Relates :  
Relates :  
Relates :  
Description
`CodeCache::initialize_heaps` assumes CodeCache is a combination of NonProfiledCodeHeap, ProfiledCodeHeap and NonNMethodCodeHeap. Adding new CodeCache segments causes a lot of changes in the function.
We need to refactor the function to minimize changes when new segments are added to CodeCache.
The ideal solution should be `CodeCache::initialize_heaps` not to depend on any particular code heap at all. It should accept a valid CodeCache layout description and initialize each code heap according to the description. A valid CodeCache layout description is created based on defaults, cmd options and ergonomics. The process of the description creation can fail if it is not possible to have a requested CodeCache layout.
 

Comments
Changeset: d037a597 Author: Boris Ulasevich <bulasevich@openjdk.org> Date: 2024-04-10 06:29:44 +0000 URL: https://git.openjdk.org/jdk/commit/d037a597a94edf6e716098b88f42f2b15518e2bd
10-04-2024

A pull request was submitted for review. URL: https://git.openjdk.org/jdk/pull/17244 Date: 2024-01-03 14:19:10 +0000
04-01-2024