RFR: 8322853: Should use ConditionalMutexLocker in NativeHeapTrimmerThread::print_state
    Denghui Dong 
    ddong at openjdk.org
       
    Tue Jan  2 16:09:53 UTC 2024
    
    
  
Hi all,
Please help review this small fix.
MutexLocker requires that mutex != nullptr, so we should use ConditionalMutexLocker instead.
Also, this patch made '_stop' volatile, since it will be read twice in run() but may be changed.
-------------
Commit messages:
 - remove unused method is_stopped
 - only make _stop volatile
 - make some fields volatile
 - 8322853: Should use ConditionalMutexLocker in NativeHeapTrimmerThread::print_state
Changes: https://git.openjdk.org/jdk/pull/17226/files
 Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=17226&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8322853
  Stats: 10 lines in 1 file changed: 1 ins; 7 del; 2 mod
  Patch: https://git.openjdk.org/jdk/pull/17226.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/17226/head:pull/17226
PR: https://git.openjdk.org/jdk/pull/17226
    
    
More information about the hotspot-runtime-dev
mailing list