mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-21 19:44:41 +02:00
8213346: Re-implement shared dictionary using CompactHashtable
Reviewed-by: jiangli
This commit is contained in:
parent
14b8e187e2
commit
147fc3ed13
31 changed files with 832 additions and 1049 deletions
|
@ -391,9 +391,7 @@ struct CopyKlassSubGraphInfoToArchive : StackObj {
|
|||
record->init(&info);
|
||||
|
||||
unsigned int hash = primitive_hash<Klass*>(klass);
|
||||
uintx deltax = MetaspaceShared::object_delta(record);
|
||||
guarantee(deltax <= MAX_SHARED_DELTA, "must not be");
|
||||
u4 delta = u4(deltax);
|
||||
u4 delta = MetaspaceShared::object_delta_u4(record);
|
||||
_writer->add(hash, delta);
|
||||
}
|
||||
return true; // keep on iterating
|
||||
|
@ -417,7 +415,7 @@ void HeapShared::write_subgraph_info_table() {
|
|||
int num_buckets = CompactHashtableWriter::default_num_buckets(d_table->_count);
|
||||
CompactHashtableWriter writer(num_buckets, &stats);
|
||||
CopyKlassSubGraphInfoToArchive copy(&writer);
|
||||
_dump_time_subgraph_info_table->iterate(©);
|
||||
d_table->iterate(©);
|
||||
|
||||
writer.dump(&_run_time_subgraph_info_table, "subgraphs");
|
||||
}
|
||||
|
@ -433,7 +431,7 @@ void HeapShared::initialize_from_archived_subgraph(Klass* k) {
|
|||
assert(!DumpSharedSpaces, "Should not be called with DumpSharedSpaces");
|
||||
|
||||
unsigned int hash = primitive_hash<Klass*>(k);
|
||||
ArchivedKlassSubGraphInfoRecord* record = _run_time_subgraph_info_table.lookup(k, hash, 0);
|
||||
const ArchivedKlassSubGraphInfoRecord* record = _run_time_subgraph_info_table.lookup(k, hash, 0);
|
||||
|
||||
// Initialize from archived data. Currently this is done only
|
||||
// during VM initialization time. No lock is needed.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue