RFR: 8274794: Print all owned locks in hs_err file [v2]
    Coleen Phillimore 
    coleenp at openjdk.java.net
       
    Fri Oct 15 16:47:30 UTC 2021
    
    
  
> See CR for details.  This saves the created mutex in a mutex_array during Mutex construction so that all Mutex, not just the ones in mutexLocker.cpp can be printed in the hs_err file.  ThreadCritical is used to protect the mutex_array, and to avoid UB should be used when printing the owned locks, but since that is done during error handling, this seemed better not to lock during error handling.  There's 0 probability that another thread will be creating a lock during this error handling anyway.
> Tested with tier1-8.
Coleen Phillimore has updated the pull request incrementally with one additional commit since the last revision:
  Make mutex_array be a linked list.
-------------
Changes:
  - all: https://git.openjdk.java.net/jdk/pull/5958/files
  - new: https://git.openjdk.java.net/jdk/pull/5958/files/3ff9cc02..665d5cc0
Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=5958&range=01
 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=5958&range=00-01
  Stats: 97 lines in 3 files changed: 41 ins; 38 del; 18 mod
  Patch: https://git.openjdk.java.net/jdk/pull/5958.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/5958/head:pull/5958
PR: https://git.openjdk.java.net/jdk/pull/5958
    
    
More information about the hotspot-dev
mailing list