RFR: 8318015: Lock inflation not needed for OSR or Deopt for new locking modes [v3]

Vladimir Ivanov vlivanov at openjdk.org
Fri Oct 13 23:50:51 UTC 2023


On Fri, 13 Oct 2023 21:33:32 GMT, Martin Doerr <mdoerr at openjdk.org> wrote:

>> Only LockingMode "LM_LEGACY" requires inflation before lock transfers because it is the only one which uses stack addresses in the mark word. I think we should treat the displaced header as stale data because it may be uninitialized.
>
> Martin Doerr has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Write values into displaced header slots in debug builds.

src/hotspot/share/runtime/basicLock.cpp line 88:

> 86: #ifdef ASSERT
> 87:   else {
> 88:     dest->set_displaced_header(markWord(0xde0bd000)); // eye-catcher

Such constants for debugging purposes are usually defined in a central place: 
  https://github.com/openjdk/jdk/blob/master/src/hotspot/share/utilities/globalDefinitions.hpp#L1023

It makes sense to follow that practice here.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/16165#discussion_r1358961376


More information about the hotspot-dev mailing list