Valhalla uses `load_prototype_header()` to read the Valhalla-specific mark word 
flags from the `klass` when the object appears to be locked.

However, when `UseObjectMonitorTable` is enabled, object monitors are not 
represented by displaced mark words in the object header.
In that case, the object header still contains the relevant markWord bits, so 
we can get the loaded header directly.

This patch avoids the locked-object/prototype-header path when 
`UseObjectMonitorTable` is enabled.

---------
- [x] I confirm that I make this contribution in accordance with the [OpenJDK 
Interim AI Policy](https://openjdk.org/legal/ai).

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

Commit messages:
 - 8386858: [lworld] omit load_prototype_header when UseObjectMonitorTable is 
used

Changes: https://git.openjdk.org/valhalla/pull/2591/files
  Webrev: https://webrevs.openjdk.org/?repo=valhalla&pr=2591&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8386858
  Stats: 43 lines in 4 files changed: 12 ins; 4 del; 27 mod
  Patch: https://git.openjdk.org/valhalla/pull/2591.diff
  Fetch: git fetch https://git.openjdk.org/valhalla.git pull/2591/head:pull/2591

PR: https://git.openjdk.org/valhalla/pull/2591

Reply via email to