RFR: 8309065: Move the logic to determine archive heap location from CDS to G1 GC [v3]
Thomas Stuefe
stuefe at openjdk.org
Wed Jun 7 14:45:06 UTC 2023
On Wed, 7 Jun 2023 14:28:54 GMT, Ashutosh Mehra <duke at openjdk.org> wrote:
>> src/hotspot/share/cds/filemap.cpp line 2124:
>>
>>> 2122:
>>> 2123: size_t word_size = size / HeapWordSize;
>>> 2124: address requested_start = heap_region_requested_address();
>>
>> Possibly for another RFE, if you intent to make this code move as verbatim as possible:
>>
>> This feels like something that should use `r->mapping_offset()` directly - would make the code easier to understand.
>
> Not sure I get this. Are you suggesting replacing `heap_region_requested_address` with `r->mapping_offset()`. But they are not the same, right?
Never mind, it is not important at all.
What I originally meant was: The requested address is calculated from information baked into the archive we are loading (original heap base and region offset), and we already have the archive in hand (`r`) and use it for subsequent operations, so we could calculate the requested address right here; but I was missing that heap_region_requested_address is called from several sites, so it makes sense to have this functionality in a utility function.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/14208#discussion_r1221724217
More information about the hotspot-dev
mailing list