Skip to content

Commit f788834

Browse files
author
Ivan Walulya
committed
8277786: G1: Rename log2_card_region_per_heap_region used in G1CardSet
Reviewed-by: ayang, tschatzl, mli
1 parent 3034ae8 commit f788834

File tree

3 files changed

+13
-13
lines changed

3 files changed

+13
-13
lines changed

src/hotspot/share/gc/g1/g1CardSet.cpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -45,14 +45,14 @@
4545
G1CardSet::CardSetPtr G1CardSet::FullCardSet = (G1CardSet::CardSetPtr)-1;
4646

4747
static uint default_log2_card_region_per_region() {
48-
uint log2_card_region_per_heap_region = 0;
48+
uint log2_card_regions_per_heap_region = 0;
4949

5050
const uint card_container_limit = G1CardSetContainer::LogCardsPerRegionLimit;
5151
if (card_container_limit < (uint)HeapRegion::LogCardsPerRegion) {
52-
log2_card_region_per_heap_region = (uint)HeapRegion::LogCardsPerRegion - card_container_limit;
52+
log2_card_regions_per_heap_region = (uint)HeapRegion::LogCardsPerRegion - card_container_limit;
5353
}
5454

55-
return log2_card_region_per_heap_region;
55+
return log2_card_regions_per_heap_region;
5656
}
5757

5858
G1CardSetConfiguration::G1CardSetConfiguration() :
@@ -64,7 +64,7 @@ G1CardSetConfiguration::G1CardSetConfiguration() :
6464
(uint)HeapRegion::CardsPerRegion, /* max_cards_in_cardset */
6565
default_log2_card_region_per_region()) /* log2_card_region_per_region */
6666
{
67-
assert((_log2_card_region_per_heap_region + _log2_cards_per_card_region) == (uint)HeapRegion::LogCardsPerRegion,
67+
assert((_log2_card_regions_per_heap_region + _log2_cards_per_card_region) == (uint)HeapRegion::LogCardsPerRegion,
6868
"inconsistent heap region virtualization setup");
6969
}
7070

@@ -91,7 +91,7 @@ G1CardSetConfiguration::G1CardSetConfiguration(uint inline_ptr_bits_per_card,
9191
uint num_buckets_in_howl,
9292
double cards_in_howl_threshold_percent,
9393
uint max_cards_in_card_set,
94-
uint log2_card_region_per_heap_region) :
94+
uint log2_card_regions_per_heap_region) :
9595
_inline_ptr_bits_per_card(inline_ptr_bits_per_card),
9696
_num_cards_in_array(num_cards_in_array),
9797
_num_buckets_in_howl(num_buckets_in_howl),
@@ -101,8 +101,8 @@ G1CardSetConfiguration::G1CardSetConfiguration(uint inline_ptr_bits_per_card,
101101
_cards_in_howl_bitmap_threshold(_num_cards_in_howl_bitmap * cards_in_bitmap_threshold_percent),
102102
_log2_num_cards_in_howl_bitmap(log2i_exact(_num_cards_in_howl_bitmap)),
103103
_bitmap_hash_mask(~(~(0) << _log2_num_cards_in_howl_bitmap)),
104-
_log2_card_region_per_heap_region(log2_card_region_per_heap_region),
105-
_log2_cards_per_card_region(log2i_exact(_max_cards_in_card_set) - _log2_card_region_per_heap_region) {
104+
_log2_card_regions_per_heap_region(log2_card_regions_per_heap_region),
105+
_log2_cards_per_card_region(log2i_exact(_max_cards_in_card_set) - _log2_card_regions_per_heap_region) {
106106

107107
assert(is_power_of_2(_max_cards_in_card_set),
108108
"max_cards_in_card_set must be a power of 2: %u", _max_cards_in_card_set);
@@ -134,7 +134,7 @@ void G1CardSetConfiguration::log_configuration() {
134134
num_cards_in_array(), G1CardSetArray::size_in_bytes(num_cards_in_array()),
135135
num_buckets_in_howl(), cards_in_howl_threshold(),
136136
num_cards_in_howl_bitmap(), G1CardSetBitMap::size_in_bytes(num_cards_in_howl_bitmap()), cards_in_howl_bitmap_threshold(),
137-
(uint)1 << log2_card_region_per_heap_region(),
137+
(uint)1 << log2_card_regions_per_heap_region(),
138138
(uint)1 << log2_cards_per_card_region());
139139
}
140140

src/hotspot/share/gc/g1/g1CardSet.hpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ class G1CardSetConfiguration {
5858
uint _cards_in_howl_bitmap_threshold;
5959
uint _log2_num_cards_in_howl_bitmap;
6060
size_t _bitmap_hash_mask;
61-
uint _log2_card_region_per_heap_region;
61+
uint _log2_card_regions_per_heap_region;
6262
uint _log2_cards_per_card_region;
6363

6464
G1CardSetAllocOptions* _card_set_alloc_options;
@@ -69,7 +69,7 @@ class G1CardSetConfiguration {
6969
uint num_buckets_in_howl,
7070
double cards_in_howl_threshold_percent,
7171
uint max_cards_in_card_set,
72-
uint log2_card_region_per_heap_region);
72+
uint log2_card_regions_per_heap_region);
7373
void init_card_set_alloc_options();
7474

7575
void log_configuration();
@@ -127,8 +127,8 @@ class G1CardSetConfiguration {
127127
// The next two members give information about how many card regions are there
128128
// per area (heap region) and how many cards each card region has.
129129

130-
// The log2 of the amount of card regions per heap region configured.
131-
uint log2_card_region_per_heap_region() const { return _log2_card_region_per_heap_region; }
130+
// The log2 of the number of card regions per heap region configured.
131+
uint log2_card_regions_per_heap_region() const { return _log2_card_regions_per_heap_region; }
132132
// The log2 of the number of cards per card region. This is calculated from max_cards_in_region()
133133
// and above.
134134
uint log2_cards_per_card_region() const { return _log2_cards_per_card_region; }

src/hotspot/share/gc/g1/heapRegionRemSet.inline.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ template <class CardOrRangeVisitor>
110110
inline void HeapRegionRemSet::iterate_for_merge(CardOrRangeVisitor& cl) {
111111
G1HeapRegionRemSetMergeCardClosure<CardOrRangeVisitor, G1ContainerCardsOrRanges> cl2(&_card_set,
112112
cl,
113-
_card_set.config()->log2_card_region_per_heap_region(),
113+
_card_set.config()->log2_card_regions_per_heap_region(),
114114
_card_set.config()->log2_cards_per_card_region());
115115
_card_set.iterate_containers(&cl2, true /* at_safepoint */);
116116
}

0 commit comments

Comments
 (0)