Mercurial > hg > truffle
comparison 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 |
comparison
equal
deleted
inserted
replaced
1357:781e29eb8e08 | 1358:72f725c5a7be |
---|---|
68 Monitor* iCMS_lock = NULL; | 68 Monitor* iCMS_lock = NULL; |
69 Monitor* FullGCCount_lock = NULL; | 69 Monitor* FullGCCount_lock = NULL; |
70 Monitor* CMark_lock = NULL; | 70 Monitor* CMark_lock = NULL; |
71 Monitor* ZF_mon = NULL; | 71 Monitor* ZF_mon = NULL; |
72 Monitor* Cleanup_mon = NULL; | 72 Monitor* Cleanup_mon = NULL; |
73 Mutex* CMRegionStack_lock = NULL; | |
73 Mutex* SATB_Q_FL_lock = NULL; | 74 Mutex* SATB_Q_FL_lock = NULL; |
74 Monitor* SATB_Q_CBL_mon = NULL; | 75 Monitor* SATB_Q_CBL_mon = NULL; |
75 Mutex* Shared_SATB_Q_lock = NULL; | 76 Mutex* Shared_SATB_Q_lock = NULL; |
76 Mutex* DirtyCardQ_FL_lock = NULL; | 77 Mutex* DirtyCardQ_FL_lock = NULL; |
77 Monitor* DirtyCardQ_CBL_mon = NULL; | 78 Monitor* DirtyCardQ_CBL_mon = NULL; |
165 } | 166 } |
166 if (UseG1GC) { | 167 if (UseG1GC) { |
167 def(CMark_lock , Monitor, nonleaf, true ); // coordinate concurrent mark thread | 168 def(CMark_lock , Monitor, nonleaf, true ); // coordinate concurrent mark thread |
168 def(ZF_mon , Monitor, leaf, true ); | 169 def(ZF_mon , Monitor, leaf, true ); |
169 def(Cleanup_mon , Monitor, nonleaf, true ); | 170 def(Cleanup_mon , Monitor, nonleaf, true ); |
171 def(CMRegionStack_lock , Mutex, leaf, true ); | |
170 def(SATB_Q_FL_lock , Mutex , special, true ); | 172 def(SATB_Q_FL_lock , Mutex , special, true ); |
171 def(SATB_Q_CBL_mon , Monitor, nonleaf, true ); | 173 def(SATB_Q_CBL_mon , Monitor, nonleaf, true ); |
172 def(Shared_SATB_Q_lock , Mutex, nonleaf, true ); | 174 def(Shared_SATB_Q_lock , Mutex, nonleaf, true ); |
173 | 175 |
174 def(DirtyCardQ_FL_lock , Mutex , special, true ); | 176 def(DirtyCardQ_FL_lock , Mutex , special, true ); |