RFR: 8338912: CDS: Segmented roots array [v4]
Aleksey Shipilev
shade at openjdk.org
Mon Sep 9 11:13:06 UTC 2024
On Fri, 6 Sep 2024 17:37:01 GMT, Ioi Lam <iklam at openjdk.org> wrote:
>> Aleksey Shipilev has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Amend printout as well
>
> src/hotspot/share/cds/archiveHeapWriter.cpp line 629:
>
>> 627: if (UseCompressedOops) {
>> 628: for (int i = 0; i < length; i++) {
>> 629: narrowOop* addr = (narrowOop*)(buffered_obj + requested_obj->obj_at_offset<narrowOop>(i));
>
> I know this matches the old code, but I think it will be easier to read if we use this:
>
>
> narrowOop* addr = (narrowOop*)(buffered_obj + buffered_obj->obj_at_offset<narrowOop>(i));
`buffered_obj` is just an `address`, so we cannot reach for oop array methods. But I notice that `obj_at_offset` is actually a static method, so we might as well call it as `objArrayOopDesc::obj_at_offset`. Doing this in new commit.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/20858#discussion_r1750059335
More information about the hotspot-runtime-dev
mailing list