mirror of
https://github.com/openjdk/jdk.git
synced 2026-03-23 22:29:55 +00:00
8351778: JIT compiler fails when running -XX:AOTMode=create
Reviewed-by: shade, kvn, vlivanov
This commit is contained in:
parent
7fc776e2ac
commit
be36b23431
@ -67,12 +67,7 @@ inline bool symbol_equals_compact_hashtable_entry(Symbol* value, const char* key
|
||||
static OffsetCompactHashtable<
|
||||
const char*, Symbol*,
|
||||
symbol_equals_compact_hashtable_entry
|
||||
> _shared_table;
|
||||
|
||||
static OffsetCompactHashtable<
|
||||
const char*, Symbol*,
|
||||
symbol_equals_compact_hashtable_entry
|
||||
> _dynamic_shared_table;
|
||||
> _shared_table, _dynamic_shared_table, _shared_table_for_dumping;
|
||||
|
||||
// --------------------------------------------------------------------------
|
||||
|
||||
@ -708,29 +703,24 @@ void SymbolTable::copy_shared_symbol_table(GrowableArray<Symbol*>* symbols,
|
||||
void SymbolTable::write_to_archive(GrowableArray<Symbol*>* symbols) {
|
||||
CompactHashtableWriter writer(int(_items_count), ArchiveBuilder::symbol_stats());
|
||||
copy_shared_symbol_table(symbols, &writer);
|
||||
if (CDSConfig::is_dumping_static_archive()) {
|
||||
_shared_table.reset();
|
||||
writer.dump(&_shared_table, "symbol");
|
||||
} else {
|
||||
assert(CDSConfig::is_dumping_dynamic_archive(), "must be");
|
||||
_dynamic_shared_table.reset();
|
||||
writer.dump(&_dynamic_shared_table, "symbol");
|
||||
}
|
||||
_shared_table_for_dumping.reset();
|
||||
writer.dump(&_shared_table_for_dumping, "symbol");
|
||||
}
|
||||
|
||||
void SymbolTable::serialize_shared_table_header(SerializeClosure* soc,
|
||||
bool is_static_archive) {
|
||||
OffsetCompactHashtable<const char*, Symbol*, symbol_equals_compact_hashtable_entry> * table;
|
||||
if (is_static_archive) {
|
||||
table = &_shared_table;
|
||||
if (soc->reading()) {
|
||||
if (is_static_archive) {
|
||||
table = &_shared_table;
|
||||
} else {
|
||||
table = &_dynamic_shared_table;
|
||||
}
|
||||
} else {
|
||||
table = &_dynamic_shared_table;
|
||||
table = &_shared_table_for_dumping;
|
||||
}
|
||||
|
||||
table->serialize_header(soc);
|
||||
if (soc->writing()) {
|
||||
// Sanity. Make sure we don't use the shared table at dump time
|
||||
table->reset();
|
||||
}
|
||||
}
|
||||
#endif //INCLUDE_CDS
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user