On Tue, 10 Nov 2020 17:32:56 GMT, Coleen Phillimore <[email protected]> wrote:
>> Daniel D. Daugherty has updated the pull request incrementally with one
>> additional commit since the last revision:
>>
>> dholmes-ora - convert inner while loop to do-while loop in
>> unlink_deflated().
>
> src/hotspot/share/runtime/objectMonitor.cpp line 551:
>
>> 549: if (try_set_owner_from(DEFLATER_MARKER, NULL) != DEFLATER_MARKER)
>> {
>> 550: // Deferred decrement for the JT EnterI() that cancelled the
>> async deflation.
>> 551: add_to_contentions(-1);
>
> contentions is essentially a refcount, isn't it. Can you fix the comment to
> include this at line 360 since that's not the only purpose of this count.
>
> // Keep track of contention for JVM/TI and M&M queries.
> add_to_contentions(1);
No it is not a ref_count. We got rid of the accurate ref_count field
because maintaining it was too slow.
contentions just tells you how many threads have blocked on the
slow-path trying to enter the monitor. The fast-paths never touch
contentions. The comment on line 360 is accurate.
> src/hotspot/share/runtime/synchronizer.hpp line 61:
>
>> 59: bool has_next() const { return _current != NULL; }
>> 60: ObjectMonitor* next();
>> 61: };
>
> Can MonitorList be defined in the .cpp file? I don't see anything outside of
> synchronizer.cpp that refers to it.
I can see if that will work.
-------------
PR: https://git.openjdk.java.net/jdk/pull/642