RFR: 8276901: Implement UseHeavyMonitors consistently [v11]

Daniel D.Daugherty dcubed at openjdk.java.net
Tue Dec 7 14:40:25 UTC 2021


On Thu, 2 Dec 2021 14:41:53 GMT, Roman Kennke <rkennke at openjdk.org> wrote:

>> The flag UseHeavyMonitors seems to imply that it makes Hotspot always use inflated monitors, rather than stack locks. However, it is only implemented in the interpreter that way. When it calls into runtime, it would still happily stack-lock. Even worse, C1 uses another flag UseFastLocking to achieve something similar (with the same caveat that runtime would stack-lock anyway). C2 doesn't have any such mechanism at all.
>> I would like to experiment with disabling stack-locking, and thus, having this flag work as expected would seem very useful.
>> 
>> The change removes the C1 flag UseFastLocking, and replaces its uses with equivalent (i.e. inverted) UseHeavyMonitors instead. I think it makes sense to make UseHeavyMonitors develop (I wouldn't want anybody to use this in production, not currently without this change, and not with this change). I also added a flag VerifyHeavyMonitors to be able to verify that stack-locking is really disabled. We can't currently verify this uncondiftionally (e.g. in debug builds) because all non-x86_64 platforms would need work.
>> 
>> Testing:
>>  - [x] tier1
>>  - [x] tier2
>>  - [x] tier3
>>  - [ ] tier4
>
> Roman Kennke has updated the pull request incrementally with one additional commit since the last revision:
> 
>   PPC port by @TheRealMDoerr

Mach5 Tier1:
- dcubed-8276901_for_jdk18.git-20211206-1656-26967213
- no test failures

Mach5 Tier2:
- dcubed-8276901_for_jdk18.git-20211206-2009-26973681
- 2 known, unrelated test failures

Mach5 Tier3:
- dcubed-8276901_for_jdk18.git-20211206-2009-26973700
- no failures

Mach5 Tier4:
- dcubed-8276901_for_jdk18.git-20211206-2124-26976450
- 11 known, unrelated test failures

Mach5 Tier5:
- dcubed-8276901_for_jdk18.git-20211206-2125-26976484
- 3 known, unrelated failures
- still running macosx-x64 tasks

Mach5 Tier6:
- dcubed-8276901_for_jdk18.git-20211206-2220-26978292
- still running

Mach5 Tier7:
- dcubed-8276901_for_jdk18.git-20211207-0044-26982843
- 2 known, unrelated failures
- still running macosx-x64 tasks

Mach5 Tier8:
- dcubed-8276901_for_jdk18.git-20211207-0045-26982871
- still running 24 hour tasks and macosx-x64 tasks

So Tier[1-4] are complete and look fine. Mach5 is a bit over loaded at the
moment so Tier[5-8] are still running. I think the Tier[1-4] results and the
partial Tier[5-8] are good enough to say that these bits are okay.

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

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


More information about the hotspot-compiler-dev mailing list