RFR: 8358586: ZGC: Combine ZAllocator and ZObjectAllocator [v10]

Joel Sikström jsikstro at openjdk.org
Thu Jun 26 07:32:58 UTC 2025


On Thu, 26 Jun 2025 06:14:07 GMT, Stefan Karlsson <stefank at openjdk.org> wrote:

>> Joel Sikström has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Add template spacing and remove extra semicolon
>
> src/hotspot/share/gc/z/zObjectAllocator.cpp line 207:
> 
>> 205:   : _allocators() {
>> 206: 
>> 207:   for (ZPageAge age : ZPageAgeRange()) {
> 
> Could this be using `ZPageAgeRangeAll`?

I remember we discussed a `ZPageAgeRangeAll`, but it's not in the code right now. I agree that it becomes clearer that we're iterating over *all* ages with a `ZPageRangeAll` instead of `ZPageAgeRange()`.

constexpr ZPageAgeRange ZPageAgeRangeAll = ZPageAgeRange();


I don't have anything against adding `ZPageAgeRangeAll` and replacing all the other usages of `ZPageRange()` in this patch, but we could also do that in a follow up.

The other usages:

src/hotspot/share/gc/z/zRelocationSetSelector.cpp
243:  for (ZPageAge age : ZPageAgeRange()) {

src/hotspot/share/gc/z/zStat.cpp
1503:  for (ZPageAge age : ZPageAgeRange()) {
1564:  for (ZPageAge age : ZPageAgeRange()) {
1793:  for (ZPageAge age : ZPageAgeRange()) {

src/hotspot/share/gc/z/zRelocationSetSelector.inline.hpp
192:  for (ZPageAge age : ZPageAgeRange()) {
200:  for (ZPageAge age : ZPageAgeRange()) {
208:  for (ZPageAge age : ZPageAgeRange()) {

src/hotspot/share/gc/z/zGeneration.cpp
703:  for (ZPageAge age : ZPageAgeRange()) {

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

PR Review Comment: https://git.openjdk.org/jdk/pull/25693#discussion_r2168375730


More information about the hotspot-gc-dev mailing list