RFR: 8279500: Remove FileMapHeader::_heap_obj_roots [v2]
Ioi Lam
iklam at openjdk.java.net
Fri Jan 7 18:21:11 UTC 2022
> `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.
Ioi Lam has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains two additional commits since the last revision:
- Merge branch 'master' of https://github.com/openjdk/jdk into 8279500-remove-filemapheader-heap_obj_roots
- 8279500: Remove FileMapHeader::_heap_obj_roots
-------------
Changes:
- all: https://git.openjdk.java.net/jdk/pull/6973/files
- new: https://git.openjdk.java.net/jdk/pull/6973/files/ca3210a4..59e98243
Webrevs:
- full: https://webrevs.openjdk.java.net/?repo=jdk&pr=6973&range=01
- incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=6973&range=00-01
Stats: 3481 lines in 76 files changed: 3153 ins; 144 del; 184 mod
Patch: https://git.openjdk.java.net/jdk/pull/6973.diff
Fetch: git fetch https://git.openjdk.java.net/jdk pull/6973/head:pull/6973
PR: https://git.openjdk.java.net/jdk/pull/6973
More information about the hotspot-runtime-dev
mailing list