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

[Lilliput] Microbenchmarks for compact identity hashcode

XMLWordPrintable

      We need microbenchmarks to measure performance of System.identityHashCode() calls. In particular, to cover different scenarios of compact identity hashcode (JDK-8320761), we should test performance of:
      - identityHashCode() on objects that don't get moved by GC (to test state 01, hashed-but-not-expanded?)
      - identityHashCode() on objects that have been moved by GC, after identityHashCode() has been called at least once (to test state 11, hashed-and-expanded)

      As a bonus, it would be nice to test performance of the second scenario above, once with C2 knowing the exact type of the object (in which case C2 can avoid loading the Klass* and its hash_offset at run-time, and can do so at compile-time) vs when C2 can not determine the exact type (in which case, C2 needs to generate code to load the Klass* and its hash_offset at run-time, which must be significantly slower).

            rkennke Roman Kennke
            rkennke Roman Kennke
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: