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

String.intern creates more work than necessary for G1

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 9
    • Fix Version/s: 9
    • Component/s: hotspot
    • Labels:
    • Subcomponent:
      gc
    • Resolved In Build:
      b109

      Description

      G1 requires a SATB read barrier when reading from potentially weak tables such as the string interning table. Currently the code enqueues a reference on every String.intern operation, when it is really only needed when the intern operation finds a previously interned string. Adding a new string to the table should not require a SATB read barrier.
      This code may contribute to the test failure JDK-8134992 "vm/gc/compact/Compact_InternedStrings_Strings failed due to a malloc() failure"

        Attachments

          Activity

            People

            Assignee:
            drwhite Derek White
            Reporter:
            drwhite Derek White
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: