Constant pools (and their caches) are costly:
- they are not strongly typed
- they are subject to subtle race conditions (especially in the tags and CP cache)
- their access API is confusing and hard to maintain
- indexes come in many flavors and are hard to keep straight
- they are hard to inspect in a debugger, despite modern C++ support
- they are intricately coupled to assembly code, and so hard to improve
- they mix hot and cold (mutable and immutable) data, costing bandwidth and density
- they will be difficult to extend in planned future directions, such as the Parametric VM
The solution is to remove the current two-array constant pool design in the Hotspot JVM, replacing it with a design based on bundles of strongly-typed linkage tables.
See this memo for details:
https://cr.openjdk.org/~jrose/jvm/linkage-table.html
- they are not strongly typed
- they are subject to subtle race conditions (especially in the tags and CP cache)
- their access API is confusing and hard to maintain
- indexes come in many flavors and are hard to keep straight
- they are hard to inspect in a debugger, despite modern C++ support
- they are intricately coupled to assembly code, and so hard to improve
- they mix hot and cold (mutable and immutable) data, costing bandwidth and density
- they will be difficult to extend in planned future directions, such as the Parametric VM
The solution is to remove the current two-array constant pool design in the Hotspot JVM, replacing it with a design based on bundles of strongly-typed linkage tables.
See this memo for details:
https://cr.openjdk.org/~jrose/jvm/linkage-table.html
- relates to
-
JDK-8307309 Use distinct types for derived constant pool indices
-
- Open
-
-
JDK-8248820 refactor constant pool structure
-
- Open
-