RFR: 8291912: Introduce per-allocation target struct for members in G1PLABAllocator

Stefan Johansson sjohanss at openjdk.org
Mon Sep 12 10:50:50 UTC 2022


On Mon, 22 Aug 2022 09:27:13 GMT, Thomas Schatzl <tschatzl at openjdk.org> wrote:

> Hi all,
> 
>   can I get reviews for this change that refactors the many per-destination arrays in PLABAllocator into an array of struct as I promised in the review for [JDK-8288966](https://bugs.openjdk.org/browse/JDK-8288966)/https://github.com/openjdk/jdk/pull/9726? I think that makes the code easier to follow since there is less clutter.
> 
> Testing: tier1-5, no performance differences
> 
> Thanks,
> Thomas

Refactoring looks good, minor naming suggestion that you can do with as you like.

src/hotspot/share/gc/g1/g1Allocator.hpp line 185:

> 183:     void notify_plab_refill(size_t tolerated_refills, size_t next_plab_size);
> 184: 
> 185:   } _data[G1HeapRegionAttr::Num];

What do you think about calling the struct just `PLABData` and the member `_destination_data`?

I think that would read a bit better where used.

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

Marked as reviewed by sjohanss (Reviewer).

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



More information about the hotspot-gc-dev mailing list