RFR: 8325872: Make GuaranteedSafepointInterval default 0 [v2]

Coleen Phillimore coleenp at openjdk.org
Wed Apr 17 22:17:44 UTC 2024


On Wed, 17 Apr 2024 21:09:51 GMT, Daniel D. Daugherty <dcubed at openjdk.org> wrote:

>> Coleen Phillimore has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Fix argument conditionals, reran tests with SafepointALot and HandshakeALot.
>
> src/hotspot/share/runtime/vmThread.cpp line 317:
> 
>> 315:     return false;
>> 316:   }
>> 317:   static jlong last_halot_ms = 0;
> 
> Below this point is this code:
> 
>   // If only HandshakeALot is set, but GuaranteedSafepointInterval is 0,
>   // we emit a handshake if it's been more than a second since the last one.
>   jlong interval = GuaranteedSafepointInterval != 0 ? GuaranteedSafepointInterval : 1000;
> 
> 
> Do you need this now that you've made the change in src/hotspot/share/runtime/arguments.cpp?

You're right.  This has strange logic.  We only set GuaranteedSafepointInterval in arguments.cpp if the flag hasn't been set on the command line.  So someone could set explicitly set GuaranteeSafepointInterval=0.   If GuaranteedSafepointInterval is 0 then we can get to this code if another safepoint operation wakes up the VM Thread.  And in this case, we want to make sure it's been longer than a second ago. 

I fixed the comment and changed the variable name to alot_ms.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/18820#discussion_r1569606005


More information about the hotspot-runtime-dev mailing list