RFR: 8273915: Create 'nosafepoint' rank [v2]
    Ioi Lam 
    iklam at openjdk.java.net
       
    Mon Sep 20 18:31:56 UTC 2021
    
    
  
On Mon, 20 Sep 2021 13:35:29 GMT, Coleen Phillimore <coleenp at openjdk.org> wrote:
>> Partition safepoint checking and nonchecking lock ranks. The nonchecking locks are always lower ranked than the safepoint checking locks because they cannot block.
>> 
>> This moves some leaf locks to 'nosafepoint' rank and corrects relative ranking.
>> 
>> Tested with tier1-6 and built and run tier1 tests with shenandoah locally.
>
> Coleen Phillimore has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Remove 'safepoint' rank, now unused.
src/hotspot/share/runtime/mutex.hpp line 53:
> 51:        special        = tty            +   3,
> 52:        oopstorage     = special        +   3,
> 53:        nosafepoint    = oopstorage     +   6,
Maybe add a comment below `nosafepoint` like:
// A thread is not allowed to safepoint while holding a mutex whose
// rank is nosafepoint or lower.
Also, how about renaming the generic name `lock_types` to something specific like `standard_lock_ranks`?
BTW, should we (in separate RFE) add a new enum `_safepoint_check_default`, so that this parameter can be omitted depending on the rank value (unless in places where you need to override it)?
For one thing, I never understood which _safepoint_check_xxx I should have used when adding a new lock. I just randomly changed it until the JVM stops crashing.
-------------
PR: https://git.openjdk.java.net/jdk/pull/5550
    
    
More information about the serviceability-dev
mailing list