593 heapop.set_columns(DEFAULT_COLUMNS);
594 }
595 }
596 VMThread::execute(&heapop);
597 }
598
599 int ClassStatsDCmd::num_arguments() {
600 ResourceMark rm;
601 ClassStatsDCmd* dcmd = new ClassStatsDCmd(NULL, false);
602 if (dcmd != NULL) {
603 DCmdMark mark(dcmd);
604 return dcmd->_dcmdparser.num_arguments();
605 } else {
606 return 0;
607 }
608 }
609 #endif // INCLUDE_SERVICES
610
611 ThreadDumpDCmd::ThreadDumpDCmd(outputStream* output, bool heap) :
612 DCmdWithParser(output, heap),
613 _locks("-l", "print java.util.concurrent locks", "BOOLEAN", false, "false") {
614 _dcmdparser.add_dcmd_option(&_locks);
615 }
616
617 void ThreadDumpDCmd::execute(DCmdSource source, TRAPS) {
618 // thread stacks
619 VM_PrintThreads op1(output(), _locks.value());
620 VMThread::execute(&op1);
621
622 // JNI global handles
623 VM_PrintJNI op2(output());
624 VMThread::execute(&op2);
625
626 // Deadlock detection
627 VM_FindDeadlocks op3(output());
628 VMThread::execute(&op3);
629 }
630
631 int ThreadDumpDCmd::num_arguments() {
632 ResourceMark rm;
633 ThreadDumpDCmd* dcmd = new ThreadDumpDCmd(NULL, false);
634 if (dcmd != NULL) {
635 DCmdMark mark(dcmd);
636 return dcmd->_dcmdparser.num_arguments();
637 } else {
638 return 0;
639 }
|
593 heapop.set_columns(DEFAULT_COLUMNS);
594 }
595 }
596 VMThread::execute(&heapop);
597 }
598
599 int ClassStatsDCmd::num_arguments() {
600 ResourceMark rm;
601 ClassStatsDCmd* dcmd = new ClassStatsDCmd(NULL, false);
602 if (dcmd != NULL) {
603 DCmdMark mark(dcmd);
604 return dcmd->_dcmdparser.num_arguments();
605 } else {
606 return 0;
607 }
608 }
609 #endif // INCLUDE_SERVICES
610
611 ThreadDumpDCmd::ThreadDumpDCmd(outputStream* output, bool heap) :
612 DCmdWithParser(output, heap),
613 _locks("-l", "print java.util.concurrent locks", "BOOLEAN", false, "false"),
614 _extended("-e", "print extended thread information", "BOOLEAN", false, "false") {
615 _dcmdparser.add_dcmd_option(&_locks);
616 _dcmdparser.add_dcmd_option(&_extended);
617 }
618
619 void ThreadDumpDCmd::execute(DCmdSource source, TRAPS) {
620 // thread stacks
621 VM_PrintThreads op1(output(), _locks.value(), _extended.value());
622 VMThread::execute(&op1);
623
624 // JNI global handles
625 VM_PrintJNI op2(output());
626 VMThread::execute(&op2);
627
628 // Deadlock detection
629 VM_FindDeadlocks op3(output());
630 VMThread::execute(&op3);
631 }
632
633 int ThreadDumpDCmd::num_arguments() {
634 ResourceMark rm;
635 ThreadDumpDCmd* dcmd = new ThreadDumpDCmd(NULL, false);
636 if (dcmd != NULL) {
637 DCmdMark mark(dcmd);
638 return dcmd->_dcmdparser.num_arguments();
639 } else {
640 return 0;
641 }
|