mirror of
https://github.com/openjdk/jdk.git
synced 2026-06-11 21:15:16 +00:00
8386247
Hi all, please review this trivial fix to rename the `G1CollectionSet::cur_length()` accessor to mirror the member name - change the old `regions_cur_length()` to something more descriptive. Testing: gha, local compilation Thanks, Thomas
This commit is contained in:
parent
2e364c3a06
commit
5dee3118ed
@ -182,7 +182,7 @@ void G1CollectionSet::iterate(G1HeapRegionClosure* cl) const {
|
||||
void G1CollectionSet::par_iterate(G1HeapRegionClosure* cl,
|
||||
G1HeapRegionClaimer* hr_claimer,
|
||||
uint worker_id) const {
|
||||
iterate_part_from(cl, hr_claimer, 0, cur_length(), worker_id);
|
||||
iterate_part_from(cl, hr_claimer, 0, regions_cur_length(), worker_id);
|
||||
}
|
||||
|
||||
void G1CollectionSet::iterate_optional(G1HeapRegionClosure* cl) const {
|
||||
@ -197,7 +197,7 @@ void G1CollectionSet::iterate_optional(G1HeapRegionClosure* cl) const {
|
||||
void G1CollectionSet::iterate_incremental_part_from(G1HeapRegionClosure* cl,
|
||||
G1HeapRegionClaimer* hr_claimer,
|
||||
uint worker_id) const {
|
||||
iterate_part_from(cl, hr_claimer, _regions_inc_part_start, regions_cur_length(), worker_id);
|
||||
iterate_part_from(cl, hr_claimer, _regions_inc_part_start, regions_cur_increment_length(), worker_id);
|
||||
}
|
||||
|
||||
void G1CollectionSet::iterate_part_from(G1HeapRegionClosure* cl,
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -283,9 +283,9 @@ public:
|
||||
void iterate_incremental_part_from(G1HeapRegionClosure* cl, G1HeapRegionClaimer* hr_claimer, uint worker_id) const;
|
||||
|
||||
// Returns the length of the current increment in number of regions.
|
||||
size_t regions_cur_length() const { return _regions_cur_length - _regions_inc_part_start; }
|
||||
size_t regions_cur_increment_length() const { return _regions_cur_length - _regions_inc_part_start; }
|
||||
// Returns the length of the whole current collection set in number of regions
|
||||
size_t cur_length() const { return _regions_cur_length; }
|
||||
size_t regions_cur_length() const { return _regions_cur_length; }
|
||||
|
||||
// Iterate over the entire collection set (all increments calculated so far), applying
|
||||
// the given G1HeapRegionClosure on all of the regions.
|
||||
|
||||
@ -56,7 +56,7 @@ G1YoungGCAllocationFailureInjector::G1YoungGCAllocationFailureInjector()
|
||||
void G1YoungGCAllocationFailureInjector::select_allocation_failure_regions() {
|
||||
G1CollectedHeap* g1h = G1CollectedHeap::heap();
|
||||
_allocation_failure_regions.reinitialize(g1h->max_num_regions());
|
||||
SelectAllocationFailureRegionClosure closure(_allocation_failure_regions, g1h->collection_set()->cur_length());
|
||||
SelectAllocationFailureRegionClosure closure(_allocation_failure_regions, g1h->collection_set()->regions_cur_length());
|
||||
g1h->collection_set_iterate_all(&closure);
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user