86 |
86 |
87 // generate a stack trace |
87 // generate a stack trace |
88 static void print_stack_trace(outputStream* st, JavaThread* jt, |
88 static void print_stack_trace(outputStream* st, JavaThread* jt, |
89 char* buf, int buflen, bool verbose = false); |
89 char* buf, int buflen, bool verbose = false); |
90 |
90 |
91 static const char* gc_mode(); |
|
92 static void print_oom_reasons(outputStream* st); |
|
93 |
|
94 static bool should_report_bug(unsigned int id) { |
91 static bool should_report_bug(unsigned int id) { |
95 return (id != OOM_MALLOC_ERROR) && (id != OOM_MMAP_ERROR); |
92 return (id != OOM_MALLOC_ERROR) && (id != OOM_MMAP_ERROR); |
96 } |
93 } |
97 |
94 |
98 static void report_and_die(Thread* thread, unsigned int sig, address pc, void* siginfo, |
95 static void report_and_die(Thread* thread, unsigned int sig, address pc, void* siginfo, |
107 // return a string to describe the error |
104 // return a string to describe the error |
108 static char* error_string(char* buf, int buflen); |
105 static char* error_string(char* buf, int buflen); |
109 |
106 |
110 // Record status of core/minidump |
107 // Record status of core/minidump |
111 static void record_coredump_status(const char* message, bool status); |
108 static void record_coredump_status(const char* message, bool status); |
|
109 |
|
110 // support for VM.info diagnostic command |
|
111 static void print_vm_info(outputStream* st); |
112 |
112 |
113 // main error reporting function |
113 // main error reporting function |
114 static void report_and_die(int id, const char* message, const char* detail_fmt, va_list detail_args, |
114 static void report_and_die(int id, const char* message, const char* detail_fmt, va_list detail_args, |
115 Thread* thread, address pc, void* siginfo, void* context, |
115 Thread* thread, address pc, void* siginfo, void* context, |
116 const char* filename, int lineno, size_t size) ATTRIBUTE_PRINTF(3, 0); |
116 const char* filename, int lineno, size_t size) ATTRIBUTE_PRINTF(3, 0); |