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 9949 : 8138756: Compiler Control: Print directives in hs_err
Summary: Add directive print in hs_err
Reviewed-by:


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










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




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

 521            st->print_cr("Current CompileTask:");
 522            t->task()->print_line_on_error(st, buf, sizeof(buf));
 523            st->cr();
 524         }

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


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