mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-17 01:24:33 +02:00
8293293: Move archive heap loading code out of heapShared.cpp
Reviewed-by: erikj, coleenp
This commit is contained in:
parent
e1e67324c0
commit
ac05bc8605
18 changed files with 680 additions and 560 deletions
|
@ -24,8 +24,9 @@
|
|||
|
||||
#include "precompiled.hpp"
|
||||
#include "cds/archiveBuilder.hpp"
|
||||
#include "cds/archiveHeapLoader.inline.hpp"
|
||||
#include "cds/filemap.hpp"
|
||||
#include "cds/heapShared.inline.hpp"
|
||||
#include "cds/heapShared.hpp"
|
||||
#include "classfile/altHashing.hpp"
|
||||
#include "classfile/compactHashtable.hpp"
|
||||
#include "classfile/javaClasses.inline.hpp"
|
||||
|
@ -74,13 +75,13 @@ inline oop read_string_from_compact_hashtable(address base_address, u4 offset) {
|
|||
if (UseCompressedOops) {
|
||||
assert(sizeof(narrowOop) == sizeof(offset), "must be");
|
||||
narrowOop v = CompressedOops::narrow_oop_cast(offset);
|
||||
return HeapShared::decode_from_archive(v);
|
||||
return ArchiveHeapLoader::decode_from_archive(v);
|
||||
} else {
|
||||
intptr_t dumptime_oop = (uintptr_t)offset;
|
||||
assert(dumptime_oop != 0, "null strings cannot be interned");
|
||||
intptr_t runtime_oop = dumptime_oop +
|
||||
(intptr_t)FileMapInfo::current_info()->header()->heap_begin() +
|
||||
(intptr_t)HeapShared::runtime_delta();
|
||||
(intptr_t)ArchiveHeapLoader::runtime_delta();
|
||||
return (oop)cast_to_oop(runtime_oop);
|
||||
}
|
||||
}
|
||||
|
@ -831,7 +832,7 @@ void StringTable::serialize_shared_table_header(SerializeClosure* soc) {
|
|||
if (soc->writing()) {
|
||||
// Sanity. Make sure we don't use the shared table at dump time
|
||||
_shared_table.reset();
|
||||
} else if (!HeapShared::are_archived_strings_available()) {
|
||||
} else if (!ArchiveHeapLoader::are_archived_strings_available()) {
|
||||
_shared_table.reset();
|
||||
}
|
||||
|
||||
|
@ -861,7 +862,7 @@ public:
|
|||
// _shared_table invalid. Therefore, we proactively copy all the shared
|
||||
// strings into the _local_table, which can deal with oop relocation.
|
||||
void StringTable::transfer_shared_strings_to_local_table() {
|
||||
assert(HeapShared::is_loaded(), "must be");
|
||||
assert(ArchiveHeapLoader::is_loaded(), "must be");
|
||||
EXCEPTION_MARK;
|
||||
|
||||
// Reset _shared_table so that during the transfer, StringTable::intern()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue