154 |
154 |
155 // check if there is a safepoint in progress, if so, block the thread |
155 // check if there is a safepoint in progress, if so, block the thread |
156 // for the safepoint |
156 // for the safepoint |
157 void MemBaseline::check_safepoint(JavaThread* thr) { |
157 void MemBaseline::check_safepoint(JavaThread* thr) { |
158 if (SafepointSynchronize::is_synchronizing()) { |
158 if (SafepointSynchronize::is_synchronizing()) { |
159 SafepointSynchronize::block(thr); |
159 // grab and drop the SR_lock to honor the safepoint protocol |
|
160 MutexLocker ml(thr->SR_lock()); |
160 } |
161 } |
161 } |
162 } |
162 |
163 |
163 // baseline mmap'd memory records, generate overall summary and summaries by |
164 // baseline mmap'd memory records, generate overall summary and summaries by |
164 // memory types |
165 // memory types |