TaggedArrays

Rickard Bäckman rickard.backman at oracle.com
Wed Sep 12 04:39:03 PDT 2012


Hi,

finally I'm able to suggest a possible implementation of the TaggedArray, earlier proposed on this mailing list by Jim Laskey [1].
The implementation includes a Java implementation (two actually) and an intrisified VM implementation. The VM implementation
has intrinsics for the server/C2 compiler, and some of the intrinsics (fill, copy) are currently only available for 64-bit x86.

This is still work in progress, and have a couple of drawbacks.
* When running with -XX:+UseCompressedOops the implementation uses two stores for objects, one for the object pointer and
  one to make sure the tagged bit is cleared. Future implementations might store uncompressed pointers in TaggedArrays.

To enable the VM implemented TaggedArray support the following flags must be given to the VM:
  -XX:+NativeTaggedArrays -XX:+TaggedArrayIntrinsics
both are false by default.

Webrevs (compared to hsx-comp):
HotSpot: http://cr.openjdk.java.net/~rbackman/tagged.patch/hs/
JDK: http://cr.openjdk.java.net/~rbackman/tagged.patch/jdk/

Webrevs (for the mlvm patch repository):
HotSpot: http://cr.openjdk.java.net/~rbackman/tagged.patch/hs-patch/
JDK: http://cr.openjdk.java.net/~rbackman/tagged.patch/jdk-patch/

and finally hg exports of the changes to mlvm:
HotSpot: http://cr.openjdk.java.net/~rbackman/tagged.patch/mlvm.hs.patch
JDK: http://cr.openjdk.java.net/~rbackman/tagged.patch/mlvm.jdk.patch

Suggestions, improvements and ideas are welcome!

/R

[1] http://mail.openjdk.java.net/pipermail/mlvm-dev/2012-July/004665.html



More information about the mlvm-dev mailing list