< prev index next >

src/share/vm/utilities/vmError.cpp

Print this page




 261     st->print_cr("#   Use 64 bit Java on a 64 bit OS");
 262   }
 263   st->print_cr("#   Decrease Java heap size (-Xmx/-Xms)");
 264   st->print_cr("#   Decrease number of Java threads");
 265   st->print_cr("#   Decrease Java thread stack sizes (-Xss)");
 266   st->print_cr("#   Set larger code cache with -XX:ReservedCodeCacheSize=");
 267   if (UseCompressedOops) {
 268     switch (Universe::narrow_oop_mode()) {
 269       case Universe::UnscaledNarrowOop:
 270         st->print_cr("#   JVM is running with Unscaled Compressed Oops mode in which the Java heap is");
 271         st->print_cr("#     placed in the first 4GB address space. The Java Heap base address is the");
 272         st->print_cr("#     maximum limit for the native heap growth. Please use -XX:HeapBaseMinAddress");
 273         st->print_cr("#     to set the Java Heap base and to place the Java Heap above 4GB virtual address.");
 274         break;
 275       case Universe::ZeroBasedNarrowOop:
 276         st->print_cr("#   JVM is running with Zero Based Compressed Oops mode in which the Java heap is");
 277         st->print_cr("#     placed in the first 32GB address space. The Java Heap base address is the");
 278         st->print_cr("#     maximum limit for the native heap growth. Please use -XX:HeapBaseMinAddress");
 279         st->print_cr("#     to set the Java Heap base and to place the Java Heap above 32GB virtual address.");
 280         break;


 281     }
 282   }
 283   st->print_cr("# This output file may be truncated or incomplete.");
 284 }
 285 
 286 static const char* gc_mode() {
 287   if (UseG1GC)            return "g1 gc";
 288   if (UseParallelGC)      return "parallel gc";
 289   if (UseConcMarkSweepGC) return "concurrent mark sweep gc";
 290   if (UseSerialGC)        return "serial gc";
 291   return "ERROR in GC mode";
 292 }
 293 
 294 static void report_vm_version(outputStream* st, char* buf, int buflen) {
 295    // VM version
 296    st->print_cr("#");
 297    JDK_Version::current().to_string(buf, buflen);
 298    const char* runtime_name = JDK_Version::runtime_name() != NULL ?
 299                                 JDK_Version::runtime_name() : "";
 300    const char* runtime_version = JDK_Version::runtime_version() != NULL ?


1296       out.print_raw_cr(msgbuf);
1297 
1298       // error reporting is not MT-safe, block current thread
1299       os::infinite_sleep();
1300 
1301     } else {
1302       if (recursive_error_count++ > 30) {
1303         out.print_raw_cr("[Too many errors, abort]");
1304         os::die();
1305       }
1306 
1307       outputStream* const st = log.is_open() ? &log : &out;
1308       st->cr();
1309 
1310       // Timeout handling.
1311       if (_step_did_timeout) {
1312         // The current step had a timeout. Lets continue reporting with the next step.
1313         st->print_raw("[timeout occurred during error reporting in step \"");
1314         st->print_raw(_current_step_info);
1315         st->print_cr("\"] after " INT64_FORMAT " s.",
1316           (get_current_timestamp() - _step_start_time) / TIMESTAMP_TO_SECONDS_FACTOR);

1317       } else if (_reporting_did_timeout) {
1318         // We hit ErrorLogTimeout. Reporting will stop altogether. Let's wrap things
1319         // up, the process is about to be stopped by the WatcherThread.
1320         st->print_cr("------ Timeout during error reporting after " INT64_FORMAT " s. ------",
1321           (get_current_timestamp() - _reporting_start_time) / TIMESTAMP_TO_SECONDS_FACTOR);

1322         st->flush();
1323         // Watcherthread is about to call os::die. Lets just wait.
1324         os::infinite_sleep();
1325       } else {
1326         // Crash or assert during error reporting. Lets continue reporting with the next step.
1327         jio_snprintf(buffer, sizeof(buffer),
1328            "[error occurred during error reporting (%s), id 0x%x]",
1329                    _current_step_info, _id);
1330         st->print_raw_cr(buffer);
1331         st->cr();
1332       }
1333     }
1334   }
1335 
1336   // print to screen
1337   if (!out_done) {
1338     report(&out, false);
1339 
1340     out_done = true;
1341 




 261     st->print_cr("#   Use 64 bit Java on a 64 bit OS");
 262   }
 263   st->print_cr("#   Decrease Java heap size (-Xmx/-Xms)");
 264   st->print_cr("#   Decrease number of Java threads");
 265   st->print_cr("#   Decrease Java thread stack sizes (-Xss)");
 266   st->print_cr("#   Set larger code cache with -XX:ReservedCodeCacheSize=");
 267   if (UseCompressedOops) {
 268     switch (Universe::narrow_oop_mode()) {
 269       case Universe::UnscaledNarrowOop:
 270         st->print_cr("#   JVM is running with Unscaled Compressed Oops mode in which the Java heap is");
 271         st->print_cr("#     placed in the first 4GB address space. The Java Heap base address is the");
 272         st->print_cr("#     maximum limit for the native heap growth. Please use -XX:HeapBaseMinAddress");
 273         st->print_cr("#     to set the Java Heap base and to place the Java Heap above 4GB virtual address.");
 274         break;
 275       case Universe::ZeroBasedNarrowOop:
 276         st->print_cr("#   JVM is running with Zero Based Compressed Oops mode in which the Java heap is");
 277         st->print_cr("#     placed in the first 32GB address space. The Java Heap base address is the");
 278         st->print_cr("#     maximum limit for the native heap growth. Please use -XX:HeapBaseMinAddress");
 279         st->print_cr("#     to set the Java Heap base and to place the Java Heap above 32GB virtual address.");
 280         break;
 281       default:
 282         break;
 283     }
 284   }
 285   st->print_cr("# This output file may be truncated or incomplete.");
 286 }
 287 
 288 static const char* gc_mode() {
 289   if (UseG1GC)            return "g1 gc";
 290   if (UseParallelGC)      return "parallel gc";
 291   if (UseConcMarkSweepGC) return "concurrent mark sweep gc";
 292   if (UseSerialGC)        return "serial gc";
 293   return "ERROR in GC mode";
 294 }
 295 
 296 static void report_vm_version(outputStream* st, char* buf, int buflen) {
 297    // VM version
 298    st->print_cr("#");
 299    JDK_Version::current().to_string(buf, buflen);
 300    const char* runtime_name = JDK_Version::runtime_name() != NULL ?
 301                                 JDK_Version::runtime_name() : "";
 302    const char* runtime_version = JDK_Version::runtime_version() != NULL ?


1298       out.print_raw_cr(msgbuf);
1299 
1300       // error reporting is not MT-safe, block current thread
1301       os::infinite_sleep();
1302 
1303     } else {
1304       if (recursive_error_count++ > 30) {
1305         out.print_raw_cr("[Too many errors, abort]");
1306         os::die();
1307       }
1308 
1309       outputStream* const st = log.is_open() ? &log : &out;
1310       st->cr();
1311 
1312       // Timeout handling.
1313       if (_step_did_timeout) {
1314         // The current step had a timeout. Lets continue reporting with the next step.
1315         st->print_raw("[timeout occurred during error reporting in step \"");
1316         st->print_raw(_current_step_info);
1317         st->print_cr("\"] after " INT64_FORMAT " s.",
1318                      (int64_t)
1319                      ((get_current_timestamp() - _step_start_time) / TIMESTAMP_TO_SECONDS_FACTOR));
1320       } else if (_reporting_did_timeout) {
1321         // We hit ErrorLogTimeout. Reporting will stop altogether. Let's wrap things
1322         // up, the process is about to be stopped by the WatcherThread.
1323         st->print_cr("------ Timeout during error reporting after " INT64_FORMAT " s. ------",
1324                      (int64_t)
1325                      ((get_current_timestamp() - _reporting_start_time) / TIMESTAMP_TO_SECONDS_FACTOR));
1326         st->flush();
1327         // Watcherthread is about to call os::die. Lets just wait.
1328         os::infinite_sleep();
1329       } else {
1330         // Crash or assert during error reporting. Lets continue reporting with the next step.
1331         jio_snprintf(buffer, sizeof(buffer),
1332            "[error occurred during error reporting (%s), id 0x%x]",
1333                    _current_step_info, _id);
1334         st->print_raw_cr(buffer);
1335         st->cr();
1336       }
1337     }
1338   }
1339 
1340   // print to screen
1341   if (!out_done) {
1342     report(&out, false);
1343 
1344     out_done = true;
1345 


< prev index next >