src/share/vm/classfile/classLoader.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File webrev Sdiff src/share/vm/classfile

src/share/vm/classfile/classLoader.cpp

Print this page




  38 #include "compiler/compileBroker.hpp"
  39 #include "gc/shared/collectedHeap.inline.hpp"
  40 #include "gc/shared/generation.hpp"
  41 #include "interpreter/bytecodeStream.hpp"
  42 #include "interpreter/oopMapCache.hpp"
  43 #include "logging/logTag.hpp"
  44 #include "memory/allocation.inline.hpp"
  45 #include "memory/filemap.hpp"
  46 #include "memory/oopFactory.hpp"
  47 #include "memory/resourceArea.hpp"
  48 #include "memory/universe.inline.hpp"
  49 #include "oops/instanceKlass.hpp"
  50 #include "oops/instanceRefKlass.hpp"
  51 #include "oops/objArrayOop.inline.hpp"
  52 #include "oops/oop.inline.hpp"
  53 #include "oops/symbol.hpp"
  54 #include "prims/jvm.h"
  55 #include "prims/jvm_misc.hpp"
  56 #include "runtime/arguments.hpp"
  57 #include "runtime/compilationPolicy.hpp"
  58 #include "runtime/fprofiler.hpp"
  59 #include "runtime/handles.hpp"
  60 #include "runtime/handles.inline.hpp"
  61 #include "runtime/init.hpp"
  62 #include "runtime/interfaceSupport.hpp"
  63 #include "runtime/java.hpp"
  64 #include "runtime/javaCalls.hpp"
  65 #include "runtime/os.hpp"
  66 #include "runtime/threadCritical.hpp"
  67 #include "runtime/timer.hpp"
  68 #include "runtime/vm_version.hpp"
  69 #include "services/management.hpp"
  70 #include "services/threadService.hpp"
  71 #include "utilities/events.hpp"
  72 #include "utilities/hashtable.inline.hpp"
  73 #include "utilities/macros.hpp"
  74 #if INCLUDE_CDS
  75 #include "classfile/sharedClassUtil.hpp"
  76 #include "classfile/sharedPathsMiscInfo.hpp"
  77 #endif
  78 


1415       return stream;
1416     }
1417     e = e->next();
1418   }
1419   // If the module was located, break out even if the class was not
1420   // located successfully from that module's ClassPathEntry list.
1421   // There will not be another valid entry for that module.
1422   return NULL;
1423 }
1424 
1425 InstanceKlass* ClassLoader::load_class(Symbol* name, bool search_append_only, TRAPS) {
1426   assert(name != NULL, "invariant");
1427   assert(THREAD->is_Java_thread(), "must be a JavaThread");
1428 
1429   ResourceMark rm(THREAD);
1430   HandleMark hm(THREAD);
1431 
1432   const char* const class_name = name->as_C_string();
1433 
1434   EventMark m("loading class %s", class_name);
1435   ThreadProfilerMark tpm(ThreadProfilerMark::classLoaderRegion);
1436 
1437   const char* const file_name = file_name_for_class_name(class_name,
1438                                                          name->utf8_length());
1439   assert(file_name != NULL, "invariant");
1440 
1441   ClassLoaderExt::Context context(class_name, file_name, THREAD);
1442 
1443   // Lookup stream for parsing .class file
1444   ClassFileStream* stream = NULL;
1445   s2 classpath_index = 0;
1446   ClassPathEntry* e = NULL;
1447 
1448   // If DumpSharedSpaces is true boot loader visibility boundaries are set to:
1449   //   - [jimage] + [_first_append_entry to _last_append_entry] (all path entries).
1450   //
1451   // If search_append_only is true, boot loader visibility boundaries are
1452   // set to be _first_append_entry to the end. This includes:
1453   //   [-Xbootclasspath/a]; [jvmti appended entries]
1454   //
1455   // If both DumpSharedSpaces and search_append_only are false, boot loader




  38 #include "compiler/compileBroker.hpp"
  39 #include "gc/shared/collectedHeap.inline.hpp"
  40 #include "gc/shared/generation.hpp"
  41 #include "interpreter/bytecodeStream.hpp"
  42 #include "interpreter/oopMapCache.hpp"
  43 #include "logging/logTag.hpp"
  44 #include "memory/allocation.inline.hpp"
  45 #include "memory/filemap.hpp"
  46 #include "memory/oopFactory.hpp"
  47 #include "memory/resourceArea.hpp"
  48 #include "memory/universe.inline.hpp"
  49 #include "oops/instanceKlass.hpp"
  50 #include "oops/instanceRefKlass.hpp"
  51 #include "oops/objArrayOop.inline.hpp"
  52 #include "oops/oop.inline.hpp"
  53 #include "oops/symbol.hpp"
  54 #include "prims/jvm.h"
  55 #include "prims/jvm_misc.hpp"
  56 #include "runtime/arguments.hpp"
  57 #include "runtime/compilationPolicy.hpp"

  58 #include "runtime/handles.hpp"
  59 #include "runtime/handles.inline.hpp"
  60 #include "runtime/init.hpp"
  61 #include "runtime/interfaceSupport.hpp"
  62 #include "runtime/java.hpp"
  63 #include "runtime/javaCalls.hpp"
  64 #include "runtime/os.hpp"
  65 #include "runtime/threadCritical.hpp"
  66 #include "runtime/timer.hpp"
  67 #include "runtime/vm_version.hpp"
  68 #include "services/management.hpp"
  69 #include "services/threadService.hpp"
  70 #include "utilities/events.hpp"
  71 #include "utilities/hashtable.inline.hpp"
  72 #include "utilities/macros.hpp"
  73 #if INCLUDE_CDS
  74 #include "classfile/sharedClassUtil.hpp"
  75 #include "classfile/sharedPathsMiscInfo.hpp"
  76 #endif
  77 


1414       return stream;
1415     }
1416     e = e->next();
1417   }
1418   // If the module was located, break out even if the class was not
1419   // located successfully from that module's ClassPathEntry list.
1420   // There will not be another valid entry for that module.
1421   return NULL;
1422 }
1423 
1424 InstanceKlass* ClassLoader::load_class(Symbol* name, bool search_append_only, TRAPS) {
1425   assert(name != NULL, "invariant");
1426   assert(THREAD->is_Java_thread(), "must be a JavaThread");
1427 
1428   ResourceMark rm(THREAD);
1429   HandleMark hm(THREAD);
1430 
1431   const char* const class_name = name->as_C_string();
1432 
1433   EventMark m("loading class %s", class_name);

1434 
1435   const char* const file_name = file_name_for_class_name(class_name,
1436                                                          name->utf8_length());
1437   assert(file_name != NULL, "invariant");
1438 
1439   ClassLoaderExt::Context context(class_name, file_name, THREAD);
1440 
1441   // Lookup stream for parsing .class file
1442   ClassFileStream* stream = NULL;
1443   s2 classpath_index = 0;
1444   ClassPathEntry* e = NULL;
1445 
1446   // If DumpSharedSpaces is true boot loader visibility boundaries are set to:
1447   //   - [jimage] + [_first_append_entry to _last_append_entry] (all path entries).
1448   //
1449   // If search_append_only is true, boot loader visibility boundaries are
1450   // set to be _first_append_entry to the end. This includes:
1451   //   [-Xbootclasspath/a]; [jvmti appended entries]
1452   //
1453   // If both DumpSharedSpaces and search_append_only are false, boot loader


src/share/vm/classfile/classLoader.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File