classLoader.hpp revision 1879
1879N/A * Copyright (c) 1997, 2010, 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. 1472N/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 0N/A // corresponding directory or jar file name. 0N/A // Canonicalizes path names, so strcmp will work properly. This is mainly 0N/A // to avoid confusing the zip library 0N/A // Used by the kernel jvm. 0N/A // Record how often system loader lock object is contended 0N/A // Record how often non system loader lock object is contended 0N/A // Record how many calls to JVM_FindLoadedClass w/o holding a lock 0N/A // Record how many calls to JVM_DefineClass w/o holding a lock 0N/A // Record how many calls to jni_DefineClass w/o holding a lock 0N/A // Record how many calls to Unsafe_DefineClass 0N/A // Record how many times SystemDictionary::load_instance_class call 0N/A // fails with linkageError when Unsyncloadclass flag is set. 0N/A // Load individual .class file 0N/A // If the specified package has been loaded by the system, then returns 0N/A // the name of the directory or ZIP file that the package was loaded from. 0N/A // Returns null if the package was not loaded. 0N/A // Note: The specified name can either be the name of a class or package. 0N/A // If a package name is specified, then it must be "/"-separator and also 0N/A // end with a trailing "/". 0N/A // Returns an array of Java strings representing all of the currently 0N/A // loaded system packages. 0N/A // Note: The package names returned are "/"-separated and end with a 0N/A // Sharing dump and restore 0N/A // VM monitoring and management support 0N/A // indicates if class path already contains a entry (exact match by name) 0N/A // adds a class path list 0N/A // creates a class path zip entry (returns NULL if JAR file cannot be opened) 0N/A // Force compilation of all methods in all classes in bootstrap class path (stress test) 875N/A// PerfClassTraceTime is used to measure time for class loading related events. 875N/A// This class tracks cumulative time and exclusive time for specific event types. 875N/A// During the execution of one event, other event types (e.g. class loading and 875N/A// resolution) as well as recursive calls of the same event type could happen. 875N/A// Only one elapsed timer (cumulative) and one thread-local self timer (exclusive) 875N/A// (i.e. only one event type) are active at a time even multiple PerfClassTraceTime 875N/A// instances have been created as multiple events are happening. 875N/A // _t tracks time from initialization to destruction of this timer instance 875N/A // including time for all other event types, and recursive calls of this type. 875N/A // When a timer is called recursively, the elapsedTimer _t would not be used. 875N/A // pointer to thread-local recursion counter and timer array 875N/A // The thread_local timers track cumulative time for specific event types 875N/A // exclusive of time for other event types, but including recursive calls 875N/A // increment the event counter 875N/A // stop the current active thread-local timer to measure inclusive time 875N/A // start the inclusive timer if not recursively called 875N/A // start thread-local timer of the given event type 875N/A // stop the thread-local timer as the event completes 875N/A // and resume the thread-local timer of the event next on the stack 875N/A // increment the counters only on the leaf call 875N/A // add all class loading related event selftime to the accumulated time counter 1879N/A#
endif // SHARE_VM_CLASSFILE_CLASSLOADER_HPP