Mercurial > hg > graal-compiler
diff src/share/vm/runtime/mutexLocker.cpp @ 1358:72f725c5a7be
6940310: G1: MT-unsafe calls to CM::region_stack_push() / CM::region_stack_pop()
Summary: Calling the methods region_stack_push() and region_stack_pop() concurrent is not MT-safe. The assumption is that we will only call region_stack_push() during a GC pause and region_stack_pop() during marking. Unfortunately, we also call region_stack_push() during marking which seems to be introducing subtle marking failures. This change introduces lock-based methods for pushing / popping to be called during marking.
Reviewed-by: iveresov, johnc
author | tonyp |
---|---|
date | Mon, 05 Apr 2010 12:19:22 -0400 |
parents | bd02caa94611 |
children | f03d0a26bf83 |
line wrap: on
line diff
--- a/src/share/vm/runtime/mutexLocker.cpp Fri Apr 02 12:10:08 2010 -0400 +++ b/src/share/vm/runtime/mutexLocker.cpp Mon Apr 05 12:19:22 2010 -0400 @@ -70,6 +70,7 @@ Monitor* CMark_lock = NULL; Monitor* ZF_mon = NULL; Monitor* Cleanup_mon = NULL; +Mutex* CMRegionStack_lock = NULL; Mutex* SATB_Q_FL_lock = NULL; Monitor* SATB_Q_CBL_mon = NULL; Mutex* Shared_SATB_Q_lock = NULL; @@ -167,6 +168,7 @@ def(CMark_lock , Monitor, nonleaf, true ); // coordinate concurrent mark thread def(ZF_mon , Monitor, leaf, true ); def(Cleanup_mon , Monitor, nonleaf, true ); + def(CMRegionStack_lock , Mutex, leaf, true ); def(SATB_Q_FL_lock , Mutex , special, true ); def(SATB_Q_CBL_mon , Monitor, nonleaf, true ); def(Shared_SATB_Q_lock , Mutex, nonleaf, true );