8181917: Refactor UL LogStreams to avoid using resource area

Reviewed-by: ehelin, mlarsson
This commit is contained in:
Thomas Stuefe 2017-07-21 09:50:12 +02:00
parent 52ef49eef1
commit d12604111c
63 changed files with 662 additions and 508 deletions

View file

@ -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::set_pending_exception(oop exception, const char* file, int li
}
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;