JDK-8256282 : Investigate putting card table base into G1 thread local data
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: gc
  • Affected Version: 16
  • Priority: P4
  • Status: Open
  • Resolution: Unresolved
  • Submitted: 2020-11-12
  • Updated: 2024-10-11
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.
Other
tbdUnresolved
Description
Currently G1 thread local data contains only the two PtrQueues for the marking and dirty card queue.

It may be worth putting the card table base pointer into it too: currently card table base is encoded directly into the code stream. This takes a lot of space (on x86) there, which may be a problem (one 10 byte instruction for loading the constant), then the comparison taking 3 bytes using that register.
Putting card table base into TLS would result in a 4 bytes total comparison.

At least the first check (card in young is young) is laid out in the fast path.