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

Switch to optimal identity hash code generator

    Details

    • Type: Enhancement
    • Status: Closed
    • Priority: P4
    • Resolution: Duplicate
    • Affects Version/s: 9
    • Fix Version/s: 10
    • Component/s: hotspot

      Description

      Reported by one of our customers, relying heavily on System.identityHashCode(...) for their performance. They figured out the global state in current identity hashcode generator penalizes scalability. Their workaround is to switch -XX:hashCode=5 to the thread-local Marsaglia's XorShift generator.

      This issues considers switching -XX:hashCode=5 (or some other generator) by default.

      See also: http://cr.openjdk.java.net/~shade/8006176/randomicity/

        Issue Links

          Activity

          Hide
          shade Aleksey Shipilev added a comment - - edited
          Ooops. This change had apparently crept into an unrelated commit, long before JDK 8 release:
           http://hg.openjdk.java.net/jdk9/jdk9/hotspot/diff/4a916f2ce331/src/share/vm/runtime/globals.hpp
          Show
          shade Aleksey Shipilev added a comment - - edited Ooops. This change had apparently crept into an unrelated commit, long before JDK 8 release:   http://hg.openjdk.java.net/jdk9/jdk9/hotspot/diff/4a916f2ce331/src/share/vm/runtime/globals.hpp
          Hide
          gtriantafill George Triantafillou added a comment -
          Closing as duplicate of JDK-8003985. See Dan's comment:

          https://bugs.openjdk.java.net/browse/JDK-8006176?focusedCommentId=14065383&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-14065383

          "This bug can be closed as a duplicate of JDK-8003985 with the
          explanation that this bug was accidentally fixed by JDK-8003985."
          Show
          gtriantafill George Triantafillou added a comment - Closing as duplicate of JDK-8003985 . See Dan's comment: https://bugs.openjdk.java.net/browse/JDK-8006176?focusedCommentId=14065383&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-14065383 "This bug can be closed as a duplicate of JDK-8003985 with the explanation that this bug was accidentally fixed by JDK-8003985 ."

            People

            • Assignee:
              Unassigned
              Reporter:
              shade Aleksey Shipilev
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: