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

[lworld] Review use of oopDesc & mark word for alternative inline type behavior



    • Bug
    • Status: Open
    • P3
    • Resolution: Unresolved
    • repo-valhalla
    • repo-valhalla
    • hotspot


      Current Valhalla prototype uses "Always locked" bias lock pattern in the mark word, which is broken if bias locking is disabled. UseBiasLocking is now default off, so it seems like it is time to review Valhalla's use of the mark word.

      There are quite a number of "alternative behaviors" for inline types, where by more information is required (often requiring "load_klass" and its cost). Past experience has shown it is worth using oopDesc (or more specifically the mark word) to indicate an inline type so existing behavior with references don't suffer in terms of performance.

      Addition performance work with flattened arrays show "aaload" suffers in some benchmarks for non-inline types since "arrayStorageProperties" oopDesc._metadata encoding was removed.

      Current requirements would be to indicate the following special cases via use of the object header:
      * Inline type
      ** larval state bit
      * Flat inline type array
      * "Null-free" objArrayOop
      ** confined to "aastore" of null, slightly less of a priority than the first two.

      Furthermore, we may wish to cache the result of ValueBootstrapMethods generated hashCode method, similar storage to identity hashCode (JDK-8244975)


        Issue Links



              dsimms David Simms
              dsimms David Simms
              0 Vote for this issue
              4 Start watching this issue