src/share/vm/utilities/vmError.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File hotspot Sdiff src/share/vm/utilities

src/share/vm/utilities/vmError.cpp

Print this page
rev 10101 : 8138756: Compiler Control: Print directives in hs_err
Summary: Add directive print in hs_err
Reviewed-by:


 507 
 508   STEP(180, "(printing current thread)" )
 509 
 510      // current thread
 511      if (_verbose) {
 512        if (_thread) {
 513          st->print("Current thread (" PTR_FORMAT "):  ", p2i(_thread));
 514          _thread->print_on_error(st, buf, sizeof(buf));
 515          st->cr();
 516        } else {
 517          st->print_cr("Current thread is native thread");
 518        }
 519        st->cr();
 520      }
 521 
 522   STEP(190, "(printing current compile task)" )
 523 
 524      if (_verbose && _thread && _thread->is_Compiler_thread()) {
 525         CompilerThread* t = (CompilerThread*)_thread;
 526         if (t->task()) {
 527            st->cr();
 528            st->print_cr("Current CompileTask:");
 529            t->task()->print_line_on_error(st, buf, sizeof(buf));
 530            st->cr();
 531         }
 532      }
 533 










 534 
 535   STEP(200, "(printing stack bounds)" )
 536 
 537      if (_verbose) {
 538        st->print("Stack: ");
 539 
 540        address stack_top;
 541        size_t stack_size;
 542 
 543        if (_thread) {
 544           stack_top = _thread->stack_base();
 545           stack_size = _thread->stack_size();
 546        } else {
 547           stack_top = os::current_stack_base();
 548           stack_size = os::current_stack_size();
 549        }
 550 
 551        address stack_bottom = stack_top - stack_size;
 552        st->print("[" PTR_FORMAT "," PTR_FORMAT "]", p2i(stack_bottom), p2i(stack_top));
 553 




 507 
 508   STEP(180, "(printing current thread)" )
 509 
 510      // current thread
 511      if (_verbose) {
 512        if (_thread) {
 513          st->print("Current thread (" PTR_FORMAT "):  ", p2i(_thread));
 514          _thread->print_on_error(st, buf, sizeof(buf));
 515          st->cr();
 516        } else {
 517          st->print_cr("Current thread is native thread");
 518        }
 519        st->cr();
 520      }
 521 
 522   STEP(190, "(printing current compile task)" )
 523 
 524      if (_verbose && _thread && _thread->is_Compiler_thread()) {
 525         CompilerThread* t = (CompilerThread*)_thread;
 526         if (t->task()) {

 527            st->print_cr("Current CompileTask:");
 528            t->task()->print_line_on_error(st, buf, sizeof(buf));
 529            st->cr();
 530         }

 531 
 532         if (t->env()) {
 533            st->print_cr("Compiling with directive:");
 534             if (t->env()->directive()) {
 535              t->env()->directive()->print(st);
 536            } else {
 537              st->print_cr("No directive found:");
 538            }
 539            st->cr();
 540         }
 541      }
 542 
 543   STEP(200, "(printing stack bounds)" )
 544 
 545      if (_verbose) {
 546        st->print("Stack: ");
 547 
 548        address stack_top;
 549        size_t stack_size;
 550 
 551        if (_thread) {
 552           stack_top = _thread->stack_base();
 553           stack_size = _thread->stack_size();
 554        } else {
 555           stack_top = os::current_stack_base();
 556           stack_size = os::current_stack_size();
 557        }
 558 
 559        address stack_bottom = stack_top - stack_size;
 560        st->print("[" PTR_FORMAT "," PTR_FORMAT "]", p2i(stack_bottom), p2i(stack_top));
 561 


src/share/vm/utilities/vmError.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File