RFR: 8298610: Refactor archiving of ConstantPool::resolved_references()

David Holmes dholmes at openjdk.org
Thu Jan 19 07:29:32 UTC 2023


On Thu, 19 Jan 2023 00:44:11 GMT, Ioi Lam <iklam at openjdk.org> wrote:

>> src/hotspot/share/cds/heapShared.cpp line 298:
>> 
>>> 296:   assert(UseG1GC, "implementation limitation");
>>> 297:   size_t sz = align_up(o->size() * HeapWordSize, ObjectAlignmentInBytes);
>>> 298:   size_t max = /*G1*/HeapRegion::min_region_size_in_words() * HeapWordSize;
>> 
>> This code needs to be inside an `INCLUDE_G1GC` guard does it not?
>
> This code is inside `#if INCLUDE_CDS_JAVA_HEAP`, which is enabled only if `INCLUDE_G1GC` is defined.
> 
> We have other code within `INCLUDE_CDS_JAVA_HEAP` that unconditionally access G1 APIs. These will be fixed when we remove all dependencies of G1 from the CDS heap dumping code (see [JDK-8296344](https://bugs.openjdk.org/browse/JDK-8296344) )

I see - thanks.

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

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


More information about the hotspot-runtime-dev mailing list