RFR: 8290833: Remove ConstantPoolCache::walk_entries_for_initialization() [v4]
Ioi Lam
iklam at openjdk.org
Thu Aug 11 04:33:58 UTC 2022
On Wed, 10 Aug 2022 20:07:14 GMT, Coleen Phillimore <coleenp at openjdk.org> wrote:
>> Ioi Lam has updated the pull request incrementally with one additional commit since the last revision:
>>
>> @coleenp review comments; added asserts
>
> src/hotspot/share/cds/archiveBuilder.hpp line 203:
>
>> 201: SourceObjList _ro_src_objs; // objs to put in ro region
>> 202: ResizeableResourceHashtable<address, SourceObjInfo, ResourceObj::C_HEAP, mtClassShared> _src_obj_table;
>> 203: ResizeableResourceHashtable<address, address, ResourceObj::C_HEAP, mtClassShared> _dumped_to_src_obj_table;
>
> I was trying to sort out these tables. Can you have a comment above these tables what they are mapping? The names are somewhat opaque.
I think people will first reach these functions when reading the code, so I added some comments there:
// + When creating a CDS archive, we first load Java classes and create metadata
// objects as usual. These are call "source" objects.
// + We then copy the source objects into the output buffer at "dumped addrsses".
//
// The following functions translate between these two (non-overlapping) spaces.
// (The API should be renamed to be less confusing!)
address get_dumped_addr(address src_obj) const;
address get_src_obj(address dumped_addr) const;
I have filed an RFE [JDK-8292225](https://bugs.openjdk.org/browse/JDK-8292225) to clean up the names to make the core easier to understand.
-------------
PR: https://git.openjdk.org/jdk/pull/9759
More information about the hotspot-runtime-dev
mailing list