< prev index next >

src/hotspot/share/utilities/vmError.cpp

Updates after review: renamed event, removed status field

8041626: Shutdown tracing event

1287     // first time                                                                                                          
1288     _error_reported = true;                                                                                                
1289 
1290     reporting_started();                                                                                                   
1291     record_reporting_start_time();                                                                                         
1292 
1293     if (ShowMessageBoxOnError || PauseAtExit) {                                                                            
1294       show_message_box(buffer, sizeof(buffer));                                                                            
1295 
1296       // User has asked JVM to abort. Reset ShowMessageBoxOnError so the                                                   
1297       // WatcherThread can kill JVM if the error handler hangs.                                                            
1298       ShowMessageBoxOnError = false;                                                                                       
1299     }                                                                                                                      
1300 
1301     os::check_dump_limit(buffer, sizeof(buffer));                                                                          
1302 
1303     // reset signal handlers or exception filter; make sure recursive crashes                                              
1304     // are handled properly.                                                                                               
1305     reset_signal_handlers();                                                                                               
1306 
                                                                                                                           
                                                                                                                           
                                                                                                                           
                                                                                                                           
                                                                                                                           
                                                                                                                           
1307     TRACE_VM_ERROR();                                                                                                      
1308 
1309   } else {                                                                                                                 
1310     // If UseOsErrorReporting we call this for each level of the call stack                                                
1311     // while searching for the exception handler.  Only the first level needs                                              
1312     // to be reported.                                                                                                     
1313     if (UseOSErrorReporting && log_done) return;                                                                           
1314 
1315     // This is not the first error, see if it happened in a different thread                                               
1316     // or in the same thread during error reporting.                                                                       
1317     if (first_error_tid != mytid) {                                                                                        
1318       char msgbuf[64];                                                                                                     
1319       jio_snprintf(msgbuf, sizeof(msgbuf),                                                                                 
1320                    "[thread " INTX_FORMAT " also had an error]",                                                           
1321                    mytid);                                                                                                 
1322       out.print_raw_cr(msgbuf);                                                                                            
1323 
1324       // error reporting is not MT-safe, block current thread                                                              
1325       os::infinite_sleep();                                                                                                

1287     // first time
1288     _error_reported = true;
1289 
1290     reporting_started();
1291     record_reporting_start_time();
1292 
1293     if (ShowMessageBoxOnError || PauseAtExit) {
1294       show_message_box(buffer, sizeof(buffer));
1295 
1296       // User has asked JVM to abort. Reset ShowMessageBoxOnError so the
1297       // WatcherThread can kill JVM if the error handler hangs.
1298       ShowMessageBoxOnError = false;
1299     }
1300 
1301     os::check_dump_limit(buffer, sizeof(buffer));
1302 
1303     // reset signal handlers or exception filter; make sure recursive crashes
1304     // are handled properly.
1305     reset_signal_handlers();
1306 
1307     EventShutdown e;
1308     if (e.should_commit()) {
1309       e.set_reason("VM Error");
1310       e.commit();
1311     }
1312 
1313     TRACE_VM_ERROR();
1314 
1315   } else {
1316     // If UseOsErrorReporting we call this for each level of the call stack
1317     // while searching for the exception handler.  Only the first level needs
1318     // to be reported.
1319     if (UseOSErrorReporting && log_done) return;
1320 
1321     // This is not the first error, see if it happened in a different thread
1322     // or in the same thread during error reporting.
1323     if (first_error_tid != mytid) {
1324       char msgbuf[64];
1325       jio_snprintf(msgbuf, sizeof(msgbuf),
1326                    "[thread " INTX_FORMAT " also had an error]",
1327                    mytid);
1328       out.print_raw_cr(msgbuf);
1329 
1330       // error reporting is not MT-safe, block current thread
1331       os::infinite_sleep();
< prev index next >