src/hotspot/share/classfile/packageEntry.cpp
changeset 50113 caf115bb98ad
parent 47216 71c04702a3d5
child 51375 b812a85b3aa4
equal deleted inserted replaced
50112:7a2a740815b7 50113:caf115bb98ad
    27 #include "classfile/packageEntry.hpp"
    27 #include "classfile/packageEntry.hpp"
    28 #include "logging/log.hpp"
    28 #include "logging/log.hpp"
    29 #include "memory/resourceArea.hpp"
    29 #include "memory/resourceArea.hpp"
    30 #include "oops/symbol.hpp"
    30 #include "oops/symbol.hpp"
    31 #include "runtime/handles.inline.hpp"
    31 #include "runtime/handles.inline.hpp"
    32 #include "trace/traceMacros.hpp"
       
    33 #include "utilities/events.hpp"
    32 #include "utilities/events.hpp"
    34 #include "utilities/growableArray.hpp"
    33 #include "utilities/growableArray.hpp"
    35 #include "utilities/hashtable.inline.hpp"
    34 #include "utilities/hashtable.inline.hpp"
    36 #include "utilities/ostream.hpp"
    35 #include "utilities/ostream.hpp"
    37 
    36 
   198 
   197 
   199 PackageEntry* PackageEntryTable::new_entry(unsigned int hash, Symbol* name, ModuleEntry* module) {
   198 PackageEntry* PackageEntryTable::new_entry(unsigned int hash, Symbol* name, ModuleEntry* module) {
   200   assert(Module_lock->owned_by_self(), "should have the Module_lock");
   199   assert(Module_lock->owned_by_self(), "should have the Module_lock");
   201   PackageEntry* entry = (PackageEntry*)Hashtable<Symbol*, mtModule>::allocate_new_entry(hash, name);
   200   PackageEntry* entry = (PackageEntry*)Hashtable<Symbol*, mtModule>::allocate_new_entry(hash, name);
   202 
   201 
   203   TRACE_INIT_ID(entry);
   202   JFR_ONLY(INIT_ID(entry);)
   204 
   203 
   205   // Initialize fields specific to a PackageEntry
   204   // Initialize fields specific to a PackageEntry
   206   entry->init();
   205   entry->init();
   207   entry->name()->increment_refcount();
   206   entry->name()->increment_refcount();
   208   entry->set_module(module);
   207   entry->set_module(module);
   281   }
   280   }
   282 
   281 
   283 }
   282 }
   284 
   283 
   285 // iteration of qualified exports
   284 // iteration of qualified exports
   286 void PackageEntry::package_exports_do(ModuleClosure* const f) {
   285 void PackageEntry::package_exports_do(ModuleClosure* f) {
   287   assert_locked_or_safepoint(Module_lock);
   286   assert_locked_or_safepoint(Module_lock);
   288   assert(f != NULL, "invariant");
   287   assert(f != NULL, "invariant");
   289 
   288 
   290   if (has_qual_exports_list()) {
   289   if (has_qual_exports_list()) {
   291     int qe_len = _qualified_exports->length();
   290     int qe_len = _qualified_exports->length();