src/share/vm/classfile/sharedPathsMiscInfo.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File classpath.05 Cdiff src/share/vm/classfile/sharedPathsMiscInfo.cpp

src/share/vm/classfile/sharedPathsMiscInfo.cpp

Print this page

        

*** 1,7 **** /* ! * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. --- 1,7 ---- /* ! * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation.
*** 24,41 **** #include "precompiled.hpp" #include "classfile/classLoader.hpp" #include "classfile/classLoaderData.inline.hpp" #include "classfile/sharedPathsMiscInfo.hpp" #include "memory/allocation.inline.hpp" #include "memory/metaspaceShared.hpp" #include "runtime/arguments.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); } write(path, strlen(path) + 1); write_jint(jint(type)); } --- 24,45 ---- #include "precompiled.hpp" #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 (log_is_enabled(Info, classpath)) { ! ResourceMark rm; ! outputStream* log = LogHandle(classpath)::info_stream(); ! log->print("type=%s ", type_name(type)); ! ClassLoader::trace_class_path("add misc shared path ", path); } write(path, strlen(path) + 1); write_jint(jint(type)); }
*** 65,75 **** } return false; } bool SharedPathsMiscInfo::fail(const char* msg, const char* name) { ! ClassLoader::trace_class_path(tty, msg, name); MetaspaceShared::set_archive_loading_failed(); return false; } bool SharedPathsMiscInfo::check() { --- 69,79 ---- } return false; } bool SharedPathsMiscInfo::fail(const char* msg, const char* name) { ! ClassLoader::trace_class_path(msg, name); MetaspaceShared::set_archive_loading_failed(); return false; } bool SharedPathsMiscInfo::check() {
*** 88,108 **** const char* path = _cur_ptr; _cur_ptr += strlen(path) + 1; 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 (!check(type, path)) { if (!PrintSharedArchiveAndExit) { return false; } } else { ! trace_class_path("[ok"); } } return true; } --- 92,113 ---- const char* path = _cur_ptr; _cur_ptr += strlen(path) + 1; if (!read_jint(&type)) { return fail("Corrupted archive file header"); } ! if (log_is_enabled(Info, classpath)) { ! ResourceMark rm; ! outputStream* log = LogHandle(classpath)::info_stream(); ! log->print("type=%s ", type_name(type)); ! print_path(type, path); } if (!check(type, path)) { if (!PrintSharedArchiveAndExit) { return false; } } else { ! ClassLoader::trace_class_path("ok"); } } return true; }
src/share/vm/classfile/sharedPathsMiscInfo.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File