< prev index next >

src/hotspot/share/utilities/vmError.hpp

Print this page




  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);


 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   NOT_PRODUCT(static void controlled_crash(int how);)
 196 
 197   // returns an address which is guaranteed to generate a SIGSEGV on read,
 198   // for test purposes, which is not NULL and contains bits in every word
 199   static void* get_segfault_address();
 200 };
 201 #endif // SHARE_VM_UTILITIES_VMERROR_HPP


  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   // Whether fork and exec should call fork/vfork
  92   static bool _vfork_mode;
  93 
  94  public:
  95 
  96   // set signal handlers on Solaris/Linux or the default exception filter
  97   // on Windows, to handle recursive crashes.
  98   static void reset_signal_handlers();
  99 
 100   // handle -XX:+ShowMessageBoxOnError. buf is used to format the message string
 101   static void show_message_box(char* buf, int buflen);
 102 
 103   // generate an error report
 104   static void report(outputStream* st, bool verbose);
 105 
 106   // generate a stack trace
 107   static void print_stack_trace(outputStream* st, JavaThread* jt,
 108                                 char* buf, int buflen, bool verbose = false);
 109 
 110   // public for use by the internal non-product debugger.
 111   NOT_PRODUCT(public:)
 112   static void print_native_stack(outputStream* st, frame fr, Thread* t,
 113                                  char* buf, int buf_size);


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