comparison src/share/vm/utilities/vmError.cpp @ 18009:f73af4455d7d

Merge
author asaha
date Thu, 29 May 2014 09:56:06 -0700
parents 364b73402247 78bbf4d43a14
children 52b4284cb496 d22136881b85 d7b6bdd51abe
comparison
equal deleted inserted replaced
18008:da65bbf6f89e 18009:f73af4455d7d
39 #include "utilities/defaultStream.hpp" 39 #include "utilities/defaultStream.hpp"
40 #include "utilities/errorReporter.hpp" 40 #include "utilities/errorReporter.hpp"
41 #include "utilities/events.hpp" 41 #include "utilities/events.hpp"
42 #include "utilities/top.hpp" 42 #include "utilities/top.hpp"
43 #include "utilities/vmError.hpp" 43 #include "utilities/vmError.hpp"
44
45 PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC
44 46
45 // List of environment variables that should be reported in error log file. 47 // List of environment variables that should be reported in error log file.
46 const char *env_list[] = { 48 const char *env_list[] = {
47 // All platforms 49 // All platforms
48 "JAVA_HOME", "JRE_HOME", "JAVA_TOOL_OPTIONS", "_JAVA_OPTIONS", "CLASSPATH", 50 "JAVA_HOME", "JRE_HOME", "JAVA_TOOL_OPTIONS", "_JAVA_OPTIONS", "CLASSPATH",
356 if (_size) { 358 if (_size) {
357 st->print("# Native memory allocation "); 359 st->print("# Native memory allocation ");
358 st->print((_id == (int)OOM_MALLOC_ERROR) ? "(malloc) failed to allocate " : 360 st->print((_id == (int)OOM_MALLOC_ERROR) ? "(malloc) failed to allocate " :
359 "(mmap) failed to map "); 361 "(mmap) failed to map ");
360 jio_snprintf(buf, sizeof(buf), SIZE_FORMAT, _size); 362 jio_snprintf(buf, sizeof(buf), SIZE_FORMAT, _size);
361 st->print(buf); 363 st->print("%s", buf);
362 st->print(" bytes"); 364 st->print(" bytes");
363 if (_message != NULL) { 365 if (_message != NULL) {
364 st->print(" for "); 366 st->print(" for ");
365 st->print(_message); 367 st->print("%s", _message);
366 } 368 }
367 st->cr(); 369 st->cr();
368 } else { 370 } else {
369 if (_message != NULL) 371 if (_message != NULL)
370 st->print("# "); 372 st->print("# ");
371 st->print_cr(_message); 373 st->print_cr("%s", _message);
372 } 374 }
373 // In error file give some solutions 375 // In error file give some solutions
374 if (_verbose) { 376 if (_verbose) {
375 st->print_cr("# Possible reasons:"); 377 st->print_cr("# Possible reasons:");
376 st->print_cr("# The system is out of physical RAM or swap space"); 378 st->print_cr("# The system is out of physical RAM or swap space");
483 if (coredump_status) { 485 if (coredump_status) {
484 st->print("Core dump written. Default location: %s", coredump_message); 486 st->print("Core dump written. Default location: %s", coredump_message);
485 } else { 487 } else {
486 st->print("Failed to write core dump. %s", coredump_message); 488 st->print("Failed to write core dump. %s", coredump_message);
487 } 489 }
488 st->print_cr(""); 490 st->cr();
489 st->print_cr("#"); 491 st->print_cr("#");
490 492
491 STEP(65, "(printing bug submit message)") 493 STEP(65, "(printing bug submit message)")
492 494
493 if (should_report_bug(_id) && _verbose) { 495 if (should_report_bug(_id) && _verbose) {