RFR(XXS/S): 8230940: Obsolete MonitorBound
Daniel D. Daugherty
daniel.daugherty at oracle.com
Sun May 3 13:04:51 UTC 2020
Hi David,
On 5/3/20 5:41 AM, David Holmes wrote:
> Hi Dan,
>
> On 2/05/2020 8:57 am, Daniel D. Daugherty wrote:
>> Greetings,
>>
>> I have a fix for the following bug:
>>
>> JDK-8230940 Obsolete MonitorBound
>> https://bugs.openjdk.java.net/browse/JDK-8230940
>>
>> This fix is marked as "XXS" and "S". It is "XXS" because it is primarily
>> code deletion and it is "S" because there are 83 changed lines.
>>
>> The change in src/hotspot/share/runtime/flags/jvmFlag.cpp is the only
>> one that's not obvious. I updated the example with MaxInlineSize to
>> replace MonitorBound because both are 'intx' flags with the same range:
>> (0, max_jint) so the update was just changing the name.
>>
>> Webrev URL:
>> http://cr.openjdk.java.net/~dcubed/8230940-webrev/0-for-jdk15/
>
> Looks good!
Thanks!
> One nit in synchronizer.cpp
>
> 1172 bool ObjectSynchronizer::is_cleanup_needed() {
> 1173 if (monitors_used_above_threshold()) {
> 1174 // Too many monitors in use.
> 1175 return true;
> 1176 }
> 1177 return false;
> 1178 }
>
> can simply be written as:
>
> bool ObjectSynchronizer::is_cleanup_needed() {
> return monitors_used_above_threshold();
> }
Thanks for the suggestion. I'll make that change before pushing.
Dan
>
> Thanks,
> David
>
>> This fix has been tested with a Mach5 Tier[1-3] job set on the usual
>> Oracle platforms. No regressions.
>>
>> The open and closed repos have been searched with the following
>> patterns:
>>
>> MonitorBound|check_for_forced_cleanup|is_forced_cleanup_needed|_forceMonitorScavenge|is_MonitorBound_exceeded|needs_monitor_scavenge|InduceScavenge
>>
>>
>> with no unexpected results.
>>
>>
>> Here's what we see with the current baseline:
>>
>> $ build/macosx-x86_64-normal-server-release/images/jdk/bin/java
>> -XX:MonitorBound=1000 -version
>> Java HotSpot(TM) 64-Bit Server VM warning: Temporarily processing
>> option MonitorBound; support is scheduled for removal in 15.0
>> Java HotSpot(TM) 64-Bit Server VM warning: Temporarily processing
>> option MonitorBound; support is scheduled for removal in 15.0
>> java version "15-internal" 2020-09-15
>> Java(TM) SE Runtime Environment (build
>> 15-internal+0-2020-05-01-0300239.dcubed...)
>> Java HotSpot(TM) 64-Bit Server VM (build
>> 15-internal+0-2020-05-01-0300239.dcubed..., mixed mode, sharing)
>>
>>
>> With the fix in place, here's what we see:
>>
>> $ $JAVA_HOME/bin/java -XX:MonitorBound=1000 -version
>> Java HotSpot(TM) 64-Bit Server VM warning: Ignoring option
>> MonitorBound; support was removed in 15.0
>> java version "15-internal" 2020-09-15
>> Java(TM) SE Runtime Environment (build
>> 15-internal+0-2020-05-01-1817475.dcubed...)
>> Java HotSpot(TM) 64-Bit Server VM (build
>> 15-internal+0-2020-05-01-1817475.dcubed..., mixed mode, sharing)
>>
>>
>> Thanks, in advance, for any comments, questions or suggestions.
>>
>> Dan
>>
More information about the hotspot-runtime-dev
mailing list