classLoader.hpp revision 2273
0N/A * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. 0N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 0N/A * This code is free software; you can redistribute it and/or modify it 0N/A * under the terms of the GNU General Public License version 2 only, as 0N/A * published by the Free Software Foundation. 0N/A * This code is distributed in the hope that it will be useful, but WITHOUT 0N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 0N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 0N/A * version 2 for more details (a copy is included in the LICENSE file that 0N/A * accompanied this code). 0N/A * You should have received a copy of the GNU General Public License version 0N/A * 2 along with this work; if not, write to the Free Software Foundation, 0N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 0N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 0N/A// The VM class loader. 0N/A// Meta-index (optional, to be able to skip opening boot classpath jar files) 0N/A// Class path entry (directory or zip file) 0N/A // Next entry in class path 0N/A // may have unlocked readers, so write atomically. 0N/A // Attempt to locate file_name through this class path entry. 0N/A // Returns a class file parsing stream if successfull. 0N/A// Type definitions for zip file and zip file entry 0N/A jlong csize;
/* size of compressed data (zero if uncompressed) */ 0N/A jlong pos;
/* position of LOC header (if negative) or data */ 0N/A// For lazier loading of boot class path entries 0N/A // Performance counters 0N/A // First entry in linked list of ClassPathEntry instances 0N/A // Last entry in linked list of ClassPathEntry instances 0N/A // Hash table used to keep track of loaded packages 0N/A static unsigned int hash(
const char *s,
int n);
0N/A // Returns the package file name corresponding to the specified package 0N/A // or class name, or null if not found. 0N/A // Adds a new package entry for the specified class or package name and 5264N/A // corresponding directory or jar file name. 0N/A // Canonicalizes path names, so strcmp will work properly. This is mainly 5264N/A // to avoid confusing the zip library // Used by the kernel jvm. // Record how often system loader lock object is contended // Record how often non system loader lock object is contended // Record how many calls to JVM_FindLoadedClass w/o holding a lock // Record how many calls to JVM_DefineClass w/o holding a lock // Record how many calls to jni_DefineClass w/o holding a lock // Record how many calls to Unsafe_DefineClass // Record how many times SystemDictionary::load_instance_class call // fails with linkageError when Unsyncloadclass flag is set. // Load individual .class file // If the specified package has been loaded by the system, then returns // the name of the directory or ZIP file that the package was loaded from. // Returns null if the package was not loaded. // Note: The specified name can either be the name of a class or package. // If a package name is specified, then it must be "/"-separator and also // end with a trailing "/". // Returns an array of Java strings representing all of the currently // loaded system packages. // Note: The package names returned are "/"-separated and end with a assert(e !=
NULL,
"Not that many classpath entries.");
// Sharing dump and restore // VM monitoring and management support // indicates if class path already contains a entry (exact match by name) // adds a class path list // creates a class path zip entry (returns NULL if JAR file cannot be opened) // Force compilation of all methods in all classes in bootstrap class path (stress test) // PerfClassTraceTime is used to measure time for class loading related events. // This class tracks cumulative time and exclusive time for specific event types. // During the execution of one event, other event types (e.g. class loading and // resolution) as well as recursive calls of the same event type could happen. // Only one elapsed timer (cumulative) and one thread-local self timer (exclusive) // (i.e. only one event type) are active at a time even multiple PerfClassTraceTime // instances have been created as multiple events are happening. // _t tracks time from initialization to destruction of this timer instance // including time for all other event types, and recursive calls of this type. // When a timer is called recursively, the elapsedTimer _t would not be used. // pointer to thread-local recursion counter and timer array // The thread_local timers track cumulative time for specific event types // exclusive of time for other event types, but including recursive calls int type /* event type */ ) :
int type /* event type */ ) :
#
endif // SHARE_VM_CLASSFILE_CLASSLOADER_HPP