comparison src/share/vm/utilities/vmError.cpp @ 20804:7848fc12602b

Merge with jdk8u40-b25
author Gilles Duboscq <gilles.m.duboscq@oracle.com>
date Tue, 07 Apr 2015 14:58:49 +0200
parents 52b4284cb496 42f27b59c550
children 12dcf5ba8b34
comparison
equal deleted inserted replaced
20184:84105dcdb05b 20804:7848fc12602b
20 * or visit www.oracle.com if you need additional information or have any 20 * or visit www.oracle.com if you need additional information or have any
21 * questions. 21 * questions.
22 * 22 *
23 */ 23 */
24 24
25 #include <fcntl.h>
25 #include "precompiled.hpp" 26 #include "precompiled.hpp"
26 #include "compiler/compileBroker.hpp" 27 #include "compiler/compileBroker.hpp"
27 #include "compiler/disassembler.hpp" 28 #include "compiler/disassembler.hpp"
28 #include "gc_interface/collectedHeap.hpp" 29 #include "gc_interface/collectedHeap.hpp"
29 #include "prims/whitebox.hpp" 30 #include "prims/whitebox.hpp"
30 #include "runtime/arguments.hpp" 31 #include "runtime/arguments.hpp"
31 #include "runtime/frame.inline.hpp" 32 #include "runtime/frame.inline.hpp"
32 #include "runtime/init.hpp" 33 #include "runtime/init.hpp"
33 #include "runtime/os.hpp" 34 #include "runtime/os.hpp"
34 #include "runtime/thread.hpp" 35 #include "runtime/thread.inline.hpp"
35 #include "runtime/vmThread.hpp" 36 #include "runtime/vmThread.hpp"
36 #include "runtime/vm_operations.hpp" 37 #include "runtime/vm_operations.hpp"
37 #include "services/memTracker.hpp" 38 #include "services/memTracker.hpp"
38 #include "utilities/debug.hpp" 39 #include "utilities/debug.hpp"
39 #include "utilities/decoder.hpp" 40 #include "utilities/decoder.hpp"
797 if (_verbose) { 798 if (_verbose) {
798 os::print_signal_handlers(st, buf, sizeof(buf)); 799 os::print_signal_handlers(st, buf, sizeof(buf));
799 st->cr(); 800 st->cr();
800 } 801 }
801 802
803 STEP(228, "(Native Memory Tracking)" )
804 if (_verbose) {
805 MemTracker::error_report(st);
806 }
807
802 STEP(230, "" ) 808 STEP(230, "" )
803 809
804 if (_verbose) { 810 if (_verbose) {
805 st->cr(); 811 st->cr();
806 st->print_cr("--------------- S Y S T E M ---------------"); 812 st->print_cr("--------------- S Y S T E M ---------------");
861 867
862 /** Expand a pattern into a buffer starting at pos and open a file using constructed path */ 868 /** Expand a pattern into a buffer starting at pos and open a file using constructed path */
863 static int expand_and_open(const char* pattern, char* buf, size_t buflen, size_t pos) { 869 static int expand_and_open(const char* pattern, char* buf, size_t buflen, size_t pos) {
864 int fd = -1; 870 int fd = -1;
865 if (Arguments::copy_expand_pid(pattern, strlen(pattern), &buf[pos], buflen - pos)) { 871 if (Arguments::copy_expand_pid(pattern, strlen(pattern), &buf[pos], buflen - pos)) {
866 fd = open(buf, O_RDWR | O_CREAT | O_TRUNC, 0666); 872 // the O_EXCL flag will cause the open to fail if the file exists
873 fd = open(buf, O_RDWR | O_CREAT | O_EXCL, 0666);
867 } 874 }
868 return fd; 875 return fd;
869 } 876 }
870 877
871 /** 878 /**
919 // We will first print a brief message to standard out (verbose = false), 926 // We will first print a brief message to standard out (verbose = false),
920 // then save detailed information in log file (verbose = true). 927 // then save detailed information in log file (verbose = true).
921 static bool out_done = false; // done printing to standard out 928 static bool out_done = false; // done printing to standard out
922 static bool log_done = false; // done saving error log 929 static bool log_done = false; // done saving error log
923 static bool transmit_report_done = false; // done error reporting 930 static bool transmit_report_done = false; // done error reporting
924
925 // disble NMT to avoid further exception
926 MemTracker::shutdown(MemTracker::NMT_error_reporting);
927 931
928 if (SuppressFatalErrorMessage) { 932 if (SuppressFatalErrorMessage) {
929 os::abort(); 933 os::abort();
930 } 934 }
931 jlong mytid = os::current_thread_id(); 935 jlong mytid = os::current_thread_id();