RFR: 8311604: Simplify NOCOOPS requested addresses for archived heap objects [v4]

Ioi Lam iklam at openjdk.org
Sun Jul 9 04:25:26 UTC 2023


> This PR attempts to clean up some of the cruds in the existing code:
> 
> - Simplified the calculation of "requested address" when `UseCompressedOops` is disabled -- the archived heap objects are always written starting from 0x10000000
> - Removed `HeapShared::to_requested_address()` so we don't have two kinds of "requested address"
> - Updated the comments about "source" vs "buffered" vs "requested" addresses in archiveHeapWriter.hpp
> - Removed `SerializeClosure::oop()` as the only oop we need to store into the archive header is `HeapShared::roots()`, which can be handled more easily with `FileMapHeader::_heap_roots_offset`
> - Removed some unnecessary dependencies on `G1CollectedHeap::heap()->reserved()`
> 
> Also:
> - Moved SerializeClosure to its own header file to improve build time.
> - Fixed DeterministicDump.java, which wasn't archiving Java objects when  `UseCompressedOops` was disabled.

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 five additional commits since the last revision:

 - Merge branch 'master' into 8311604-simplify-nocoops-requested-addr-for-archived-heap
 - @calvinccheung review: print heap_roots_offset
 - @calvinccheung review: fixed include guard in headers; fixed misaligned line escapes in cds_globals.hpp
 - @ashu-mehra review; updated source code comments
 - 8311604: Simplify NOCOOPS requested addresses for archived heap objects

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/14792/files
  - new: https://git.openjdk.org/jdk/pull/14792/files/7f37fd2b..d1b56a2a

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=14792&range=03
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=14792&range=02-03

  Stats: 2826 lines in 55 files changed: 1410 ins; 1080 del; 336 mod
  Patch: https://git.openjdk.org/jdk/pull/14792.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/14792/head:pull/14792

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


More information about the hotspot-dev mailing list