RFR: 8272725: G1: replace type needs_remset_update_t with bool
Thomas Schatzl
tschatzl at openjdk.java.net
Fri Aug 20 08:23:21 UTC 2021
On Thu, 19 Aug 2021 15:12:45 GMT, Albert Mingkun Yang <ayang at openjdk.org> wrote:
> Simple type change in `struct G1HeapRegionAttr`.
>
> Test: hotspot_gc
The use of `uint8_t` in this case is intentional to have control of the size of the table, keeping it small and access time fairly small to minimize cache pollution. The size of `bool` is not defined in C++ after all. This could "waste" a lot of (cache) space.
When `G1HeapRegionAttr` has been introduced there has been a related performance issue with SPARC where this mattered which is gone now - I do not remember x64/x86 being particularly affected, but idk impact on the "new" ARM64 platform.
Anyway, it seems better to me to make sure that in this case we keep the size of the heap region attr controlled. It's being accessed for literally every reference multiple times.
-------------
PR: https://git.openjdk.java.net/jdk/pull/5188
More information about the hotspot-gc-dev
mailing list