On Fri, 7 Aug 2026 14:14:32 GMT, Fredrik Bredberg <[email protected]> wrote:

> The main objectives for this PR are:
>  1) Compact Object Headers needs the Object Monitor Table to work.
>  2) Both Compact Object Headers 
> ([JDK-8360700](https://bugs.openjdk.org/browse/JDK-8360700)) and Object 
> Monitor Table ([JDK-8379782](https://bugs.openjdk.org/browse/JDK-8379782)) 
> are now enabled by default.
>  3) If we always use the Object Monitor Table, we will free up lots of bits 
> in the markword, that could be of use to others (read GC).
>  4) If we don't need to maintain any "monitor pointer in the mark word" code, 
> we will simplify the code base.
> 
> Therefore this PR will remove the `UseObjectMonitorTable` flag and related 
> code.
> 
> Note that this PR only removes the most obvious use of the 
> `UseObjectMonitorTable` in the code base. This is to ease the burden on the 
> reviewers. [JDK-8389938](https://bugs.openjdk.org/browse/JDK-8389938) has 
> been created to finalize the work by removing the less obvious code, like no 
> longer used mark word code in different GCs. 
> 
> The code has passed tier1-7 testing on supported platforms and smoke testing 
> using QEMU on `RISC-V`, `PowerPC` and `s390`.
> 
> ---------
> - [x] I confirm that I make this contribution in accordance with the [OpenJDK 
> Interim AI Policy](https://openjdk.org/legal/ai).

You might want to merge the master branch, It seems there is one more instance 
added in valhalla. 

```diff 
diff --git a/src/hotspot/cpu/s390/macroAssembler_s390.cpp 
b/src/hotspot/cpu/s390/macroAssembler_s390.cpp
index 08ae5af194c..e8971e7630e 100644
--- a/src/hotspot/cpu/s390/macroAssembler_s390.cpp
+++ b/src/hotspot/cpu/s390/macroAssembler_s390.cpp
@@ -4265,15 +4265,6 @@ void MacroAssembler::test_oop_prototype_bit(Register 
oop, Register temp_reg, int
   assert(test_bit <= 0xFFFF, "must fit in low 16 bits for z_tmll");
   // Load mark word
   z_lg(temp_reg, oopDesc::mark_offset_in_bytes(), oop);
-  if (!UseObjectMonitorTable) {
-    Label test_mark_word;
-    // If unlocked bit is set we can directly use the mark word
-    z_tmll(temp_reg, markWord::unlocked_value);
-    z_brnaz(test_mark_word);
-    // Slow path: use klass prototype
-    load_prototype_header(temp_reg, oop);
-    bind(test_mark_word);
-  }
   z_tmll(temp_reg, test_bit);
   // Use branch_optimized to handle both near and far branches automatically
   branch_optimized(jmp_set ? Assembler::bcondNotAllZero : 
Assembler::bcondAllZero, jmp_label);


With above diff, I did testing on s390x, and result look clean.

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

PR Review: https://git.openjdk.org/jdk/pull/32257#pullrequestreview-4890674530

Reply via email to