--- a/hotspot/src/share/vm/utilities/exceptions.cpp Thu Jul 20 17:23:24 2017 -0700
+++ b/hotspot/src/share/vm/utilities/exceptions.cpp Fri Jul 21 09:50:12 2017 +0200
@@ -27,6 +27,7 @@
#include "classfile/vmSymbols.hpp"
#include "compiler/compileBroker.hpp"
#include "logging/log.hpp"
+#include "logging/logStream.hpp"
#include "memory/resourceArea.hpp"
#include "oops/oop.inline.hpp"
#include "runtime/init.hpp"
@@ -53,11 +54,12 @@
}
void ThreadShadow::clear_pending_exception() {
- if (_pending_exception != NULL && log_is_enabled(Debug, exceptions)) {
+ LogTarget(Debug, exceptions) lt;
+ if (_pending_exception != NULL && lt.is_enabled()) {
ResourceMark rm;
- outputStream* logst = Log(exceptions)::debug_stream();
- logst->print("Thread::clear_pending_exception: cleared exception:");
- _pending_exception->print_on(logst);
+ LogStream ls(lt);
+ ls.print("Thread::clear_pending_exception: cleared exception:");
+ _pending_exception->print_on(&ls);
}
_pending_exception = NULL;
_exception_file = NULL;