< prev index next >

src/share/vm/utilities/vmError.cpp

Print this page




 658        // Also see if error occurred during initialization or shutdown
 659        if (!Universe::is_fully_initialized()) {
 660          st->print(" (not fully initialized)");
 661        } else if (VM_Exit::vm_exited()) {
 662          st->print(" (shutting down)");
 663        } else {
 664          st->print(" (normal execution)");
 665        }
 666        st->cr();
 667        st->cr();
 668      }
 669 
 670   STEP(180, "(printing owned locks on error)" )
 671 
 672      // mutexes/monitors that currently have an owner
 673      if (_verbose) {
 674        print_owned_locks_on_error(st);
 675        st->cr();
 676      }
 677 


















 678   STEP(190, "(printing heap information)" )
 679 
 680      if (_verbose && Universe::is_fully_initialized()) {
 681        Universe::heap()->print_on_error(st);
 682        st->cr();
 683 
 684        st->print_cr("Polling page: " INTPTR_FORMAT, os::get_polling_page());
 685        st->cr();
 686      }
 687 
 688   STEP(195, "(printing code cache information)" )
 689 
 690      if (_verbose && Universe::is_fully_initialized()) {
 691        // print code cache information before vm abort
 692        CodeCache::print_summary(st);
 693        st->cr();
 694      }
 695 
 696   STEP(200, "(printing ring buffers)" )
 697 


 763        st->cr();
 764      }
 765 
 766   STEP(260, "(printing memory info)" )
 767 
 768      if (_verbose) {
 769        os::print_memory_info(st);
 770        st->cr();
 771      }
 772 
 773   STEP(270, "(printing internal vm info)" )
 774 
 775      if (_verbose) {
 776        st->print_cr("vm_info: %s", Abstract_VM_Version::internal_vm_info_string());
 777        st->cr();
 778      }
 779 
 780   STEP(280, "(printing date and time)" )
 781 
 782      if (_verbose) {
 783        os::print_date_and_time(st);
 784        st->cr();
 785      }
 786 
 787   END
 788 
 789 # undef BEGIN
 790 # undef STEP
 791 # undef END
 792 }
 793 
 794 VMError* volatile VMError::first_error = NULL;
 795 volatile jlong VMError::first_error_tid = -1;
 796 
 797 // An error could happen before tty is initialized or after it has been
 798 // destroyed. Here we use a very simple unbuffered fdStream for printing.
 799 // Only out.print_raw() and out.print_raw_cr() should be used, as other
 800 // printing methods need to allocate large buffer on stack. To format a
 801 // string, use jio_snprintf() with a static buffer or use staticBufferStream.
 802 fdStream VMError::out(defaultStream::output_fd());
 803 fdStream VMError::log; // error log used by VMError::report_and_die()




 658        // Also see if error occurred during initialization or shutdown
 659        if (!Universe::is_fully_initialized()) {
 660          st->print(" (not fully initialized)");
 661        } else if (VM_Exit::vm_exited()) {
 662          st->print(" (shutting down)");
 663        } else {
 664          st->print(" (normal execution)");
 665        }
 666        st->cr();
 667        st->cr();
 668      }
 669 
 670   STEP(180, "(printing owned locks on error)" )
 671 
 672      // mutexes/monitors that currently have an owner
 673      if (_verbose) {
 674        print_owned_locks_on_error(st);
 675        st->cr();
 676      }
 677 
 678   STEP(182, "(printing number of OutOfMemoryError and StackOverflow exceptions)")
 679 
 680      if (_verbose && Exceptions::has_exception_counts()) {
 681        st->print_cr("OutOfMemory and StackOverflow Exception counts:");
 682        Exceptions::print_exception_counts_on_error(st);
 683        st->cr();
 684      }
 685 
 686   STEP(185, "(printing compressed oops mode")
 687 
 688      if (_verbose && UseCompressedOops) {
 689        Universe::print_compressed_oops_mode(st);
 690        if (UseCompressedClassPointers) {
 691          Metaspace::print_compressed_class_space(st);
 692        }
 693        st->cr();
 694      }
 695 
 696   STEP(190, "(printing heap information)" )
 697 
 698      if (_verbose && Universe::is_fully_initialized()) {
 699        Universe::heap()->print_on_error(st);
 700        st->cr();
 701 
 702        st->print_cr("Polling page: " INTPTR_FORMAT, os::get_polling_page());
 703        st->cr();
 704      }
 705 
 706   STEP(195, "(printing code cache information)" )
 707 
 708      if (_verbose && Universe::is_fully_initialized()) {
 709        // print code cache information before vm abort
 710        CodeCache::print_summary(st);
 711        st->cr();
 712      }
 713 
 714   STEP(200, "(printing ring buffers)" )
 715 


 781        st->cr();
 782      }
 783 
 784   STEP(260, "(printing memory info)" )
 785 
 786      if (_verbose) {
 787        os::print_memory_info(st);
 788        st->cr();
 789      }
 790 
 791   STEP(270, "(printing internal vm info)" )
 792 
 793      if (_verbose) {
 794        st->print_cr("vm_info: %s", Abstract_VM_Version::internal_vm_info_string());
 795        st->cr();
 796      }
 797 
 798   STEP(280, "(printing date and time)" )
 799 
 800      if (_verbose) {
 801        os::print_date_and_time(st, buf, sizeof(buf));
 802        st->cr();
 803      }
 804 
 805   END
 806 
 807 # undef BEGIN
 808 # undef STEP
 809 # undef END
 810 }
 811 
 812 VMError* volatile VMError::first_error = NULL;
 813 volatile jlong VMError::first_error_tid = -1;
 814 
 815 // An error could happen before tty is initialized or after it has been
 816 // destroyed. Here we use a very simple unbuffered fdStream for printing.
 817 // Only out.print_raw() and out.print_raw_cr() should be used, as other
 818 // printing methods need to allocate large buffer on stack. To format a
 819 // string, use jio_snprintf() with a static buffer or use staticBufferStream.
 820 fdStream VMError::out(defaultStream::output_fd());
 821 fdStream VMError::log; // error log used by VMError::report_and_die()


< prev index next >