< prev index next >

src/hotspot/share/services/diagnosticCommand.cpp

Print this page
rev 50464 : Thread Dump Extension (memory allocation)


 595       heapop.set_columns(DEFAULT_COLUMNS);
 596     }
 597   }
 598   VMThread::execute(&heapop);
 599 }
 600 
 601 int ClassStatsDCmd::num_arguments() {
 602   ResourceMark rm;
 603   ClassStatsDCmd* dcmd = new ClassStatsDCmd(NULL, false);
 604   if (dcmd != NULL) {
 605     DCmdMark mark(dcmd);
 606     return dcmd->_dcmdparser.num_arguments();
 607   } else {
 608     return 0;
 609   }
 610 }
 611 #endif // INCLUDE_SERVICES
 612 
 613 ThreadDumpDCmd::ThreadDumpDCmd(outputStream* output, bool heap) :
 614                                DCmdWithParser(output, heap),
 615   _locks("-l", "print java.util.concurrent locks", "BOOLEAN", false, "false") {

 616   _dcmdparser.add_dcmd_option(&_locks);

 617 }
 618 
 619 void ThreadDumpDCmd::execute(DCmdSource source, TRAPS) {
 620   // thread stacks
 621   VM_PrintThreads op1(output(), _locks.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   }




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


< prev index next >