--- a/src/hotspot/share/utilities/events.hpp Sat May 25 20:55:33 2019 +0900
+++ b/src/hotspot/share/utilities/events.hpp Thu May 23 15:15:01 2019 +0200
@@ -232,7 +232,7 @@
};
inline void Events::log(Thread* thread, const char* format, ...) {
- if (LogEvents) {
+ if (LogEvents && _messages != NULL) {
va_list ap;
va_start(ap, format);
_messages->logv(thread, format, ap);
@@ -241,7 +241,7 @@
}
inline void Events::log_exception(Thread* thread, const char* format, ...) {
- if (LogEvents) {
+ if (LogEvents && _exceptions != NULL) {
va_list ap;
va_start(ap, format);
_exceptions->logv(thread, format, ap);
@@ -250,13 +250,13 @@
}
inline void Events::log_exception(Thread* thread, Handle h_exception, const char* message, const char* file, int line) {
- if (LogEvents) {
+ if (LogEvents && _exceptions != NULL) {
_exceptions->log(thread, h_exception, message, file, line);
}
}
inline void Events::log_redefinition(Thread* thread, const char* format, ...) {
- if (LogEvents) {
+ if (LogEvents && _redefinitions != NULL) {
va_list ap;
va_start(ap, format);
_redefinitions->logv(thread, format, ap);
@@ -265,13 +265,13 @@
}
inline void Events::log_class_unloading(Thread* thread, InstanceKlass* ik) {
- if (LogEvents) {
+ if (LogEvents && _class_unloading != NULL) {
_class_unloading->log(thread, ik);
}
}
inline void Events::log_deopt_message(Thread* thread, const char* format, ...) {
- if (LogEvents) {
+ if (LogEvents && _deopt_messages != NULL) {
va_list ap;
va_start(ap, format);
_deopt_messages->logv(thread, format, ap);