< prev index next >

src/share/vm/utilities/vmError.hpp

Print this page




  69 
  70   // Core dump status, false if we have been unable to write a core/minidump for some reason
  71   static bool coredump_status;
  72 
  73   // When coredump_status is set to true this will contain the name/path to the core/minidump,
  74   // if coredump_status if false, this will (hopefully) contain a useful error explaining why
  75   // no core/minidump has been written to disk
  76   static char coredump_message[O_BUFLEN];
  77 
  78   // Timeout handling:
  79   // Timestamp at which error reporting started; -1 if no error reporting in progress.
  80   static volatile jlong _reporting_start_time;
  81   // Whether or not error reporting did timeout.
  82   static volatile bool _reporting_did_timeout;
  83   // Timestamp at which the last error reporting step started; -1 if no error reporting
  84   //   in progress.
  85   static volatile jlong _step_start_time;
  86   // Whether or not the last error reporting step did timeout.
  87   static volatile bool _step_did_timeout;
  88 




  89   // set signal handlers on Solaris/Linux or the default exception filter
  90   // on Windows, to handle recursive crashes.
  91   static void reset_signal_handlers();
  92 
  93   // handle -XX:+ShowMessageBoxOnError. buf is used to format the message string
  94   static void show_message_box(char* buf, int buflen);
  95 
  96   // generate an error report
  97   static void report(outputStream* st, bool verbose);
  98 
  99   // generate a stack trace
 100   static void print_stack_trace(outputStream* st, JavaThread* jt,
 101                                 char* buf, int buflen, bool verbose = false);
 102 
 103   // public for use by the internal non-product debugger.
 104   NOT_PRODUCT(public:)
 105   static void print_native_stack(outputStream* st, frame fr, Thread* t,
 106                                  char* buf, int buf_size);
 107   NOT_PRODUCT(private:)
 108 


 166   // reporting OutOfMemoryError
 167   static void report_java_out_of_memory(const char* message);
 168 
 169   // returns original flags for signal, if it was resetted, or -1 if
 170   // signal was not changed by error reporter
 171   static int get_resetted_sigflags(int sig);
 172 
 173   // returns original handler for signal, if it was resetted, or NULL if
 174   // signal was not changed by error reporter
 175   static address get_resetted_sighandler(int sig);
 176 
 177   // check to see if fatal error reporting is in progress
 178   static bool fatal_error_in_progress() { return first_error_tid != -1; }
 179 
 180   static intptr_t get_first_error_tid() { return first_error_tid; }
 181 
 182   // Called by the WatcherThread to check if error reporting has timed-out.
 183   //  Returns true if error reporting has not completed within the ErrorLogTimeout limit.
 184   static bool check_timeout();
 185 
 186 };

 187 







 188 #endif // SHARE_VM_UTILITIES_VMERROR_HPP


  69 
  70   // Core dump status, false if we have been unable to write a core/minidump for some reason
  71   static bool coredump_status;
  72 
  73   // When coredump_status is set to true this will contain the name/path to the core/minidump,
  74   // if coredump_status if false, this will (hopefully) contain a useful error explaining why
  75   // no core/minidump has been written to disk
  76   static char coredump_message[O_BUFLEN];
  77 
  78   // Timeout handling:
  79   // Timestamp at which error reporting started; -1 if no error reporting in progress.
  80   static volatile jlong _reporting_start_time;
  81   // Whether or not error reporting did timeout.
  82   static volatile bool _reporting_did_timeout;
  83   // Timestamp at which the last error reporting step started; -1 if no error reporting
  84   //   in progress.
  85   static volatile jlong _step_start_time;
  86   // Whether or not the last error reporting step did timeout.
  87   static volatile bool _step_did_timeout;
  88 
  89   static bool _error_reported;
  90 
  91  public:
  92 
  93   // set signal handlers on Solaris/Linux or the default exception filter
  94   // on Windows, to handle recursive crashes.
  95   static void reset_signal_handlers();
  96 
  97   // handle -XX:+ShowMessageBoxOnError. buf is used to format the message string
  98   static void show_message_box(char* buf, int buflen);
  99 
 100   // generate an error report
 101   static void report(outputStream* st, bool verbose);
 102 
 103   // generate a stack trace
 104   static void print_stack_trace(outputStream* st, JavaThread* jt,
 105                                 char* buf, int buflen, bool verbose = false);
 106 
 107   // public for use by the internal non-product debugger.
 108   NOT_PRODUCT(public:)
 109   static void print_native_stack(outputStream* st, frame fr, Thread* t,
 110                                  char* buf, int buf_size);
 111   NOT_PRODUCT(private:)
 112 


 170   // reporting OutOfMemoryError
 171   static void report_java_out_of_memory(const char* message);
 172 
 173   // returns original flags for signal, if it was resetted, or -1 if
 174   // signal was not changed by error reporter
 175   static int get_resetted_sigflags(int sig);
 176 
 177   // returns original handler for signal, if it was resetted, or NULL if
 178   // signal was not changed by error reporter
 179   static address get_resetted_sighandler(int sig);
 180 
 181   // check to see if fatal error reporting is in progress
 182   static bool fatal_error_in_progress() { return first_error_tid != -1; }
 183 
 184   static intptr_t get_first_error_tid() { return first_error_tid; }
 185 
 186   // Called by the WatcherThread to check if error reporting has timed-out.
 187   //  Returns true if error reporting has not completed within the ErrorLogTimeout limit.
 188   static bool check_timeout();
 189 
 190   // Support for avoiding multiple asserts
 191   static bool is_error_reported();
 192 
 193   // Test vmassert(), fatal(), guarantee(), etc.
 194   NOT_PRODUCT(static void test_error_handler();)
 195 
 196   // returns an address which is guaranteed to generate a SIGSEGV on read,
 197   // for test purposes, which is not NULL and contains bits in every word
 198   static void* get_segfault_address();
 199 };
 200 #endif // SHARE_VM_UTILITIES_VMERROR_HPP
< prev index next >