On Fri, 21 Aug 2026 17:09:01 GMT, Coleen Phillimore <[email protected]> wrote:

>> This PR is a follow-up to 
>> [JDK-8389325](https://bugs.openjdk.org/browse/JDK-8389325) ("Remove the 
>> UseObjectMonitorTable flag and related code"). It:
>> - Removes obsolete mark-word and monitor-pointer support.
>> - Removes displaced-mark related code in garbage collectors (G1, Parallel GC 
>> and Shenandoah).
>> - Renames UseObjectMonitorTableTest to ObjectMonitorTableTest.
>> - Addresses all the leftover review comments from 
>> [JDK-8389325](https://bugs.openjdk.org/browse/JDK-8389325).
>> 
>> Passes tier1-5 tests successfully on supported platforms.
>> 
>> ---------
>> - [x] I confirm that I make this contribution in accordance with the 
>> [OpenJDK Interim AI Policy](https://openjdk.org/legal/ai).
>
> src/hotspot/share/oops/markWord.cpp line 40:
> 
>> 38:     // have to check has_monitor() before is_locked()
>> 39:     // Valhalla: inline types/arrays can't be monitored
>> 40:     st->print(" monitor(" INTPTR_FORMAT ")", value());
> 
> But the monitor isn't the value now. Shouldn't this just be removed?  We 
> don't want printing to search the table.

I think this whole method could use some cleanup. This just prints the value of 
the markWord (same as before) but it did so because it did not want to go 
chasing displaced marked words. Similarly the `is_locked` leg did not want to 
go chase stack locks.

Neither exists anymore. It is really only the GC that displaces/preservers the 
markWord in a STW collection because of forwarding pointers. So we should clean 
this up to be if marked just print the value, else actually print some more 
state.

Similarly we should clean up the valhalla invariants now that we do not 
displace markWords.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/32471#discussion_r3841296763

Reply via email to