< prev index next >

src/hotspot/share/classfile/symbolTable.cpp

Print this page

        

*** 265,275 **** _dynamic_shared_table.iterate(&iter); // all symbols from the dynamic table SymbolsDo sd(cl); if (!_local_table->try_scan(Thread::current(), sd)) { ! log_info(symboltable)("symbols_do unavailable at this moment"); } } class MetaspacePointersDo : StackObj { MetaspaceClosure *_it; --- 265,275 ---- _dynamic_shared_table.iterate(&iter); // all symbols from the dynamic table SymbolsDo sd(cl); if (!_local_table->try_scan(Thread::current(), sd)) { ! log_info(stringtable)("symbols_do unavailable at this moment"); } } class MetaspacePointersDo : StackObj { MetaspaceClosure *_it;
*** 555,565 **** void SymbolTable::verify() { Thread* thr = Thread::current(); VerifySymbols vs; if (!_local_table->try_scan(thr, vs)) { ! log_info(symboltable)("verify unavailable at this moment"); } } // Dumping class DumpSymbol : StackObj { --- 555,565 ---- void SymbolTable::verify() { Thread* thr = Thread::current(); VerifySymbols vs; if (!_local_table->try_scan(thr, vs)) { ! log_info(stringtable)("verify unavailable at this moment"); } } // Dumping class DumpSymbol : StackObj {
*** 621,645 **** size_t SymbolTable::estimate_size_for_archive() { return CompactHashtableWriter::estimate_size(int(_items_count)); } void SymbolTable::write_to_archive(bool is_static_archive) { CompactHashtableWriter writer(int(_items_count), &MetaspaceShared::stats()->symbol); copy_shared_symbol_table(&writer); if (is_static_archive) { - _shared_table.reset(); writer.dump(&_shared_table, "symbol"); // Verify table is correct Symbol* sym = vmSymbols::java_lang_Object(); const char* name = (const char*)sym->bytes(); int len = sym->utf8_length(); unsigned int hash = hash_symbol(name, len, _alt_hash); assert(sym == _shared_table.lookup(name, hash, len), "sanity"); } else { - _dynamic_shared_table.reset(); writer.dump(&_dynamic_shared_table, "symbol"); } } void SymbolTable::serialize_shared_table_header(SerializeClosure* soc, --- 621,646 ---- size_t SymbolTable::estimate_size_for_archive() { return CompactHashtableWriter::estimate_size(int(_items_count)); } void SymbolTable::write_to_archive(bool is_static_archive) { + _shared_table.reset(); + _dynamic_shared_table.reset(); + CompactHashtableWriter writer(int(_items_count), &MetaspaceShared::stats()->symbol); copy_shared_symbol_table(&writer); if (is_static_archive) { writer.dump(&_shared_table, "symbol"); // Verify table is correct Symbol* sym = vmSymbols::java_lang_Object(); const char* name = (const char*)sym->bytes(); int len = sym->utf8_length(); unsigned int hash = hash_symbol(name, len, _alt_hash); assert(sym == _shared_table.lookup(name, hash, len), "sanity"); } else { writer.dump(&_dynamic_shared_table, "symbol"); } } void SymbolTable::serialize_shared_table_header(SerializeClosure* soc,
*** 761,773 **** bool SymbolTable::do_rehash() { if (!_local_table->is_safepoint_safe()) { return false; } ! // We use current size ! size_t new_size = _local_table->get_size_log2(Thread::current()); ! SymbolTableHash* new_table = new SymbolTableHash(new_size, END_SIZE, REHASH_LEN); // Use alt hash from now on _alt_hash = true; if (!_local_table->try_move_nodes_to(Thread::current(), new_table)) { _alt_hash = false; delete new_table; --- 762,773 ---- bool SymbolTable::do_rehash() { if (!_local_table->is_safepoint_safe()) { return false; } ! // We use max size ! SymbolTableHash* new_table = new SymbolTableHash(END_SIZE, END_SIZE, REHASH_LEN); // Use alt hash from now on _alt_hash = true; if (!_local_table->try_move_nodes_to(Thread::current(), new_table)) { _alt_hash = false; delete new_table;
< prev index next >