RFR: 8276901: Implement UseHeavyMonitors consistently [v10]

Roman Kennke rkennke at openjdk.java.net
Wed Dec 1 18:00:28 UTC 2021


On Wed, 1 Dec 2021 17:26:06 GMT, Martin Doerr <mdoerr at openjdk.org> wrote:

> > I believe you still have to change something in sharedRuntime_ppc.cpp, similar to what I did in, e.g., sharedRuntime_aarch64.cpp.
> 
> You mean in `generate_native_wrapper`? I already did. It uses the same assembler function as C2 on PPC64. Did I miss anything else? I think hacking `unlock` is optional. The additional checks don't really disturb.

Ah I haven't seen it, sorry.
It turns out, I cannot avoid emitting FastLockNode, some backends (x86 and aarch64) also generate fast-path code that deals with ObjectMonitor, and we want this even when running with +UseHeavyMonitors.

Can you verify the new testcase, and perhaps some test programs that do some locking with -XX:+UseHeavyMonitors -XX:+VerifyHeavyMonitors ? You also need to include PPC in arguments.cpp and synchronizer.cpp changes to enable that stuff on PPC:

-------------

PR: https://git.openjdk.java.net/jdk/pull/6320


More information about the hotspot-compiler-dev mailing list