8220366: Optimize Symbol handling in ClassVerifier and SignatureStream

Reviewed-by: hseigel, coleenp, lfoltan
This commit is contained in:
Claes Redestad 2019-03-14 18:56:25 +01:00
parent 9635954e6e
commit 4bfd3db2e0
8 changed files with 132 additions and 80 deletions

View file

@ -487,8 +487,8 @@ Symbol* SymbolTable::new_permanent_symbol(const char* name, TRAPS) {
if (sym == NULL) {
sym = SymbolTable::the_table()->do_add_if_needed(name, len, hash, false, CHECK_NULL);
}
if (sym->refcount() != PERM_REFCOUNT) {
sym->increment_refcount();
if (!sym->is_permanent()) {
sym->make_permanent();
log_trace_symboltable_helper(sym, "Asked for a permanent symbol, but got a regular one");
}
return sym;