< prev index next >

src/hotspot/share/utilities/vmError.cpp

Print this page




1348   fdStream out(fd_out);
1349   out.set_scratch_buffer(buffer, sizeof(buffer));
1350 
1351   // Depending on the re-entrance depth at this point, fd_log may be -1 or point to an open hs-err file.
1352   fdStream log(fd_log);
1353   log.set_scratch_buffer(buffer, sizeof(buffer));
1354 
1355   // How many errors occurred in error handler when reporting first_error.
1356   static int recursive_error_count;
1357 
1358   // We will first print a brief message to standard out (verbose = false),
1359   // then save detailed information in log file (verbose = true).
1360   static bool out_done = false;         // done printing to standard out
1361   static bool log_done = false;         // done saving error log
1362 
1363   if (SuppressFatalErrorMessage) {
1364       os::abort(CreateCoredumpOnCrash);
1365   }
1366   intptr_t mytid = os::current_thread_id();
1367   if (_first_error_tid == -1 &&
1368       Atomic::cmpxchg(mytid, &_first_error_tid, (intptr_t)-1) == -1) {
1369 
1370     // Initialize time stamps to use the same base.
1371     out.time_stamp().update_to(1);
1372     log.time_stamp().update_to(1);
1373 
1374     _id = id;
1375     _message = message;
1376     _thread = thread;
1377     _pc = pc;
1378     _siginfo = siginfo;
1379     _context = context;
1380     _filename = filename;
1381     _lineno = lineno;
1382     _size = size;
1383     jio_vsnprintf(_detail_msg, sizeof(_detail_msg), detail_fmt, detail_args);
1384 
1385     // first time
1386     _error_reported = true;
1387 
1388     reporting_started();




1348   fdStream out(fd_out);
1349   out.set_scratch_buffer(buffer, sizeof(buffer));
1350 
1351   // Depending on the re-entrance depth at this point, fd_log may be -1 or point to an open hs-err file.
1352   fdStream log(fd_log);
1353   log.set_scratch_buffer(buffer, sizeof(buffer));
1354 
1355   // How many errors occurred in error handler when reporting first_error.
1356   static int recursive_error_count;
1357 
1358   // We will first print a brief message to standard out (verbose = false),
1359   // then save detailed information in log file (verbose = true).
1360   static bool out_done = false;         // done printing to standard out
1361   static bool log_done = false;         // done saving error log
1362 
1363   if (SuppressFatalErrorMessage) {
1364       os::abort(CreateCoredumpOnCrash);
1365   }
1366   intptr_t mytid = os::current_thread_id();
1367   if (_first_error_tid == -1 &&
1368       Atomic::cmpxchg(&_first_error_tid, (intptr_t)-1, mytid) == -1) {
1369 
1370     // Initialize time stamps to use the same base.
1371     out.time_stamp().update_to(1);
1372     log.time_stamp().update_to(1);
1373 
1374     _id = id;
1375     _message = message;
1376     _thread = thread;
1377     _pc = pc;
1378     _siginfo = siginfo;
1379     _context = context;
1380     _filename = filename;
1381     _lineno = lineno;
1382     _size = size;
1383     jio_vsnprintf(_detail_msg, sizeof(_detail_msg), detail_fmt, detail_args);
1384 
1385     // first time
1386     _error_reported = true;
1387 
1388     reporting_started();


< prev index next >