On Tue, 2 Sep 2025 20:22:45 GMT, Coleen Phillimore <cole...@openjdk.org> wrote:
>> Fredrik Bredberg has updated the pull request incrementally with one >> additional commit since the last revision: >> >> New version for Coleen > > src/hotspot/share/runtime/lightweightSynchronizer.cpp line 823: > >> 821: ObjectMonitor* LightweightSynchronizer::inflate_into_object_header(oop >> object, ObjectSynchronizer::InflateCause cause, JavaThread* locking_thread, >> Thread* current) { >> 822: >> 823: // The JavaThread* locking_thread parameter is only used by >> lightweight locking and > > Same here. suggestion: > > > // The JavaThread* locking parameter requires that the locking_thread == > JavaThread::current, or is suspended > // throughout the call by some other mechanism. Fixed > src/hotspot/share/runtime/synchronizer.cpp line 542: > >> 540: } >> 541: ObjectMonitor* monitor; >> 542: monitor = LightweightSynchronizer::inflate_locked_or_imse(obj(), >> inflate_cause_notify, CHECK); > > Declare and initialize on the same line: > > ObjectMonitor* monitor = > LightwightSynchronizer::inflate_locked_or_imse(obj...); Fixed > src/hotspot/share/runtime/synchronizer.cpp line 557: > >> 555: >> 556: ObjectMonitor* monitor; >> 557: monitor = LightweightSynchronizer::inflate_locked_or_imse(obj(), >> inflate_cause_notify, CHECK); > > same here with > ObjectMonitor* monitor = LIght ... > > I think we should have another RFE to look at eliminating the middle call. > Call these in LIghtweightSynchronizer::notify, notifyAll and > waitInterruptably directly and remove these functions. Added this to o the [next cleanup](https://bugs.openjdk.org/browse/JDK-8365191). ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/27041#discussion_r2322051302 PR Review Comment: https://git.openjdk.org/jdk/pull/27041#discussion_r2322052236 PR Review Comment: https://git.openjdk.org/jdk/pull/27041#discussion_r2322057900