Integrated: 8279500: Remove FileMapHeader::_heap_obj_roots
Ioi Lam
iklam at openjdk.java.net
Fri Jan 7 18:41:33 UTC 2022
On Wed, 5 Jan 2022 22:29:33 GMT, Ioi Lam <iklam at openjdk.org> wrote:
> `FileMapHeader::_heap_obj_roots` is an `narrowOop` that's used to remember the `objArray` that stores all the roots of archived heap objects. Reading/writing of this field requires some ad-hoc code in many places.
>
> There's already a standard way of reading/writing oops in the CDS archive -- `SerializeClosure::do_oop()`. See here for an example:
>
> - https://github.com/iklam/jdk/blame/ad1dc9c2ae5463363aff20072a3f2ca4ea23acd2/src/hotspot/share/memory/universe.cpp#L243
>
> We should use the same pattern in `HeapShared.seralize()` to write/restore `HeapShared::_roots`. That way we can remove `FileMapHeader::_heap_obj_roots` and the associated ad-hoc code.
This pull request has now been integrated.
Changeset: d47af74e
Author: Ioi Lam <iklam at openjdk.org>
URL: https://git.openjdk.java.net/jdk/commit/d47af74e4c98c9fc4aef537c6d8eeb66a1621586
Stats: 44 lines in 6 files changed: 16 ins; 18 del; 10 mod
8279500: Remove FileMapHeader::_heap_obj_roots
Reviewed-by: minqi, ccheung
-------------
PR: https://git.openjdk.java.net/jdk/pull/6973
More information about the hotspot-runtime-dev
mailing list