RFR: 8255234: ZGC: Bulk allocate forwarding data structures [v3]

Per Liden pliden at openjdk.java.net
Tue Oct 27 10:44:41 UTC 2020


> Allocation of forwarding data structures (ZForwarding/ZForwardingEntry instances) can generate a lot of calls to new/malloc if the number of pages in the relocation set is large. This can make the "Concurrent Select Relocation Set" phase long. By bulk allocating a single piece of memory and then placement new() all objects into that memory we can speed this phase up quite a bit.
> 
> During relocation set selection we keep track of the number of ZForwardingEntry instances we will need for the selected relocation set. The ZForwardingAllocator is then initialized to have enough room for all the relocation set array, all ZForwarding instances, and all ZForwardingEntry instances. Objects are then placement new()'d using into the memory allocated by the ZForwardingAllocator.
> 
> This patch was joint work with Albert (ayang).

Per Liden has updated the pull request incrementally with one additional commit since the last revision:

  Assert that all allocated memory is used

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

Changes:
  - all: https://git.openjdk.java.net/jdk/pull/804/files
  - new: https://git.openjdk.java.net/jdk/pull/804/files/ced555a7..0cb3a80c

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=804&range=02
 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=804&range=01-02

  Stats: 9 lines in 3 files changed: 9 ins; 0 del; 0 mod
  Patch: https://git.openjdk.java.net/jdk/pull/804.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/804/head:pull/804

PR: https://git.openjdk.java.net/jdk/pull/804



More information about the hotspot-gc-dev mailing list