8245264: Test runtime/cds/appcds/SignedJar.java fails

Concurrent work of symbol table caused _shared_table not walkable in dumping archive which led symbols not sorted in shared archive. Change to use do_safepoint_scan of _local_table to collect symbols.

Reviewed-by: iklam, ccheung
This commit is contained in:
Yumin Qi 2020-05-27 16:04:28 -07:00
parent 7e85b2c787
commit e6855f20b0
4 changed files with 5 additions and 5 deletions

View file

@ -269,6 +269,7 @@ public:
// Call function for all symbols in the symbol table.
void SymbolTable::symbols_do(SymbolClosure *cl) {
assert(SafepointSynchronize::is_at_safepoint(), "Must be at safepoint");
// all symbols from shared table
SharedSymbolIterator iter(cl);
_shared_table.iterate(&iter);
@ -276,9 +277,7 @@ void SymbolTable::symbols_do(SymbolClosure *cl) {
// 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");
}
_local_table->do_safepoint_scan(sd);
}
class MetaspacePointersDo : StackObj {