RFR: JDK-8231085: C2/GC: Better GC-interface for expanding clone

Roman Kennke rkennke at redhat.com
Tue Sep 17 09:40:36 UTC 2019

The current GC-interface for inserting barriers after expanded clones is
rather rigid: it only allows to insert a barrier after the expanded
clone. It does, for example, not allow a barrier *before* the clone.
Also, a possible optimization would be to generate only a single call
for both the barrier and the actual clone, i.e. replace the whole
clone-expansion with a GC-specific call.

I propose that the expansion code for clone is fully owned by GC. This
is also in the spirit of other GC interfaces where the GC owns the whole
path. However, it requires relaxing visibility of some methods.

Jira issue:
Testing: tier1,2 locally without regressions

For an example how I intend to use it, look here (in

I intend to push this together with JDK-8231086 (otherwise Shenandoah
might be temporarily broken).

Can I please get a review?


More information about the hotspot-gc-dev mailing list