hotspot/src/share/vm/utilities/vmError.cpp

Print this page




 441 
 442           while (count++ < StackPrintLimit) {
 443              fr.print_on_error(st, buf, sizeof(buf));
 444              st->cr();
 445              if (os::is_first_C_frame(&fr)) break;
 446              fr = os::get_sender_for_C_frame(&fr);
 447           }
 448 
 449           if (count > StackPrintLimit) {
 450              st->print_cr("...<more frames>...");
 451           }
 452 
 453           st->cr();
 454        }
 455      }
 456 
 457   STEP(130, "(printing Java stack)" )
 458 
 459      if (_verbose && _thread && _thread->is_Java_thread()) {
 460        JavaThread* jt = (JavaThread*)_thread;


































 461        if (jt->has_last_Java_frame()) {
 462          st->print_cr("Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)");
 463          for(StackFrameStream sfs(jt); !sfs.is_done(); sfs.next()) {
 464            sfs.current()->print_on_error(st, buf, sizeof(buf));
 465            st->cr();
 466          }
 467        }

 468      }
 469 
 470   STEP(140, "(printing VM operation)" )
 471 
 472      if (_verbose && _thread && _thread->is_VM_thread()) {
 473         VMThread* t = (VMThread*)_thread;
 474         VM_Operation* op = t->vm_operation();
 475         if (op) {
 476           op->print_on_error(st);
 477           st->cr();
 478           st->cr();
 479         }
 480      }
 481 
 482   STEP(150, "(printing current compile task)" )
 483 
 484      if (_verbose && _thread && _thread->is_Compiler_thread()) {
 485         CompilerThread* t = (CompilerThread*)_thread;
 486         if (t->task()) {
 487            st->cr();




 441 
 442           while (count++ < StackPrintLimit) {
 443              fr.print_on_error(st, buf, sizeof(buf));
 444              st->cr();
 445              if (os::is_first_C_frame(&fr)) break;
 446              fr = os::get_sender_for_C_frame(&fr);
 447           }
 448 
 449           if (count > StackPrintLimit) {
 450              st->print_cr("...<more frames>...");
 451           }
 452 
 453           st->cr();
 454        }
 455      }
 456 
 457   STEP(130, "(printing Java stack)" )
 458 
 459      if (_verbose && _thread && _thread->is_Java_thread()) {
 460        JavaThread* jt = (JavaThread*)_thread;
 461 #ifdef ZERO
 462        if (jt->zero_stack()->sp() && jt->top_zero_frame()) {
 463          // StackFrameStream uses the frame anchor, which may not have
 464          // been set up.  This can be done at any time in Zero, however,
 465          // so if it hasn't been set up then we just set it up now and
 466          // clear it again when we're done.
 467          bool has_last_Java_frame = jt->has_last_Java_frame();
 468          if (!has_last_Java_frame)
 469            jt->set_last_Java_frame();
 470          st->print("Java frames:");
 471   
 472          // If the top frame is a Shark frame and the frame anchor isn't
 473          // set up then it's possible that the information in the frame
 474          // is garbage: it could be from a previous decache, or it could
 475          // simply have never been written.  So we print a warning...
 476          StackFrameStream sfs(jt);
 477          if (!has_last_Java_frame && !sfs.is_done()) {
 478            if (sfs.current()->zeroframe()->is_shark_frame()) {
 479              st->print(" (TOP FRAME MAY BE JUNK)");
 480            }
 481          }
 482          st->cr();
 483   
 484          // Print the frames
 485          for(int i = 0; !sfs.is_done(); sfs.next(), i++) {
 486            sfs.current()->zero_print_on_error(i, st, buf, sizeof(buf));
 487            st->cr();
 488          }
 489   
 490          // Reset the frame anchor if necessary
 491          if (!has_last_Java_frame)
 492            jt->reset_last_Java_frame();
 493        }
 494 #else
 495        if (jt->has_last_Java_frame()) {
 496          st->print_cr("Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)");
 497          for(StackFrameStream sfs(jt); !sfs.is_done(); sfs.next()) {
 498            sfs.current()->print_on_error(st, buf, sizeof(buf));
 499            st->cr();
 500          }
 501        }
 502 #endif // ZERO
 503      }
 504 
 505   STEP(140, "(printing VM operation)" )
 506 
 507      if (_verbose && _thread && _thread->is_VM_thread()) {
 508         VMThread* t = (VMThread*)_thread;
 509         VM_Operation* op = t->vm_operation();
 510         if (op) {
 511           op->print_on_error(st);
 512           st->cr();
 513           st->cr();
 514         }
 515      }
 516 
 517   STEP(150, "(printing current compile task)" )
 518 
 519      if (_verbose && _thread && _thread->is_Compiler_thread()) {
 520         CompilerThread* t = (CompilerThread*)_thread;
 521         if (t->task()) {
 522            st->cr();