RFR(S): 8229212 clear up CHECK_OWNER confusion in objectMonitor.cpp
Daniel D. Daugherty
daniel.daugherty at oracle.com
Fri Aug 9 19:30:08 UTC 2019
Updated the fix based on David H's review.
Incremental webrev URL:
Full webrev URL:
Thanks, in advance, for any comments, questions or suggestions.
On 8/8/19 10:25 AM, Daniel D. Daugherty wrote:
> Discussions with David Holmes about ObjectMonitors revealed a bit of
> a mess with the CHECK_OWNER macro and the ObjectMonitor::check() and
> ObjectMonitor::check_slow() functions. I have a small fix to clean up
> this bit of messy code.
> The bug URL:
> JDK-8229212 clear up CHECK_OWNER confusion in objectMonitor.cpp
> The webrev URL:
> Summary of the fix:
> Merge the CHECK_OWNER macro and the ObjectMonitor::check() and
> ObjectMonitor::check_slow() functions into a new function:
> Update the CHECK_OWNER and check() call sites to use
> check_owner_and_throw_IMSE_if_not(). Update the comments
> to make the intended semantics clear.
> Also included a new test for when Object.wait(), Object.notify()
> and Object.notifyAll() are called a thread that doesn't own the
> Java monitor.
> Test with Mach5 Tier[1-3] on the usual Oracle platforms. Verified
> that the new test passes on all Oracle platforms. It's a Tier1
> test but its duration is < 1s on every platform.
> Thanks, in advance, for any comments, questions or suggestions.
More information about the hotspot-runtime-dev