RFR: 8250989: Consolidate buffer allocation code for CDS static/dynamic dumping [v2]
Ioi Lam
iklam at openjdk.java.net
Tue Feb 2 00:14:00 UTC 2021
On Mon, 1 Feb 2021 18:41:36 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:
>> Ioi Lam has updated the pull request incrementally with one additional commit since the last revision:
>>
>> @calvinccheung and @tstuefe comments
>
> src/hotspot/share/memory/metaspaceShared.cpp line 283:
>
>> 281: _extra_symbols->append(SymbolTable::new_permanent_symbol(utf8_buffer));
>> 282: } else{
>> 283: assert(prefix_type == HashtableTextDump::StringPrefix, "Sanity");
>
> So this whole comment is wrong now and obsolete?
Yes, most of the work done under the old function `MetaspaceShared::initialize_dumptime_shared_and_meta_spaces()` are now unnecessary. Specifically, it doesn't initialize the "shared space" or "meta space" anymore. That's why I renamed it to `MetaspaceShared::initialize_for_static_dump()`.
Now it only does the following:
- reset `SharedBaseAddress` if too high
- reserve `_symbol_rs`
===============
BTW, I have added comments at the top of archiveBuilder.hpp to give an overview of how the memory is reserved and relocated during the dump process.
-------------
PR: https://git.openjdk.java.net/jdk/pull/2296
More information about the hotspot-runtime-dev
mailing list