312 #ifndef PRODUCT |
312 #ifndef PRODUCT |
313 // Error handler self tests |
313 // Error handler self tests |
314 |
314 |
315 // test secondary error handling. Test it twice, to test that resetting |
315 // test secondary error handling. Test it twice, to test that resetting |
316 // error handler after a secondary crash works. |
316 // error handler after a secondary crash works. |
317 STEP(20, "(test secondary crash 1)") |
317 STEP("test secondary crash 1") |
318 if (_verbose && TestCrashInErrorHandler != 0) { |
318 if (_verbose && TestCrashInErrorHandler != 0) { |
319 st->print_cr("Will crash now (TestCrashInErrorHandler=" UINTX_FORMAT ")...", |
319 st->print_cr("Will crash now (TestCrashInErrorHandler=" UINTX_FORMAT ")...", |
320 TestCrashInErrorHandler); |
320 TestCrashInErrorHandler); |
321 controlled_crash(TestCrashInErrorHandler); |
321 controlled_crash(TestCrashInErrorHandler); |
322 } |
322 } |
323 |
323 |
324 STEP(30, "(test secondary crash 2)") |
324 STEP("test secondary crash 2") |
325 if (_verbose && TestCrashInErrorHandler != 0) { |
325 if (_verbose && TestCrashInErrorHandler != 0) { |
326 st->print_cr("Will crash now (TestCrashInErrorHandler=" UINTX_FORMAT ")...", |
326 st->print_cr("Will crash now (TestCrashInErrorHandler=" UINTX_FORMAT ")...", |
327 TestCrashInErrorHandler); |
327 TestCrashInErrorHandler); |
328 controlled_crash(TestCrashInErrorHandler); |
328 controlled_crash(TestCrashInErrorHandler); |
329 } |
329 } |
330 |
330 |
331 STEP(40, "(test safefetch in error handler)") |
331 STEP("test safefetch in error handler") |
332 // test whether it is safe to use SafeFetch32 in Crash Handler. Test twice |
332 // test whether it is safe to use SafeFetch32 in Crash Handler. Test twice |
333 // to test that resetting the signal handler works correctly. |
333 // to test that resetting the signal handler works correctly. |
334 if (_verbose && TestSafeFetchInErrorHandler) { |
334 if (_verbose && TestSafeFetchInErrorHandler) { |
335 st->print_cr("Will test SafeFetch..."); |
335 st->print_cr("Will test SafeFetch..."); |
336 if (CanUseSafeFetch32()) { |
336 if (CanUseSafeFetch32()) { |
412 } else { |
412 } else { |
413 st->print(" (0x%x)", _id); |
413 st->print(" (0x%x)", _id); |
414 } |
414 } |
415 } |
415 } |
416 |
416 |
417 STEP(70, "(printing current thread and pid)") |
417 STEP("printing current thread and pid") |
418 |
418 |
419 // process id, thread id |
419 // process id, thread id |
420 st->print(", pid=%d", os::current_process_id()); |
420 st->print(", pid=%d", os::current_process_id()); |
421 st->print(", tid=" UINTX_FORMAT, os::current_thread_id()); |
421 st->print(", tid=" UINTX_FORMAT, os::current_thread_id()); |
422 st->cr(); |
422 st->cr(); |
423 |
423 |
424 STEP(80, "(printing error message)") |
424 STEP("printing error message") |
425 |
425 |
426 if (should_report_bug(_id)) { // already printed the message. |
426 if (should_report_bug(_id)) { // already printed the message. |
427 // error message |
427 // error message |
428 if (strlen(_detail_msg) > 0) { |
428 if (strlen(_detail_msg) > 0) { |
429 st->print_cr("# %s: %s", _message ? _message : "Error", _detail_msg); |
429 st->print_cr("# %s: %s", _message ? _message : "Error", _detail_msg); |
430 } else if (_message) { |
430 } else if (_message) { |
431 st->print_cr("# Error: %s", _message); |
431 st->print_cr("# Error: %s", _message); |
432 } |
432 } |
433 } |
433 } |
434 |
434 |
435 STEP(90, "(printing Java version string)") |
435 STEP("printing Java version string") |
436 |
436 |
437 report_vm_version(st, buf, sizeof(buf)); |
437 report_vm_version(st, buf, sizeof(buf)); |
438 |
438 |
439 STEP(100, "(printing problematic frame)") |
439 STEP("printing problematic frame") |
440 |
440 |
441 // Print current frame if we have a context (i.e. it's a crash) |
441 // Print current frame if we have a context (i.e. it's a crash) |
442 if (_context) { |
442 if (_context) { |
443 st->print_cr("# Problematic frame:"); |
443 st->print_cr("# Problematic frame:"); |
444 st->print("# "); |
444 st->print("# "); |
460 st->print("CreateCoredumpOnCrash turned off, no core file dumped"); |
460 st->print("CreateCoredumpOnCrash turned off, no core file dumped"); |
461 } |
461 } |
462 st->cr(); |
462 st->cr(); |
463 st->print_cr("#"); |
463 st->print_cr("#"); |
464 |
464 |
465 STEP(120, "(printing bug submit message)") |
465 STEP("printing bug submit message") |
466 |
466 |
467 if (should_report_bug(_id) && _verbose) { |
467 if (should_report_bug(_id) && _verbose) { |
468 print_bug_submit_message(st, _thread); |
468 print_bug_submit_message(st, _thread); |
469 } |
469 } |
470 |
470 |
471 STEP(130, "(printing summary)" ) |
471 STEP("printing summary") |
472 |
472 |
473 if (_verbose) { |
473 if (_verbose) { |
474 st->cr(); |
474 st->cr(); |
475 st->print_cr("--------------- S U M M A R Y ------------"); |
475 st->print_cr("--------------- S U M M A R Y ------------"); |
476 st->cr(); |
476 st->cr(); |
477 } |
477 } |
478 |
478 |
479 STEP(140, "(printing VM option summary)" ) |
479 STEP("printing VM option summary") |
480 |
480 |
481 if (_verbose) { |
481 if (_verbose) { |
482 // VM options |
482 // VM options |
483 Arguments::print_summary_on(st); |
483 Arguments::print_summary_on(st); |
484 st->cr(); |
484 st->cr(); |
485 } |
485 } |
486 |
486 |
487 STEP(150, "(printing summary machine and OS info)") |
487 STEP("printing summary machine and OS info") |
488 |
488 |
489 if (_verbose) { |
489 if (_verbose) { |
490 os::print_summary_info(st, buf, sizeof(buf)); |
490 os::print_summary_info(st, buf, sizeof(buf)); |
491 } |
491 } |
492 |
492 |
493 |
493 |
494 STEP(160, "(printing date and time)" ) |
494 STEP("printing date and time") |
495 |
495 |
496 if (_verbose) { |
496 if (_verbose) { |
497 os::print_date_and_time(st, buf, sizeof(buf)); |
497 os::print_date_and_time(st, buf, sizeof(buf)); |
498 } |
498 } |
499 |
499 |
500 STEP(170, "(printing thread)" ) |
500 STEP("printing thread") |
501 |
501 |
502 if (_verbose) { |
502 if (_verbose) { |
503 st->cr(); |
503 st->cr(); |
504 st->print_cr("--------------- T H R E A D ---------------"); |
504 st->print_cr("--------------- T H R E A D ---------------"); |
505 st->cr(); |
505 st->cr(); |
506 } |
506 } |
507 |
507 |
508 STEP(180, "(printing current thread)" ) |
508 STEP("printing current thread") |
509 |
509 |
510 // current thread |
510 // current thread |
511 if (_verbose) { |
511 if (_verbose) { |
512 if (_thread) { |
512 if (_thread) { |
513 st->print("Current thread (" PTR_FORMAT "): ", p2i(_thread)); |
513 st->print("Current thread (" PTR_FORMAT "): ", p2i(_thread)); |
575 |
575 |
576 print_native_stack(st, fr, _thread, buf, sizeof(buf)); |
576 print_native_stack(st, fr, _thread, buf, sizeof(buf)); |
577 } |
577 } |
578 } |
578 } |
579 |
579 |
580 STEP(220, "(printing Java stack)" ) |
580 STEP("printing Java stack") |
581 |
581 |
582 if (_verbose && _thread && _thread->is_Java_thread()) { |
582 if (_verbose && _thread && _thread->is_Java_thread()) { |
583 print_stack_trace(st, (JavaThread*)_thread, buf, sizeof(buf)); |
583 print_stack_trace(st, (JavaThread*)_thread, buf, sizeof(buf)); |
584 } |
584 } |
585 |
585 |
586 STEP(230, "(printing target Java thread stack)" ) |
586 STEP("printing target Java thread stack") |
587 |
587 |
588 // printing Java thread stack trace if it is involved in GC crash |
588 // printing Java thread stack trace if it is involved in GC crash |
589 if (_verbose && _thread && (_thread->is_Named_thread())) { |
589 if (_verbose && _thread && (_thread->is_Named_thread())) { |
590 JavaThread* jt = ((NamedThread *)_thread)->processed_thread(); |
590 JavaThread* jt = ((NamedThread *)_thread)->processed_thread(); |
591 if (jt != NULL) { |
591 if (jt != NULL) { |
592 st->print_cr("JavaThread " PTR_FORMAT " (nid = %d) was being processed", p2i(jt), jt->osthread()->thread_id()); |
592 st->print_cr("JavaThread " PTR_FORMAT " (nid = %d) was being processed", p2i(jt), jt->osthread()->thread_id()); |
593 print_stack_trace(st, jt, buf, sizeof(buf), true); |
593 print_stack_trace(st, jt, buf, sizeof(buf), true); |
594 } |
594 } |
595 } |
595 } |
596 |
596 |
597 STEP(240, "(printing siginfo)" ) |
597 STEP("printing siginfo") |
598 |
598 |
599 // signal no, signal code, address that caused the fault |
599 // signal no, signal code, address that caused the fault |
600 if (_verbose && _siginfo) { |
600 if (_verbose && _siginfo) { |
601 st->cr(); |
601 st->cr(); |
602 os::print_siginfo(st, _siginfo); |
602 os::print_siginfo(st, _siginfo); |
603 st->cr(); |
603 st->cr(); |
604 } |
604 } |
605 |
605 |
606 STEP(245, "(CDS archive access warning)" ) |
606 STEP("CDS archive access warning") |
607 |
607 |
608 // Print an explicit hint if we crashed on access to the CDS archive. |
608 // Print an explicit hint if we crashed on access to the CDS archive. |
609 if (_verbose && _siginfo) { |
609 if (_verbose && _siginfo) { |
610 check_failing_cds_access(st, _siginfo); |
610 check_failing_cds_access(st, _siginfo); |
611 st->cr(); |
611 st->cr(); |
612 } |
612 } |
613 |
613 |
614 STEP(250, "(printing register info)") |
614 STEP("printing register info") |
615 |
615 |
616 // decode register contents if possible |
616 // decode register contents if possible |
617 if (_verbose && _context && Universe::is_fully_initialized()) { |
617 if (_verbose && _context && Universe::is_fully_initialized()) { |
618 os::print_register_info(st, _context); |
618 os::print_register_info(st, _context); |
619 st->cr(); |
619 st->cr(); |
620 } |
620 } |
621 |
621 |
622 STEP(260, "(printing registers, top of stack, instructions near pc)") |
622 STEP("printing registers, top of stack, instructions near pc") |
623 |
623 |
624 // registers, top of stack, instructions near pc |
624 // registers, top of stack, instructions near pc |
625 if (_verbose && _context) { |
625 if (_verbose && _context) { |
626 os::print_context(st, _context); |
626 os::print_context(st, _context); |
627 st->cr(); |
627 st->cr(); |
628 } |
628 } |
629 |
629 |
630 STEP(265, "(printing code blob if possible)") |
630 STEP("printing code blob if possible") |
631 |
631 |
632 if (_verbose && _context) { |
632 if (_verbose && _context) { |
633 CodeBlob* cb = CodeCache::find_blob(_pc); |
633 CodeBlob* cb = CodeCache::find_blob(_pc); |
634 if (cb != NULL) { |
634 if (cb != NULL) { |
635 if (Interpreter::contains(_pc)) { |
635 if (Interpreter::contains(_pc)) { |
700 } |
700 } |
701 st->cr(); |
701 st->cr(); |
702 st->cr(); |
702 st->cr(); |
703 } |
703 } |
704 |
704 |
705 STEP(310, "(printing owned locks on error)" ) |
705 STEP("printing owned locks on error") |
706 |
706 |
707 // mutexes/monitors that currently have an owner |
707 // mutexes/monitors that currently have an owner |
708 if (_verbose) { |
708 if (_verbose) { |
709 print_owned_locks_on_error(st); |
709 print_owned_locks_on_error(st); |
710 st->cr(); |
710 st->cr(); |
711 } |
711 } |
712 |
712 |
713 STEP(320, "(printing number of OutOfMemoryError and StackOverflow exceptions)") |
713 STEP("printing number of OutOfMemoryError and StackOverflow exceptions") |
714 |
714 |
715 if (_verbose && Exceptions::has_exception_counts()) { |
715 if (_verbose && Exceptions::has_exception_counts()) { |
716 st->print_cr("OutOfMemory and StackOverflow Exception counts:"); |
716 st->print_cr("OutOfMemory and StackOverflow Exception counts:"); |
717 Exceptions::print_exception_counts_on_error(st); |
717 Exceptions::print_exception_counts_on_error(st); |
718 st->cr(); |
718 st->cr(); |
719 } |
719 } |
720 |
720 |
721 STEP(330, "(printing compressed oops mode") |
721 STEP("printing compressed oops mode") |
722 |
722 |
723 if (_verbose && UseCompressedOops) { |
723 if (_verbose && UseCompressedOops) { |
724 Universe::print_compressed_oops_mode(st); |
724 Universe::print_compressed_oops_mode(st); |
725 if (UseCompressedClassPointers) { |
725 if (UseCompressedClassPointers) { |
726 Metaspace::print_compressed_class_space(st); |
726 Metaspace::print_compressed_class_space(st); |
727 } |
727 } |
728 st->cr(); |
728 st->cr(); |
729 } |
729 } |
730 |
730 |
731 STEP(340, "(printing heap information)" ) |
731 STEP("printing heap information") |
732 |
732 |
733 if (_verbose && Universe::is_fully_initialized()) { |
733 if (_verbose && Universe::is_fully_initialized()) { |
734 Universe::heap()->print_on_error(st); |
734 Universe::heap()->print_on_error(st); |
735 st->cr(); |
735 st->cr(); |
736 st->print_cr("Polling page: " INTPTR_FORMAT, p2i(os::get_polling_page())); |
736 st->print_cr("Polling page: " INTPTR_FORMAT, p2i(os::get_polling_page())); |
737 st->cr(); |
737 st->cr(); |
738 } |
738 } |
739 |
739 |
740 STEP(350, "(printing code cache information)" ) |
740 STEP("printing code cache information") |
741 |
741 |
742 if (_verbose && Universe::is_fully_initialized()) { |
742 if (_verbose && Universe::is_fully_initialized()) { |
743 // print code cache information before vm abort |
743 // print code cache information before vm abort |
744 CodeCache::print_summary(st); |
744 CodeCache::print_summary(st); |
745 st->cr(); |
745 st->cr(); |
746 } |
746 } |
747 |
747 |
748 STEP(360, "(printing ring buffers)" ) |
748 STEP("printing ring buffers") |
749 |
749 |
750 if (_verbose) { |
750 if (_verbose) { |
751 Events::print_all(st); |
751 Events::print_all(st); |
752 st->cr(); |
752 st->cr(); |
753 } |
753 } |
754 |
754 |
755 STEP(370, "(printing dynamic libraries)" ) |
755 STEP("printing dynamic libraries") |
756 |
756 |
757 if (_verbose) { |
757 if (_verbose) { |
758 // dynamic libraries, or memory map |
758 // dynamic libraries, or memory map |
759 os::print_dll_info(st); |
759 os::print_dll_info(st); |
760 st->cr(); |
760 st->cr(); |
761 } |
761 } |
762 |
762 |
763 STEP(380, "(printing VM options)" ) |
763 STEP("printing VM options") |
764 |
764 |
765 if (_verbose) { |
765 if (_verbose) { |
766 // VM options |
766 // VM options |
767 Arguments::print_on(st); |
767 Arguments::print_on(st); |
768 st->cr(); |
768 st->cr(); |
769 } |
769 } |
770 |
770 |
771 STEP(390, "(printing warning if internal testing API used)" ) |
771 STEP("printing warning if internal testing API used") |
772 |
772 |
773 if (WhiteBox::used()) { |
773 if (WhiteBox::used()) { |
774 st->print_cr("Unsupported internal testing APIs have been used."); |
774 st->print_cr("Unsupported internal testing APIs have been used."); |
775 st->cr(); |
775 st->cr(); |
776 } |
776 } |
777 |
777 |
778 STEP(395, "(printing log configuration)") |
778 STEP("printing log configuration") |
779 if (_verbose){ |
779 if (_verbose){ |
780 st->print_cr("Logging:"); |
780 st->print_cr("Logging:"); |
781 LogConfiguration::describe_current_configuration(st); |
781 LogConfiguration::describe_current_configuration(st); |
782 st->cr(); |
782 st->cr(); |
783 } |
783 } |
784 |
784 |
785 STEP(400, "(printing all environment variables)" ) |
785 STEP("printing all environment variables") |
786 |
786 |
787 if (_verbose) { |
787 if (_verbose) { |
788 os::print_environment_variables(st, env_list); |
788 os::print_environment_variables(st, env_list); |
789 st->cr(); |
789 st->cr(); |
790 } |
790 } |
791 |
791 |
792 STEP(410, "(printing signal handlers)" ) |
792 STEP("printing signal handlers") |
793 |
793 |
794 if (_verbose) { |
794 if (_verbose) { |
795 os::print_signal_handlers(st, buf, sizeof(buf)); |
795 os::print_signal_handlers(st, buf, sizeof(buf)); |
796 st->cr(); |
796 st->cr(); |
797 } |
797 } |
798 |
798 |
799 STEP(420, "(Native Memory Tracking)" ) |
799 STEP("Native Memory Tracking") |
800 if (_verbose) { |
800 if (_verbose) { |
801 MemTracker::error_report(st); |
801 MemTracker::error_report(st); |
802 } |
802 } |
803 |
803 |
804 STEP(430, "(printing system)" ) |
804 STEP("printing system") |
805 |
805 |
806 if (_verbose) { |
806 if (_verbose) { |
807 st->cr(); |
807 st->cr(); |
808 st->print_cr("--------------- S Y S T E M ---------------"); |
808 st->print_cr("--------------- S Y S T E M ---------------"); |
809 st->cr(); |
809 st->cr(); |
810 } |
810 } |
811 |
811 |
812 STEP(440, "(printing OS information)" ) |
812 STEP("printing OS information") |
813 |
813 |
814 if (_verbose) { |
814 if (_verbose) { |
815 os::print_os_info(st); |
815 os::print_os_info(st); |
816 st->cr(); |
816 st->cr(); |
817 } |
817 } |
818 |
818 |
819 STEP(450, "(printing CPU info)" ) |
819 STEP("printing CPU info") |
820 if (_verbose) { |
820 if (_verbose) { |
821 os::print_cpu_info(st, buf, sizeof(buf)); |
821 os::print_cpu_info(st, buf, sizeof(buf)); |
822 st->cr(); |
822 st->cr(); |
823 } |
823 } |
824 |
824 |
825 STEP(460, "(printing memory info)" ) |
825 STEP("printing memory info") |
826 |
826 |
827 if (_verbose) { |
827 if (_verbose) { |
828 os::print_memory_info(st); |
828 os::print_memory_info(st); |
829 st->cr(); |
829 st->cr(); |
830 } |
830 } |
831 |
831 |
832 STEP(470, "(printing internal vm info)" ) |
832 STEP("printing internal vm info") |
833 |
833 |
834 if (_verbose) { |
834 if (_verbose) { |
835 st->print_cr("vm_info: %s", Abstract_VM_Version::internal_vm_info_string()); |
835 st->print_cr("vm_info: %s", Abstract_VM_Version::internal_vm_info_string()); |
836 st->cr(); |
836 st->cr(); |
837 } |
837 } |
838 |
838 |
839 // print a defined marker to show that error handling finished correctly. |
839 // print a defined marker to show that error handling finished correctly. |
840 STEP(480, "(printing end marker)" ) |
840 STEP("printing end marker") |
841 |
841 |
842 if (_verbose) { |
842 if (_verbose) { |
843 st->print_cr("END."); |
843 st->print_cr("END."); |
844 } |
844 } |
845 |
845 |
856 void VMError::print_vm_info(outputStream* st) { |
856 void VMError::print_vm_info(outputStream* st) { |
857 |
857 |
858 char buf[O_BUFLEN]; |
858 char buf[O_BUFLEN]; |
859 report_vm_version(st, buf, sizeof(buf)); |
859 report_vm_version(st, buf, sizeof(buf)); |
860 |
860 |
861 // STEP("(printing summary)") |
861 // STEP("printing summary") |
862 |
862 |
863 st->cr(); |
863 st->cr(); |
864 st->print_cr("--------------- S U M M A R Y ------------"); |
864 st->print_cr("--------------- S U M M A R Y ------------"); |
865 st->cr(); |
865 st->cr(); |
866 |
866 |
867 // STEP("(printing VM option summary)") |
867 // STEP("printing VM option summary") |
868 |
868 |
869 // VM options |
869 // VM options |
870 Arguments::print_summary_on(st); |
870 Arguments::print_summary_on(st); |
871 st->cr(); |
871 st->cr(); |
872 |
872 |
873 // STEP("(printing summary machine and OS info)") |
873 // STEP("printing summary machine and OS info") |
874 |
874 |
875 os::print_summary_info(st, buf, sizeof(buf)); |
875 os::print_summary_info(st, buf, sizeof(buf)); |
876 |
876 |
877 // STEP("(printing date and time)") |
877 // STEP("printing date and time") |
878 |
878 |
879 os::print_date_and_time(st, buf, sizeof(buf)); |
879 os::print_date_and_time(st, buf, sizeof(buf)); |
880 |
880 |
881 // Skip: STEP("(printing thread)") |
881 // Skip: STEP("printing thread") |
882 |
882 |
883 // STEP("(printing process)") |
883 // STEP("printing process") |
884 |
884 |
885 st->cr(); |
885 st->cr(); |
886 st->print_cr("--------------- P R O C E S S ---------------"); |
886 st->print_cr("--------------- P R O C E S S ---------------"); |
887 st->cr(); |
887 st->cr(); |
888 |
888 |
889 // STEP("(printing number of OutOfMemoryError and StackOverflow exceptions)") |
889 // STEP("printing number of OutOfMemoryError and StackOverflow exceptions") |
890 |
890 |
891 if (Exceptions::has_exception_counts()) { |
891 if (Exceptions::has_exception_counts()) { |
892 st->print_cr("OutOfMemory and StackOverflow Exception counts:"); |
892 st->print_cr("OutOfMemory and StackOverflow Exception counts:"); |
893 Exceptions::print_exception_counts_on_error(st); |
893 Exceptions::print_exception_counts_on_error(st); |
894 st->cr(); |
894 st->cr(); |
895 } |
895 } |
896 |
896 |
897 // STEP("(printing compressed oops mode") |
897 // STEP("printing compressed oops mode") |
898 |
898 |
899 if (UseCompressedOops) { |
899 if (UseCompressedOops) { |
900 Universe::print_compressed_oops_mode(st); |
900 Universe::print_compressed_oops_mode(st); |
901 if (UseCompressedClassPointers) { |
901 if (UseCompressedClassPointers) { |
902 Metaspace::print_compressed_class_space(st); |
902 Metaspace::print_compressed_class_space(st); |
903 } |
903 } |
904 st->cr(); |
904 st->cr(); |
905 } |
905 } |
906 |
906 |
907 // STEP("(printing heap information)") |
907 // STEP("printing heap information") |
908 |
908 |
909 if (Universe::is_fully_initialized()) { |
909 if (Universe::is_fully_initialized()) { |
910 Universe::heap()->print_on_error(st); |
910 Universe::heap()->print_on_error(st); |
911 st->cr(); |
911 st->cr(); |
912 st->print_cr("Polling page: " INTPTR_FORMAT, p2i(os::get_polling_page())); |
912 st->print_cr("Polling page: " INTPTR_FORMAT, p2i(os::get_polling_page())); |
913 st->cr(); |
913 st->cr(); |
914 } |
914 } |
915 |
915 |
916 // STEP("(printing code cache information)") |
916 // STEP("printing code cache information") |
917 |
917 |
918 if (Universe::is_fully_initialized()) { |
918 if (Universe::is_fully_initialized()) { |
919 // print code cache information before vm abort |
919 // print code cache information before vm abort |
920 CodeCache::print_summary(st); |
920 CodeCache::print_summary(st); |
921 st->cr(); |
921 st->cr(); |
922 } |
922 } |
923 |
923 |
924 // STEP("(printing ring buffers)") |
924 // STEP("printing ring buffers") |
925 |
925 |
926 Events::print_all(st); |
926 Events::print_all(st); |
927 st->cr(); |
927 st->cr(); |
928 |
928 |
929 // STEP("(printing dynamic libraries)") |
929 // STEP("printing dynamic libraries") |
930 |
930 |
931 // dynamic libraries, or memory map |
931 // dynamic libraries, or memory map |
932 os::print_dll_info(st); |
932 os::print_dll_info(st); |
933 st->cr(); |
933 st->cr(); |
934 |
934 |
935 // STEP("(printing VM options)") |
935 // STEP("printing VM options") |
936 |
936 |
937 // VM options |
937 // VM options |
938 Arguments::print_on(st); |
938 Arguments::print_on(st); |
939 st->cr(); |
939 st->cr(); |
940 |
940 |
941 // STEP("(printing warning if internal testing API used)") |
941 // STEP("printing warning if internal testing API used") |
942 |
942 |
943 if (WhiteBox::used()) { |
943 if (WhiteBox::used()) { |
944 st->print_cr("Unsupported internal testing APIs have been used."); |
944 st->print_cr("Unsupported internal testing APIs have been used."); |
945 st->cr(); |
945 st->cr(); |
946 } |
946 } |
947 |
947 |
948 // STEP("(printing log configuration)") |
948 // STEP("printing log configuration") |
949 st->print_cr("Logging:"); |
949 st->print_cr("Logging:"); |
950 LogConfiguration::describe(st); |
950 LogConfiguration::describe(st); |
951 st->cr(); |
951 st->cr(); |
952 |
952 |
953 // STEP("(printing all environment variables)") |
953 // STEP("printing all environment variables") |
954 |
954 |
955 os::print_environment_variables(st, env_list); |
955 os::print_environment_variables(st, env_list); |
956 st->cr(); |
956 st->cr(); |
957 |
957 |
958 // STEP("(printing signal handlers)") |
958 // STEP("printing signal handlers") |
959 |
959 |
960 os::print_signal_handlers(st, buf, sizeof(buf)); |
960 os::print_signal_handlers(st, buf, sizeof(buf)); |
961 st->cr(); |
961 st->cr(); |
962 |
962 |
963 // STEP("(Native Memory Tracking)") |
963 // STEP("Native Memory Tracking") |
964 |
964 |
965 MemTracker::error_report(st); |
965 MemTracker::error_report(st); |
966 |
966 |
967 // STEP("(printing system)") |
967 // STEP("printing system") |
968 |
968 |
969 st->cr(); |
969 st->cr(); |
970 st->print_cr("--------------- S Y S T E M ---------------"); |
970 st->print_cr("--------------- S Y S T E M ---------------"); |
971 st->cr(); |
971 st->cr(); |
972 |
972 |
973 // STEP("(printing OS information)") |
973 // STEP("printing OS information") |
974 |
974 |
975 os::print_os_info(st); |
975 os::print_os_info(st); |
976 st->cr(); |
976 st->cr(); |
977 |
977 |
978 // STEP("(printing CPU info)") |
978 // STEP("printing CPU info") |
979 |
979 |
980 os::print_cpu_info(st, buf, sizeof(buf)); |
980 os::print_cpu_info(st, buf, sizeof(buf)); |
981 st->cr(); |
981 st->cr(); |
982 |
982 |
983 // STEP("(printing memory info)") |
983 // STEP("printing memory info") |
984 |
984 |
985 os::print_memory_info(st); |
985 os::print_memory_info(st); |
986 st->cr(); |
986 st->cr(); |
987 |
987 |
988 // STEP("(printing internal vm info)") |
988 // STEP("printing internal vm info") |
989 |
989 |
990 st->print_cr("vm_info: %s", Abstract_VM_Version::internal_vm_info_string()); |
990 st->print_cr("vm_info: %s", Abstract_VM_Version::internal_vm_info_string()); |
991 st->cr(); |
991 st->cr(); |
992 |
992 |
993 // print a defined marker to show that error handling finished correctly. |
993 // print a defined marker to show that error handling finished correctly. |
994 // STEP("(printing end marker)") |
994 // STEP("printing end marker") |
995 |
995 |
996 st->print_cr("END."); |
996 st->print_cr("END."); |
997 } |
997 } |
998 |
998 |
999 volatile intptr_t VMError::first_error_tid = -1; |
999 volatile intptr_t VMError::first_error_tid = -1; |