[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openjdk-hotspot-runtime-dev
Subject:    Integrated: 8297290: Use int indices to reference CDS archived primitive mirrors
From:       Ioi Lam <iklam () openjdk ! org>
Date:       2022-11-30 5:38:20
Message-ID: Gbgiu_QLXUT0xxhGjHfJHcELkfDWU7pdk_NmAZXFwVM=.cacb0d6e-e941-4039-978e-9a8a7f7b7915 () github ! com
[Download RAW message or body]

On Mon, 21 Nov 2022 05:45:42 GMT, Ioi Lam <iklam@openjdk.org> wrote:

> In CDS, when archived class metadata reference an object in the archive heap, it's \
> usually done using an integer index, which can be passed to \
> `HeapShared::get_root(int)` to retrieve the object. This way, we don't need to \
> worry if the archive heap has been relocated. E.g., 
> 
> oop Klass::archived_java_mirror() {
> assert(has_archived_mirror_index(), "must have archived mirror");
> return HeapShared::get_root(_archived_mirror_index);
> }
> 
> However, for the primitive mirror objects (in `Universe::_mirrors[]`, which point \
> to the `java.lang.Class` instances of the Java primitive types such as `int`, \
> `float`, etc), we are still using a direct oop reference. 
> For consistency, we should change this code to use the same int indices as the rest \
> of the system. This will also make it simpler to optimize the layout of the CDS \
> archive heap (e.g., in [JDK-8234679](https://bugs.openjdk.org/browse/JDK-8234679)). \
>                 
> Testing: passed tiers 1-4

This pull request has now been integrated.

Changeset: c7a679fb
Author:    Ioi Lam <iklam@openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/c7a679fbdd7c775cdb931a560b498a17b9828f63
                
Stats:     95 lines in 6 files changed: 44 ins; 20 del; 31 mod

8297290: Use int indices to reference CDS archived primitive mirrors

Reviewed-by: ccheung

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

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


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic