mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 23:04:50 +02:00
6940310: G1: MT-unsafe calls to CM::region_stack_push() / CM::region_stack_pop()
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
This commit is contained in:
parent
9545c0521e
commit
2e3363d109
4 changed files with 87 additions and 4 deletions
|
@ -70,6 +70,7 @@ Monitor* FullGCCount_lock = NULL;
|
|||
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 @@ void mutex_init() {
|
|||
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 );
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue