8080925: Make error log write timeout parameter configurable
Reviewed-by: sla, coleenp, ctornqvi, dholmes
--- a/hotspot/src/share/vm/runtime/globals.hpp Mon Jan 19 11:06:08 2015 +0100
+++ b/hotspot/src/share/vm/runtime/globals.hpp Fri Jun 26 08:29:29 2015 +0200
@@ -1026,6 +1026,10 @@
product(bool, CreateCoredumpOnCrash, true, \
"Create core/mini dump on VM fatal error") \
\
+ product(uintx, ErrorLogTimeout, 2 * 60, \
+ "Timeout, in seconds, to limit the time spent on writing an " \
+ "error log in case of a crash.") \
+ \
product_pd(bool, UseOSErrorReporting, \
"Let VM fatal error propagate to the OS (ie. WER on Windows)") \
\
--- a/hotspot/src/share/vm/runtime/thread.cpp Mon Jan 19 11:06:08 2015 +0100
+++ b/hotspot/src/share/vm/runtime/thread.cpp Fri Jun 26 08:29:29 2015 +0200
@@ -1291,7 +1291,7 @@
if (!ShowMessageBoxOnError
&& (OnError == NULL || OnError[0] == '\0')
&& Arguments::abort_hook() == NULL) {
- os::sleep(this, 2 * 60 * 1000, false);
+ os::sleep(this, ErrorLogTimeout * 60 * 1000, false);
fdStream err(defaultStream::output_fd());
err.print_raw_cr("# [ timer expired, abort... ]");
// skip atexit/vm_exit/vm_abort hooks