src/hotspot/share/utilities/hashtable.cpp
changeset 49982 9042ffe5b7fe
parent 49818 e57e6addb978
child 50113 caf115bb98ad
equal deleted inserted replaced
49981:bd0a95bec96b 49982:9042ffe5b7fe
    29 #include "classfile/moduleEntry.hpp"
    29 #include "classfile/moduleEntry.hpp"
    30 #include "classfile/packageEntry.hpp"
    30 #include "classfile/packageEntry.hpp"
    31 #include "classfile/placeholders.hpp"
    31 #include "classfile/placeholders.hpp"
    32 #include "classfile/protectionDomainCache.hpp"
    32 #include "classfile/protectionDomainCache.hpp"
    33 #include "classfile/stringTable.hpp"
    33 #include "classfile/stringTable.hpp"
       
    34 #include "logging/log.hpp"
    34 #include "memory/allocation.inline.hpp"
    35 #include "memory/allocation.inline.hpp"
    35 #include "memory/metaspaceShared.hpp"
    36 #include "memory/metaspaceShared.hpp"
    36 #include "memory/resourceArea.hpp"
    37 #include "memory/resourceArea.hpp"
    37 #include "oops/oop.inline.hpp"
    38 #include "oops/oop.inline.hpp"
    38 #include "oops/weakHandle.inline.hpp"
    39 #include "oops/weakHandle.inline.hpp"
   240 }
   241 }
   241 
   242 
   242 // For oops and Strings the size of the literal is interesting. For other types, nobody cares.
   243 // For oops and Strings the size of the literal is interesting. For other types, nobody cares.
   243 static int literal_size(ConstantPool*) { return 0; }
   244 static int literal_size(ConstantPool*) { return 0; }
   244 static int literal_size(Klass*)        { return 0; }
   245 static int literal_size(Klass*)        { return 0; }
   245 #if INCLUDE_ALL_GCS
       
   246 static int literal_size(nmethod*)      { return 0; }
   246 static int literal_size(nmethod*)      { return 0; }
   247 #endif
       
   248 
   247 
   249 static int literal_size(Symbol *symbol) {
   248 static int literal_size(Symbol *symbol) {
   250   return symbol->size() * HeapWordSize;
   249   return symbol->size() * HeapWordSize;
   251 }
   250 }
   252 
   251 
   445   }
   444   }
   446 }
   445 }
   447 #endif // PRODUCT
   446 #endif // PRODUCT
   448 
   447 
   449 // Explicitly instantiate these types
   448 // Explicitly instantiate these types
   450 #if INCLUDE_ALL_GCS
       
   451 template class Hashtable<nmethod*, mtGC>;
   449 template class Hashtable<nmethod*, mtGC>;
   452 template class HashtableEntry<nmethod*, mtGC>;
   450 template class HashtableEntry<nmethod*, mtGC>;
   453 template class BasicHashtable<mtGC>;
   451 template class BasicHashtable<mtGC>;
   454 #endif
       
   455 template class Hashtable<ConstantPool*, mtClass>;
   452 template class Hashtable<ConstantPool*, mtClass>;
   456 template class RehashableHashtable<Symbol*, mtSymbol>;
   453 template class RehashableHashtable<Symbol*, mtSymbol>;
   457 template class RehashableHashtable<oop, mtSymbol>;
   454 template class RehashableHashtable<oop, mtSymbol>;
   458 template class Hashtable<Symbol*, mtSymbol>;
   455 template class Hashtable<Symbol*, mtSymbol>;
   459 template class Hashtable<Klass*, mtClass>;
   456 template class Hashtable<Klass*, mtClass>;