mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-21 11:34:38 +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 );
|
||||
|
|
|
@ -63,6 +63,7 @@ extern Monitor* FullGCCount_lock; // in support of "concurrent" f
|
|||
extern Monitor* CMark_lock; // used for concurrent mark thread coordination
|
||||
extern Monitor* ZF_mon; // used for G1 conc zero-fill.
|
||||
extern Monitor* Cleanup_mon; // used for G1 conc cleanup.
|
||||
extern Mutex* CMRegionStack_lock; // used for protecting accesses to the CM region stack
|
||||
extern Mutex* SATB_Q_FL_lock; // Protects SATB Q
|
||||
// buffer free list.
|
||||
extern Monitor* SATB_Q_CBL_mon; // Protects SATB Q
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue