RFR: JDK-8213615: GC/C2 abstraction for escape analysis

Roman Kennke rkennke at redhat.com
Fri Nov 9 19:45:35 UTC 2018


Hi Vladimir,

> I like proposal from JIT POV.

Thanks :-)
> I did not look in details but we need to
> make sure that changes produce the same results as before.

Yes. I gave my best to make the results /code paths taken identical, but
it's better to give it some scrutiny.

Thanks,
Roman

> Vladimir
> 
> On 11/9/18 8:46 AM, Roman Kennke wrote:
>> There's plenty of GC related+specific (G1, ZGC, Shenandoah) code in
>> escape.cpp that needs to be abstracted out into BarrierSetC2 or similar.
>>
>> Consider for example the mess we needed to make in Shenandoah:
>> https://builds.shipilev.net/patch-openjdk-shenandoah-jdk-only-shared/b64-vs-dc1f9dec2018/src/hotspot/share/opto/escape.cpp.sdiff.html
>>
>>
>>
>> The following proposed changeset covers all needs of G1, ZGC and
>> Shenandoah:
>> http://cr.openjdk.java.net/~rkennke/JDK-8213615/webrev.01/
>>
>> Some notes:
>> - Similar to how it works with the hooks for
>> Compile::final_graph_reshaping(), if GC returns true (meaning the GC
>> completely handled the current node), the main switch is skipped.
>> - The bodies of the unsafe (CAS, etc) handlers are factored out so that
>> they can be called back from GC handlers. For example, in Shenandoah we
>> have our own set of CAS nodes that need to call back into those.
>> - A bunch of methods in ConnectionGraph (e.g. add_local_var_and_edge)
>> needed to be made public so that they can be accessed from the GC code.
>> - ConnectionGraph::record_for_optimizer() body has been moved into
>> escape.cpp because it depends on PhaseIterGVN to be known, and I did not
>> feel like adding include phaseX.hpp to escape.hpp. This popped up
>> because of changed include order.
>>
>> Bug:
>> https://bugs.openjdk.java.net/browse/JDK-8213615
>>
>> Testing: passes hotspot/jtreg:tier1 locally.
>>
>> Thoughts? Reviews?
>>
>> Roman
>>

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <https://mail.openjdk.org/pipermail/hotspot-gc-dev/attachments/20181109/d78d950c/signature.asc>


More information about the hotspot-gc-dev mailing list