--- old/src/share/vm/classfile/sharedPathsMiscInfo.cpp 2016-02-17 17:04:44.790324343 -0500 +++ new/src/share/vm/classfile/sharedPathsMiscInfo.cpp 2016-02-17 17:04:44.614327704 -0500 @@ -26,14 +26,18 @@ #include "classfile/classLoader.hpp" #include "classfile/classLoaderData.inline.hpp" #include "classfile/sharedPathsMiscInfo.hpp" +#include "logging/log.hpp" #include "memory/allocation.inline.hpp" #include "memory/metaspaceShared.hpp" #include "runtime/arguments.hpp" +#include "utilities/ostream.hpp" void SharedPathsMiscInfo::add_path(const char* path, int type) { - if (TraceClassPaths) { - tty->print("[type=%s] ", type_name(type)); - trace_class_path("[Add misc shared path ", path); + if (log_is_enabled(Info, classpath)) { + ResourceMark rm; + outputStream* log = LogHandle(classpath)::info_stream(); + log->print("type=%s ", type_name(type)); + ClassLoader::trace_class_path(log, "add misc shared path ", path); } write(path, strlen(path) + 1); write_jint(jint(type)); @@ -90,17 +94,18 @@ if (!read_jint(&type)) { return fail("Corrupted archive file header"); } - if (TraceClassPaths) { - tty->print("[type=%s ", type_name(type)); - print_path(tty, type, path); - tty->print_cr("]"); + if (log_is_enabled(Info, classpath)) { + ResourceMark rm; + outputStream* log = LogHandle(classpath)::info_stream(); + log->print("type=%s ", type_name(type)); + print_path(log, type, path); } if (!check(type, path)) { if (!PrintSharedArchiveAndExit) { return false; } } else { - trace_class_path("[ok"); + trace_class_path("[ok]"); } }