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

@ -46,6 +46,7 @@
#include "interpreter/bytecodeStream.hpp"
#include "interpreter/interpreter.hpp"
#include "logging/log.hpp"
#include "logging/logStream.hpp"
#include "memory/filemap.hpp"
#include "memory/oopFactory.hpp"
#include "memory/resourceArea.hpp"
@ -432,15 +433,16 @@ void SystemDictionary::validate_protection_domain(InstanceKlass* klass,
// Now we have to call back to java to check if the initating class has access
JavaValue result(T_VOID);
if (log_is_enabled(Debug, protectiondomain)) {
LogTarget(Debug, protectiondomain) lt;
if (lt.is_enabled()) {
ResourceMark rm;
// Print out trace information
outputStream* log = Log(protectiondomain)::debug_stream();
log->print_cr("Checking package access");
log->print("class loader: "); class_loader()->print_value_on(log);
log->print(" protection domain: "); protection_domain()->print_value_on(log);
log->print(" loading: "); klass->print_value_on(log);
log->cr();
LogStream ls(lt);
ls.print_cr("Checking package access");
ls.print("class loader: "); class_loader()->print_value_on(&ls);
ls.print(" protection domain: "); protection_domain()->print_value_on(&ls);
ls.print(" loading: "); klass->print_value_on(&ls);
ls.cr();
}
InstanceKlass* system_loader = SystemDictionary::ClassLoader_klass();