classLoader.cpp revision 2062
1472N/A * or visit www.oracle.com if you need additional information or have any
1879N/A#include "precompiled.hpp"
1879N/A#include "classfile/classFileParser.hpp"
1879N/A#include "classfile/classFileStream.hpp"
1879N/A#include "classfile/classLoader.hpp"
1879N/A#include "classfile/javaClasses.hpp"
1879N/A#include "classfile/systemDictionary.hpp"
1879N/A#include "classfile/vmSymbols.hpp"
1879N/A#include "compiler/compileBroker.hpp"
0N/A#include "gc_interface/collectedHeap.inline.hpp"
0N/A#include "interpreter/bytecodeStream.hpp"
0N/A#include "interpreter/oopMapCache.hpp"
0N/A#include "memory/allocation.inline.hpp"
0N/A#include "memory/generation.hpp"
0N/A#include "memory/oopFactory.hpp"
0N/A#include "memory/universe.inline.hpp"
0N/A#include "oops/constantPoolKlass.hpp"
0N/A#include "oops/instanceKlass.hpp"
0N/A#include "oops/instanceRefKlass.hpp"
0N/A#include "oops/oop.inline.hpp"
0N/A#include "oops/symbol.hpp"
0N/A#include "prims/jvm_misc.hpp"
0N/A#include "runtime/arguments.hpp"
0N/A#include "runtime/compilationPolicy.hpp"
0N/A#include "runtime/fprofiler.hpp"
0N/A#include "runtime/handles.hpp"
0N/A#include "runtime/handles.inline.hpp"
0N/A#include "runtime/interfaceSupport.hpp"
0N/A#include "runtime/javaCalls.hpp"
0N/A#include "runtime/threadCritical.hpp"
0N/A#include "services/management.hpp"
0N/A#include "services/threadService.hpp"
0N/A#include "utilities/events.hpp"
0N/A#include "utilities/hashtable.hpp"
0N/A#include "utilities/hashtable.inline.hpp"
0N/A#ifdef TARGET_OS_FAMILY_linux
0N/A# include "os_linux.inline.hpp"
0N/A#ifdef TARGET_OS_FAMILY_solaris
0N/A# include "os_solaris.inline.hpp"
0N/A#ifdef TARGET_OS_FAMILY_windows
0N/A# include "os_windows.inline.hpp"
0N/Atypedef jzentry* (JNICALL *FindEntry_t)(jzfile *zip, const char *name, jint *sizeP, jint *nameLen);
0N/Atypedef jboolean (JNICALL *ReadEntry_t)(jzfile *zip, jzentry *entry, unsigned char *buf, char *namebuf);
0N/Atypedef jboolean (JNICALL *ReadMappedEntry_t)(jzfile *zip, jzentry *entry, unsigned char **buf, char *namebuf);
0N/A if (num_meta_package_names == 0) {
0N/A if ( _num_meta_package_names == 0) {
0N/A for (int i = 0; i < _num_meta_package_names; i++) {
return NULL;
if (UsePerfData) {
return NULL;
char* filename;
if (UsePerfData) {
return new_entry;
delete new_entry;
return NULL;
int line_no = 0;
bool skipCurrentJar = false;
++line_no;
switch(package_name[0]) {
// make/tools/MetaIndex/BuildMetaIndex.java in the J2SE
skipCurrentJar = true;
skipCurrentJar = false;
int end = 0;
end++;
end++;
void ClassLoader::create_class_path_entry(char *path, struct stat st, ClassPathEntry **new_entry, bool lazy) {
if (lazy) {
if (TraceClassLoading) {
char *msg;
if (TraceClassLoading) {
return NULL;
while (e != NULL) {
e = e->next();
bool check_for_duplicates) {
while (e != NULL) {
e = e->next();
CanonicalizeEntry = CAST_TO_FN_PTR(canonicalize_fn_t, os::dll_lookup(javalib_handle, "Canonicalize"));
const char* filename() {
inline unsigned int compute_hash(const char *s, int n) {
unsigned int val = 0;
return val;
return pp;
return NULL;
return pp;
for (int i = 0; i < table_size(); ++i) {
for (i = 0; i < table_size(); ++i) {
for (i = 0; i < table_size(); ++i) {
return NULL;
return NULL;
int nof_entries;
const char** packages;
return NULL;
for (int i = 0; i < nof_entries; i++) {
return result();
// st.print("%s.class", h_name->as_utf8());
int classpath_index = 0;
while (e != NULL) {
e = e->next();
CHECK_(h));
h = result;
int number_of_entries) {
if (UsePerfData) {
// ClassLoader.loadClass/findClass is being called synchronized or not.
if (UnsyncloadClass) {
if (LazyBootClassLoader) {
return UsePerfData ?
return UsePerfData ?
return UsePerfData ?
return UsePerfData ?
void classLoader_init() {
#ifndef PRODUCT
// jzcell and jzfile definitions from zip_util.h but rename jzfile to real_jzfile,
// Matches zip_util.h 1.14 99/06/01 from jdk1.3 beta H build
char **comments;
if (HAS_PENDING_EXCEPTION) {
return is_rt_jar12();
return is_rt_jar13();
BackgroundCompilation = false;
while (e != NULL) {
e = e->next();
extern void print_statistics();
vm_exit(0);
static int _codecache_sweep_counter = 0;
if (HAS_PENDING_EXCEPTION) {
if (HAS_PENDING_EXCEPTION) {
tty->print_cr("CompileTheWorld (%d) : Skipping method: %s", _compile_the_world_counter, m->name()->as_C_string());
if (TieredCompilation) {
m->clear_code();
if (HAS_PENDING_EXCEPTION) {
tty->print_cr("CompileTheWorld (%d) : Skipping method: %s", _compile_the_world_counter, m->name()->as_C_string());
m->clear_code();
// Please keep following two functions at end of this file. With them placed at top or in middle of the file,
if (!UsePerfData) return;
for (int i=0; i < EVENT_TYPE_COUNT; i++) {
_prev_active_event = i;
if (!UsePerfData) return;
if (_prev_active_event >= 0) {