218 }
219 return true;
220 }
221
222 void VM_PrintThreads::doit() {
223 Threads::print_on(_out, true, false, _print_concurrent_locks);
224 }
225
226 void VM_PrintThreads::doit_epilogue() {
227 if (_print_concurrent_locks) {
228 // Release Heap_lock
229 Heap_lock->unlock();
230 }
231 }
232
233 void VM_PrintJNI::doit() {
234 JNIHandles::print_on(_out);
235 }
236
237 void VM_PrintMetadata::doit() {
238 MetaspaceUtils::print_metadata_for_nmt(_out, _scale);
239 }
240
241 VM_FindDeadlocks::~VM_FindDeadlocks() {
242 if (_deadlocks != NULL) {
243 DeadlockCycle* cycle = _deadlocks;
244 while (cycle != NULL) {
245 DeadlockCycle* d = cycle;
246 cycle = cycle->next();
247 delete d;
248 }
249 }
250 }
251
252 bool VM_FindDeadlocks::doit_prologue() {
253 if (_concurrent_locks) {
254 // Make sure AbstractOwnableSynchronizer is loaded
255 JavaThread* jt = JavaThread::current();
256 java_util_concurrent_locks_AbstractOwnableSynchronizer::initialize(jt);
257 if (jt->has_pending_exception()) {
258 return false;
|
218 }
219 return true;
220 }
221
222 void VM_PrintThreads::doit() {
223 Threads::print_on(_out, true, false, _print_concurrent_locks);
224 }
225
226 void VM_PrintThreads::doit_epilogue() {
227 if (_print_concurrent_locks) {
228 // Release Heap_lock
229 Heap_lock->unlock();
230 }
231 }
232
233 void VM_PrintJNI::doit() {
234 JNIHandles::print_on(_out);
235 }
236
237 void VM_PrintMetadata::doit() {
238 MetaspaceUtils::print_report(_out, _scale, _flags);
239 }
240
241 VM_FindDeadlocks::~VM_FindDeadlocks() {
242 if (_deadlocks != NULL) {
243 DeadlockCycle* cycle = _deadlocks;
244 while (cycle != NULL) {
245 DeadlockCycle* d = cycle;
246 cycle = cycle->next();
247 delete d;
248 }
249 }
250 }
251
252 bool VM_FindDeadlocks::doit_prologue() {
253 if (_concurrent_locks) {
254 // Make sure AbstractOwnableSynchronizer is loaded
255 JavaThread* jt = JavaThread::current();
256 java_util_concurrent_locks_AbstractOwnableSynchronizer::initialize(jt);
257 if (jt->has_pending_exception()) {
258 return false;
|