< prev index next >

src/hotspot/share/classfile/classLoaderExt.cpp

Print this page




 276                                ((JavaThread*) THREAD)->get_thread_stat()->perf_timers_addr(),
 277                                PerfClassTraceTime::CLASS_LOAD);
 278     stream = e->open_stream(file_name, CHECK_NULL);
 279   }
 280 
 281   if (NULL == stream) {
 282     tty->print_cr("Preload Warning: Cannot find %s", class_name);
 283     return NULL;
 284   }
 285 
 286   assert(stream != NULL, "invariant");
 287   stream->set_verify(true);
 288 
 289   ClassLoaderData* loader_data = ClassLoaderData::the_null_class_loader_data();
 290   Handle protection_domain;
 291 
 292   InstanceKlass* result = KlassFactory::create_from_stream(stream,
 293                                                            name,
 294                                                            loader_data,
 295                                                            protection_domain,
 296                                                            NULL, // unsafe_anonymous_host
 297                                                            NULL, // cp_patches




 298                                                            THREAD);
 299 
 300   if (HAS_PENDING_EXCEPTION) {
 301     tty->print_cr("Preload Error: Failed to load %s", class_name);
 302     return NULL;
 303   }
 304   result->set_shared_classpath_index(UNREGISTERED_INDEX);
 305   SystemDictionaryShared::set_shared_class_misc_info(result, stream);
 306   return result;
 307 }
 308 
 309 struct CachedClassPathEntry {
 310   const char* _path;
 311   ClassPathEntry* _entry;
 312 };
 313 
 314 static GrowableArray<CachedClassPathEntry>* cached_path_entries = NULL;
 315 
 316 ClassPathEntry* ClassLoaderExt::find_classpath_entry_from_cache(const char* path, TRAPS) {
 317   // This is called from dump time so it's single threaded and there's no need for a lock.




 276                                ((JavaThread*) THREAD)->get_thread_stat()->perf_timers_addr(),
 277                                PerfClassTraceTime::CLASS_LOAD);
 278     stream = e->open_stream(file_name, CHECK_NULL);
 279   }
 280 
 281   if (NULL == stream) {
 282     tty->print_cr("Preload Warning: Cannot find %s", class_name);
 283     return NULL;
 284   }
 285 
 286   assert(stream != NULL, "invariant");
 287   stream->set_verify(true);
 288 
 289   ClassLoaderData* loader_data = ClassLoaderData::the_null_class_loader_data();
 290   Handle protection_domain;
 291 
 292   InstanceKlass* result = KlassFactory::create_from_stream(stream,
 293                                                            name,
 294                                                            loader_data,
 295                                                            protection_domain,
 296                                                            NULL,  // unsafe_anonymous_host
 297                                                            NULL,  // cp_patches
 298                                                            false, // is_nonfindable
 299                                                            false, // can_access_vm_annotations
 300                                                            NULL,  // dynamic_nest_host
 301                                                            Handle(), // classData
 302                                                            THREAD);
 303 
 304   if (HAS_PENDING_EXCEPTION) {
 305     tty->print_cr("Preload Error: Failed to load %s", class_name);
 306     return NULL;
 307   }
 308   result->set_shared_classpath_index(UNREGISTERED_INDEX);
 309   SystemDictionaryShared::set_shared_class_misc_info(result, stream);
 310   return result;
 311 }
 312 
 313 struct CachedClassPathEntry {
 314   const char* _path;
 315   ClassPathEntry* _entry;
 316 };
 317 
 318 static GrowableArray<CachedClassPathEntry>* cached_path_entries = NULL;
 319 
 320 ClassPathEntry* ClassLoaderExt::find_classpath_entry_from_cache(const char* path, TRAPS) {
 321   // This is called from dump time so it's single threaded and there's no need for a lock.


< prev index next >