< prev index next >

src/hotspot/share/classfile/dictionary.cpp

Print this page




  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *
  23  */
  24 
  25 #include "precompiled.hpp"
  26 #include "classfile/classLoaderData.inline.hpp"
  27 #include "classfile/dictionary.inline.hpp"
  28 #include "classfile/protectionDomainCache.hpp"
  29 #include "classfile/systemDictionary.hpp"
  30 #include "classfile/systemDictionaryShared.hpp"
  31 #include "logging/log.hpp"
  32 #include "logging/logStream.hpp"
  33 #include "memory/iterator.hpp"
  34 #include "memory/metaspaceClosure.hpp"
  35 #include "memory/resourceArea.hpp"
  36 #include "oops/oop.inline.hpp"
  37 #include "runtime/atomic.hpp"
  38 #include "runtime/orderAccess.inline.hpp"
  39 #include "runtime/safepointVerifiers.hpp"
  40 #include "utilities/hashtable.inline.hpp"
  41 
  42 // Optimization: if any dictionary needs resizing, we set this flag,
  43 // so that we dont't have to walk all dictionaries to check if any actually
  44 // needs resizing, which is costly to do at Safepoint.
  45 bool Dictionary::_some_dictionary_needs_resizing = false;
  46 
  47 size_t Dictionary::entry_size() {
  48   if (DumpSharedSpaces) {
  49     return SystemDictionaryShared::dictionary_entry_size();
  50   } else {
  51     return sizeof(DictionaryEntry);
  52   }
  53 }
  54 
  55 Dictionary::Dictionary(ClassLoaderData* loader_data, int table_size, bool resizable)
  56   : _loader_data(loader_data), _resizable(resizable), _needs_resizing(false),
  57   Hashtable<InstanceKlass*, mtClass>(table_size, (int)entry_size()) {
  58 };




  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *
  23  */
  24 
  25 #include "precompiled.hpp"
  26 #include "classfile/classLoaderData.inline.hpp"
  27 #include "classfile/dictionary.inline.hpp"
  28 #include "classfile/protectionDomainCache.hpp"
  29 #include "classfile/systemDictionary.hpp"
  30 #include "classfile/systemDictionaryShared.hpp"
  31 #include "logging/log.hpp"
  32 #include "logging/logStream.hpp"
  33 #include "memory/iterator.hpp"
  34 #include "memory/metaspaceClosure.hpp"
  35 #include "memory/resourceArea.hpp"
  36 #include "oops/oop.inline.hpp"
  37 #include "runtime/atomic.hpp"
  38 #include "runtime/orderAccess.hpp"
  39 #include "runtime/safepointVerifiers.hpp"
  40 #include "utilities/hashtable.inline.hpp"
  41 
  42 // Optimization: if any dictionary needs resizing, we set this flag,
  43 // so that we dont't have to walk all dictionaries to check if any actually
  44 // needs resizing, which is costly to do at Safepoint.
  45 bool Dictionary::_some_dictionary_needs_resizing = false;
  46 
  47 size_t Dictionary::entry_size() {
  48   if (DumpSharedSpaces) {
  49     return SystemDictionaryShared::dictionary_entry_size();
  50   } else {
  51     return sizeof(DictionaryEntry);
  52   }
  53 }
  54 
  55 Dictionary::Dictionary(ClassLoaderData* loader_data, int table_size, bool resizable)
  56   : _loader_data(loader_data), _resizable(resizable), _needs_resizing(false),
  57   Hashtable<InstanceKlass*, mtClass>(table_size, (int)entry_size()) {
  58 };


< prev index next >