Integrated: 8255234: ZGC: Bulk allocate forwarding data structures

Per Liden pliden at openjdk.java.net
Wed Oct 28 09:03:21 UTC 2020


On Thu, 22 Oct 2020 12:02:19 GMT, Per Liden <pliden at openjdk.org> wrote:

> 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).

This pull request has now been integrated.

Changeset: 2c9dfc73
Author:    Per Liden <pliden at openjdk.org>
URL:       https://git.openjdk.java.net/jdk/commit/2c9dfc73
Stats:     314 lines in 16 files changed: 246 ins; 31 del; 37 mod

8255234: ZGC: Bulk allocate forwarding data structures

Co-authored-by: Albert Mingkun Yang <ayang at openjdk.org>
Co-authored-by: Per Liden <pliden at openjdk.org>
Reviewed-by: ayang, stefank

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

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



More information about the hotspot-gc-dev mailing list