RFR: JDK-8210829: Modularize allocations in C2

Roman Kennke rkennke at redhat.com
Tue Sep 18 07:58:42 UTC 2018

Similar to what we've done before to runtime, interpreter and C1,
allocations should be owned and implemented by GC, and possible to
override by specific collectors. For example, Shenandoah lays out
objects differently in heap, and needs one extra store to initialize

This proposed change factors out the interesting part of object
allocation (i.e. the actual allocation) into BarrierSetC2. It's mostly a
move-and-rename-job. I had to move some little things around, that is:
- for the need-gc-check, I'm passing back the needgc_ctrl to plug into
- for prefetching, instead of passing around the 'length' node, only to
determine the number of prefetch lines, I determine this early, and pass
through the lines arg.
- i_o, needgc_ctrl, fast_oop_ctrl, fast_oop_rawmem are passed as in/out
or out-args to stitch together into the regions and phis as appropriate.
I see no easy way around that.

I tested this using hotspot/jtreg:tier1 and also verified that this
fills Shenandoah's needs and run tier3_gc_shenandoah testsuite.


Can I please get reviews?

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: OpenPGP digital signature
URL: <https://mail.openjdk.java.net/pipermail/hotspot-gc-dev/attachments/20180918/2c4fa3d8/signature.asc>

More information about the hotspot-gc-dev mailing list