RFR: 8256306: ObjectMonitor::_contentions field should not be 'jint'
Coleen Phillimore
coleenp at openjdk.java.net
Tue Jun 22 16:00:33 UTC 2021
On Mon, 21 Jun 2021 23:55:45 GMT, David Holmes <dholmes at openjdk.org> wrote:
>> I changed the _contentions and _waiters fields from jint to int and ran tests tier1-3. Tested tier1 with linux, mac, windows platforms. Also changed the _previous_owner_tid to unintptr_t from jlong, since that's what the cast did.
>
> src/hotspot/share/runtime/objectMonitor.cpp line 548:
>
>> 546: set_owner_from(NULL, DEFLATER_MARKER);
>> 547: assert(contentions() >= 0, "must be non-negative: contentions=%d", contentions());
>> 548: _contentions = INT32_MIN; // minimum negative int
>
> INT_MIN (unless you want to change the type to int32_t)
Fixed.
-------------
PR: https://git.openjdk.java.net/jdk/pull/3980
More information about the serviceability-dev
mailing list