RFR: 8263002: Remove CDS MiscCode region [v2]
Ioi Lam
iklam at openjdk.java.net
Tue Mar 9 04:53:29 UTC 2021
On Mon, 8 Mar 2021 23:50:30 GMT, Coleen Phillimore <coleenp at openjdk.org> wrote:
>> Ioi Lam has updated the pull request incrementally with two additional commits since the last revision:
>>
>> - bumped CURRENT_CDS_ARCHIVE_VERSION by one since format has changed
>> - @coleenp review: remove temp debug code; fixed accounting of vtable sizes
>
> src/hotspot/share/memory/archiveBuilder.cpp line 831:
>
>> 829: if (STATIC_DUMP) {
>> 830: if (!_builder->is_in_buffer_space(*p)) {
>> 831: tty->print_cr("ohashii %p %p", p, *p);
>
> What is ohashii ? Should this be an assert? Or log_error instead of tty->print
This was debug code that I left behind by mistake. I've removed it.
> src/hotspot/share/memory/cppVtables.cpp line 218:
>
>> 216: assert(DumpSharedSpaces, "must");
>> 217: size_t vtptrs_bytes = _num_cloned_vtable_kinds * sizeof(CppVtableInfo*);
>> 218: _index = (CppVtableInfo**)ArchiveBuilder::current()->rw_region()->allocate(vtptrs_bytes);
>
> I thought these would be read-only?
The vtables contain function pointers and need to be updated at runtime to match the latest location of libjvm.so, so they need to be R/W.
> src/hotspot/share/memory/dumpAllocStats.cpp line 106:
>
>> 104:
>> 105: assert(all_ro_bytes == ro_all, "everything should have been counted");
>> 106: //assert(all_rw_bytes == rw_all, "everything should have been counted"); FIXME!
>
> ? Does this need to be fixed?
This is fixed in the latest version. I added accounting for the vtables.
-------------
PR: https://git.openjdk.java.net/jdk/pull/2861
More information about the hotspot-dev
mailing list