src/hotspot/share/classfile/symbolTable.cpp
changeset 58447 319173c62caa
parent 57593 f40a73b61b5e
child 58679 9c3209ff7550
child 59248 e92153ed8bdc
equal deleted inserted replaced
58446:5c83830390ba 58447:319173c62caa
   218 
   218 
   219 Symbol* SymbolTable::allocate_symbol(const char* name, int len, bool c_heap) {
   219 Symbol* SymbolTable::allocate_symbol(const char* name, int len, bool c_heap) {
   220   assert (len <= Symbol::max_length(), "should be checked by caller");
   220   assert (len <= Symbol::max_length(), "should be checked by caller");
   221 
   221 
   222   Symbol* sym;
   222   Symbol* sym;
   223   if (DumpSharedSpaces || DynamicDumpSharedSpaces) {
   223   if (Arguments::is_dumping_archive()) {
   224     c_heap = false;
   224     c_heap = false;
   225   }
   225   }
   226   if (c_heap) {
   226   if (c_heap) {
   227     // refcount starts as 1
   227     // refcount starts as 1
   228     sym = new (len) Symbol((const u1*)name, len, 1);
   228     sym = new (len) Symbol((const u1*)name, len, 1);
   281     return true;
   281     return true;
   282   };
   282   };
   283 };
   283 };
   284 
   284 
   285 void SymbolTable::metaspace_pointers_do(MetaspaceClosure* it) {
   285 void SymbolTable::metaspace_pointers_do(MetaspaceClosure* it) {
   286   assert(DumpSharedSpaces || DynamicDumpSharedSpaces, "called only during dump time");
   286   Arguments::assert_is_dumping_archive();
   287   MetaspacePointersDo mpd(it);
   287   MetaspacePointersDo mpd(it);
   288   _local_table->do_safepoint_scan(mpd);
   288   _local_table->do_safepoint_scan(mpd);
   289 }
   289 }
   290 
   290 
   291 Symbol* SymbolTable::lookup_dynamic(const char* name,
   291 Symbol* SymbolTable::lookup_dynamic(const char* name,