RFR: 8296155: Simplify CDS heap region address calculation

Matias Saavedra Silva matsaave at openjdk.org
Tue Nov 1 22:17:05 UTC 2022


On Mon, 31 Oct 2022 22:54:24 GMT, Ioi Lam <iklam at openjdk.org> wrote:

> Rewrite and simplify the convoluted logic used to calculate the runtime location of a CDS heap region. Now it's as simple as:
> 
> 
> FileMapRegion::dumptime_base() + ArchiveHeapLoader::runtime_delta();
> 
> 
> See `FileMapInfo::heap_region_runtime_start_address` for an example.
> 
> Also removed dead code:
> 
> - `FileMapInfo::is_in_shared_region`
> - `MetaspaceShared::is_in_shared_region`
> - `FileMapInfo::stop_sharing_and_unmap`

It seems much cleaner and a bit more intuitive now. The removal of dead code is very nice as well. Looks good to me!

-------------

Marked as reviewed by matsaave (Author).

PR: https://git.openjdk.org/jdk/pull/10923


More information about the hotspot-runtime-dev mailing list