Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8368954

G1: Document why G1 uses TLS storage for the current card table reference

XMLWordPrintable

    • gc
    • master

      G1 uses TLS storage to store the ever-changing current card table to modify.

      The reason is that this generates the most compact code: inlining some address where the current value can be obtained has the disadvante of increases code size significantly, particularly on non-x64 where constructing a 64 bit integer takes many instructions. Even on x64, this is a 10 byte instruction.

      This in turn at best has the same performance as using TLS (x64), worse on aarch64, even modern implementations.

            tschatzl Thomas Schatzl
            tschatzl Thomas Schatzl
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: