--- a/hotspot/src/share/vm/utilities/exceptions.cpp Tue Jun 09 10:26:25 2015 -0400
+++ b/hotspot/src/share/vm/utilities/exceptions.cpp Wed Jun 10 04:39:15 2015 +0200
@@ -164,9 +164,11 @@
thread->set_pending_exception(h_exception(), file, line);
// vm log
- Events::log_exception(thread, "Exception <%s%s%s> (" INTPTR_FORMAT ") thrown at [%s, line %d]",
- h_exception->print_value_string(), message ? ": " : "", message ? message : "",
- (address)h_exception(), file, line);
+ if (LogEvents){
+ Events::log_exception(thread, "Exception <%s%s%s> (" INTPTR_FORMAT ") thrown at [%s, line %d]",
+ h_exception->print_value_string(), message ? ": " : "", message ? message : "",
+ (address)h_exception(), file, line);
+ }
}