< prev index next >

src/hotspot/share/utilities/vmError.cpp

Print this page
rev 47400 : [mq]: cmpxchg_ptr


1252 {
1253   // Don't allocate large buffer on stack
1254   static char buffer[O_BUFLEN];
1255   out.set_scratch_buffer(buffer, sizeof(buffer));
1256   log.set_scratch_buffer(buffer, sizeof(buffer));
1257 
1258   // How many errors occurred in error handler when reporting first_error.
1259   static int recursive_error_count;
1260 
1261   // We will first print a brief message to standard out (verbose = false),
1262   // then save detailed information in log file (verbose = true).
1263   static bool out_done = false;         // done printing to standard out
1264   static bool log_done = false;         // done saving error log
1265   static bool transmit_report_done = false; // done error reporting
1266 
1267   if (SuppressFatalErrorMessage) {
1268       os::abort(CreateCoredumpOnCrash);
1269   }
1270   intptr_t mytid = os::current_thread_id();
1271   if (first_error_tid == -1 &&
1272       Atomic::cmpxchg_ptr(mytid, &first_error_tid, -1) == -1) {
1273 
1274     // Initialize time stamps to use the same base.
1275     out.time_stamp().update_to(1);
1276     log.time_stamp().update_to(1);
1277 
1278     _id = id;
1279     _message = message;
1280     _thread = thread;
1281     _pc = pc;
1282     _siginfo = siginfo;
1283     _context = context;
1284     _filename = filename;
1285     _lineno = lineno;
1286     _size = size;
1287     jio_vsnprintf(_detail_msg, sizeof(_detail_msg), detail_fmt, detail_args);
1288 
1289     // first time
1290     _error_reported = true;
1291 
1292     reporting_started();




1252 {
1253   // Don't allocate large buffer on stack
1254   static char buffer[O_BUFLEN];
1255   out.set_scratch_buffer(buffer, sizeof(buffer));
1256   log.set_scratch_buffer(buffer, sizeof(buffer));
1257 
1258   // How many errors occurred in error handler when reporting first_error.
1259   static int recursive_error_count;
1260 
1261   // We will first print a brief message to standard out (verbose = false),
1262   // then save detailed information in log file (verbose = true).
1263   static bool out_done = false;         // done printing to standard out
1264   static bool log_done = false;         // done saving error log
1265   static bool transmit_report_done = false; // done error reporting
1266 
1267   if (SuppressFatalErrorMessage) {
1268       os::abort(CreateCoredumpOnCrash);
1269   }
1270   intptr_t mytid = os::current_thread_id();
1271   if (first_error_tid == -1 &&
1272       Atomic::cmpxchg(mytid, &first_error_tid, (intptr_t)-1) == -1) {
1273 
1274     // Initialize time stamps to use the same base.
1275     out.time_stamp().update_to(1);
1276     log.time_stamp().update_to(1);
1277 
1278     _id = id;
1279     _message = message;
1280     _thread = thread;
1281     _pc = pc;
1282     _siginfo = siginfo;
1283     _context = context;
1284     _filename = filename;
1285     _lineno = lineno;
1286     _size = size;
1287     jio_vsnprintf(_detail_msg, sizeof(_detail_msg), detail_fmt, detail_args);
1288 
1289     // first time
1290     _error_reported = true;
1291 
1292     reporting_started();


< prev index next >