RFR: 8277990: NMT: Remove NMT shutdown capability
    Zhengyu Gu 
    zgu at openjdk.java.net
       
    Thu Dec  2 13:42:28 UTC 2021
    
    
  
On Thu, 2 Dec 2021 05:09:04 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:
> Very nice simplification.
> 
> Before diving in, could you explain a bit the locking changes in MallocSiteTable? To me, the association with shutdown is not immediately clear. Thanks!
You are talking about `AccessLock`, right?
As @dholmes-ora mentioned in [PR #6267](https://github.com/openjdk/jdk/pull/6267), the name is misleading: it is **not** a lock, but a countdown latch. It allows multi-reader to access `MallocSiteTable`, but once an exclusive access is requested, the requester sets counter to negative number and waits all readers to exit, then no readers and writers are allowed, so that `MallocSiteTable` can be safely destroyed.
`AccessLock` was invented to guard `MallocSiteTable`, as `ThreadCritical` is **too** expensive for malloc tracking.
-------------
PR: https://git.openjdk.java.net/jdk/pull/6640
    
    
More information about the hotspot-dev
mailing list