RFR: 8231497: [lworld] Inline type use of Access API (Runtime)

David Simms david.simms at oracle.com
Thu Sep 26 14:23:29 UTC 2019

Bug/RFE: https://bugs.openjdk.java.net/browse/JDK-8231497

Webrev: http://cr.openjdk.java.net/~dsimms/valhalla/8231497/webrev0/


So for the longest time Valhalla has completely ignored the Heap Access 
API, and gone and used write barriers directly, thereby breaking other 
GCs with different barrier requirements.

Here is a 1st pass at adding the required Heap Access API for "inline 
types", and an runtime (C++) implementation for modBarrierSet and 
zBarrierSet. No compiler support as yet, I've open another bug[1] for that.

Webrev notes:

  * Reviewed the actual Access API changes already with Erik Österlund,
    he's okayed it.
  * There was some inline header file clean up required, sorry for the noise
  * Hotspot convention uses the Access API in *Oop and * Klass
    implementation, not directly in runtime code
      o ValueKlass has "value_copy_*" API since it deals with naked
        payload (inlined layout from different containers), not just
        oops (otherwise they could have gone into oop API)
  * Rather than a single "value_store", gone with multiple methods so
    call-site can use the appropriate decorators
      o Remove runtime conditions
      o Feel free to have an opinion on the "value_copy*" API naming
  * Passes testing
      o ValueOops -Xint, C1 and C2 need further fix [1]

[1] https://bugs.openjdk.java.net/browse/JDK-8231498

More information about the valhalla-dev mailing list