String.intern creates more work than necessary for G1

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P4
    • 9
    • Affects Version/s: 9
    • Component/s: hotspot
    • gc
    • b109

      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"

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

              Created:
              Updated:
              Resolved: