Integrated: 8298612: Refactor archiving of java String objects

Ioi Lam iklam at openjdk.org
Sun Jan 29 22:03:24 UTC 2023


On Tue, 24 Jan 2023 21:46:12 GMT, Ioi Lam <iklam at openjdk.org> wrote:

> This is the last prerequisite PR for [JDK-8296344](https://bugs.openjdk.org/browse/JDK-8296344) (Remove dependency on G1 for writing the CDS archive heap).
> 
> The old `StringTable::write_to_archive()` violates requirements [1] and [2] as stated in [JDK-8298600](https://bugs.openjdk.org/browse/JDK-8298600).
> 
> In the new implementation, copying of strings into the archive has been moved inside of heapShared.cpp. Now we no longer expose the `HeapShared::archive_object()` API. This addresses requirement [1].
> 
> Also, we no longer hand-assemble the String object and its internal `value` array. Instead, we use `HeapShared::archive_reachable_objects_from` to recursively copy the `value`.  This addresses requirement [2].
> 
> Test: tiers 1-4.

This pull request has now been integrated.

Changeset: 1ff4646e
Author:    Ioi Lam <iklam at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/1ff4646ed5f64a786a2f2688529e13d6d9f47fa3
Stats:     75 lines in 4 files changed: 27 ins; 30 del; 18 mod

8298612: Refactor archiving of java String objects

Reviewed-by: ccheung

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

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


More information about the hotspot-runtime-dev mailing list