hotspot/src/share/vm/utilities/vmError.cpp
changeset 37113 5a33bf5089ac
parent 36320 3d35d1e1dfde
child 37466 287c4ebd11b0
equal deleted inserted replaced
37111:98572401ab0a 37113:5a33bf5089ac
  1258           fileStream replay_data_stream(replay_data_file, /*need_close=*/true);
  1258           fileStream replay_data_stream(replay_data_file, /*need_close=*/true);
  1259           env->dump_replay_data_unsafe(&replay_data_stream);
  1259           env->dump_replay_data_unsafe(&replay_data_stream);
  1260           out.print_raw("#\n# Compiler replay data is saved as:\n# ");
  1260           out.print_raw("#\n# Compiler replay data is saved as:\n# ");
  1261           out.print_raw_cr(buffer);
  1261           out.print_raw_cr(buffer);
  1262         } else {
  1262         } else {
       
  1263           int e = errno;
  1263           out.print_raw("#\n# Can't open file to dump replay data. Error: ");
  1264           out.print_raw("#\n# Can't open file to dump replay data. Error: ");
  1264           out.print_raw_cr(strerror(os::get_last_error()));
  1265           out.print_raw_cr(os::strerror(e));
  1265         }
  1266         }
  1266       }
  1267       }
  1267     }
  1268     }
  1268   }
  1269   }
  1269 
  1270 
  1299       out.print_raw   ("\"");
  1300       out.print_raw   ("\"");
  1300       out.print_raw   (cmd);
  1301       out.print_raw   (cmd);
  1301       out.print_raw_cr("\" ...");
  1302       out.print_raw_cr("\" ...");
  1302 
  1303 
  1303       if (os::fork_and_exec(cmd) < 0) {
  1304       if (os::fork_and_exec(cmd) < 0) {
  1304         out.print_cr("os::fork_and_exec failed: %s (%d)", strerror(errno), errno);
  1305         out.print_cr("os::fork_and_exec failed: %s (%s=%d)",
       
  1306                      os::strerror(errno), os::errno_name(errno), errno);
  1305       }
  1307       }
  1306     }
  1308     }
  1307 
  1309 
  1308     // done with OnError
  1310     // done with OnError
  1309     OnError = NULL;
  1311     OnError = NULL;
  1357     tty->print  ("/usr/bin/sh -c ");
  1359     tty->print  ("/usr/bin/sh -c ");
  1358 #endif
  1360 #endif
  1359     tty->print_cr("\"%s\"...", cmd);
  1361     tty->print_cr("\"%s\"...", cmd);
  1360 
  1362 
  1361     if (os::fork_and_exec(cmd) < 0) {
  1363     if (os::fork_and_exec(cmd) < 0) {
  1362       tty->print_cr("os::fork_and_exec failed: %s (%d)", strerror(errno), errno);
  1364       tty->print_cr("os::fork_and_exec failed: %s (%s=%d)",
       
  1365                      os::strerror(errno), os::errno_name(errno), errno);
  1363     }
  1366     }
  1364   }
  1367   }
  1365 }
  1368 }
  1366 
  1369 
  1367 void VMError::report_java_out_of_memory(const char* message) {
  1370 void VMError::report_java_out_of_memory(const char* message) {