RFR: 8354448: [REDO] Remove friends for ObjectMonitor

David Holmes dholmes at openjdk.org
Tue Apr 15 06:50:41 UTC 2025


On Mon, 14 Apr 2025 15:17:54 GMT, Coleen Phillimore <coleenp at openjdk.org> wrote:

> This is a redo of the trivial change that failed.  The second commit is the method I should have added.
> Tested with tier1-4, where tier3 has the code to exercise LockingMode=1.
> Thanks,
> Coleen

It probably would have helped if `set_recursions` had a comment stating what it is used for (which seems to be setting recursions when an anonymously owned monitor is given its true owner details).

Updated fix is fine. Thanks

src/hotspot/share/runtime/objectMonitor.inline.hpp line 154:

> 152: 
> 153: inline void ObjectMonitor::increment_recursions(JavaThread* current) {
> 154:   assert(has_owner(current), "must be the owner");

May be overkill to have this assert ...

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

Marked as reviewed by dholmes (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/24626#pullrequestreview-2767003304
PR Review Comment: https://git.openjdk.org/jdk/pull/24626#discussion_r2043750379


More information about the hotspot-runtime-dev mailing list