equal
deleted
inserted
replaced
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, |