hotspot/src/share/vm/utilities/vmError.cpp
changeset 31963 641ed52732ec
parent 31615 e48d94b97b6c
child 32583 e95e2cfc9cf5
equal deleted inserted replaced
31856:614d6786ba55 31963:641ed52732ec
   302       sfs.current()->print_on_error(st, buf, buflen, verbose);
   302       sfs.current()->print_on_error(st, buf, buflen, verbose);
   303       st->cr();
   303       st->cr();
   304     }
   304     }
   305   }
   305   }
   306 #endif // ZERO
   306 #endif // ZERO
       
   307 }
       
   308 
       
   309 void VMError::print_oom_reasons(outputStream* st) {
       
   310   st->print_cr("# Possible reasons:");
       
   311   st->print_cr("#   The system is out of physical RAM or swap space");
       
   312   st->print_cr("#   In 32 bit mode, the process size limit was hit");
       
   313   st->print_cr("# Possible solutions:");
       
   314   st->print_cr("#   Reduce memory load on the system");
       
   315   st->print_cr("#   Increase physical memory or swap space");
       
   316   st->print_cr("#   Check if swap backing store is full");
       
   317   st->print_cr("#   Use 64 bit Java on a 64 bit OS");
       
   318   st->print_cr("#   Decrease Java heap size (-Xmx/-Xms)");
       
   319   st->print_cr("#   Decrease number of Java threads");
       
   320   st->print_cr("#   Decrease Java thread stack sizes (-Xss)");
       
   321   st->print_cr("#   Set larger code cache with -XX:ReservedCodeCacheSize=");
       
   322   st->print_cr("# This output file may be truncated or incomplete.");
       
   323 }
       
   324 
       
   325 const char* VMError::gc_mode() {
       
   326   if (UseG1GC)            return "g1 gc";
       
   327   if (UseParallelGC)      return "parallel gc";
       
   328   if (UseConcMarkSweepGC) return "concurrent mark sweep gc";
       
   329   if (UseSerialGC)        return "serial gc";
       
   330   return "ERROR in GC mode";
   307 }
   331 }
   308 
   332 
   309 // This is the main function to report a fatal error. Only one thread can
   333 // This is the main function to report a fatal error. Only one thread can
   310 // call this function, so we don't need to worry about MT-safety. But it's
   334 // call this function, so we don't need to worry about MT-safety. But it's
   311 // possible that the error handler itself may crash or die on an internal
   335 // possible that the error handler itself may crash or die on an internal
   356 #ifndef PRODUCT
   380 #ifndef PRODUCT
   357   // Error handler self tests
   381   // Error handler self tests
   358 
   382 
   359   // test secondary error handling. Test it twice, to test that resetting
   383   // test secondary error handling. Test it twice, to test that resetting
   360   // error handler after a secondary crash works.
   384   // error handler after a secondary crash works.
   361   STEP(11, "(test secondary crash 1)")
   385   STEP(20, "(test secondary crash 1)")
   362     if (_verbose && TestCrashInErrorHandler != 0) {
   386     if (_verbose && TestCrashInErrorHandler != 0) {
   363       st->print_cr("Will crash now (TestCrashInErrorHandler=%d)...",
   387       st->print_cr("Will crash now (TestCrashInErrorHandler=%d)...",
   364         TestCrashInErrorHandler);
   388         TestCrashInErrorHandler);
   365       controlled_crash(TestCrashInErrorHandler);
   389       controlled_crash(TestCrashInErrorHandler);
   366     }
   390     }
   367 
   391 
   368   STEP(12, "(test secondary crash 2)")
   392   STEP(30, "(test secondary crash 2)")
   369     if (_verbose && TestCrashInErrorHandler != 0) {
   393     if (_verbose && TestCrashInErrorHandler != 0) {
   370       st->print_cr("Will crash now (TestCrashInErrorHandler=%d)...",
   394       st->print_cr("Will crash now (TestCrashInErrorHandler=%d)...",
   371         TestCrashInErrorHandler);
   395         TestCrashInErrorHandler);
   372       controlled_crash(TestCrashInErrorHandler);
   396       controlled_crash(TestCrashInErrorHandler);
   373     }
   397     }
   374 
   398 
   375   STEP(13, "(test safefetch in error handler)")
   399   STEP(40, "(test safefetch in error handler)")
   376     // test whether it is safe to use SafeFetch32 in Crash Handler. Test twice
   400     // test whether it is safe to use SafeFetch32 in Crash Handler. Test twice
   377     // to test that resetting the signal handler works correctly.
   401     // to test that resetting the signal handler works correctly.
   378     if (_verbose && TestSafeFetchInErrorHandler) {
   402     if (_verbose && TestSafeFetchInErrorHandler) {
   379       st->print_cr("Will test SafeFetch...");
   403       st->print_cr("Will test SafeFetch...");
   380       if (CanUseSafeFetch32()) {
   404       if (CanUseSafeFetch32()) {
   391         st->print_cr("not possible; skipped.");
   415         st->print_cr("not possible; skipped.");
   392       }
   416       }
   393     }
   417     }
   394 #endif // PRODUCT
   418 #endif // PRODUCT
   395 
   419 
   396   STEP(15, "(printing type of error)")
   420   STEP(50, "(printing type of error)")
   397 
   421 
   398      switch(_id) {
   422      switch(_id) {
   399        case OOM_MALLOC_ERROR:
   423        case OOM_MALLOC_ERROR:
   400        case OOM_MMAP_ERROR:
   424        case OOM_MMAP_ERROR:
   401          if (_size) {
   425          if (_size) {
   416              st->print_cr("%s", _message);
   440              st->print_cr("%s", _message);
   417            }
   441            }
   418          }
   442          }
   419          // In error file give some solutions
   443          // In error file give some solutions
   420          if (_verbose) {
   444          if (_verbose) {
   421            st->print_cr("# Possible reasons:");
   445            print_oom_reasons(st);
   422            st->print_cr("#   The system is out of physical RAM or swap space");
       
   423            st->print_cr("#   In 32 bit mode, the process size limit was hit");
       
   424            st->print_cr("# Possible solutions:");
       
   425            st->print_cr("#   Reduce memory load on the system");
       
   426            st->print_cr("#   Increase physical memory or swap space");
       
   427            st->print_cr("#   Check if swap backing store is full");
       
   428            st->print_cr("#   Use 64 bit Java on a 64 bit OS");
       
   429            st->print_cr("#   Decrease Java heap size (-Xmx/-Xms)");
       
   430            st->print_cr("#   Decrease number of Java threads");
       
   431            st->print_cr("#   Decrease Java thread stack sizes (-Xss)");
       
   432            st->print_cr("#   Set larger code cache with -XX:ReservedCodeCacheSize=");
       
   433            st->print_cr("# This output file may be truncated or incomplete.");
       
   434          } else {
   446          } else {
   435            return;  // that's enough for the screen
   447            return;  // that's enough for the screen
   436          }
   448          }
   437          break;
   449          break;
   438        case INTERNAL_ERROR:
   450        case INTERNAL_ERROR:
   439        default:
   451        default:
   440          break;
   452          break;
   441      }
   453      }
   442 
   454 
   443   STEP(20, "(printing exception/signal name)")
   455   STEP(60, "(printing exception/signal name)")
   444 
   456 
   445      st->print_cr("#");
   457      st->print_cr("#");
   446      st->print("#  ");
   458      st->print("#  ");
   447      // Is it an OS exception/signal?
   459      // Is it an OS exception/signal?
   448      if (os::exception_name(_id, buf, sizeof(buf))) {
   460      if (os::exception_name(_id, buf, sizeof(buf))) {
   468        } else {
   480        } else {
   469          st->print(" (0x%x)", _id);
   481          st->print(" (0x%x)", _id);
   470        }
   482        }
   471      }
   483      }
   472 
   484 
   473   STEP(30, "(printing current thread and pid)")
   485   STEP(70, "(printing current thread and pid)")
   474 
   486 
   475      // process id, thread id
   487      // process id, thread id
   476      st->print(", pid=%d", os::current_process_id());
   488      st->print(", pid=%d", os::current_process_id());
   477      st->print(", tid=" INTPTR_FORMAT, os::current_thread_id());
   489      st->print(", tid=" INTPTR_FORMAT, os::current_thread_id());
   478      st->cr();
   490      st->cr();
   479 
   491 
   480   STEP(40, "(printing error message)")
   492   STEP(80, "(printing error message)")
   481 
   493 
   482      if (should_report_bug(_id)) {  // already printed the message.
   494      if (should_report_bug(_id)) {  // already printed the message.
   483        // error message
   495        // error message
   484        if (_detail_msg) {
   496        if (_detail_msg) {
   485          st->print_cr("#  %s: %s", _message ? _message : "Error", _detail_msg);
   497          st->print_cr("#  %s: %s", _message ? _message : "Error", _detail_msg);
   486        } else if (_message) {
   498        } else if (_message) {
   487          st->print_cr("#  Error: %s", _message);
   499          st->print_cr("#  Error: %s", _message);
   488        }
   500        }
   489     }
   501     }
   490 
   502 
   491   STEP(50, "(printing Java version string)")
   503   STEP(90, "(printing Java version string)")
   492 
   504 
   493      // VM version
   505      // VM version
   494      st->print_cr("#");
   506      st->print_cr("#");
   495      JDK_Version::current().to_string(buf, sizeof(buf));
   507      JDK_Version::current().to_string(buf, sizeof(buf));
   496      const char* runtime_name = JDK_Version::runtime_name() != NULL ?
   508      const char* runtime_name = JDK_Version::runtime_name() != NULL ?
   497                                   JDK_Version::runtime_name() : "";
   509                                   JDK_Version::runtime_name() : "";
   498      const char* runtime_version = JDK_Version::runtime_version() != NULL ?
   510      const char* runtime_version = JDK_Version::runtime_version() != NULL ?
   499                                   JDK_Version::runtime_version() : "";
   511                                   JDK_Version::runtime_version() : "";
   500      st->print_cr("# JRE version: %s (%s) (build %s)", runtime_name, buf, runtime_version);
   512      st->print_cr("# JRE version: %s (%s) (build %s)", runtime_name, buf, runtime_version);
   501      st->print_cr("# Java VM: %s (%s %s %s %s)",
   513      // This is the long version with some default settings added
       
   514      st->print_cr("# Java VM: %s (%s, %s%s%s, %s, %s)",
   502                    Abstract_VM_Version::vm_name(),
   515                    Abstract_VM_Version::vm_name(),
   503                    Abstract_VM_Version::vm_release(),
   516                    Abstract_VM_Version::vm_release(),
   504                    Abstract_VM_Version::vm_info_string(),
   517                    Abstract_VM_Version::vm_info_string(),
   505                    Abstract_VM_Version::vm_platform_string(),
   518                    TieredCompilation ? ", tiered" : "",
   506                    UseCompressedOops ? "compressed oops" : ""
   519                    UseCompressedOops ? ", compressed oops" : "",
       
   520                    gc_mode(),
       
   521                    Abstract_VM_Version::vm_platform_string()
   507                  );
   522                  );
   508 
   523 
   509   STEP(60, "(printing problematic frame)")
   524   STEP(100, "(printing problematic frame)")
   510 
   525 
   511      // Print current frame if we have a context (i.e. it's a crash)
   526      // Print current frame if we have a context (i.e. it's a crash)
   512      if (_context) {
   527      if (_context) {
   513        st->print_cr("# Problematic frame:");
   528        st->print_cr("# Problematic frame:");
   514        st->print("# ");
   529        st->print("# ");
   515        frame fr = os::fetch_frame_from_context(_context);
   530        frame fr = os::fetch_frame_from_context(_context);
   516        fr.print_on_error(st, buf, sizeof(buf));
   531        fr.print_on_error(st, buf, sizeof(buf));
   517        st->cr();
   532        st->cr();
   518        st->print_cr("#");
   533        st->print_cr("#");
   519      }
   534      }
   520   STEP(63, "(printing core file information)")
   535 
       
   536   STEP(110, "(printing core file information)")
   521     st->print("# ");
   537     st->print("# ");
   522     if (CreateCoredumpOnCrash) {
   538     if (CreateCoredumpOnCrash) {
   523       if (coredump_status) {
   539       if (coredump_status) {
   524         st->print("Core dump will be written. Default location: %s", coredump_message);
   540         st->print("Core dump will be written. Default location: %s", coredump_message);
   525       } else {
   541       } else {
   529       st->print("CreateCoredumpOnCrash turned off, no core file dumped");
   545       st->print("CreateCoredumpOnCrash turned off, no core file dumped");
   530     }
   546     }
   531     st->cr();
   547     st->cr();
   532     st->print_cr("#");
   548     st->print_cr("#");
   533 
   549 
   534   STEP(65, "(printing bug submit message)")
   550   STEP(120, "(printing bug submit message)")
   535 
   551 
   536      if (should_report_bug(_id) && _verbose) {
   552      if (should_report_bug(_id) && _verbose) {
   537        print_bug_submit_message(st, _thread);
   553        print_bug_submit_message(st, _thread);
   538      }
   554      }
   539 
   555 
   540   STEP(70, "(printing thread)" )
   556   STEP(130, "(printing summary)" )
       
   557 
       
   558      if (_verbose) {
       
   559        st->cr();
       
   560        st->print_cr("---------------  S U M M A R Y ------------");
       
   561        st->cr();
       
   562      }
       
   563 
       
   564   STEP(140, "(printing VM option summary)" )
       
   565 
       
   566      if (_verbose) {
       
   567        // VM options
       
   568        Arguments::print_summary_on(st);
       
   569        st->cr();
       
   570      }
       
   571 
       
   572   STEP(150, "(printing summary machine and OS info)")
       
   573 
       
   574      if (_verbose) {
       
   575        os::print_summary_info(st, buf, sizeof(buf));
       
   576      }
       
   577 
       
   578 
       
   579   STEP(160, "(printing date and time)" )
       
   580 
       
   581      if (_verbose) {
       
   582        os::print_date_and_time(st, buf, sizeof(buf));
       
   583      }
       
   584 
       
   585   STEP(170, "(printing thread)" )
   541 
   586 
   542      if (_verbose) {
   587      if (_verbose) {
   543        st->cr();
   588        st->cr();
   544        st->print_cr("---------------  T H R E A D  ---------------");
   589        st->print_cr("---------------  T H R E A D  ---------------");
   545        st->cr();
   590        st->cr();
   546      }
   591      }
   547 
   592 
   548   STEP(80, "(printing current thread)" )
   593   STEP(180, "(printing current thread)" )
   549 
   594 
   550      // current thread
   595      // current thread
   551      if (_verbose) {
   596      if (_verbose) {
   552        if (_thread) {
   597        if (_thread) {
   553          st->print("Current thread (" PTR_FORMAT "):  ", _thread);
   598          st->print("Current thread (" PTR_FORMAT "):  ", _thread);
   557          st->print_cr("Current thread is native thread");
   602          st->print_cr("Current thread is native thread");
   558        }
   603        }
   559        st->cr();
   604        st->cr();
   560      }
   605      }
   561 
   606 
   562   STEP(90, "(printing siginfo)" )
   607   STEP(190, "(printing current compile task)" )
   563 
   608 
   564      // signal no, signal code, address that caused the fault
   609      if (_verbose && _thread && _thread->is_Compiler_thread()) {
   565      if (_verbose && _siginfo) {
   610         CompilerThread* t = (CompilerThread*)_thread;
   566        os::print_siginfo(st, _siginfo);
   611         if (t->task()) {
   567        st->cr();
   612            st->cr();
   568      }
   613            st->print_cr("Current CompileTask:");
   569 
   614            t->task()->print_line_on_error(st, buf, sizeof(buf));
   570   STEP(100, "(printing registers, top of stack, instructions near pc)")
   615            st->cr();
   571 
   616         }
   572      // registers, top of stack, instructions near pc
   617      }
   573      if (_verbose && _context) {
   618 
   574        os::print_context(st, _context);
   619 
   575        st->cr();
   620   STEP(200, "(printing stack bounds)" )
   576      }
       
   577 
       
   578   STEP(105, "(printing register info)")
       
   579 
       
   580      // decode register contents if possible
       
   581      if (_verbose && _context && Universe::is_fully_initialized()) {
       
   582        os::print_register_info(st, _context);
       
   583        st->cr();
       
   584      }
       
   585 
       
   586   STEP(110, "(printing stack bounds)" )
       
   587 
   621 
   588      if (_verbose) {
   622      if (_verbose) {
   589        st->print("Stack: ");
   623        st->print("Stack: ");
   590 
   624 
   591        address stack_top;
   625        address stack_top;
   612        }
   646        }
   613 
   647 
   614        st->cr();
   648        st->cr();
   615      }
   649      }
   616 
   650 
   617   STEP(120, "(printing native stack)" )
   651   STEP(210, "(printing native stack)" )
   618 
   652 
   619    if (_verbose) {
   653    if (_verbose) {
   620      if (os::platform_print_native_stack(st, _context, buf, sizeof(buf))) {
   654      if (os::platform_print_native_stack(st, _context, buf, sizeof(buf))) {
   621        // We have printed the native stack in platform-specific code
   655        // We have printed the native stack in platform-specific code
   622        // Windows/x64 needs special handling.
   656        // Windows/x64 needs special handling.
   626 
   660 
   627        print_native_stack(st, fr, _thread, buf, sizeof(buf));
   661        print_native_stack(st, fr, _thread, buf, sizeof(buf));
   628      }
   662      }
   629    }
   663    }
   630 
   664 
   631   STEP(130, "(printing Java stack)" )
   665   STEP(220, "(printing Java stack)" )
   632 
   666 
   633      if (_verbose && _thread && _thread->is_Java_thread()) {
   667      if (_verbose && _thread && _thread->is_Java_thread()) {
   634        print_stack_trace(st, (JavaThread*)_thread, buf, sizeof(buf));
   668        print_stack_trace(st, (JavaThread*)_thread, buf, sizeof(buf));
   635      }
   669      }
   636 
   670 
   637   STEP(135, "(printing target Java thread stack)" )
   671   STEP(230, "(printing target Java thread stack)" )
   638 
   672 
   639      // printing Java thread stack trace if it is involved in GC crash
   673      // printing Java thread stack trace if it is involved in GC crash
   640      if (_verbose && _thread && (_thread->is_Named_thread())) {
   674      if (_verbose && _thread && (_thread->is_Named_thread())) {
   641        JavaThread*  jt = ((NamedThread *)_thread)->processed_thread();
   675        JavaThread*  jt = ((NamedThread *)_thread)->processed_thread();
   642        if (jt != NULL) {
   676        if (jt != NULL) {
   643          st->print_cr("JavaThread " PTR_FORMAT " (nid = " UINTX_FORMAT ") was being processed", jt, jt->osthread()->thread_id());
   677          st->print_cr("JavaThread " PTR_FORMAT " (nid = " UINTX_FORMAT ") was being processed", jt, jt->osthread()->thread_id());
   644          print_stack_trace(st, jt, buf, sizeof(buf), true);
   678          print_stack_trace(st, jt, buf, sizeof(buf), true);
   645        }
   679        }
   646      }
   680      }
   647 
   681 
   648   STEP(140, "(printing VM operation)" )
   682   STEP(240, "(printing siginfo)" )
       
   683 
       
   684      // signal no, signal code, address that caused the fault
       
   685      if (_verbose && _siginfo) {
       
   686        st->cr();
       
   687        os::print_siginfo(st, _siginfo);
       
   688        st->cr();
       
   689      }
       
   690 
       
   691   STEP(250, "(printing register info)")
       
   692 
       
   693      // decode register contents if possible
       
   694      if (_verbose && _context && Universe::is_fully_initialized()) {
       
   695        os::print_register_info(st, _context);
       
   696        st->cr();
       
   697      }
       
   698 
       
   699   STEP(260, "(printing registers, top of stack, instructions near pc)")
       
   700 
       
   701      // registers, top of stack, instructions near pc
       
   702      if (_verbose && _context) {
       
   703        os::print_context(st, _context);
       
   704        st->cr();
       
   705      }
       
   706 
       
   707   STEP(270, "(printing VM operation)" )
   649 
   708 
   650      if (_verbose && _thread && _thread->is_VM_thread()) {
   709      if (_verbose && _thread && _thread->is_VM_thread()) {
   651         VMThread* t = (VMThread*)_thread;
   710         VMThread* t = (VMThread*)_thread;
   652         VM_Operation* op = t->vm_operation();
   711         VM_Operation* op = t->vm_operation();
   653         if (op) {
   712         if (op) {
   655           st->cr();
   714           st->cr();
   656           st->cr();
   715           st->cr();
   657         }
   716         }
   658      }
   717      }
   659 
   718 
   660   STEP(150, "(printing current compile task)" )
   719   STEP(280, "(printing process)" )
   661 
       
   662      if (_verbose && _thread && _thread->is_Compiler_thread()) {
       
   663         CompilerThread* t = (CompilerThread*)_thread;
       
   664         if (t->task()) {
       
   665            st->cr();
       
   666            st->print_cr("Current CompileTask:");
       
   667            t->task()->print_line_on_error(st, buf, sizeof(buf));
       
   668            st->cr();
       
   669         }
       
   670      }
       
   671 
       
   672   STEP(160, "(printing process)" )
       
   673 
   720 
   674      if (_verbose) {
   721      if (_verbose) {
   675        st->cr();
   722        st->cr();
   676        st->print_cr("---------------  P R O C E S S  ---------------");
   723        st->print_cr("---------------  P R O C E S S  ---------------");
   677        st->cr();
   724        st->cr();
   678      }
   725      }
   679 
   726 
   680   STEP(170, "(printing all threads)" )
   727   STEP(290, "(printing all threads)" )
   681 
   728 
   682      // all threads
   729      // all threads
   683      if (_verbose && _thread) {
   730      if (_verbose && _thread) {
   684        Threads::print_on_error(st, _thread, buf, sizeof(buf));
   731        Threads::print_on_error(st, _thread, buf, sizeof(buf));
   685        st->cr();
   732        st->cr();
   686      }
   733      }
   687 
   734 
   688   STEP(175, "(printing VM state)" )
   735   STEP(300, "(printing VM state)" )
   689 
   736 
   690      if (_verbose) {
   737      if (_verbose) {
   691        // Safepoint state
   738        // Safepoint state
   692        st->print("VM state:");
   739        st->print("VM state:");
   693 
   740 
   705        }
   752        }
   706        st->cr();
   753        st->cr();
   707        st->cr();
   754        st->cr();
   708      }
   755      }
   709 
   756 
   710   STEP(180, "(printing owned locks on error)" )
   757   STEP(310, "(printing owned locks on error)" )
   711 
   758 
   712      // mutexes/monitors that currently have an owner
   759      // mutexes/monitors that currently have an owner
   713      if (_verbose) {
   760      if (_verbose) {
   714        print_owned_locks_on_error(st);
   761        print_owned_locks_on_error(st);
   715        st->cr();
   762        st->cr();
   716      }
   763      }
   717 
   764 
   718   STEP(182, "(printing number of OutOfMemoryError and StackOverflow exceptions)")
   765   STEP(320, "(printing number of OutOfMemoryError and StackOverflow exceptions)")
   719 
   766 
   720      if (_verbose && Exceptions::has_exception_counts()) {
   767      if (_verbose && Exceptions::has_exception_counts()) {
   721        st->print_cr("OutOfMemory and StackOverflow Exception counts:");
   768        st->print_cr("OutOfMemory and StackOverflow Exception counts:");
   722        Exceptions::print_exception_counts_on_error(st);
   769        Exceptions::print_exception_counts_on_error(st);
   723        st->cr();
   770        st->cr();
   724      }
   771      }
   725 
   772 
   726   STEP(185, "(printing compressed oops mode")
   773   STEP(330, "(printing compressed oops mode")
   727 
   774 
   728      if (_verbose && UseCompressedOops) {
   775      if (_verbose && UseCompressedOops) {
   729        Universe::print_compressed_oops_mode(st);
   776        Universe::print_compressed_oops_mode(st);
   730        if (UseCompressedClassPointers) {
   777        if (UseCompressedClassPointers) {
   731          Metaspace::print_compressed_class_space(st);
   778          Metaspace::print_compressed_class_space(st);
   732        }
   779        }
   733        st->cr();
   780        st->cr();
   734      }
   781      }
   735 
   782 
   736   STEP(190, "(printing heap information)" )
   783   STEP(340, "(printing heap information)" )
   737 
   784 
   738      if (_verbose && Universe::is_fully_initialized()) {
   785      if (_verbose && Universe::is_fully_initialized()) {
   739        Universe::heap()->print_on_error(st);
   786        Universe::heap()->print_on_error(st);
   740        st->cr();
   787        st->cr();
   741 
   788 
   742        st->print_cr("Polling page: " INTPTR_FORMAT, os::get_polling_page());
   789        st->print_cr("Polling page: " INTPTR_FORMAT, os::get_polling_page());
   743        st->cr();
   790        st->cr();
   744      }
   791      }
   745 
   792 
   746   STEP(195, "(printing code cache information)" )
   793   STEP(350, "(printing code cache information)" )
   747 
   794 
   748      if (_verbose && Universe::is_fully_initialized()) {
   795      if (_verbose && Universe::is_fully_initialized()) {
   749        // print code cache information before vm abort
   796        // print code cache information before vm abort
   750        CodeCache::print_summary(st);
   797        CodeCache::print_summary(st);
   751        st->cr();
   798        st->cr();
   752      }
   799      }
   753 
   800 
   754   STEP(200, "(printing ring buffers)" )
   801   STEP(360, "(printing ring buffers)" )
   755 
   802 
   756      if (_verbose) {
   803      if (_verbose) {
   757        Events::print_all(st);
   804        Events::print_all(st);
   758        st->cr();
   805        st->cr();
   759      }
   806      }
   760 
   807 
   761   STEP(205, "(printing dynamic libraries)" )
   808   STEP(370, "(printing dynamic libraries)" )
   762 
   809 
   763      if (_verbose) {
   810      if (_verbose) {
   764        // dynamic libraries, or memory map
   811        // dynamic libraries, or memory map
   765        os::print_dll_info(st);
   812        os::print_dll_info(st);
   766        st->cr();
   813        st->cr();
   767      }
   814      }
   768 
   815 
   769   STEP(210, "(printing VM options)" )
   816   STEP(380, "(printing VM options)" )
   770 
   817 
   771      if (_verbose) {
   818      if (_verbose) {
   772        // VM options
   819        // VM options
   773        Arguments::print_on(st);
   820        Arguments::print_on(st);
   774        st->cr();
   821        st->cr();
   775      }
   822      }
   776 
   823 
   777   STEP(215, "(printing warning if internal testing API used)" )
   824   STEP(390, "(printing warning if internal testing API used)" )
   778 
   825 
   779      if (WhiteBox::used()) {
   826      if (WhiteBox::used()) {
   780        st->print_cr("Unsupported internal testing APIs have been used.");
   827        st->print_cr("Unsupported internal testing APIs have been used.");
   781        st->cr();
   828        st->cr();
   782      }
   829      }
   783 
   830 
   784   STEP(220, "(printing environment variables)" )
   831   STEP(400, "(printing all environment variables)" )
   785 
   832 
   786      if (_verbose) {
   833      if (_verbose) {
   787        os::print_environment_variables(st, env_list);
   834        os::print_environment_variables(st, env_list);
   788        st->cr();
   835        st->cr();
   789      }
   836      }
   790 
   837 
   791   STEP(225, "(printing signal handlers)" )
   838   STEP(410, "(printing signal handlers)" )
   792 
   839 
   793      if (_verbose) {
   840      if (_verbose) {
   794        os::print_signal_handlers(st, buf, sizeof(buf));
   841        os::print_signal_handlers(st, buf, sizeof(buf));
   795        st->cr();
   842        st->cr();
   796      }
   843      }
   797 
   844 
   798   STEP(228, "(Native Memory Tracking)" )
   845   STEP(420, "(Native Memory Tracking)" )
   799      if (_verbose) {
   846      if (_verbose) {
   800        MemTracker::error_report(st);
   847        MemTracker::error_report(st);
   801      }
   848      }
   802 
   849 
   803   STEP(230, "" )
   850   STEP(430, "(printing system)" )
   804 
   851 
   805      if (_verbose) {
   852      if (_verbose) {
   806        st->cr();
   853        st->cr();
   807        st->print_cr("---------------  S Y S T E M  ---------------");
   854        st->print_cr("---------------  S Y S T E M  ---------------");
   808        st->cr();
   855        st->cr();
   809      }
   856      }
   810 
   857 
   811   STEP(240, "(printing OS information)" )
   858   STEP(440, "(printing OS information)" )
   812 
   859 
   813      if (_verbose) {
   860      if (_verbose) {
   814        os::print_os_info(st);
   861        os::print_os_info(st);
   815        st->cr();
   862        st->cr();
   816      }
   863      }
   817 
   864 
   818   STEP(250, "(printing CPU info)" )
   865   STEP(450, "(printing CPU info)" )
   819      if (_verbose) {
   866      if (_verbose) {
   820        os::print_cpu_info(st, buf, sizeof(buf));
   867        os::print_cpu_info(st, buf, sizeof(buf));
   821        st->cr();
   868        st->cr();
   822      }
   869      }
   823 
   870 
   824   STEP(260, "(printing memory info)" )
   871   STEP(460, "(printing memory info)" )
   825 
   872 
   826      if (_verbose) {
   873      if (_verbose) {
   827        os::print_memory_info(st);
   874        os::print_memory_info(st);
   828        st->cr();
   875        st->cr();
   829      }
   876      }
   830 
   877 
   831   STEP(270, "(printing internal vm info)" )
   878   STEP(470, "(printing internal vm info)" )
   832 
   879 
   833      if (_verbose) {
   880      if (_verbose) {
   834        st->print_cr("vm_info: %s", Abstract_VM_Version::internal_vm_info_string());
   881        st->print_cr("vm_info: %s", Abstract_VM_Version::internal_vm_info_string());
   835        st->cr();
   882        st->cr();
   836      }
   883      }
   837 
   884 
   838   STEP(280, "(printing date and time)" )
       
   839 
       
   840      if (_verbose) {
       
   841        os::print_date_and_time(st, buf, sizeof(buf));
       
   842        st->cr();
       
   843      }
       
   844 
       
   845 #ifndef PRODUCT
       
   846   // print a defined marker to show that error handling finished correctly.
   885   // print a defined marker to show that error handling finished correctly.
   847   STEP(290, "(printing end marker)" )
   886   STEP(480, "(printing end marker)" )
   848 
   887 
   849      if (_verbose) {
   888      if (_verbose) {
   850        st->print_cr("END.");
   889        st->print_cr("END.");
   851      }
   890      }
   852 #endif
       
   853 
   891 
   854   END
   892   END
   855 
   893 
   856 # undef BEGIN
   894 # undef BEGIN
   857 # undef STEP
   895 # undef STEP